Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonah Graham2018-11-20 16:20:39 -0500
committerJonah Graham2018-11-20 16:20:39 -0500
commit48d2271a58a68743e428d3096d2bca054d04e310 (patch)
tree235ba23e71c393ad22d1d57fc8fdfec14754c4ee
parent3cf0297769e5cfb91823e93ce570120a75fe01ce (diff)
downloadorg.eclipse.cdt-48d2271a58a68743e428d3096d2bca054d04e310.tar.gz
org.eclipse.cdt-48d2271a58a68743e428d3096d2bca054d04e310.tar.xz
org.eclipse.cdt-48d2271a58a68743e428d3096d2bca054d04e310.zip
Bug 540373: Normalize newlines with .gitattributes
There is also a new script to verify completeness of .gitattributes: releng/scripts/verify_gitattributes.sh Change-Id: I2ce270852ab54b66b6c474a6ec94203fe5bba78b
-rw-r--r--.gitattributes142
-rw-r--r--build/org.eclipse.cdt.autotools.core/.settings/org.eclipse.jdt.core.prefs200
-rw-r--r--build/org.eclipse.cdt.autotools.tests/.settings/org.eclipse.jdt.core.prefs202
-rw-r--r--build/org.eclipse.cdt.build.gcc.core/src/org/eclipse/cdt/build/gcc/core/ClangToolChain.java72
-rw-r--r--build/org.eclipse.cdt.build.gcc.core/src/org/eclipse/cdt/build/gcc/core/internal/Msys2ToolChainProvider.java252
-rw-r--r--build/org.eclipse.cdt.build.gcc.ui/src/org/eclipse/cdt/build/gcc/ui/internal/Messages.java112
-rw-r--r--build/org.eclipse.cdt.build.gcc.ui/src/org/eclipse/cdt/build/gcc/ui/internal/NewClangToolChainWizard.java150
-rw-r--r--build/org.eclipse.cdt.build.gcc.ui/src/org/eclipse/cdt/build/gcc/ui/internal/messages.properties84
-rw-r--r--build/org.eclipse.cdt.core.autotools-feature/feature.xml72
-rw-r--r--build/org.eclipse.cdt.gnu.build-feature/feature.xml86
-rw-r--r--build/org.eclipse.cdt.make.core/schema/MakeTargetBuilder.exsd218
-rw-r--r--build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/core/MakefileBuildConfigurationProvider.java148
-rw-r--r--build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/core/MakefileProjectGenerator.java178
-rw-r--r--build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig2/GCCSpecsRunSIProvider.java186
-rw-r--r--build/org.eclipse.cdt.make.core/templates/simple/Makefile50
-rw-r--r--build/org.eclipse.cdt.make.ui.tests/.classpath14
-rw-r--r--build/org.eclipse.cdt.make.ui.tests/build.properties12
-rw-r--r--build/org.eclipse.cdt.make.ui.tests/src/org/eclipse/cdt/make/ui/tests/AutomatedIntegrationSuite.java40
-rw-r--r--build/org.eclipse.cdt.make.ui.tests/src/org/eclipse/cdt/make/ui/tests/MakeUIImagesTest.java236
-rw-r--r--build/org.eclipse.cdt.make.ui.tests/src/org/eclipse/cdt/make/ui/tests/MakeUITestBase.java126
-rw-r--r--build/org.eclipse.cdt.make.ui.tests/src/org/eclipse/cdt/make/ui/tests/MakeUITestsPlugin.java106
-rw-r--r--build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/MakeBuildSettingsTab.java428
-rw-r--r--build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/Messages.java42
-rw-r--r--build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/messages.properties14
-rw-r--r--build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/wizards/NewMakefileProjectWizard.java156
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/ManagedBuildDependencyLibsTests.java586
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/test_commands4
-rw-r--r--build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/internal/ui/language/settings/providers/ScannerDiscoveryConsole.java78
-rw-r--r--build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/internal/ui/language/settings/providers/ScannerDiscoveryGlobalConsole.java234
-rw-r--r--codan/org.eclipse.cdt.codan.checkers.ui/src/org/eclipse/cdt/codan/internal/checkers/ui/quickfix/CaseBreakQuickFixBreak.java88
-rw-r--r--codan/org.eclipse.cdt.codan.checkers.ui/src/org/eclipse/cdt/codan/internal/checkers/ui/quickfix/CaseBreakQuickFixComment.java132
-rw-r--r--codan/org.eclipse.cdt.codan.core.tests/src/org/eclipse/cdt/codan/internal/checkers/ui/quickfix/CaseBreakQuickFixBreakTest.java136
-rw-r--r--codan/org.eclipse.cdt.codan.ui.cxx/.classpath14
-rw-r--r--codan/org.eclipse.cdt.codan.ui.cxx/.settings/org.eclipse.jdt.core.prefs692
-rw-r--r--codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/ImageConstants.java34
-rw-r--r--core/org.eclipse.cdt.core.linux/library/SpawnerInputStream.h64
-rw-r--r--core/org.eclipse.cdt.core.linux/library/SpawnerOutputStream.h58
-rw-r--r--core/org.eclipse.cdt.core.linux/library/exec0.h58
-rw-r--r--core/org.eclipse.cdt.core.linux/library/exec_pty.c372
-rw-r--r--core/org.eclipse.cdt.core.linux/library/exec_unix.c316
-rw-r--r--core/org.eclipse.cdt.core.linux/library/io.c228
-rw-r--r--core/org.eclipse.cdt.core.linux/library/spawner.c604
-rw-r--r--core/org.eclipse.cdt.core.linux/plugin.properties4
-rw-r--r--core/org.eclipse.cdt.core.macosx/library/exec_pty.c372
-rw-r--r--core/org.eclipse.cdt.core.macosx/plugin.properties4
-rw-r--r--core/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/core/internal/tests/filesystem/ram/MemoryEFSExtensionProvider.java64
-rw-r--r--core/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/language/settings/providers/LanguageSettingsProviderReferencedProjectsTests.java604
-rw-r--r--core/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/language/settings/providers/LanguageSettingsScannerInfoProviderTests.java1916
-rw-r--r--core/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/language/settings/providers/MockListenerRegisterer.java206
-rw-r--r--core/org.eclipse.cdt.core.tests/resources/cfiles/CModelElementsTestStart.h290
-rw-r--r--core/org.eclipse.cdt.core.tests/resources/cfiles/TranslationUnits.c138
-rw-r--r--core/org.eclipse.cdt.core.tests/resources/cfiles/included.h20
-rw-r--r--core/org.eclipse.cdt.core.tests/resources/cmodel/DeclaratorsTests.cpp48
-rw-r--r--core/org.eclipse.cdt.core.tests/resources/cmodel/IIncludeTest.h84
-rw-r--r--core/org.eclipse.cdt.core.tests/resources/cmodel/IMacroTest.h8
-rw-r--r--core/org.eclipse.cdt.core.tests/resources/cmodel/ITemplate.cpp144
-rw-r--r--core/org.eclipse.cdt.core.tests/resources/dependency/DepTest.cpp16
-rw-r--r--core/org.eclipse.cdt.core.tests/resources/dependency/DepTest.h16
-rw-r--r--core/org.eclipse.cdt.core.tests/resources/dependency/DepTest2.cpp16
-rw-r--r--core/org.eclipse.cdt.core.tests/resources/dependency/DepTest2.h16
-rw-r--r--core/org.eclipse.cdt.core.tests/resources/dependency/DepTest3.cpp14
-rw-r--r--core/org.eclipse.cdt.core.tests/resources/dependency/DepTest3.h16
-rw-r--r--core/org.eclipse.cdt.core.tests/resources/dependency/Inc1.h14
-rw-r--r--core/org.eclipse.cdt.core.tests/resources/dependency/a.h14
-rw-r--r--core/org.eclipse.cdt.core.tests/resources/dependency/c.h10
-rw-r--r--core/org.eclipse.cdt.core.tests/resources/dependency/d.h10
-rw-r--r--core/org.eclipse.cdt.core.tests/resources/indexer/DocumentManager.cpp50
-rw-r--r--core/org.eclipse.cdt.core.tests/resources/indexer/extramail.cpp224
-rw-r--r--core/org.eclipse.cdt.core.tests/resources/indexer/reftest.cpp42
-rw-r--r--core/org.eclipse.cdt.core.tests/resources/parser/AutomatedTest/defaultC/Simple.c86
-rw-r--r--core/org.eclipse.cdt.core.tests/resources/parser/AutomatedTest/defaultC/Simple.h34
-rw-r--r--core/org.eclipse.cdt.core.tests/resources/parser/AutomatedTest/defaultCpp/Simple.cpp74
-rw-r--r--core/org.eclipse.cdt.core.tests/resources/parser/AutomatedTest/defaultCpp/Simple.h64
-rw-r--r--core/org.eclipse.cdt.core.tests/resources/parser/LineNumberTest.h84
-rw-r--r--core/org.eclipse.cdt.core.tests/resources/search/classDecl.cpp202
-rw-r--r--core/org.eclipse.cdt.core.tests/resources/search/include.h70
-rw-r--r--core/org.eclipse.cdt.core.tests/suite/org/eclipse/cdt/core/testplugin/CModelMock.java992
-rw-r--r--core/org.eclipse.cdt.core.win32.x86/.project44
-rw-r--r--core/org.eclipse.cdt.core.win32.x86/about.html46
-rw-r--r--core/org.eclipse.cdt.core.win32.x86/build.properties30
-rw-r--r--core/org.eclipse.cdt.core.win32.x86_64/.project44
-rw-r--r--core/org.eclipse.cdt.core.win32.x86_64/about.html46
-rw-r--r--core/org.eclipse.cdt.core.win32.x86_64/build.properties30
-rw-r--r--core/org.eclipse.cdt.core.win32/library/Makefile_x86_64.mk146
-rw-r--r--core/org.eclipse.cdt.core.win32/library/Readme64.txt46
-rw-r--r--core/org.eclipse.cdt.core.win32/library/build64.bat22
-rw-r--r--core/org.eclipse.cdt.core.win32/library/cdt-win32.sln66
-rw-r--r--core/org.eclipse.cdt.core.win32/library/listtasks/StdAfx.cpp36
-rw-r--r--core/org.eclipse.cdt.core.win32/library/listtasks/StdAfx.h58
-rw-r--r--core/org.eclipse.cdt.core.win32/library/listtasks/listtasks.cpp692
-rw-r--r--core/org.eclipse.cdt.core.win32/library/listtasks/listtasks.dsp234
-rw-r--r--core/org.eclipse.cdt.core.win32/library/listtasks/listtasks.dsw58
-rw-r--r--core/org.eclipse.cdt.core.win32/library/listtasks/listtasks.h42
-rw-r--r--core/org.eclipse.cdt.core.win32/library/pty/jni/include/PTY.h90
-rw-r--r--core/org.eclipse.cdt.core.win32/library/pty/jni/include/PTYInputStream.h62
-rw-r--r--core/org.eclipse.cdt.core.win32/library/pty/jni/include/PTYOutputStream.h58
-rw-r--r--core/org.eclipse.cdt.core.win32/library/pty/pty.sln92
-rw-r--r--core/org.eclipse.cdt.core.win32/library/pty/pty.vcxproj352
-rw-r--r--core/org.eclipse.cdt.core.win32/library/pty/pty.vcxproj.filters58
-rw-r--r--core/org.eclipse.cdt.core.win32/library/pty/winpty-agent.vcxproj368
-rw-r--r--core/org.eclipse.cdt.core.win32/library/pty/winpty-agent.vcxproj.filters178
-rw-r--r--core/org.eclipse.cdt.core.win32/library/pty/winpty.vcxproj332
-rw-r--r--core/org.eclipse.cdt.core.win32/library/pty/winpty.vcxproj.filters76
-rw-r--r--core/org.eclipse.cdt.core.win32/library/winreg/dllmain.cpp56
-rw-r--r--core/org.eclipse.cdt.core.win32/library/winreg/stdafx.cpp28
-rw-r--r--core/org.eclipse.cdt.core.win32/library/winreg/stdafx.h44
-rw-r--r--core/org.eclipse.cdt.core.win32/library/winreg/targetver.h36
-rw-r--r--core/org.eclipse.cdt.core.win32/library/winreg/winreg.cpp302
-rw-r--r--core/org.eclipse.cdt.core.win32/library/winreg/winreg.vcxproj348
-rw-r--r--core/org.eclipse.cdt.core.win32/library/winreg/winreg.vcxproj.filters70
-rw-r--r--core/org.eclipse.cdt.core.win32/plugin.properties4
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/language/settings/providers/ILanguageSettingsProvidersKeeper.java136
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/language/settings/providers/IWorkingDirectoryTracker.java56
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/language/settings/providers/LanguageSettingsStorage.java530
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/language/settings/providers/ScannerDiscoveryLegacySupport.java578
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/ICElement.java872
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/settings/model/ICFileDescription.java28
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/language/settings/providers/LanguageSettingsDelta.java232
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/language/settings/providers/LanguageSettingsSerializableStorage.java454
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/language/settings/providers/PathEntryScannerInfoLanguageSettingsProvider.java330
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/language/settings/providers/ReferencedProjectsLanguageSettingsProvider.java158
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/language/settings/providers/ScannerInfoExtensionLanguageSettingsProvider.java316
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/BatchOperation.java116
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPAliasTemplate.java56
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/rewrite/DeclarationGenerator.java90
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/index/ResourceContainerRelativeLocationConverter.java10
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/parser/StandardAttributes.java60
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPAliasTemplate.java334
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPAliasTemplateInstance.java330
-rw-r--r--core/org.eclipse.cdt.core/schema/buildConfigProvider.exsd238
-rw-r--r--core/org.eclipse.cdt.core/schema/toolChainProvider.exsd264
-rw-r--r--core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/build/IToolChain.java548
-rw-r--r--core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/StreamProgressMonitor.java216
-rw-r--r--core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/envvar/ToolChainEnvironmentSupplier.java128
-rw-r--r--core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/TemplateCategory.java88
-rw-r--r--core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/TemplateEngine2.java66
-rw-r--r--core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/TemplateInfo2.java78
-rw-r--r--core/org.eclipse.cdt.core/utils/org/eclipse/cdt/internal/core/Cygwin.java666
-rw-r--r--core/org.eclipse.cdt.core/utils/org/eclipse/cdt/internal/core/LRUCache.java98
-rw-r--r--core/org.eclipse.cdt.core/utils/org/eclipse/cdt/internal/core/MinGW.java718
-rw-r--r--core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/envvar/IEnvironmentChangeListener.java54
-rw-r--r--core/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart.h144
-rw-r--r--core/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart1.cpp12
-rw-r--r--core/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart10.cpp14
-rw-r--r--core/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart11.cpp6
-rw-r--r--core/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart12.h12
-rw-r--r--core/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart13.h10
-rw-r--r--core/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart14.cpp10
-rw-r--r--core/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart15.cpp10
-rw-r--r--core/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart16.cpp6
-rw-r--r--core/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart17.cpp6
-rw-r--r--core/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart18.cpp12
-rw-r--r--core/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart19.cpp10
-rw-r--r--core/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart2.cpp14
-rw-r--r--core/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart20.h8
-rw-r--r--core/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart21.h6
-rw-r--r--core/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart22.cpp16
-rw-r--r--core/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart23.cpp14
-rw-r--r--core/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart24.cpp6
-rw-r--r--core/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart25.cpp6
-rw-r--r--core/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart26.cpp6
-rw-r--r--core/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart27.cpp6
-rw-r--r--core/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart28.cpp12
-rw-r--r--core/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart29.cpp14
-rw-r--r--core/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart3.cpp6
-rw-r--r--core/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart30.cpp12
-rw-r--r--core/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart31.cpp12
-rw-r--r--core/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart32.cpp6
-rw-r--r--core/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart33.cpp6
-rw-r--r--core/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart34.cpp12
-rw-r--r--core/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart35.cpp10
-rw-r--r--core/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart36.cpp14
-rw-r--r--core/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart37.cpp10
-rw-r--r--core/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart38.cpp20
-rw-r--r--core/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart39.cpp18
-rw-r--r--core/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart4.h10
-rw-r--r--core/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart5.cpp12
-rw-r--r--core/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart6.cpp14
-rw-r--r--core/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart7.cpp20
-rw-r--r--core/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart8.cpp10
-rw-r--r--core/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart9.cpp14
-rw-r--r--core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/AutomatedSuite.java94
-rw-r--r--core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/callhierarchy/extension/CHContentProvider.java122
-rw-r--r--core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/callhierarchy/extension/CHExtensionTest.java212
-rw-r--r--core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/callhierarchy/extension/CHLabelProvider.java144
-rw-r--r--core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/callhierarchy/extension/CHOpenListener.java184
-rw-r--r--core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/callhierarchy/extension/DslNode.java152
-rw-r--r--core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist2/TemplateProposalTest.java446
-rw-r--r--core/org.eclipse.cdt.ui/schema/CCallHierarchy.exsd296
-rw-r--r--core/org.eclipse.cdt.ui/schema/newToolChainWizards.exsd258
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/ImageCombo.java3002
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/callhierarchy/CHEProviderSettings.java194
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/callhierarchy/CHPinAction.java74
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/AddIncludeAction.java378
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/OrganizeIncludesAction.java284
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/language/settings/providers/LanguageSettingsImages.java490
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/language/settings/providers/LanguageSettingsProviderAssociationManager.java722
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/language/settings/providers/LanguageSettingsProvidersLabelProvider.java200
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/newui/StatusMessageLine.java158
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/refactoring/extractlocalvariable/ExtractLocalVariableRefactoringContribution.java64
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/refactoring/extractlocalvariable/ExtractLocalVariableRefactoringDescriptor.java96
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/refactoring/extractlocalvariable/ExtractLocalVariableRefactoringRunner.java86
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/ICHEContentProvider.java48
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/ICHENode.java46
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/actions/WorkingSetConfigAction.java168
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/language/settings/providers/AbstractLanguageSettingProviderOptionPage.java176
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/language/settings/providers/LanguageSettingsProvidersImages.java66
-rw-r--r--cross/org.eclipse.cdt.build.crossgcc/.classpath14
-rw-r--r--cross/org.eclipse.cdt.build.crossgcc/.settings/org.eclipse.jdt.core.prefs16
-rw-r--r--cross/org.eclipse.cdt.build.crossgcc/src/org/eclipse/cdt/internal/build/crossgcc/Messages.java58
-rw-r--r--cross/org.eclipse.cdt.build.crossgcc/src/org/eclipse/cdt/internal/build/crossgcc/Messages.properties32
-rw-r--r--cross/org.eclipse.cdt.build.crossgcc/src/org/eclipse/cdt/internal/build/crossgcc/SetCrossCommandOperation.java132
-rw-r--r--cross/org.eclipse.cdt.launch.serial-feature/.project34
-rw-r--r--cross/org.eclipse.cdt.launch.serial-feature/build.properties4
-rw-r--r--cross/org.eclipse.cdt.launch.serial-feature/feature.properties34
-rw-r--r--cross/org.eclipse.cdt.launch.serial-feature/feature.xml70
-rw-r--r--cross/org.eclipse.cdt.launch.serial.core/.classpath14
-rw-r--r--cross/org.eclipse.cdt.launch.serial.core/.project56
-rw-r--r--cross/org.eclipse.cdt.launch.serial.core/.settings/org.eclipse.jdt.core.prefs14
-rw-r--r--cross/org.eclipse.cdt.launch.serial.core/build.properties12
-rw-r--r--cross/org.eclipse.cdt.launch.serial.core/plugin.xml58
-rw-r--r--cross/org.eclipse.cdt.launch.serial.core/src/org/eclipse/cdt/launch/serial/SerialFlashLaunchTargetProvider.java72
-rw-r--r--cross/org.eclipse.cdt.launch.serial.core/src/org/eclipse/cdt/launch/serial/internal/Activator.java60
-rw-r--r--cross/org.eclipse.cdt.launch.serial.core/src/org/eclipse/cdt/launch/serial/internal/Messages.java46
-rw-r--r--cross/org.eclipse.cdt.launch.serial.core/src/org/eclipse/cdt/launch/serial/internal/SerialFlashLaunch.java134
-rw-r--r--cross/org.eclipse.cdt.launch.serial.core/src/org/eclipse/cdt/launch/serial/internal/SerialFlashLaunchConfigDelegate.java74
-rw-r--r--cross/org.eclipse.cdt.launch.serial.core/src/org/eclipse/cdt/launch/serial/internal/SerialFlashLaunchConfigProvider.java64
-rw-r--r--cross/org.eclipse.cdt.launch.serial.core/src/org/eclipse/cdt/launch/serial/internal/messages.properties18
-rw-r--r--cross/org.eclipse.cdt.launch.serial.ui/.classpath14
-rw-r--r--cross/org.eclipse.cdt.launch.serial.ui/.project56
-rw-r--r--cross/org.eclipse.cdt.launch.serial.ui/.settings/org.eclipse.jdt.core.prefs14
-rw-r--r--cross/org.eclipse.cdt.launch.serial.ui/build.properties14
-rw-r--r--cross/org.eclipse.cdt.launch.serial.ui/plugin.xml68
-rw-r--r--cross/org.eclipse.cdt.launch.serial.ui/src/org/eclipse/cdt/launch/serial/ui/internal/Activator.java104
-rw-r--r--cross/org.eclipse.cdt.launch.serial.ui/src/org/eclipse/cdt/launch/serial/ui/internal/Messages.java58
-rw-r--r--cross/org.eclipse.cdt.launch.serial.ui/src/org/eclipse/cdt/launch/serial/ui/internal/NewSerialFlashTargetWizard.java106
-rw-r--r--cross/org.eclipse.cdt.launch.serial.ui/src/org/eclipse/cdt/launch/serial/ui/internal/NewSerialFlashTargetWizardPage.java260
-rw-r--r--cross/org.eclipse.cdt.launch.serial.ui/src/org/eclipse/cdt/launch/serial/ui/internal/SerialFlashLaunchConfigTabGroup.java48
-rw-r--r--cross/org.eclipse.cdt.launch.serial.ui/src/org/eclipse/cdt/launch/serial/ui/internal/SerialFlashLaunchTargetLabelProvider.java70
-rw-r--r--cross/org.eclipse.cdt.launch.serial.ui/src/org/eclipse/cdt/launch/serial/ui/internal/messages.properties30
-rw-r--r--debug/org.eclipse.cdt.debug.application.doc/customBuildCallbacks.xml326
-rw-r--r--debug/org.eclipse.cdt.debug.application/configGenerator.xml30
-rw-r--r--debug/org.eclipse.cdt.debug.core/schema/BreakpointAction.exsd212
-rw-r--r--debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/launch/CoreBuildGenericLaunchConfigDelegate.java176
-rw-r--r--debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/launch/CoreBuildGenericLaunchConfigProvider.java330
-rw-r--r--debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/launch/NullProcess.java214
-rw-r--r--debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/Messages.java50
-rw-r--r--debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/breakpoints/CBreakpointImportParticipant.java328
-rw-r--r--debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/messages.properties22
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/preferences/StringSetSerializer.java108
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/breakpointactions/CLICommandAction.java248
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/breakpointactions/CLICommandActionComposite.java86
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/breakpointactions/CLICommandActionPage.java90
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/breakpointactions/IBreakpointActionPage.java64
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/breakpointactions/LogActionComposite.java148
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/breakpointactions/Messages.java64
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/breakpointactions/PreferenceConstants.java52
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/breakpointactions/PreferenceInitializer.java68
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/breakpointactions/SoundActionComposite.java354
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/disassembly/rulers/AbstractContributedRulerColumn.java132
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/disassembly/rulers/IColumnSupport.java122
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/disassembly/rulers/IContributedRulerColumn.java198
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/disassembly/rulers/RulerColumnDescriptor.java612
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/disassembly/rulers/RulerColumnRegistry.java588
-rw-r--r--debug/org.eclipse.cdt.gdb/about.ini48
-rw-r--r--debug/org.eclipse.cdt.gdb/about.mappings16
-rw-r--r--doc/org.eclipse.cdt.doc.isv/schema.css132
-rw-r--r--doc/org.eclipse.cdt.doc.user/customBuildCallbacks.xml326
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/view/Messages.java50
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/view/Messages.properties24
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.tests/src/org/eclipse/cdt/dsf/gdb/service/CommonDsfTest.java216
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.tests/src/org/eclipse/cdt/dsf/mi/service/command/commands/TestMIGDBSetSysroot.java146
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/internal/GdbDebugOptions.java244
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/command/CommandFactory_6_8.java80
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/CLIJump.java56
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIExecArguments.java62
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIGDBSetCharset.java60
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIGDBSetHostCharset.java56
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIGDBSetNewConsole.java54
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIGDBSetPrintObject.java60
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIGDBSetPrintSevenbitStrings.java58
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIGDBSetTargetCharset.java58
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIGDBSetTargetWideCharset.java62
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIGDBShowNewConsole.java68
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIGDBShowNewConsoleInfo.java102
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIStringHandler.java918
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/DisassemblyColumnSupport.java410
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/OpcodeRulerColumn.java252
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/provisional/DisassemblyAnnotationModel.java178
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf/src/org/eclipse/cdt/examples/dsf/.gitignore4
-rw-r--r--launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/corebuild/GenericLaunchConfigTabGroup.java56
-rw-r--r--launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/ui/Messages.java72
-rw-r--r--launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/ui/messages.properties44
-rw-r--r--launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/corebuild/GenericMainTab.java1430
-rw-r--r--llvm/org.eclipse.cdt.managedbuilder.llvm.tests/.classpath16
-rw-r--r--llvm/org.eclipse.cdt.managedbuilder.llvm.tests/.settings/org.eclipse.jdt.core.prefs156
-rw-r--r--llvm/org.eclipse.cdt.managedbuilder.llvm.tests/.settings/org.eclipse.wst.xsl.core.prefs24
-rw-r--r--llvm/org.eclipse.cdt.managedbuilder.llvm.tests/build.properties14
-rw-r--r--llvm/org.eclipse.cdt.managedbuilder.llvm.tests/src/org/eclipse/cdt/managedbuilder/llvm/tests/JUnit_tests.java76
-rw-r--r--llvm/org.eclipse.cdt.managedbuilder.llvm.tests/src/org/eclipse/cdt/managedbuilder/llvm/tests/messages.properties2
-rw-r--r--llvm/org.eclipse.cdt.managedbuilder.llvm.tests/test.xml204
-rwxr-xr-xllvm/org.eclipse.cdt.managedbuilder.llvm.ui/.project90
-rwxr-xr-xllvm/org.eclipse.cdt.managedbuilder.llvm.ui/build.properties28
-rw-r--r--llvm/org.eclipse.cdt.managedbuilder.llvm.ui/doc/allclasses-frame.html138
-rw-r--r--llvm/org.eclipse.cdt.managedbuilder.llvm.ui/doc/allclasses-noframe.html138
-rw-r--r--llvm/org.eclipse.cdt.managedbuilder.llvm.ui/doc/constant-values.html636
-rw-r--r--llvm/org.eclipse.cdt.managedbuilder.llvm.ui/doc/deprecated-list.html292
-rw-r--r--llvm/org.eclipse.cdt.managedbuilder.llvm.ui/doc/help-doc.html446
-rw-r--r--llvm/org.eclipse.cdt.managedbuilder.llvm.ui/doc/index-files/index-1.html428
-rw-r--r--llvm/org.eclipse.cdt.managedbuilder.llvm.ui/doc/index-files/index-10.html296
-rw-r--r--llvm/org.eclipse.cdt.managedbuilder.llvm.ui/doc/index-files/index-11.html296
-rw-r--r--llvm/org.eclipse.cdt.managedbuilder.llvm.ui/doc/index-files/index-12.html290
-rw-r--r--llvm/org.eclipse.cdt.managedbuilder.llvm.ui/doc/index-files/index-13.html380
-rw-r--r--llvm/org.eclipse.cdt.managedbuilder.llvm.ui/doc/index-files/index-14.html422
-rw-r--r--llvm/org.eclipse.cdt.managedbuilder.llvm.ui/doc/index-files/index-15.html398
-rw-r--r--llvm/org.eclipse.cdt.managedbuilder.llvm.ui/doc/index-files/index-16.html296
-rw-r--r--llvm/org.eclipse.cdt.managedbuilder.llvm.ui/doc/index-files/index-17.html290
-rw-r--r--llvm/org.eclipse.cdt.managedbuilder.llvm.ui/doc/index-files/index-2.html296
-rw-r--r--llvm/org.eclipse.cdt.managedbuilder.llvm.ui/doc/index-files/index-3.html320
-rw-r--r--llvm/org.eclipse.cdt.managedbuilder.llvm.ui/doc/index-files/index-4.html308
-rw-r--r--llvm/org.eclipse.cdt.managedbuilder.llvm.ui/doc/index-files/index-5.html320
-rw-r--r--llvm/org.eclipse.cdt.managedbuilder.llvm.ui/doc/index-files/index-6.html302
-rw-r--r--llvm/org.eclipse.cdt.managedbuilder.llvm.ui/doc/index-files/index-7.html590
-rw-r--r--llvm/org.eclipse.cdt.managedbuilder.llvm.ui/doc/index-files/index-8.html344
-rw-r--r--llvm/org.eclipse.cdt.managedbuilder.llvm.ui/doc/index-files/index-9.html464
-rw-r--r--llvm/org.eclipse.cdt.managedbuilder.llvm.ui/doc/index.html78
-rw-r--r--llvm/org.eclipse.cdt.managedbuilder.llvm.ui/doc/org/eclipse/cdt/managedbuilder/llvm/makegen/LlvmDependencyCalculator2.html644
-rw-r--r--llvm/org.eclipse.cdt.managedbuilder.llvm.ui/doc/org/eclipse/cdt/managedbuilder/llvm/makegen/LlvmDependencyCalculator2Commands.html600
-rw-r--r--llvm/org.eclipse.cdt.managedbuilder.llvm.ui/doc/org/eclipse/cdt/managedbuilder/llvm/makegen/class-use/LlvmDependencyCalculator2.html288
-rw-r--r--llvm/org.eclipse.cdt.managedbuilder.llvm.ui/doc/org/eclipse/cdt/managedbuilder/llvm/makegen/class-use/LlvmDependencyCalculator2Commands.html288
-rw-r--r--llvm/org.eclipse.cdt.managedbuilder.llvm.ui/doc/org/eclipse/cdt/managedbuilder/llvm/makegen/package-frame.html68
-rw-r--r--llvm/org.eclipse.cdt.managedbuilder.llvm.ui/doc/org/eclipse/cdt/managedbuilder/llvm/makegen/package-summary.html322
-rw-r--r--llvm/org.eclipse.cdt.managedbuilder.llvm.ui/doc/org/eclipse/cdt/managedbuilder/llvm/makegen/package-tree.html318
-rw-r--r--llvm/org.eclipse.cdt.managedbuilder.llvm.ui/doc/org/eclipse/cdt/managedbuilder/llvm/makegen/package-use.html288
-rw-r--r--llvm/org.eclipse.cdt.managedbuilder.llvm.ui/doc/org/eclipse/cdt/managedbuilder/llvm/scannerconfig/LLVMScannerInfoCollector.html554
-rw-r--r--llvm/org.eclipse.cdt.managedbuilder.llvm.ui/doc/org/eclipse/cdt/managedbuilder/llvm/scannerconfig/ManagedLlvmScannerInfoConsoleParser.html828
-rw-r--r--llvm/org.eclipse.cdt.managedbuilder.llvm.ui/doc/org/eclipse/cdt/managedbuilder/llvm/scannerconfig/class-use/LLVMScannerInfoCollector.html288
-rw-r--r--llvm/org.eclipse.cdt.managedbuilder.llvm.ui/doc/org/eclipse/cdt/managedbuilder/llvm/scannerconfig/class-use/ManagedLlvmScannerInfoConsoleParser.html288
-rw-r--r--llvm/org.eclipse.cdt.managedbuilder.llvm.ui/doc/org/eclipse/cdt/managedbuilder/llvm/scannerconfig/package-frame.html68
-rw-r--r--llvm/org.eclipse.cdt.managedbuilder.llvm.ui/doc/org/eclipse/cdt/managedbuilder/llvm/scannerconfig/package-summary.html322
-rw-r--r--llvm/org.eclipse.cdt.managedbuilder.llvm.ui/doc/org/eclipse/cdt/managedbuilder/llvm/scannerconfig/package-tree.html324
-rw-r--r--llvm/org.eclipse.cdt.managedbuilder.llvm.ui/doc/org/eclipse/cdt/managedbuilder/llvm/scannerconfig/package-use.html288
-rw-r--r--llvm/org.eclipse.cdt.managedbuilder.llvm.ui/doc/org/eclipse/cdt/managedbuilder/llvm/ui/LlvmBuildEnvironmentVariable.html858
-rw-r--r--llvm/org.eclipse.cdt.managedbuilder.llvm.ui/doc/org/eclipse/cdt/managedbuilder/llvm/ui/LlvmEnvironmentVariableSupplier.html1812
-rw-r--r--llvm/org.eclipse.cdt.managedbuilder.llvm.ui/doc/org/eclipse/cdt/managedbuilder/llvm/ui/LlvmIsToolChainSupported.html612
-rw-r--r--llvm/org.eclipse.cdt.managedbuilder.llvm.ui/doc/org/eclipse/cdt/managedbuilder/llvm/ui/LlvmProjectNature.html758
-rw-r--r--llvm/org.eclipse.cdt.managedbuilder.llvm.ui/doc/org/eclipse/cdt/managedbuilder/llvm/ui/LlvmUIPlugin.html1158
-rw-r--r--llvm/org.eclipse.cdt.managedbuilder.llvm.ui/doc/org/eclipse/cdt/managedbuilder/llvm/ui/class-use/LlvmBuildEnvironmentVariable.html392
-rw-r--r--llvm/org.eclipse.cdt.managedbuilder.llvm.ui/doc/org/eclipse/cdt/managedbuilder/llvm/ui/class-use/LlvmEnvironmentVariableSupplier.html288
-rw-r--r--llvm/org.eclipse.cdt.managedbuilder.llvm.ui/doc/org/eclipse/cdt/managedbuilder/llvm/ui/class-use/LlvmIsToolChainSupported.html288
-rw-r--r--llvm/org.eclipse.cdt.managedbuilder.llvm.ui/doc/org/eclipse/cdt/managedbuilder/llvm/ui/class-use/LlvmProjectNature.html288
-rw-r--r--llvm/org.eclipse.cdt.managedbuilder.llvm.ui/doc/org/eclipse/cdt/managedbuilder/llvm/ui/class-use/LlvmUIPlugin.html392
-rw-r--r--llvm/org.eclipse.cdt.managedbuilder.llvm.ui/doc/org/eclipse/cdt/managedbuilder/llvm/ui/package-frame.html80
-rw-r--r--llvm/org.eclipse.cdt.managedbuilder.llvm.ui/doc/org/eclipse/cdt/managedbuilder/llvm/ui/package-summary.html346
-rw-r--r--llvm/org.eclipse.cdt.managedbuilder.llvm.ui/doc/org/eclipse/cdt/managedbuilder/llvm/ui/package-tree.html324
-rw-r--r--llvm/org.eclipse.cdt.managedbuilder.llvm.ui/doc/org/eclipse/cdt/managedbuilder/llvm/ui/package-use.html352
-rw-r--r--llvm/org.eclipse.cdt.managedbuilder.llvm.ui/doc/org/eclipse/cdt/managedbuilder/llvm/ui/preferences/IncludePathListEditor.html698
-rw-r--r--llvm/org.eclipse.cdt.managedbuilder.llvm.ui/doc/org/eclipse/cdt/managedbuilder/llvm/ui/preferences/LibraryListEditor.html698
-rw-r--r--llvm/org.eclipse.cdt.managedbuilder.llvm.ui/doc/org/eclipse/cdt/managedbuilder/llvm/ui/preferences/LibraryPathListEditor.html698
-rw-r--r--llvm/org.eclipse.cdt.managedbuilder.llvm.ui/doc/org/eclipse/cdt/managedbuilder/llvm/ui/preferences/LlvmListEditor.html1552
-rw-r--r--llvm/org.eclipse.cdt.managedbuilder.llvm.ui/doc/org/eclipse/cdt/managedbuilder/llvm/ui/preferences/LlvmPreferencePage.html766
-rw-r--r--llvm/org.eclipse.cdt.managedbuilder.llvm.ui/doc/org/eclipse/cdt/managedbuilder/llvm/ui/preferences/LlvmPreferenceStore.html1384
-rw-r--r--llvm/org.eclipse.cdt.managedbuilder.llvm.ui/doc/org/eclipse/cdt/managedbuilder/llvm/ui/preferences/Messages.html904
-rw-r--r--llvm/org.eclipse.cdt.managedbuilder.llvm.ui/doc/org/eclipse/cdt/managedbuilder/llvm/ui/preferences/PreferenceConstants.html636
-rw-r--r--llvm/org.eclipse.cdt.managedbuilder.llvm.ui/doc/org/eclipse/cdt/managedbuilder/llvm/ui/preferences/PreferenceInitializer.html520
-rw-r--r--llvm/org.eclipse.cdt.managedbuilder.llvm.ui/doc/org/eclipse/cdt/managedbuilder/llvm/ui/preferences/class-use/IncludePathListEditor.html288
-rw-r--r--llvm/org.eclipse.cdt.managedbuilder.llvm.ui/doc/org/eclipse/cdt/managedbuilder/llvm/ui/preferences/class-use/LibraryListEditor.html288
-rw-r--r--llvm/org.eclipse.cdt.managedbuilder.llvm.ui/doc/org/eclipse/cdt/managedbuilder/llvm/ui/preferences/class-use/LibraryPathListEditor.html288
-rw-r--r--llvm/org.eclipse.cdt.managedbuilder.llvm.ui/doc/org/eclipse/cdt/managedbuilder/llvm/ui/preferences/class-use/LlvmListEditor.html392
-rw-r--r--llvm/org.eclipse.cdt.managedbuilder.llvm.ui/doc/org/eclipse/cdt/managedbuilder/llvm/ui/preferences/class-use/LlvmPreferencePage.html288
-rw-r--r--llvm/org.eclipse.cdt.managedbuilder.llvm.ui/doc/org/eclipse/cdt/managedbuilder/llvm/ui/preferences/class-use/LlvmPreferenceStore.html288
-rw-r--r--llvm/org.eclipse.cdt.managedbuilder.llvm.ui/doc/org/eclipse/cdt/managedbuilder/llvm/ui/preferences/class-use/Messages.html288
-rw-r--r--llvm/org.eclipse.cdt.managedbuilder.llvm.ui/doc/org/eclipse/cdt/managedbuilder/llvm/ui/preferences/class-use/PreferenceConstants.html288
-rw-r--r--llvm/org.eclipse.cdt.managedbuilder.llvm.ui/doc/org/eclipse/cdt/managedbuilder/llvm/ui/preferences/class-use/PreferenceInitializer.html288
-rw-r--r--llvm/org.eclipse.cdt.managedbuilder.llvm.ui/doc/org/eclipse/cdt/managedbuilder/llvm/ui/preferences/package-frame.html96
-rw-r--r--llvm/org.eclipse.cdt.managedbuilder.llvm.ui/doc/org/eclipse/cdt/managedbuilder/llvm/ui/preferences/package-summary.html378
-rw-r--r--llvm/org.eclipse.cdt.managedbuilder.llvm.ui/doc/org/eclipse/cdt/managedbuilder/llvm/ui/preferences/package-tree.html346
-rw-r--r--llvm/org.eclipse.cdt.managedbuilder.llvm.ui/doc/org/eclipse/cdt/managedbuilder/llvm/ui/preferences/package-use.html340
-rw-r--r--llvm/org.eclipse.cdt.managedbuilder.llvm.ui/doc/org/eclipse/cdt/managedbuilder/llvm/util/LlvmToolOptionPathUtil.html2542
-rw-r--r--llvm/org.eclipse.cdt.managedbuilder.llvm.ui/doc/org/eclipse/cdt/managedbuilder/llvm/util/Separators.html670
-rw-r--r--llvm/org.eclipse.cdt.managedbuilder.llvm.ui/doc/org/eclipse/cdt/managedbuilder/llvm/util/class-use/LlvmToolOptionPathUtil.html288
-rw-r--r--llvm/org.eclipse.cdt.managedbuilder.llvm.ui/doc/org/eclipse/cdt/managedbuilder/llvm/util/class-use/Separators.html288
-rw-r--r--llvm/org.eclipse.cdt.managedbuilder.llvm.ui/doc/org/eclipse/cdt/managedbuilder/llvm/util/package-frame.html68
-rw-r--r--llvm/org.eclipse.cdt.managedbuilder.llvm.ui/doc/org/eclipse/cdt/managedbuilder/llvm/util/package-summary.html322
-rw-r--r--llvm/org.eclipse.cdt.managedbuilder.llvm.ui/doc/org/eclipse/cdt/managedbuilder/llvm/util/package-tree.html306
-rw-r--r--llvm/org.eclipse.cdt.managedbuilder.llvm.ui/doc/org/eclipse/cdt/managedbuilder/llvm/util/package-use.html288
-rw-r--r--llvm/org.eclipse.cdt.managedbuilder.llvm.ui/doc/overview-frame.html100
-rw-r--r--llvm/org.eclipse.cdt.managedbuilder.llvm.ui/doc/overview-summary.html334
-rw-r--r--llvm/org.eclipse.cdt.managedbuilder.llvm.ui/doc/overview-tree.html392
-rw-r--r--llvm/org.eclipse.cdt.managedbuilder.llvm.ui/doc/package-list10
-rw-r--r--llvm/org.eclipse.cdt.managedbuilder.llvm.ui/doc/stylesheet.css58
-rwxr-xr-xllvm/org.eclipse.cdt.managedbuilder.llvm.ui/plugin.properties454
-rwxr-xr-xllvm/org.eclipse.cdt.managedbuilder.llvm.ui/plugin.xml10714
-rw-r--r--llvm/org.eclipse.cdt.managedbuilder.llvm.ui/scripts/find_path.bat16
-rwxr-xr-xllvm/org.eclipse.cdt.managedbuilder.llvm.ui/src/org/eclipse/cdt/managedbuilder/llvm/makegen/LlvmDependencyCalculator2.java86
-rwxr-xr-xllvm/org.eclipse.cdt.managedbuilder.llvm.ui/src/org/eclipse/cdt/managedbuilder/llvm/makegen/LlvmDependencyCalculator2Commands.java122
-rwxr-xr-xllvm/org.eclipse.cdt.managedbuilder.llvm.ui/src/org/eclipse/cdt/managedbuilder/llvm/ui/LlvmEnvironmentVariableSupplier.java906
-rwxr-xr-xllvm/org.eclipse.cdt.managedbuilder.llvm.ui/src/org/eclipse/cdt/managedbuilder/llvm/ui/LlvmIsToolChainSupported.java102
-rwxr-xr-xllvm/org.eclipse.cdt.managedbuilder.llvm.ui/src/org/eclipse/cdt/managedbuilder/llvm/ui/LlvmUIPlugin.java354
-rw-r--r--llvm/org.eclipse.cdt.managedbuilder.llvm.ui/src/org/eclipse/cdt/managedbuilder/llvm/ui/preferences/Messages.java76
-rw-r--r--llvm/org.eclipse.cdt.managedbuilder.llvm.ui/src/org/eclipse/cdt/managedbuilder/llvm/ui/preferences/messages.properties20
-rw-r--r--llvm/org.eclipse.cdt.managedbuilder.llvm.ui/src/org/eclipse/cdt/managedbuilder/llvm/util/FileUtil.java88
-rw-r--r--llvm/org.eclipse.cdt.managedbuilder.llvm.ui/src/org/eclipse/cdt/managedbuilder/llvm/util/ProjectIndex.java58
-rw-r--r--qt/org.eclipse.cdt.qt.core.tests/scripts/ecma5-defs.js1936
-rw-r--r--qt/org.eclipse.cdt.qt.core.tests/src/org/eclipse/cdt/qt/core/tests/QMLDirectoryLexerTests.java574
-rw-r--r--qt/org.eclipse.cdt.qt.core.tests/src/org/eclipse/cdt/qt/core/tests/QMLDirectoryParserTests.java616
-rw-r--r--qt/org.eclipse.cdt.qt.core/acorn-qml/index.js40
-rw-r--r--qt/org.eclipse.cdt.qt.core/acorn-qml/inject.js1298
-rw-r--r--qt/org.eclipse.cdt.qt.core/acorn-qml/loose/index.js40
-rw-r--r--qt/org.eclipse.cdt.qt.core/acorn-qml/loose/inject.js1354
-rw-r--r--qt/org.eclipse.cdt.qt.core/acorn-qml/package.json22
-rw-r--r--qt/org.eclipse.cdt.qt.core/acorn-qml/test/driver.js224
-rw-r--r--qt/org.eclipse.cdt.qt.core/acorn-qml/test/run.js226
-rw-r--r--qt/org.eclipse.cdt.qt.core/acorn-qml/test/tests-qml.js8042
-rw-r--r--qt/org.eclipse.cdt.qt.core/acorn-qml/walk/index.js168
-rw-r--r--qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/QMLModuleResolver.java198
-rw-r--r--qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/QmlASTNodeHandler.java504
-rw-r--r--qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/location/Position.java76
-rw-r--r--qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/location/SourceLocation.java116
-rw-r--r--qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/qmldir/QDirAST.java72
-rw-r--r--qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/qmldir/QDirASTNode.java110
-rw-r--r--qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/qmldir/QDirClassnameCommand.java56
-rw-r--r--qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/qmldir/QDirCommentCommand.java56
-rw-r--r--qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/qmldir/QDirDependsCommand.java76
-rw-r--r--qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/qmldir/QDirDesignerSupportedCommand.java32
-rw-r--r--qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/qmldir/QDirInternalCommand.java76
-rw-r--r--qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/qmldir/QDirModuleCommand.java54
-rw-r--r--qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/qmldir/QDirPluginCommand.java76
-rw-r--r--qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/qmldir/QDirResourceCommand.java94
-rw-r--r--qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/qmldir/QDirSingletonCommand.java96
-rw-r--r--qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/qmldir/QDirSyntaxError.java80
-rw-r--r--qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/qmldir/QDirTypeInfoCommand.java56
-rw-r--r--qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/qmldir/QDirVersion.java56
-rw-r--r--qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/qmldir/QDirWord.java56
-rw-r--r--qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/qmltypes/QMLComponentInfo.java278
-rw-r--r--qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/qmltypes/QMLEnumInfo.java192
-rw-r--r--qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/qmltypes/QMLExportInfo.java74
-rw-r--r--qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/qmltypes/QMLMethodInfo.java138
-rw-r--r--qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/qmltypes/QMLModelBuilder.java382
-rw-r--r--qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/qmltypes/QMLModuleInfo.java80
-rw-r--r--qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/qmltypes/QMLParameterInfo.java104
-rw-r--r--qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/qmltypes/QMLPropertyInfo.java176
-rw-r--r--qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/qmltypes/QMLSignalInfo.java138
-rw-r--r--qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/qt/core/IQMLAnalyzer.java90
-rw-r--r--qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/qt/core/IQtBuildConfiguration.java76
-rw-r--r--qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/qt/core/location/IPosition.java60
-rw-r--r--qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/qt/core/location/ISourceLocation.java76
-rw-r--r--qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/qt/core/qmldir/IQDirAST.java52
-rw-r--r--qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/qt/core/qmldir/IQDirASTNode.java82
-rw-r--r--qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/qt/core/qmldir/IQDirClassnameCommand.java50
-rw-r--r--qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/qt/core/qmldir/IQDirCommand.java38
-rw-r--r--qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/qt/core/qmldir/IQDirCommentCommand.java50
-rw-r--r--qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/qt/core/qmldir/IQDirDependsCommand.java64
-rw-r--r--qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/qt/core/qmldir/IQDirDesignerSupportedCommand.java38
-rw-r--r--qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/qt/core/qmldir/IQDirInternalCommand.java64
-rw-r--r--qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/qt/core/qmldir/IQDirModuleCommand.java50
-rw-r--r--qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/qt/core/qmldir/IQDirPluginCommand.java64
-rw-r--r--qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/qt/core/qmldir/IQDirResourceCommand.java78
-rw-r--r--qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/qt/core/qmldir/IQDirSingletonCommand.java78
-rw-r--r--qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/qt/core/qmldir/IQDirSyntaxError.java86
-rw-r--r--qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/qt/core/qmldir/IQDirTypeInfoCommand.java50
-rw-r--r--qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/qt/core/qmldir/IQDirVersion.java46
-rw-r--r--qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/qt/core/qmldir/IQDirWord.java54
-rw-r--r--qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/qt/core/qmldir/QMLDirectoryInfo.java360
-rw-r--r--qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/qt/core/qmldir/QMLDirectoryLexer.java504
-rw-r--r--qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/qt/core/qmldir/QMLDirectoryParser.java846
-rw-r--r--qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/qt/core/qmljs/IJSArrayExpression.java52
-rw-r--r--qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/qt/core/qmljs/IJSAssignmentExpression.java136
-rw-r--r--qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/qt/core/qmljs/IJSBinaryExpression.java152
-rw-r--r--qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/qt/core/qmljs/IJSBlockStatement.java52
-rw-r--r--qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/qt/core/qmljs/IJSBreakStatement.java48
-rw-r--r--qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/qt/core/qmljs/IJSCallExpression.java56
-rw-r--r--qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/qt/core/qmljs/IJSCatchClause.java52
-rw-r--r--qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/qt/core/qmljs/IJSConditionalExpression.java56
-rw-r--r--qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/qt/core/qmljs/IJSContinueStatement.java48
-rw-r--r--qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/qt/core/qmljs/IJSDebuggerStatement.java44
-rw-r--r--qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/qt/core/qmljs/IJSDeclaration.java36
-rw-r--r--qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/qt/core/qmljs/IJSDoWhileStatement.java52
-rw-r--r--qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/qt/core/qmljs/IJSEmptyStatement.java44
-rw-r--r--qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/qt/core/qmljs/IJSExpression.java36
-rw-r--r--qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/qt/core/qmljs/IJSExpressionStatement.java48
-rw-r--r--qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/qt/core/qmljs/IJSForInStatement.java62
-rw-r--r--qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/qt/core/qmljs/IJSForStatement.java66
-rw-r--r--qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/qt/core/qmljs/IJSFunction.java48
-rw-r--r--qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/qt/core/qmljs/IJSFunctionDeclaration.java50
-rw-r--r--qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/qt/core/qmljs/IJSFunctionExpression.java44
-rw-r--r--qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/qt/core/qmljs/IJSIdentifier.java48
-rw-r--r--qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/qt/core/qmljs/IJSIfStatement.java56
-rw-r--r--qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/qt/core/qmljs/IJSLabeledStatement.java52
-rw-r--r--qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/qt/core/qmljs/IJSLiteral.java56
-rw-r--r--qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/qt/core/qmljs/IJSLogicalExpression.java116
-rw-r--r--qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/qt/core/qmljs/IJSMemberExpression.java56
-rw-r--r--qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/qt/core/qmljs/IJSNewExpression.java44
-rw-r--r--qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/qt/core/qmljs/IJSObjectExpression.java52
-rw-r--r--qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/qt/core/qmljs/IJSPattern.java34
-rw-r--r--qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/qt/core/qmljs/IJSProgram.java50
-rw-r--r--qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/qt/core/qmljs/IJSProperty.java62
-rw-r--r--qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/qt/core/qmljs/IJSRegExpLiteral.java80
-rw-r--r--qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/qt/core/qmljs/IJSReturnStatement.java48
-rw-r--r--qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/qt/core/qmljs/IJSSequenceExpression.java52
-rw-r--r--qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/qt/core/qmljs/IJSStatement.java36
-rw-r--r--qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/qt/core/qmljs/IJSSwitchCase.java56
-rw-r--r--qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/qt/core/qmljs/IJSSwitchStatement.java52
-rw-r--r--qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/qt/core/qmljs/IJSThisExpression.java44
-rw-r--r--qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/qt/core/qmljs/IJSThrowStatement.java48
-rw-r--r--qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/qt/core/qmljs/IJSTryStatement.java56
-rw-r--r--qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/qt/core/qmljs/IJSUnaryExpression.java126
-rw-r--r--qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/qt/core/qmljs/IJSUpdateExpression.java116
-rw-r--r--qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/qt/core/qmljs/IJSVariableDeclaration.java60
-rw-r--r--qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/qt/core/qmljs/IJSVariableDeclarator.java52
-rw-r--r--qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/qt/core/qmljs/IJSWhileStatement.java52
-rw-r--r--qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/qt/core/qmljs/IJSWithStatement.java52
-rw-r--r--qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/qt/core/qmljs/IQmlASTNode.java160
-rw-r--r--qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/qt/core/qmljs/IQmlArrayBinding.java44
-rw-r--r--qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/qt/core/qmljs/IQmlBinding.java28
-rw-r--r--qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/qt/core/qmljs/IQmlHeaderItem.java28
-rw-r--r--qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/qt/core/qmljs/IQmlHeaderItemList.java34
-rw-r--r--qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/qt/core/qmljs/IQmlImport.java48
-rw-r--r--qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/qt/core/qmljs/IQmlModule.java34
-rw-r--r--qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/qt/core/qmljs/IQmlObjectBinding.java44
-rw-r--r--qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/qt/core/qmljs/IQmlObjectDefinition.java44
-rw-r--r--qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/qt/core/qmljs/IQmlObjectInitializer.java44
-rw-r--r--qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/qt/core/qmljs/IQmlObjectMember.java28
-rw-r--r--qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/qt/core/qmljs/IQmlParameter.java44
-rw-r--r--qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/qt/core/qmljs/IQmlPragma.java40
-rw-r--r--qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/qt/core/qmljs/IQmlProgram.java76
-rw-r--r--qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/qt/core/qmljs/IQmlPropertyBinding.java44
-rw-r--r--qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/qt/core/qmljs/IQmlPropertyDeclaration.java60
-rw-r--r--qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/qt/core/qmljs/IQmlPropertyType.java44
-rw-r--r--qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/qt/core/qmljs/IQmlQualifiedID.java48
-rw-r--r--qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/qt/core/qmljs/IQmlQualifier.java40
-rw-r--r--qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/qt/core/qmljs/IQmlRootObject.java28
-rw-r--r--qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/qt/core/qmljs/IQmlScriptBinding.java50
-rw-r--r--qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/qt/core/qmljs/IQmlSignalDefinition.java48
-rw-r--r--qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/qt/core/qmljs/IQmlStatementBlock.java44
-rw-r--r--qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/qt/core/qmljs/IQmlVersionLiteral.java44
-rw-r--r--qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/qt/core/qmljs/QMLExpressionEvaluator.java240
-rw-r--r--qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/qt/core/tern/ITernScope.java30
-rw-r--r--qt/org.eclipse.cdt.qt.core/tern-qml/.npmignore8
-rw-r--r--qt/org.eclipse.cdt.qt.core/tern-qml/demo/defs/ecma5.json.js1930
-rw-r--r--qt/org.eclipse.cdt.qt.core/tern-qml/demo/qml-demo.html506
-rw-r--r--qt/org.eclipse.cdt.qt.core/tern-qml/ecma5-defs.js1950
-rw-r--r--qt/org.eclipse.cdt.qt.core/tern-qml/package.json38
-rw-r--r--qt/org.eclipse.cdt.qt.core/tern-qml/qml.js2064
-rw-r--r--qt/org.eclipse.cdt.qt.core/tern-qml/test/driver.js418
-rw-r--r--qt/org.eclipse.cdt.qt.core/tern-qml/test/ecma5-defs.js1958
-rw-r--r--qt/org.eclipse.cdt.qt.core/tern-qml/test/run.js162
-rw-r--r--qt/org.eclipse.cdt.qt.core/tern-qml/test/test-completions.js1420
-rw-r--r--qt/org.eclipse.cdt.qt.core/tern-qml/test/test-finddef.js616
-rw-r--r--qt/org.eclipse.cdt.qt.core/tern-qml/test/test-parse.js250
-rw-r--r--qt/org.eclipse.cdt.qt.core/tern-qml/test/test-scoping.js816
-rw-r--r--qt/org.eclipse.cdt.qt.ui.tests/src/org/eclipse/cdt/qt/pro/parser/tests/QtProjectFileModifierTest.java680
-rw-r--r--qt/org.eclipse.cdt.qt.ui.tests/src/org/eclipse/cdt/qt/pro/parser/tests/QtProjectFileParserTest.java362
-rw-r--r--qt/org.eclipse.cdt.qt.ui/src/org/eclipse/cdt/internal/qt/ui/editor/IQMLPartitions.java54
-rw-r--r--qt/org.eclipse.cdt.qt.ui/src/org/eclipse/cdt/internal/qt/ui/editor/QMLDocumentSetupParticipant.java64
-rw-r--r--qt/org.eclipse.cdt.qt.ui/src/org/eclipse/cdt/internal/qt/ui/editor/QMLEditor.java326
-rw-r--r--qt/org.eclipse.cdt.qt.ui/src/org/eclipse/cdt/internal/qt/ui/editor/QMLKeywords.java238
-rw-r--r--qt/org.eclipse.cdt.qt.ui/src/org/eclipse/cdt/internal/qt/ui/editor/QMLPartitionScanner.java90
-rw-r--r--qt/org.eclipse.cdt.qt.ui/src/org/eclipse/cdt/internal/qt/ui/editor/QMLSourceViewerConfiguration.java472
-rw-r--r--qt/org.eclipse.cdt.qt.ui/src/org/eclipse/cdt/internal/qt/ui/editor/QtProjectFileContentAssistProcessor.java210
-rw-r--r--qt/org.eclipse.cdt.qt.ui/src/org/eclipse/cdt/internal/qt/ui/editor/QtProjectFileEditor.java90
-rw-r--r--qt/org.eclipse.cdt.qt.ui/src/org/eclipse/cdt/internal/qt/ui/editor/QtProjectFileKeyword.java658
-rw-r--r--qt/org.eclipse.cdt.qt.ui/src/org/eclipse/cdt/internal/qt/ui/editor/QtProjectFileSourceViewerConfiguration.java204
-rw-r--r--qt/org.eclipse.cdt.qt.ui/src/org/eclipse/cdt/internal/qt/ui/pro/parser/QtProjectFileModifier.java572
-rw-r--r--qt/org.eclipse.cdt.qt.ui/src/org/eclipse/cdt/internal/qt/ui/pro/parser/QtProjectFileParser.java232
-rw-r--r--qt/org.eclipse.cdt.qt.ui/src/org/eclipse/cdt/internal/qt/ui/pro/parser/QtProjectVariable.java776
-rw-r--r--qt/org.eclipse.cdt.qt.ui/src/org/eclipse/cdt/internal/qt/ui/resources/QMLTernFileUpdateJob.java152
-rw-r--r--qt/org.eclipse.cdt.qt.ui/src/org/eclipse/cdt/internal/qt/ui/resources/QtProjectFileUpdateJob.java314
-rw-r--r--qt/org.eclipse.cdt.qt.ui/src/org/eclipse/cdt/internal/qt/ui/resources/QtResourceChangeListener.java256
-rw-r--r--qt/org.eclipse.cdt.qt.ui/src/org/eclipse/cdt/internal/qt/ui/resources/QtWorkspaceSaveParticipant.java78
-rw-r--r--releng/org.eclipse.cdt.native-feature/.project34
-rw-r--r--releng/org.eclipse.cdt.sdk/about.ini54
-rw-r--r--releng/org.eclipse.cdt.sdk/about.mappings16
-rw-r--r--releng/org.eclipse.cdt.testing/about.ini54
-rw-r--r--releng/org.eclipse.cdt.testing/about.mappings16
-rw-r--r--releng/org.eclipse.cdt/.eclipseproduct6
-rw-r--r--releng/org.eclipse.cdt/about.ini48
-rw-r--r--releng/org.eclipse.cdt/about.mappings16
-rw-r--r--releng/org.eclipse.cdt/css/overview.css18
-rwxr-xr-xreleng/scripts/verify_gitattributes.sh22
-rw-r--r--testsrunner/org.eclipse.cdt.testsrunner.feature/.project34
-rw-r--r--testsrunner/org.eclipse.cdt.testsrunner.feature/build.properties26
-rw-r--r--testsrunner/org.eclipse.cdt.testsrunner.tap/.project68
-rw-r--r--testsrunner/org.eclipse.cdt.testsrunner.tests/src/org/eclipse/cdt/testsrunner/testsrunners/TAPTestCase.java398
-rw-r--r--upc/org.eclipse.cdt.core.parser.upc/.classpath14
-rw-r--r--upc/org.eclipse.cdt.core.parser.upc/.settings/org.eclipse.jdt.core.prefs140
-rw-r--r--upc/org.eclipse.cdt.managedbuilder.bupc.ui/.classpath14
-rw-r--r--upc/org.eclipse.cdt.managedbuilder.bupc.ui/.settings/org.eclipse.jdt.core.prefs24
-rwxr-xr-xvisualizer/org.eclipse.cdt.visualizer.ui/src/org/eclipse/cdt/visualizer/ui/canvas/BufferedCanvas.java16
-rwxr-xr-xvisualizer/org.eclipse.cdt.visualizer.ui/src/org/eclipse/cdt/visualizer/ui/canvas/GraphicCanvas.java374
-rwxr-xr-xvisualizer/org.eclipse.cdt.visualizer.ui/src/org/eclipse/cdt/visualizer/ui/canvas/GraphicObject.java892
-rw-r--r--windows/org.eclipse.cdt.msw.build/.classpath14
-rw-r--r--windows/org.eclipse.cdt.msw.build/.settings/org.eclipse.jdt.core.prefs24
-rw-r--r--windows/org.eclipse.cdt.msw.build/src/org/eclipse/cdt/msw/build/core/MSVCToolChain.java562
-rw-r--r--windows/org.eclipse.cdt.msw.build/src/org/eclipse/cdt/msw/build/core/MSVCToolChainProvider.java148
-rw-r--r--xlc/org.eclipse.cdt.core.lrparser.xlc/.classpath16
-rw-r--r--xlc/org.eclipse.cdt.core.lrparser.xlc/.settings/org.eclipse.jdt.core.prefs24
-rw-r--r--xlc/org.eclipse.cdt.errorparsers.xlc.tests/.classpath14
-rw-r--r--xlc/org.eclipse.cdt.errorparsers.xlc.tests/.settings/org.eclipse.jdt.core.prefs16
-rw-r--r--xlc/org.eclipse.cdt.errorparsers.xlc/.classpath14
-rw-r--r--xlc/org.eclipse.cdt.errorparsers.xlc/.settings/org.eclipse.jdt.core.prefs24
-rw-r--r--xlc/org.eclipse.cdt.make.xlc.core/.classpath14
-rw-r--r--xlc/org.eclipse.cdt.make.xlc.core/.settings/org.eclipse.jdt.core.prefs148
-rw-r--r--xlc/org.eclipse.cdt.managedbuilder.xlc.core/.classpath14
-rw-r--r--xlc/org.eclipse.cdt.managedbuilder.xlc.core/.settings/org.eclipse.jdt.core.prefs502
-rw-r--r--xlc/org.eclipse.cdt.managedbuilder.xlc.ui/.classpath14
-rw-r--r--xlc/org.eclipse.cdt.managedbuilder.xlc.ui/.settings/org.eclipse.jdt.core.prefs24
-rw-r--r--xlc/org.eclipse.cdt.managedbuilder.xlupc.ui/.classpath14
-rw-r--r--xlc/org.eclipse.cdt.managedbuilder.xlupc.ui/.settings/org.eclipse.jdt.core.prefs140
609 files changed, 72673 insertions, 72509 deletions
diff --git a/.gitattributes b/.gitattributes
new file mode 100644
index 0000000000..f40ce5ed8b
--- /dev/null
+++ b/.gitattributes
@@ -0,0 +1,142 @@
+* text=auto
+
+# Generic files
+AUTHORS text
+ChangeLog text
+COPYING text
+NEWS text
+README text
+*.txt text
+*.zip binary
+
+# C-like Sources
+*.asm text
+*.c text
+*.cc text
+*.cpp text
+*.h text
+*.s text
+*.S text
+
+# C-like configuration/scripts
+*.ac text
+*.am text
+*.bat text
+*.build text
+*.incl text
+makefile text
+Makefile text
+*.mk text
+*.sh text
+
+# Qt
+*.pro text
+*.qml text
+*.qrc text
+
+# Visual Studio
+*.dsp text eol=crlf
+*.dsw text eol=crlf
+*.filters text eol=crlf
+*.sln text eol=crlf
+*.vcxproj text eol=crlf
+
+# C output files
+# (These should not normally be checked in, exceptions for pre-compiled libraries and tests)
+*.o binary
+*.d text
+*.dll binary
+*.a binary
+*.exe binary
+*.out binary
+*.app binary
+*.jnilib binary
+*.so binary
+
+# Web/Javascript/Node
+*.css text
+*.htm text
+*.html text
+*.js text
+*.json text
+.npmignore text
+package-list text
+*.xml text
+*.xsd text
+*.xsl text
+
+# Images
+*.gif binary
+*.icns binary
+*.ico binary
+*.jpg binary
+*.jpeg binary
+*.png binary
+*.PNG binary
+*.xpm binary
+
+# Java/Eclipse
+*.java text
+*.properties text
+.api_filters text
+.classpath text
+*.exsd text
+*.g text
+*.inf text
+*.ini text
+*.launch text
+*.mappings text
+*.MF text
+.options text
+*.options text
+*.prefs text
+*.product text
+.project text
+*.setup text
+*.target text
+
+# Java output files
+# (These should not normally be checked in, exceptions for pre-compiled libraries and tests)
+*.class binary
+*.jar binary
+
+# Files used in tests
+*.awts text
+be32 binary
+be32lib binary
+be64 binary
+be64lib binary
+exe binary
+exebig_g binary
+exe_g binary
+*.expected text
+*.F90 text
+*.init text
+launchConfigTestGdbinit text
+le32 binary
+le32lib binary
+le64 binary
+le64lib binary
+*.main text
+output-1 text
+*.pda text
+*.rts text
+test_commands text
+
+# Other special files
+cdtOptions text
+.contentsettings text
+*.csv text
+*.dia binary
+*.dictionary text
+.eclipseproduct text
+.euml2 text
+.gitattributes text
+.gitignore text
+*.patch text
+*.src text
+*.tmLanguage text
+*.top text
+*.ucd text
+.umlproject text
+*.upc text
diff --git a/build/org.eclipse.cdt.autotools.core/.settings/org.eclipse.jdt.core.prefs b/build/org.eclipse.cdt.autotools.core/.settings/org.eclipse.jdt.core.prefs
index 5fa6bebe1e..28477e229d 100644
--- a/build/org.eclipse.cdt.autotools.core/.settings/org.eclipse.jdt.core.prefs
+++ b/build/org.eclipse.cdt.autotools.core/.settings/org.eclipse.jdt.core.prefs
@@ -1,100 +1,100 @@
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=disabled
-org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore
-org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull
-org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault
-org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
-org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.8
-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.comparingIdentical=warning
-org.eclipse.jdt.core.compiler.problem.deadCode=warning
-org.eclipse.jdt.core.compiler.problem.deprecation=warning
-org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
-org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
-org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
-org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=warning
-org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
-org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
-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.includeNullInfoFromAsserts=disabled
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=warning
-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.missingDefaultCase=ignore
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=warning
-org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=disabled
-org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=warning
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
-org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
-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.nonnullParameterAnnotationDropped=warning
-org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error
-org.eclipse.jdt.core.compiler.problem.nullReference=warning
-org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error
-org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=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.potentiallyUnclosedCloseable=ignore
-org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
-org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning
-org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
-org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=warning
-org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=warning
-org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
-org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
-org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
-org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
-org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=disabled
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
-org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
-org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=enabled
-org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
-org.eclipse.jdt.core.compiler.problem.unclosedCloseable=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=disabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=disabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.unusedExceptionParameter=ignore
-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.unusedObjectAllocation=ignore
-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.unusedTypeParameter=warning
-org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.source=1.8
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=disabled
+org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore
+org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull
+org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault
+org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
+org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+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.comparingIdentical=warning
+org.eclipse.jdt.core.compiler.problem.deadCode=warning
+org.eclipse.jdt.core.compiler.problem.deprecation=warning
+org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
+org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
+org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
+org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=warning
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
+org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
+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.includeNullInfoFromAsserts=disabled
+org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
+org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=warning
+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.missingDefaultCase=ignore
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=disabled
+org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
+org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
+org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
+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.nonnullParameterAnnotationDropped=warning
+org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error
+org.eclipse.jdt.core.compiler.problem.nullReference=warning
+org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error
+org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=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.potentiallyUnclosedCloseable=ignore
+org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
+org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=warning
+org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=warning
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore
+org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
+org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
+org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
+org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
+org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=disabled
+org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
+org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
+org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=enabled
+org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
+org.eclipse.jdt.core.compiler.problem.unclosedCloseable=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=disabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=disabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=enabled
+org.eclipse.jdt.core.compiler.problem.unusedExceptionParameter=ignore
+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.unusedObjectAllocation=ignore
+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.unusedTypeParameter=warning
+org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/build/org.eclipse.cdt.autotools.tests/.settings/org.eclipse.jdt.core.prefs b/build/org.eclipse.cdt.autotools.tests/.settings/org.eclipse.jdt.core.prefs
index 0ff2963342..01c8b5d65b 100644
--- a/build/org.eclipse.cdt.autotools.tests/.settings/org.eclipse.jdt.core.prefs
+++ b/build/org.eclipse.cdt.autotools.tests/.settings/org.eclipse.jdt.core.prefs
@@ -1,101 +1,101 @@
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=disabled
-org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore
-org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull
-org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault
-org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
-org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.8
-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.comparingIdentical=warning
-org.eclipse.jdt.core.compiler.problem.deadCode=warning
-org.eclipse.jdt.core.compiler.problem.deprecation=warning
-org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
-org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
-org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
-org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=warning
-org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
-org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
-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.includeNullInfoFromAsserts=disabled
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=warning
-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.missingDefaultCase=ignore
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=warning
-org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=disabled
-org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=warning
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
-org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
-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.nonnullParameterAnnotationDropped=warning
-org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error
-org.eclipse.jdt.core.compiler.problem.nullReference=warning
-org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error
-org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=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.potentiallyUnclosedCloseable=ignore
-org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
-org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning
-org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
-org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=warning
-org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=warning
-org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
-org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
-org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
-org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
-org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=disabled
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
-org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
-org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=enabled
-org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
-org.eclipse.jdt.core.compiler.problem.unclosedCloseable=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=disabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=disabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.unusedExceptionParameter=ignore
-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.unusedObjectAllocation=ignore
-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.unusedTypeParameter=warning
-org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.source=1.8
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=disabled
+org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore
+org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull
+org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault
+org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
+org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+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.comparingIdentical=warning
+org.eclipse.jdt.core.compiler.problem.deadCode=warning
+org.eclipse.jdt.core.compiler.problem.deprecation=warning
+org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
+org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
+org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
+org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=warning
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
+org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
+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.includeNullInfoFromAsserts=disabled
+org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
+org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=warning
+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.missingDefaultCase=ignore
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=disabled
+org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
+org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
+org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
+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.nonnullParameterAnnotationDropped=warning
+org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error
+org.eclipse.jdt.core.compiler.problem.nullReference=warning
+org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error
+org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=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.potentiallyUnclosedCloseable=ignore
+org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
+org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=warning
+org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=warning
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore
+org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
+org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
+org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
+org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
+org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=disabled
+org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
+org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
+org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=enabled
+org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
+org.eclipse.jdt.core.compiler.problem.unclosedCloseable=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=disabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=disabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=enabled
+org.eclipse.jdt.core.compiler.problem.unusedExceptionParameter=ignore
+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.unusedObjectAllocation=ignore
+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.unusedTypeParameter=warning
+org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/build/org.eclipse.cdt.build.gcc.core/src/org/eclipse/cdt/build/gcc/core/ClangToolChain.java b/build/org.eclipse.cdt.build.gcc.core/src/org/eclipse/cdt/build/gcc/core/ClangToolChain.java
index 96fa84d7a5..ae4f4cbb7a 100644
--- a/build/org.eclipse.cdt.build.gcc.core/src/org/eclipse/cdt/build/gcc/core/ClangToolChain.java
+++ b/build/org.eclipse.cdt.build.gcc.core/src/org/eclipse/cdt/build/gcc/core/ClangToolChain.java
@@ -1,36 +1,36 @@
-/*******************************************************************************
- * Copyright (c) 2017 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
- *******************************************************************************/
-package org.eclipse.cdt.build.gcc.core;
-
-import java.nio.file.Path;
-
-import org.eclipse.cdt.core.build.IToolChainProvider;
-import org.eclipse.cdt.core.envvar.IEnvironmentVariable;
-
-/**
- * The Clang toolchain. There's little different from the GCC toolchain other
- * than the toolchain type and name.
- *
- * @author dschaefer
- *
- */
-public class ClangToolChain extends GCCToolChain {
-
- public static final String TYPE_ID = "org.eclipse.cdt.build.clang"; //$NON-NLS-1$
-
- public ClangToolChain(IToolChainProvider provider, Path pathToToolChain, String arch,
- IEnvironmentVariable[] envVars) {
- super(provider, pathToToolChain, arch, envVars);
- }
-
- @Override
- public String getTypeId() {
- return TYPE_ID;
- }
-
-}
+/*******************************************************************************
+ * Copyright (c) 2017 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
+ *******************************************************************************/
+package org.eclipse.cdt.build.gcc.core;
+
+import java.nio.file.Path;
+
+import org.eclipse.cdt.core.build.IToolChainProvider;
+import org.eclipse.cdt.core.envvar.IEnvironmentVariable;
+
+/**
+ * The Clang toolchain. There's little different from the GCC toolchain other
+ * than the toolchain type and name.
+ *
+ * @author dschaefer
+ *
+ */
+public class ClangToolChain extends GCCToolChain {
+
+ public static final String TYPE_ID = "org.eclipse.cdt.build.clang"; //$NON-NLS-1$
+
+ public ClangToolChain(IToolChainProvider provider, Path pathToToolChain, String arch,
+ IEnvironmentVariable[] envVars) {
+ super(provider, pathToToolChain, arch, envVars);
+ }
+
+ @Override
+ public String getTypeId() {
+ return TYPE_ID;
+ }
+
+}
diff --git a/build/org.eclipse.cdt.build.gcc.core/src/org/eclipse/cdt/build/gcc/core/internal/Msys2ToolChainProvider.java b/build/org.eclipse.cdt.build.gcc.core/src/org/eclipse/cdt/build/gcc/core/internal/Msys2ToolChainProvider.java
index 7b4cb3a5e1..c702701820 100644
--- a/build/org.eclipse.cdt.build.gcc.core/src/org/eclipse/cdt/build/gcc/core/internal/Msys2ToolChainProvider.java
+++ b/build/org.eclipse.cdt.build.gcc.core/src/org/eclipse/cdt/build/gcc/core/internal/Msys2ToolChainProvider.java
@@ -1,126 +1,126 @@
-/*******************************************************************************
- * Copyright (c) 2016 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
- *******************************************************************************/
-package org.eclipse.cdt.build.gcc.core.internal;
-
-import java.io.File;
-import java.nio.file.Files;
-import java.nio.file.Path;
-import java.nio.file.Paths;
-
-import org.eclipse.cdt.build.gcc.core.GCCToolChain;
-import org.eclipse.cdt.core.build.IToolChain;
-import org.eclipse.cdt.core.build.IToolChainManager;
-import org.eclipse.cdt.core.build.IToolChainProvider;
-import org.eclipse.cdt.core.envvar.EnvironmentVariable;
-import org.eclipse.cdt.core.envvar.IEnvironmentVariable;
-import org.eclipse.cdt.utils.WindowsRegistry;
-import org.eclipse.core.runtime.Platform;
-
-public class Msys2ToolChainProvider implements IToolChainProvider {
-
- private static final String ID = "org.eclipse.cdt.build.gcc.core.msys2Provider"; //$NON-NLS-1$
-
- @Override
- public String getId() {
- return ID;
- }
-
- @Override
- public void init(IToolChainManager manager) {
- if (Platform.getOS().equals(Platform.OS_WIN32)) {
- WindowsRegistry registry = WindowsRegistry.getRegistry();
- String uninstallKey = "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall"; //$NON-NLS-1$
- String subkey;
- boolean on64bit = Platform.getOSArch().equals(Platform.ARCH_X86_64);
- String key32bit = null;
- for (int i = 0; (subkey = registry.getCurrentUserKeyName(uninstallKey, i)) != null; i++) {
- String compKey = uninstallKey + '\\' + subkey;
- String displayName = registry.getCurrentUserValue(compKey, "DisplayName"); //$NON-NLS-1$
- if (on64bit) {
- if ("MSYS2 64bit".equals(displayName)) { //$NON-NLS-1$
- if (addToolChain64(manager, registry, compKey)) {
- key32bit = null;
- break;
- }
- } else if ("MSYS2 32bit".equals(displayName)) { //$NON-NLS-1$
- key32bit = compKey;
- }
- } else {
- if ("MSYS2 32bit".equals(displayName)) { //$NON-NLS-1$
- if (addToolChain32(manager, registry, compKey)) {
- break;
- }
- }
- }
- }
-
- if (on64bit && key32bit != null) {
- addToolChain64(manager, registry, key32bit);
- }
- }
- }
-
- private boolean addToolChain64(IToolChainManager manager, WindowsRegistry registry, String key) {
- String installLocation = registry.getCurrentUserValue(key, "InstallLocation"); //$NON-NLS-1$
- Path msysPath = Paths.get(installLocation);
- Path gccPath = msysPath.resolve("mingw64\\bin\\gcc.exe"); //$NON-NLS-1$
- if (Files.exists(gccPath)) {
- StringBuilder pathVar = new StringBuilder();
- pathVar.append(msysPath);
- pathVar.append("\\mingw64\\bin"); //$NON-NLS-1$
- pathVar.append(File.pathSeparatorChar);
- pathVar.append(msysPath);
- pathVar.append("\\usr\\local\\bin"); //$NON-NLS-1$
- pathVar.append(File.pathSeparatorChar);
- pathVar.append(msysPath);
- pathVar.append("\\usr\\bin"); //$NON-NLS-1$
- pathVar.append(File.pathSeparatorChar);
- pathVar.append(msysPath);
- pathVar.append("\\bin"); //$NON-NLS-1$
- IEnvironmentVariable[] vars = new IEnvironmentVariable[] {
- new EnvironmentVariable("PATH", pathVar.toString(), IEnvironmentVariable.ENVVAR_PREPEND, //$NON-NLS-1$
- File.pathSeparator)
- };
- GCCToolChain toolChain = new GCCToolChain(this, gccPath, Platform.ARCH_X86_64, vars);
- toolChain.setProperty(IToolChain.ATTR_PACKAGE, "msys2"); //$NON-NLS-1$
- manager.addToolChain(toolChain);
- return true;
- } else {
- return addToolChain32(manager, registry, key);
- }
- }
-
- private boolean addToolChain32(IToolChainManager manager, WindowsRegistry registry, String key) {
- String installLocation = registry.getCurrentUserValue(key, "InstallLocation"); //$NON-NLS-1$
- Path msysPath = Paths.get(installLocation);
- Path gccPath = msysPath.resolve("mingw32\\bin\\gcc.exe"); //$NON-NLS-1$
- if (Files.exists(gccPath)) {
- StringBuilder pathVar = new StringBuilder();
- pathVar.append(msysPath);
- pathVar.append("\\mingw32\\bin"); //$NON-NLS-1$
- pathVar.append(File.pathSeparatorChar);
- pathVar.append(msysPath);
- pathVar.append("\\usr\\local\\bin"); //$NON-NLS-1$
- pathVar.append(File.pathSeparatorChar);
- pathVar.append(msysPath);
- pathVar.append("\\usr\\bin"); //$NON-NLS-1$
- pathVar.append(File.pathSeparatorChar);
- pathVar.append(msysPath);
- pathVar.append("\\bin"); //$NON-NLS-1$
- IEnvironmentVariable[] vars = new IEnvironmentVariable[] {
- new EnvironmentVariable("PATH", pathVar.toString(), IEnvironmentVariable.ENVVAR_PREPEND, //$NON-NLS-1$
- File.pathSeparator) };
- GCCToolChain toolChain = new GCCToolChain(this, gccPath, Platform.ARCH_X86, vars);
- toolChain.setProperty(IToolChain.ATTR_PACKAGE, "msys2"); //$NON-NLS-1$
- manager.addToolChain(toolChain);
- return true;
- } else {
- return false;
- }
- }
-
-}
+/*******************************************************************************
+ * Copyright (c) 2016 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
+ *******************************************************************************/
+package org.eclipse.cdt.build.gcc.core.internal;
+
+import java.io.File;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+
+import org.eclipse.cdt.build.gcc.core.GCCToolChain;
+import org.eclipse.cdt.core.build.IToolChain;
+import org.eclipse.cdt.core.build.IToolChainManager;
+import org.eclipse.cdt.core.build.IToolChainProvider;
+import org.eclipse.cdt.core.envvar.EnvironmentVariable;
+import org.eclipse.cdt.core.envvar.IEnvironmentVariable;
+import org.eclipse.cdt.utils.WindowsRegistry;
+import org.eclipse.core.runtime.Platform;
+
+public class Msys2ToolChainProvider implements IToolChainProvider {
+
+ private static final String ID = "org.eclipse.cdt.build.gcc.core.msys2Provider"; //$NON-NLS-1$
+
+ @Override
+ public String getId() {
+ return ID;
+ }
+
+ @Override
+ public void init(IToolChainManager manager) {
+ if (Platform.getOS().equals(Platform.OS_WIN32)) {
+ WindowsRegistry registry = WindowsRegistry.getRegistry();
+ String uninstallKey = "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall"; //$NON-NLS-1$
+ String subkey;
+ boolean on64bit = Platform.getOSArch().equals(Platform.ARCH_X86_64);
+ String key32bit = null;
+ for (int i = 0; (subkey = registry.getCurrentUserKeyName(uninstallKey, i)) != null; i++) {
+ String compKey = uninstallKey + '\\' + subkey;
+ String displayName = registry.getCurrentUserValue(compKey, "DisplayName"); //$NON-NLS-1$
+ if (on64bit) {
+ if ("MSYS2 64bit".equals(displayName)) { //$NON-NLS-1$
+ if (addToolChain64(manager, registry, compKey)) {
+ key32bit = null;
+ break;
+ }
+ } else if ("MSYS2 32bit".equals(displayName)) { //$NON-NLS-1$
+ key32bit = compKey;
+ }
+ } else {
+ if ("MSYS2 32bit".equals(displayName)) { //$NON-NLS-1$
+ if (addToolChain32(manager, registry, compKey)) {
+ break;
+ }
+ }
+ }
+ }
+
+ if (on64bit && key32bit != null) {
+ addToolChain64(manager, registry, key32bit);
+ }
+ }
+ }
+
+ private boolean addToolChain64(IToolChainManager manager, WindowsRegistry registry, String key) {
+ String installLocation = registry.getCurrentUserValue(key, "InstallLocation"); //$NON-NLS-1$
+ Path msysPath = Paths.get(installLocation);
+ Path gccPath = msysPath.resolve("mingw64\\bin\\gcc.exe"); //$NON-NLS-1$
+ if (Files.exists(gccPath)) {
+ StringBuilder pathVar = new StringBuilder();
+ pathVar.append(msysPath);
+ pathVar.append("\\mingw64\\bin"); //$NON-NLS-1$
+ pathVar.append(File.pathSeparatorChar);
+ pathVar.append(msysPath);
+ pathVar.append("\\usr\\local\\bin"); //$NON-NLS-1$
+ pathVar.append(File.pathSeparatorChar);
+ pathVar.append(msysPath);
+ pathVar.append("\\usr\\bin"); //$NON-NLS-1$
+ pathVar.append(File.pathSeparatorChar);
+ pathVar.append(msysPath);
+ pathVar.append("\\bin"); //$NON-NLS-1$
+ IEnvironmentVariable[] vars = new IEnvironmentVariable[] {
+ new EnvironmentVariable("PATH", pathVar.toString(), IEnvironmentVariable.ENVVAR_PREPEND, //$NON-NLS-1$
+ File.pathSeparator)
+ };
+ GCCToolChain toolChain = new GCCToolChain(this, gccPath, Platform.ARCH_X86_64, vars);
+ toolChain.setProperty(IToolChain.ATTR_PACKAGE, "msys2"); //$NON-NLS-1$
+ manager.addToolChain(toolChain);
+ return true;
+ } else {
+ return addToolChain32(manager, registry, key);
+ }
+ }
+
+ private boolean addToolChain32(IToolChainManager manager, WindowsRegistry registry, String key) {
+ String installLocation = registry.getCurrentUserValue(key, "InstallLocation"); //$NON-NLS-1$
+ Path msysPath = Paths.get(installLocation);
+ Path gccPath = msysPath.resolve("mingw32\\bin\\gcc.exe"); //$NON-NLS-1$
+ if (Files.exists(gccPath)) {
+ StringBuilder pathVar = new StringBuilder();
+ pathVar.append(msysPath);
+ pathVar.append("\\mingw32\\bin"); //$NON-NLS-1$
+ pathVar.append(File.pathSeparatorChar);
+ pathVar.append(msysPath);
+ pathVar.append("\\usr\\local\\bin"); //$NON-NLS-1$
+ pathVar.append(File.pathSeparatorChar);
+ pathVar.append(msysPath);
+ pathVar.append("\\usr\\bin"); //$NON-NLS-1$
+ pathVar.append(File.pathSeparatorChar);
+ pathVar.append(msysPath);
+ pathVar.append("\\bin"); //$NON-NLS-1$
+ IEnvironmentVariable[] vars = new IEnvironmentVariable[] {
+ new EnvironmentVariable("PATH", pathVar.toString(), IEnvironmentVariable.ENVVAR_PREPEND, //$NON-NLS-1$
+ File.pathSeparator) };
+ GCCToolChain toolChain = new GCCToolChain(this, gccPath, Platform.ARCH_X86, vars);
+ toolChain.setProperty(IToolChain.ATTR_PACKAGE, "msys2"); //$NON-NLS-1$
+ manager.addToolChain(toolChain);
+ return true;
+ } else {
+ return false;
+ }
+ }
+
+}
diff --git a/build/org.eclipse.cdt.build.gcc.ui/src/org/eclipse/cdt/build/gcc/ui/internal/Messages.java b/build/org.eclipse.cdt.build.gcc.ui/src/org/eclipse/cdt/build/gcc/ui/internal/Messages.java
index 4905e7fd64..2e07df0092 100644
--- a/build/org.eclipse.cdt.build.gcc.ui/src/org/eclipse/cdt/build/gcc/ui/internal/Messages.java
+++ b/build/org.eclipse.cdt.build.gcc.ui/src/org/eclipse/cdt/build/gcc/ui/internal/Messages.java
@@ -1,56 +1,56 @@
-/*******************************************************************************
- * Copyright (c) 2017 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
- *******************************************************************************/
-package org.eclipse.cdt.build.gcc.ui.internal;
-
-import org.eclipse.osgi.util.NLS;
-
-public class Messages extends NLS {
- private static final String BUNDLE_NAME = "org.eclipse.cdt.build.gcc.ui.internal.messages"; //$NON-NLS-1$
- public static String GCCToolChainSettingsPage_Arch;
- public static String GCCToolChainSettingsPage_Browse;
- public static String GCCToolChainSettingsPage_ClangTitle;
- public static String GCCToolChainSettingsPage_Compiler;
- public static String GCCToolChainSettingsPage_Description;
- public static String GCCToolChainSettingsPage_OS;
- public static String GCCToolChainSettingsPage_Title;
- public static String NewClangToolChainWizard_Title;
- public static String NewEnvVarDialog_Append;
- public static String NewEnvVarDialog_Delimiter;
- public static String NewEnvVarDialog_Edit;
- public static String NewEnvVarDialog_Name;
- public static String NewEnvVarDialog_New;
- public static String NewEnvVarDialog_Operation;
- public static String NewEnvVarDialog_Prepend;
- public static String NewEnvVarDialog_Replace;
- public static String NewEnvVarDialog_Select;
- public static String NewEnvVarDialog_Unset;
- public static String NewEnvVarDialog_Value;
- public static String NewGCCToolChainWizard_Add;
- public static String NewGCCToolChainWizard_New;
- public static String ToolChainEnvironmentPage_Add;
- public static String ToolChainEnvironmentPage_Append;
- public static String ToolChainEnvironmentPage_Description;
- public static String ToolChainEnvironmentPage_Edit;
- public static String ToolChainEnvironmentPage_Name;
- public static String ToolChainEnvironmentPage_Operation;
- public static String ToolChainEnvironmentPage_Prepend;
- public static String ToolChainEnvironmentPage_Remove;
- public static String ToolChainEnvironmentPage_RemoveMessage;
- public static String ToolChainEnvironmentPage_RemoveTitle;
- public static String ToolChainEnvironmentPage_Replace;
- public static String ToolChainEnvironmentPage_Title;
- public static String ToolChainEnvironmentPage_Unset;
- public static String ToolChainEnvironmentPage_Value;
- static {
- // initialize resource bundle
- NLS.initializeMessages(BUNDLE_NAME, Messages.class);
- }
-
- private Messages() {
- }
-}
+/*******************************************************************************
+ * Copyright (c) 2017 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
+ *******************************************************************************/
+package org.eclipse.cdt.build.gcc.ui.internal;
+
+import org.eclipse.osgi.util.NLS;
+
+public class Messages extends NLS {
+ private static final String BUNDLE_NAME = "org.eclipse.cdt.build.gcc.ui.internal.messages"; //$NON-NLS-1$
+ public static String GCCToolChainSettingsPage_Arch;
+ public static String GCCToolChainSettingsPage_Browse;
+ public static String GCCToolChainSettingsPage_ClangTitle;
+ public static String GCCToolChainSettingsPage_Compiler;
+ public static String GCCToolChainSettingsPage_Description;
+ public static String GCCToolChainSettingsPage_OS;
+ public static String GCCToolChainSettingsPage_Title;
+ public static String NewClangToolChainWizard_Title;
+ public static String NewEnvVarDialog_Append;
+ public static String NewEnvVarDialog_Delimiter;
+ public static String NewEnvVarDialog_Edit;
+ public static String NewEnvVarDialog_Name;
+ public static String NewEnvVarDialog_New;
+ public static String NewEnvVarDialog_Operation;
+ public static String NewEnvVarDialog_Prepend;
+ public static String NewEnvVarDialog_Replace;
+ public static String NewEnvVarDialog_Select;
+ public static String NewEnvVarDialog_Unset;
+ public static String NewEnvVarDialog_Value;
+ public static String NewGCCToolChainWizard_Add;
+ public static String NewGCCToolChainWizard_New;
+ public static String ToolChainEnvironmentPage_Add;
+ public static String ToolChainEnvironmentPage_Append;
+ public static String ToolChainEnvironmentPage_Description;
+ public static String ToolChainEnvironmentPage_Edit;
+ public static String ToolChainEnvironmentPage_Name;
+ public static String ToolChainEnvironmentPage_Operation;
+ public static String ToolChainEnvironmentPage_Prepend;
+ public static String ToolChainEnvironmentPage_Remove;
+ public static String ToolChainEnvironmentPage_RemoveMessage;
+ public static String ToolChainEnvironmentPage_RemoveTitle;
+ public static String ToolChainEnvironmentPage_Replace;
+ public static String ToolChainEnvironmentPage_Title;
+ public static String ToolChainEnvironmentPage_Unset;
+ public static String ToolChainEnvironmentPage_Value;
+ static {
+ // initialize resource bundle
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+
+ private Messages() {
+ }
+}
diff --git a/build/org.eclipse.cdt.build.gcc.ui/src/org/eclipse/cdt/build/gcc/ui/internal/NewClangToolChainWizard.java b/build/org.eclipse.cdt.build.gcc.ui/src/org/eclipse/cdt/build/gcc/ui/internal/NewClangToolChainWizard.java
index a489217305..d508b73992 100644
--- a/build/org.eclipse.cdt.build.gcc.ui/src/org/eclipse/cdt/build/gcc/ui/internal/NewClangToolChainWizard.java
+++ b/build/org.eclipse.cdt.build.gcc.ui/src/org/eclipse/cdt/build/gcc/ui/internal/NewClangToolChainWizard.java
@@ -1,75 +1,75 @@
-/*******************************************************************************
- * Copyright (c) 2017 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
- *******************************************************************************/
-package org.eclipse.cdt.build.gcc.ui.internal;
-
-import java.nio.file.Path;
-
-import org.eclipse.cdt.build.gcc.core.ClangToolChain;
-import org.eclipse.cdt.build.gcc.core.GCCToolChain;
-import org.eclipse.cdt.build.gcc.core.GCCUserToolChainProvider;
-import org.eclipse.cdt.core.build.IToolChain;
-import org.eclipse.cdt.core.build.IToolChainManager;
-import org.eclipse.cdt.core.build.IUserToolChainProvider;
-import org.eclipse.cdt.core.envvar.IEnvironmentVariable;
-import org.eclipse.cdt.ui.build.ToolChainWizard;
-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;
-
-public class NewClangToolChainWizard extends ToolChainWizard {
-
- private GCCToolChainSettingsPage settingsPage;
- private ToolChainEnvironmentPage envPage;
-
- @Override
- public boolean performFinish() {
- Path path = settingsPage.getPath();
- String os = settingsPage.getOS();
- String arch = settingsPage.getArch();
- IEnvironmentVariable[] envvars = envPage.getEnvVars();
-
- new Job(Messages.NewGCCToolChainWizard_Add) {
- @Override
- protected IStatus run(IProgressMonitor monitor) {
- try {
- IToolChainManager manager = Activator.getService(IToolChainManager.class);
- IUserToolChainProvider provider = (IUserToolChainProvider) manager
- .getProvider(GCCUserToolChainProvider.PROVIDER_ID);
-
- if (toolChain != null) {
- provider.removeToolChain(toolChain);
- }
-
- ClangToolChain gcc = new ClangToolChain(provider, path, arch, envvars);
- gcc.setProperty(IToolChain.ATTR_OS, os);
- provider.addToolChain(gcc);
- return Status.OK_STATUS;
- } catch (CoreException e) {
- return e.getStatus();
- }
- }
- }.schedule();
- return true;
- }
-
- @Override
- public void addPages() {
- super.addPages();
-
- settingsPage = new GCCToolChainSettingsPage((GCCToolChain) toolChain, true);
- addPage(settingsPage);
-
- envPage = new ToolChainEnvironmentPage(toolChain);
- addPage(envPage);
-
- setWindowTitle(Messages.NewClangToolChainWizard_Title);
- }
-
-}
+/*******************************************************************************
+ * Copyright (c) 2017 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
+ *******************************************************************************/
+package org.eclipse.cdt.build.gcc.ui.internal;
+
+import java.nio.file.Path;
+
+import org.eclipse.cdt.build.gcc.core.ClangToolChain;
+import org.eclipse.cdt.build.gcc.core.GCCToolChain;
+import org.eclipse.cdt.build.gcc.core.GCCUserToolChainProvider;
+import org.eclipse.cdt.core.build.IToolChain;
+import org.eclipse.cdt.core.build.IToolChainManager;
+import org.eclipse.cdt.core.build.IUserToolChainProvider;
+import org.eclipse.cdt.core.envvar.IEnvironmentVariable;
+import org.eclipse.cdt.ui.build.ToolChainWizard;
+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;
+
+public class NewClangToolChainWizard extends ToolChainWizard {
+
+ private GCCToolChainSettingsPage settingsPage;
+ private ToolChainEnvironmentPage envPage;
+
+ @Override
+ public boolean performFinish() {
+ Path path = settingsPage.getPath();
+ String os = settingsPage.getOS();
+ String arch = settingsPage.getArch();
+ IEnvironmentVariable[] envvars = envPage.getEnvVars();
+
+ new Job(Messages.NewGCCToolChainWizard_Add) {
+ @Override
+ protected IStatus run(IProgressMonitor monitor) {
+ try {
+ IToolChainManager manager = Activator.getService(IToolChainManager.class);
+ IUserToolChainProvider provider = (IUserToolChainProvider) manager
+ .getProvider(GCCUserToolChainProvider.PROVIDER_ID);
+
+ if (toolChain != null) {
+ provider.removeToolChain(toolChain);
+ }
+
+ ClangToolChain gcc = new ClangToolChain(provider, path, arch, envvars);
+ gcc.setProperty(IToolChain.ATTR_OS, os);
+ provider.addToolChain(gcc);
+ return Status.OK_STATUS;
+ } catch (CoreException e) {
+ return e.getStatus();
+ }
+ }
+ }.schedule();
+ return true;
+ }
+
+ @Override
+ public void addPages() {
+ super.addPages();
+
+ settingsPage = new GCCToolChainSettingsPage((GCCToolChain) toolChain, true);
+ addPage(settingsPage);
+
+ envPage = new ToolChainEnvironmentPage(toolChain);
+ addPage(envPage);
+
+ setWindowTitle(Messages.NewClangToolChainWizard_Title);
+ }
+
+}
diff --git a/build/org.eclipse.cdt.build.gcc.ui/src/org/eclipse/cdt/build/gcc/ui/internal/messages.properties b/build/org.eclipse.cdt.build.gcc.ui/src/org/eclipse/cdt/build/gcc/ui/internal/messages.properties
index 47aa4fe0d0..986e1cb776 100644
--- a/build/org.eclipse.cdt.build.gcc.ui/src/org/eclipse/cdt/build/gcc/ui/internal/messages.properties
+++ b/build/org.eclipse.cdt.build.gcc.ui/src/org/eclipse/cdt/build/gcc/ui/internal/messages.properties
@@ -1,42 +1,42 @@
-################################################################################
-# Copyright (c) 2017 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
-################################################################################
-GCCToolChainSettingsPage_Arch=CPU Architecture:
-GCCToolChainSettingsPage_Browse=Browse...
-GCCToolChainSettingsPage_ClangTitle=clang Toolchain Settings
-GCCToolChainSettingsPage_Compiler=Compiler:
-GCCToolChainSettingsPage_Description=Enter the path to the compiler and properties for the toolchain.
-GCCToolChainSettingsPage_OS=Operating System:
-GCCToolChainSettingsPage_Title=GCC ToolChain Settings
-NewClangToolChainWizard_Title=New clang Toolchain
-NewEnvVarDialog_Append=Append
-NewEnvVarDialog_Delimiter=Delimiter:
-NewEnvVarDialog_Edit=Edit Environment Variable
-NewEnvVarDialog_Name=Name:
-NewEnvVarDialog_New=New Environment Variable
-NewEnvVarDialog_Operation=Operation
-NewEnvVarDialog_Prepend=Prepend
-NewEnvVarDialog_Replace=Replace
-NewEnvVarDialog_Select=Select...
-NewEnvVarDialog_Unset=Unset
-NewEnvVarDialog_Value=Value:
-NewGCCToolChainWizard_Add=Add ToolChain
-NewGCCToolChainWizard_New=New GCC ToolChain
-ToolChainEnvironmentPage_Add=Add...
-ToolChainEnvironmentPage_Append=Append
-ToolChainEnvironmentPage_Description=Environment variables to set when using toolchain.
-ToolChainEnvironmentPage_Edit=Edit...
-ToolChainEnvironmentPage_Name=Name
-ToolChainEnvironmentPage_Operation=Operation
-ToolChainEnvironmentPage_Prepend=Prepend
-ToolChainEnvironmentPage_Remove=Remove
-ToolChainEnvironmentPage_RemoveMessage=Are you sure you would like to remove the selected environment variable(s)
-ToolChainEnvironmentPage_RemoveTitle=Remove
-ToolChainEnvironmentPage_Replace=Replace
-ToolChainEnvironmentPage_Title=Environment Variables
-ToolChainEnvironmentPage_Unset=Unset
-ToolChainEnvironmentPage_Value=Value
+################################################################################
+# Copyright (c) 2017 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
+################################################################################
+GCCToolChainSettingsPage_Arch=CPU Architecture:
+GCCToolChainSettingsPage_Browse=Browse...
+GCCToolChainSettingsPage_ClangTitle=clang Toolchain Settings
+GCCToolChainSettingsPage_Compiler=Compiler:
+GCCToolChainSettingsPage_Description=Enter the path to the compiler and properties for the toolchain.
+GCCToolChainSettingsPage_OS=Operating System:
+GCCToolChainSettingsPage_Title=GCC ToolChain Settings
+NewClangToolChainWizard_Title=New clang Toolchain
+NewEnvVarDialog_Append=Append
+NewEnvVarDialog_Delimiter=Delimiter:
+NewEnvVarDialog_Edit=Edit Environment Variable
+NewEnvVarDialog_Name=Name:
+NewEnvVarDialog_New=New Environment Variable
+NewEnvVarDialog_Operation=Operation
+NewEnvVarDialog_Prepend=Prepend
+NewEnvVarDialog_Replace=Replace
+NewEnvVarDialog_Select=Select...
+NewEnvVarDialog_Unset=Unset
+NewEnvVarDialog_Value=Value:
+NewGCCToolChainWizard_Add=Add ToolChain
+NewGCCToolChainWizard_New=New GCC ToolChain
+ToolChainEnvironmentPage_Add=Add...
+ToolChainEnvironmentPage_Append=Append
+ToolChainEnvironmentPage_Description=Environment variables to set when using toolchain.
+ToolChainEnvironmentPage_Edit=Edit...
+ToolChainEnvironmentPage_Name=Name
+ToolChainEnvironmentPage_Operation=Operation
+ToolChainEnvironmentPage_Prepend=Prepend
+ToolChainEnvironmentPage_Remove=Remove
+ToolChainEnvironmentPage_RemoveMessage=Are you sure you would like to remove the selected environment variable(s)
+ToolChainEnvironmentPage_RemoveTitle=Remove
+ToolChainEnvironmentPage_Replace=Replace
+ToolChainEnvironmentPage_Title=Environment Variables
+ToolChainEnvironmentPage_Unset=Unset
+ToolChainEnvironmentPage_Value=Value
diff --git a/build/org.eclipse.cdt.core.autotools-feature/feature.xml b/build/org.eclipse.cdt.core.autotools-feature/feature.xml
index 37023049e4..f41dd07bfd 100644
--- a/build/org.eclipse.cdt.core.autotools-feature/feature.xml
+++ b/build/org.eclipse.cdt.core.autotools-feature/feature.xml
@@ -1,36 +1,36 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<feature
- id="org.eclipse.cdt.core.autotools"
- label="%featureName"
- version="9.6.0.qualifier"
- provider-name="%providerName"
- license-feature="org.eclipse.license"
- license-feature-version="0.0.0">
-
- <description>
- %description
- </description>
-
- <copyright>
- %copyright
- </copyright>
-
- <license url="%licenseURL">
- %license
- </license>
-
- <plugin
- id="org.eclipse.cdt.core.autotools.ui"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.cdt.core.autotools.core"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
-</feature>
+<?xml version="1.0" encoding="UTF-8"?>
+<feature
+ id="org.eclipse.cdt.core.autotools"
+ label="%featureName"
+ version="9.6.0.qualifier"
+ provider-name="%providerName"
+ license-feature="org.eclipse.license"
+ license-feature-version="0.0.0">
+
+ <description>
+ %description
+ </description>
+
+ <copyright>
+ %copyright
+ </copyright>
+
+ <license url="%licenseURL">
+ %license
+ </license>
+
+ <plugin
+ id="org.eclipse.cdt.core.autotools.ui"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.cdt.core.autotools.core"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+</feature>
diff --git a/build/org.eclipse.cdt.gnu.build-feature/feature.xml b/build/org.eclipse.cdt.gnu.build-feature/feature.xml
index 0ab36aedd6..b7a4c8b03c 100644
--- a/build/org.eclipse.cdt.gnu.build-feature/feature.xml
+++ b/build/org.eclipse.cdt.gnu.build-feature/feature.xml
@@ -1,43 +1,43 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<feature
- id="org.eclipse.cdt.gnu.build"
- label="%featureName"
- version="9.6.0.qualifier"
- provider-name="%providerName"
- license-feature="org.eclipse.license"
- license-feature-version="0.0.0">
-
- <description>
- %description
- </description>
-
- <copyright>
- %copyright
- </copyright>
-
- <license url="%licenseURL">
- %license
- </license>
-
- <plugin
- id="org.eclipse.cdt.managedbuilder.gnu.ui"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.cdt.build.gcc.core"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.cdt.build.gcc.ui"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
-</feature>
+<?xml version="1.0" encoding="UTF-8"?>
+<feature
+ id="org.eclipse.cdt.gnu.build"
+ label="%featureName"
+ version="9.6.0.qualifier"
+ provider-name="%providerName"
+ license-feature="org.eclipse.license"
+ license-feature-version="0.0.0">
+
+ <description>
+ %description
+ </description>
+
+ <copyright>
+ %copyright
+ </copyright>
+
+ <license url="%licenseURL">
+ %license
+ </license>
+
+ <plugin
+ id="org.eclipse.cdt.managedbuilder.gnu.ui"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.cdt.build.gcc.core"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.cdt.build.gcc.ui"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+</feature>
diff --git a/build/org.eclipse.cdt.make.core/schema/MakeTargetBuilder.exsd b/build/org.eclipse.cdt.make.core/schema/MakeTargetBuilder.exsd
index 8f3ad3f4c9..95e4953211 100644
--- a/build/org.eclipse.cdt.make.core/schema/MakeTargetBuilder.exsd
+++ b/build/org.eclipse.cdt.make.core/schema/MakeTargetBuilder.exsd
@@ -1,109 +1,109 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.cdt.make.core">
-<annotation>
- <appInfo>
- <meta.schema plugin="org.eclipse.cdt.make.core" id="MakeTargetBuilder" name="Make Target Builder"/>
- </appInfo>
- <documentation>
- This extension point is used to identify builders that support IMakeBuidlerInfo an arguments.
- </documentation>
- </annotation>
-
- <element name="extension">
- <complexType>
- <sequence>
- <element ref="builder"/>
- </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="builder">
- <complexType>
- <attribute name="builderID" type="string" use="required">
- <annotation>
- <documentation>
- Eclipse builder ID of the builder that supports target builds. (Must support IMakeInfo as argument).
- </documentation>
- </annotation>
- </attribute>
- <attribute name="id" type="string" use="required">
- <annotation>
- <documentation>
- id used to identify this target builder
- </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>
-
- <annotation>
- <appInfo>
- <meta.section type="copyright"/>
- </appInfo>
- <documentation>
-
- </documentation>
- </annotation>
-
-</schema>
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- Schema file written by PDE -->
+<schema targetNamespace="org.eclipse.cdt.make.core">
+<annotation>
+ <appInfo>
+ <meta.schema plugin="org.eclipse.cdt.make.core" id="MakeTargetBuilder" name="Make Target Builder"/>
+ </appInfo>
+ <documentation>
+ This extension point is used to identify builders that support IMakeBuidlerInfo an arguments.
+ </documentation>
+ </annotation>
+
+ <element name="extension">
+ <complexType>
+ <sequence>
+ <element ref="builder"/>
+ </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="builder">
+ <complexType>
+ <attribute name="builderID" type="string" use="required">
+ <annotation>
+ <documentation>
+ Eclipse builder ID of the builder that supports target builds. (Must support IMakeInfo as argument).
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="id" type="string" use="required">
+ <annotation>
+ <documentation>
+ id used to identify this target builder
+ </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>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="copyright"/>
+ </appInfo>
+ <documentation>
+
+ </documentation>
+ </annotation>
+
+</schema>
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/core/MakefileBuildConfigurationProvider.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/core/MakefileBuildConfigurationProvider.java
index 5d6f82d292..3941e48ac0 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/core/MakefileBuildConfigurationProvider.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/core/MakefileBuildConfigurationProvider.java
@@ -1,74 +1,74 @@
-/*******************************************************************************
- * Copyright (c) 2017 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
- *******************************************************************************/
-package org.eclipse.cdt.make.core;
-
-import org.eclipse.cdt.core.build.ICBuildConfiguration;
-import org.eclipse.cdt.core.build.ICBuildConfigurationManager;
-import org.eclipse.cdt.core.build.ICBuildConfigurationProvider;
-import org.eclipse.cdt.core.build.IToolChain;
-import org.eclipse.cdt.core.build.StandardBuildConfiguration;
-import org.eclipse.core.resources.IBuildConfiguration;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-
-/**
- * @since 7.4
- */
-public class MakefileBuildConfigurationProvider implements ICBuildConfigurationProvider {
-
- public static final String ID = "org.eclipse.cdt.make.core.provider"; //$NON-NLS-1$
-
- @Override
- public String getId() {
- return ID;
- }
-
- @Override
- public ICBuildConfiguration getCBuildConfiguration(IBuildConfiguration config, String name)
- throws CoreException {
- return new StandardBuildConfiguration(config, name);
- }
-
- @Override
- public ICBuildConfiguration createBuildConfiguration(IProject project, IToolChain toolChain,
- String launchMode, IProgressMonitor monitor) throws CoreException {
- ICBuildConfigurationManager configManager = MakeCorePlugin.getService(ICBuildConfigurationManager.class);
-
- StringBuilder configName = new StringBuilder("make."); //$NON-NLS-1$
- configName.append(launchMode);
- String os = toolChain.getProperty(IToolChain.ATTR_OS);
- if ("linux-container".equals(os)) { //$NON-NLS-1$
- String osConfigName = toolChain.getProperty("linux-container-id"); //$NON-NLS-1$
- configName.append('.');
- configName.append(osConfigName);
- } else {
- if (os != null) {
- configName.append('.');
- configName.append(os);
- }
- String arch = toolChain.getProperty(IToolChain.ATTR_ARCH);
- if (arch != null && !arch.isEmpty()) {
- configName.append('.');
- configName.append(arch);
- }
- }
- String name = configName.toString();
- int i = 0;
- while (configManager.hasConfiguration(this, project, name)) {
- name = configName.toString() + '.' + (++i);
- }
-
- IBuildConfiguration config = configManager.createBuildConfiguration(this, project, name, monitor);
- StandardBuildConfiguration makeConfig = new StandardBuildConfiguration(config, name, toolChain,
- launchMode);
- configManager.addBuildConfiguration(config, makeConfig);
- return makeConfig;
- }
-
-}
+/*******************************************************************************
+ * Copyright (c) 2017 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
+ *******************************************************************************/
+package org.eclipse.cdt.make.core;
+
+import org.eclipse.cdt.core.build.ICBuildConfiguration;
+import org.eclipse.cdt.core.build.ICBuildConfigurationManager;
+import org.eclipse.cdt.core.build.ICBuildConfigurationProvider;
+import org.eclipse.cdt.core.build.IToolChain;
+import org.eclipse.cdt.core.build.StandardBuildConfiguration;
+import org.eclipse.core.resources.IBuildConfiguration;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+
+/**
+ * @since 7.4
+ */
+public class MakefileBuildConfigurationProvider implements ICBuildConfigurationProvider {
+
+ public static final String ID = "org.eclipse.cdt.make.core.provider"; //$NON-NLS-1$
+
+ @Override
+ public String getId() {
+ return ID;
+ }
+
+ @Override
+ public ICBuildConfiguration getCBuildConfiguration(IBuildConfiguration config, String name)
+ throws CoreException {
+ return new StandardBuildConfiguration(config, name);
+ }
+
+ @Override
+ public ICBuildConfiguration createBuildConfiguration(IProject project, IToolChain toolChain,
+ String launchMode, IProgressMonitor monitor) throws CoreException {
+ ICBuildConfigurationManager configManager = MakeCorePlugin.getService(ICBuildConfigurationManager.class);
+
+ StringBuilder configName = new StringBuilder("make."); //$NON-NLS-1$
+ configName.append(launchMode);
+ String os = toolChain.getProperty(IToolChain.ATTR_OS);
+ if ("linux-container".equals(os)) { //$NON-NLS-1$
+ String osConfigName = toolChain.getProperty("linux-container-id"); //$NON-NLS-1$
+ configName.append('.');
+ configName.append(osConfigName);
+ } else {
+ if (os != null) {
+ configName.append('.');
+ configName.append(os);
+ }
+ String arch = toolChain.getProperty(IToolChain.ATTR_ARCH);
+ if (arch != null && !arch.isEmpty()) {
+ configName.append('.');
+ configName.append(arch);
+ }
+ }
+ String name = configName.toString();
+ int i = 0;
+ while (configManager.hasConfiguration(this, project, name)) {
+ name = configName.toString() + '.' + (++i);
+ }
+
+ IBuildConfiguration config = configManager.createBuildConfiguration(this, project, name, monitor);
+ StandardBuildConfiguration makeConfig = new StandardBuildConfiguration(config, name, toolChain,
+ launchMode);
+ configManager.addBuildConfiguration(config, makeConfig);
+ return makeConfig;
+ }
+
+}
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/core/MakefileProjectGenerator.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/core/MakefileProjectGenerator.java
index 69f6b544f4..cfc0e622e7 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/core/MakefileProjectGenerator.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/core/MakefileProjectGenerator.java
@@ -1,89 +1,89 @@
-/*******************************************************************************
- * Copyright (c) 2017 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
- *******************************************************************************/
-package org.eclipse.cdt.make.core;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.cdt.core.CCProjectNature;
-import org.eclipse.cdt.core.CProjectNature;
-import org.eclipse.cdt.core.build.CBuilder;
-import org.eclipse.cdt.core.model.CoreModel;
-import org.eclipse.cdt.core.model.IPathEntry;
-import org.eclipse.core.resources.ICommand;
-import org.eclipse.core.resources.IFolder;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IProjectDescription;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.tools.templates.freemarker.FMProjectGenerator;
-import org.eclipse.tools.templates.freemarker.SourceRoot;
-import org.eclipse.tools.templates.freemarker.TemplateManifest;
-import org.osgi.framework.Bundle;
-
-/**
- * Generator for Makefile projects.
- *
- * @since 7.4
- */
-public class MakefileProjectGenerator extends FMProjectGenerator {
-
- public MakefileProjectGenerator(String manifestPath) {
- super(manifestPath);
- }
-
- @Override
- protected Bundle getSourceBundle() {
- return MakeCorePlugin.getDefault().getBundle();
- }
-
- @Override
- protected void initProjectDescription(IProjectDescription description) throws CoreException {
- description.setNatureIds(new String[] { CProjectNature.C_NATURE_ID, CCProjectNature.CC_NATURE_ID,
- MakeProjectNature.NATURE_ID });
- ICommand command = description.newCommand();
- CBuilder.setupBuilder(command);
- description.setBuildSpec(new ICommand[] { command });
- }
-
- @Override
- public void generate(Map<String, Object> model, IProgressMonitor monitor) throws CoreException {
- super.generate(model, monitor);
-
- List<IPathEntry> entries = new ArrayList<>();
- IProject project = getProject();
-
- // Create the source and output folders
- IFolder buildFolder = getProject().getFolder("build"); //$NON-NLS-1$
-
- TemplateManifest manifest = getManifest();
- if (manifest != null) {
- List<SourceRoot> srcRoots = getManifest().getSrcRoots();
- if (srcRoots != null && !srcRoots.isEmpty()) {
- for (SourceRoot srcRoot : srcRoots) {
- IFolder sourceFolder = project.getFolder(srcRoot.getDir());
- if (!sourceFolder.exists()) {
- sourceFolder.create(true, true, monitor);
- }
-
- entries.add(CoreModel.newSourceEntry(sourceFolder.getFullPath(),
- new IPath[] { buildFolder.getFullPath() }));
- }
- } else {
- entries.add(CoreModel.newSourceEntry(getProject().getFullPath()));
- }
- }
-
- entries.add(CoreModel.newOutputEntry(buildFolder.getFullPath()));
- CoreModel.getDefault().create(project)
- .setRawPathEntries(entries.toArray(new IPathEntry[entries.size()]), monitor);
- }
-
-}
+/*******************************************************************************
+ * Copyright (c) 2017 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
+ *******************************************************************************/
+package org.eclipse.cdt.make.core;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.cdt.core.CCProjectNature;
+import org.eclipse.cdt.core.CProjectNature;
+import org.eclipse.cdt.core.build.CBuilder;
+import org.eclipse.cdt.core.model.CoreModel;
+import org.eclipse.cdt.core.model.IPathEntry;
+import org.eclipse.core.resources.ICommand;
+import org.eclipse.core.resources.IFolder;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IProjectDescription;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.tools.templates.freemarker.FMProjectGenerator;
+import org.eclipse.tools.templates.freemarker.SourceRoot;
+import org.eclipse.tools.templates.freemarker.TemplateManifest;
+import org.osgi.framework.Bundle;
+
+/**
+ * Generator for Makefile projects.
+ *
+ * @since 7.4
+ */
+public class MakefileProjectGenerator extends FMProjectGenerator {
+
+ public MakefileProjectGenerator(String manifestPath) {
+ super(manifestPath);
+ }
+
+ @Override
+ protected Bundle getSourceBundle() {
+ return MakeCorePlugin.getDefault().getBundle();
+ }
+
+ @Override
+ protected void initProjectDescription(IProjectDescription description) throws CoreException {
+ description.setNatureIds(new String[] { CProjectNature.C_NATURE_ID, CCProjectNature.CC_NATURE_ID,
+ MakeProjectNature.NATURE_ID });
+ ICommand command = description.newCommand();
+ CBuilder.setupBuilder(command);
+ description.setBuildSpec(new ICommand[] { command });
+ }
+
+ @Override
+ public void generate(Map<String, Object> model, IProgressMonitor monitor) throws CoreException {
+ super.generate(model, monitor);
+
+ List<IPathEntry> entries = new ArrayList<>();
+ IProject project = getProject();
+
+ // Create the source and output folders
+ IFolder buildFolder = getProject().getFolder("build"); //$NON-NLS-1$
+
+ TemplateManifest manifest = getManifest();
+ if (manifest != null) {
+ List<SourceRoot> srcRoots = getManifest().getSrcRoots();
+ if (srcRoots != null && !srcRoots.isEmpty()) {
+ for (SourceRoot srcRoot : srcRoots) {
+ IFolder sourceFolder = project.getFolder(srcRoot.getDir());
+ if (!sourceFolder.exists()) {
+ sourceFolder.create(true, true, monitor);
+ }
+
+ entries.add(CoreModel.newSourceEntry(sourceFolder.getFullPath(),
+ new IPath[] { buildFolder.getFullPath() }));
+ }
+ } else {
+ entries.add(CoreModel.newSourceEntry(getProject().getFullPath()));
+ }
+ }
+
+ entries.add(CoreModel.newOutputEntry(buildFolder.getFullPath()));
+ CoreModel.getDefault().create(project)
+ .setRawPathEntries(entries.toArray(new IPathEntry[entries.size()]), monitor);
+ }
+
+}
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig2/GCCSpecsRunSIProvider.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig2/GCCSpecsRunSIProvider.java
index 8ecb3e935e..dfe235e80e 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig2/GCCSpecsRunSIProvider.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig2/GCCSpecsRunSIProvider.java
@@ -1,93 +1,93 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2011 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.cdt.make.internal.core.scannerconfig2;
-
-import java.util.List;
-
-import org.eclipse.cdt.core.CCProjectNature;
-import org.eclipse.cdt.core.CProjectNature;
-import org.eclipse.cdt.make.core.MakeCorePlugin;
-import org.eclipse.cdt.make.core.scannerconfig.ScannerInfoTypes;
-import org.eclipse.cdt.make.internal.core.scannerconfig.gnu.GCCScannerConfigUtil;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.CoreException;
-
-/**
- * Runs a command to retrieve compiler intrinsic scanner info from 'specs' file.
- *
- * @author vhirsl
- */
-public class GCCSpecsRunSIProvider extends DefaultRunSIProvider {
- /* (non-Javadoc)
- * @see org.eclipse.cdt.make.internal.core.scannerconfig2.DefaultRunSIProvider#initialize()
- */
- @Override
- protected boolean initialize() {
- boolean rc = super.initialize();
-
- if (rc) {
- String targetFile = "dummy"; //$NON-NLS-1$
- IProject project = resource.getProject();
- try {
- if (project.hasNature(CCProjectNature.CC_NATURE_ID)) {
- targetFile = GCCScannerConfigUtil.CPP_SPECS_FILE;
- }
- else if (project.hasNature(CProjectNature.C_NATURE_ID)) {
- targetFile = GCCScannerConfigUtil.C_SPECS_FILE;
- }
- // replace string variables in compile arguments
- // TODO Vmir - use string variable replacement
- for (int i = 0; i < fCompileArguments.length; ++i) {
- fCompileArguments[i] = fCompileArguments[i].replaceAll("\\$\\{plugin_state_location\\}", //$NON-NLS-1$
- MakeCorePlugin.getWorkingDirectory().toString());
- fCompileArguments[i] = fCompileArguments[i].replaceAll("\\$\\{specs_file\\}", targetFile); //$NON-NLS-1$
- }
- } catch (CoreException e) {
- //TODO VMIR better error handling
- MakeCorePlugin.log(e.getStatus());
- rc = false;
- }
- }
- return rc;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.make.internal.core.scannerconfig2.DefaultRunSIProvider#prepareArguments(boolean)
- */
- @Override
- protected String[] prepareArguments(boolean isDefaultCommand) {
- if (collector == null)
- return fCompileArguments;
-
- @SuppressWarnings("unchecked")
- List<String> tso = collector.getCollectedScannerInfo(resource.getProject(), ScannerInfoTypes.TARGET_SPECIFIC_OPTION);
- if (tso == null || tso.size() == 0) {
- return fCompileArguments;
- }
-
- String[] rv = null;
- // commandArguments may have multiple arguments; tokenizing
- int nTokens = 0;
- if (fCompileArguments != null && fCompileArguments.length > 0) {
- nTokens = fCompileArguments.length;
- rv = new String[nTokens + tso.size()];
- System.arraycopy(fCompileArguments, 0, rv, 0, nTokens);
- }
- else {
- rv = new String[tso.size()];
- }
- for (int i = 0; i < tso.size(); ++i) {
- rv[nTokens + i] = tso.get(i);
- }
- return rv;
- }
-
-}
+/*******************************************************************************
+ * Copyright (c) 2004, 2011 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.cdt.make.internal.core.scannerconfig2;
+
+import java.util.List;
+
+import org.eclipse.cdt.core.CCProjectNature;
+import org.eclipse.cdt.core.CProjectNature;
+import org.eclipse.cdt.make.core.MakeCorePlugin;
+import org.eclipse.cdt.make.core.scannerconfig.ScannerInfoTypes;
+import org.eclipse.cdt.make.internal.core.scannerconfig.gnu.GCCScannerConfigUtil;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
+
+/**
+ * Runs a command to retrieve compiler intrinsic scanner info from 'specs' file.
+ *
+ * @author vhirsl
+ */
+public class GCCSpecsRunSIProvider extends DefaultRunSIProvider {
+ /* (non-Javadoc)
+ * @see org.eclipse.cdt.make.internal.core.scannerconfig2.DefaultRunSIProvider#initialize()
+ */
+ @Override
+ protected boolean initialize() {
+ boolean rc = super.initialize();
+
+ if (rc) {
+ String targetFile = "dummy"; //$NON-NLS-1$
+ IProject project = resource.getProject();
+ try {
+ if (project.hasNature(CCProjectNature.CC_NATURE_ID)) {
+ targetFile = GCCScannerConfigUtil.CPP_SPECS_FILE;
+ }
+ else if (project.hasNature(CProjectNature.C_NATURE_ID)) {
+ targetFile = GCCScannerConfigUtil.C_SPECS_FILE;
+ }
+ // replace string variables in compile arguments
+ // TODO Vmir - use string variable replacement
+ for (int i = 0; i < fCompileArguments.length; ++i) {
+ fCompileArguments[i] = fCompileArguments[i].replaceAll("\\$\\{plugin_state_location\\}", //$NON-NLS-1$
+ MakeCorePlugin.getWorkingDirectory().toString());
+ fCompileArguments[i] = fCompileArguments[i].replaceAll("\\$\\{specs_file\\}", targetFile); //$NON-NLS-1$
+ }
+ } catch (CoreException e) {
+ //TODO VMIR better error handling
+ MakeCorePlugin.log(e.getStatus());
+ rc = false;
+ }
+ }
+ return rc;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.cdt.make.internal.core.scannerconfig2.DefaultRunSIProvider#prepareArguments(boolean)
+ */
+ @Override
+ protected String[] prepareArguments(boolean isDefaultCommand) {
+ if (collector == null)
+ return fCompileArguments;
+
+ @SuppressWarnings("unchecked")
+ List<String> tso = collector.getCollectedScannerInfo(resource.getProject(), ScannerInfoTypes.TARGET_SPECIFIC_OPTION);
+ if (tso == null || tso.size() == 0) {
+ return fCompileArguments;
+ }
+
+ String[] rv = null;
+ // commandArguments may have multiple arguments; tokenizing
+ int nTokens = 0;
+ if (fCompileArguments != null && fCompileArguments.length > 0) {
+ nTokens = fCompileArguments.length;
+ rv = new String[nTokens + tso.size()];
+ System.arraycopy(fCompileArguments, 0, rv, 0, nTokens);
+ }
+ else {
+ rv = new String[tso.size()];
+ }
+ for (int i = 0; i < tso.size(); ++i) {
+ rv[nTokens + i] = tso.get(i);
+ }
+ return rv;
+ }
+
+}
diff --git a/build/org.eclipse.cdt.make.core/templates/simple/Makefile b/build/org.eclipse.cdt.make.core/templates/simple/Makefile
index bcf0bb59a7..7fe5793f75 100644
--- a/build/org.eclipse.cdt.make.core/templates/simple/Makefile
+++ b/build/org.eclipse.cdt.make.core/templates/simple/Makefile
@@ -1,25 +1,25 @@
-PROJECT_ROOT = $(dir $(abspath $(lastword $(MAKEFILE_LIST))))
-
-OBJS = ${projectName}.o
-
-ifeq ($(BUILD_MODE),debug)
- CFLAGS += -g
-else ifeq ($(BUILD_MODE),run)
- CFLAGS += -O2
-else
- $(error Build mode $(BUILD_MODE) not supported by this Makefile)
-endif
-
-all: ${projectName}
-
-${projectName}: $(OBJS)
- $(CXX) -o $@ $^
-
-%.o: $(PROJECT_ROOT)%.cpp
- $(CXX) -c $(CFLAGS) $(CXXFLAGS) $(CPPFLAGS) -o $@ $<
-
-%.o: $(PROJECT_ROOT)%.c
- $(CC) -c $(CFLAGS) $(CPPFLAGS) -o $@ $<
-
-clean:
- rm -fr ${projectName} $(OBJS)
+PROJECT_ROOT = $(dir $(abspath $(lastword $(MAKEFILE_LIST))))
+
+OBJS = ${projectName}.o
+
+ifeq ($(BUILD_MODE),debug)
+ CFLAGS += -g
+else ifeq ($(BUILD_MODE),run)
+ CFLAGS += -O2
+else
+ $(error Build mode $(BUILD_MODE) not supported by this Makefile)
+endif
+
+all: ${projectName}
+
+${projectName}: $(OBJS)
+ $(CXX) -o $@ $^
+
+%.o: $(PROJECT_ROOT)%.cpp
+ $(CXX) -c $(CFLAGS) $(CXXFLAGS) $(CPPFLAGS) -o $@ $<
+
+%.o: $(PROJECT_ROOT)%.c
+ $(CC) -c $(CFLAGS) $(CPPFLAGS) -o $@ $<
+
+clean:
+ rm -fr ${projectName} $(OBJS)
diff --git a/build/org.eclipse.cdt.make.ui.tests/.classpath b/build/org.eclipse.cdt.make.ui.tests/.classpath
index b862a296d3..eca7bdba8f 100644
--- a/build/org.eclipse.cdt.make.ui.tests/.classpath
+++ b/build/org.eclipse.cdt.make.ui.tests/.classpath
@@ -1,7 +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.8"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
+<?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.8"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/build/org.eclipse.cdt.make.ui.tests/build.properties b/build/org.eclipse.cdt.make.ui.tests/build.properties
index 785a40c0ec..9cbab3c135 100644
--- a/build/org.eclipse.cdt.make.ui.tests/build.properties
+++ b/build/org.eclipse.cdt.make.ui.tests/build.properties
@@ -1,6 +1,6 @@
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- about.html
-src.includes = about.html
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ about.html
+src.includes = about.html
diff --git a/build/org.eclipse.cdt.make.ui.tests/src/org/eclipse/cdt/make/ui/tests/AutomatedIntegrationSuite.java b/build/org.eclipse.cdt.make.ui.tests/src/org/eclipse/cdt/make/ui/tests/AutomatedIntegrationSuite.java
index d9c84daeb7..11d1a338f5 100644
--- a/build/org.eclipse.cdt.make.ui.tests/src/org/eclipse/cdt/make/ui/tests/AutomatedIntegrationSuite.java
+++ b/build/org.eclipse.cdt.make.ui.tests/src/org/eclipse/cdt/make/ui/tests/AutomatedIntegrationSuite.java
@@ -1,20 +1,20 @@
-/*******************************************************************************
- * Copyright (c) 2013, 2013 Andrew Gvozdev and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Andrew Gvozdev - initial API and implementation
- *******************************************************************************/
-package org.eclipse.cdt.make.ui.tests;
-
-import org.junit.runner.RunWith;
-import org.junit.runners.Suite;
-import org.junit.runners.Suite.SuiteClasses;
-
-@RunWith(Suite.class)
-@SuiteClasses({ MakeUIImagesTest.class })
-public class AutomatedIntegrationSuite {
-}
+/*******************************************************************************
+ * Copyright (c) 2013, 2013 Andrew Gvozdev and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Andrew Gvozdev - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.make.ui.tests;
+
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+import org.junit.runners.Suite.SuiteClasses;
+
+@RunWith(Suite.class)
+@SuiteClasses({ MakeUIImagesTest.class })
+public class AutomatedIntegrationSuite {
+}
diff --git a/build/org.eclipse.cdt.make.ui.tests/src/org/eclipse/cdt/make/ui/tests/MakeUIImagesTest.java b/build/org.eclipse.cdt.make.ui.tests/src/org/eclipse/cdt/make/ui/tests/MakeUIImagesTest.java
index a03cf9f44b..bcbc0ca0a0 100644
--- a/build/org.eclipse.cdt.make.ui.tests/src/org/eclipse/cdt/make/ui/tests/MakeUIImagesTest.java
+++ b/build/org.eclipse.cdt.make.ui.tests/src/org/eclipse/cdt/make/ui/tests/MakeUIImagesTest.java
@@ -1,118 +1,118 @@
-/*******************************************************************************
- * Copyright (c) 2013, 2013 Andrew Gvozdev and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Andrew Gvozdev - initial API and implementation
- *******************************************************************************/
-package org.eclipse.cdt.make.ui.tests;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotSame;
-import static org.junit.Assert.assertSame;
-import static org.junit.Assert.assertTrue;
-
-import java.lang.reflect.Field;
-import java.lang.reflect.Modifier;
-import java.net.URL;
-
-import org.eclipse.cdt.make.internal.ui.MakeUIImages;
-import org.eclipse.cdt.make.internal.ui.MakeUIPlugin;
-import org.eclipse.core.runtime.FileLocator;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.IDecoration;
-import org.eclipse.swt.graphics.Image;
-import org.junit.Test;
-
-public class MakeUIImagesTest {
- private static final ImageDescriptor MISSING_IMAGE_DESCRIPTOR = ImageDescriptor.getMissingImageDescriptor();
-
- // sample image (IMG_ETOOL_MAKEFILE) from MakeUIPlugin bundle
- private static final String KEY_ETOOL_MAKEFILE = MakeUIImages.IMG_ETOOL_MAKEFILE;
- private static final IPath PATH_ETOOL_MAKEFILE = new Path("icons/etool16/makefile.gif");
- private static final URL URL_ETOOL_MAKEFILE= FileLocator.find(MakeUIPlugin.getDefault().getBundle(), PATH_ETOOL_MAKEFILE, null);
-
- /**
- * Handling of missing keys.
- */
- @Test
- public void testNoImage() throws Exception {
- ImageDescriptor descriptor = MakeUIImages.getImageDescriptor("missing key 1");
- assertSame(MISSING_IMAGE_DESCRIPTOR, descriptor);
-
- Image image1 = MakeUIImages.getImage("missing key 1");
- Image image2 = MakeUIImages.getImage("missing key 2");
- assertSame(image1, image2);
- }
-
- /**
- * Test regular images.
- */
- @Test
- public void testImage() throws Exception {
- // create descriptor from MakeUIImages key
- ImageDescriptor descriptorFromKey = MakeUIImages.getImageDescriptor(KEY_ETOOL_MAKEFILE);
- assertNotSame(MISSING_IMAGE_DESCRIPTOR, descriptorFromKey);
-
- // create descriptor from registered bundle URL as a key
- MakeUIImages.register(URL_ETOOL_MAKEFILE);
- ImageDescriptor descriptorFromUrl = MakeUIImages.getImageDescriptor(URL_ETOOL_MAKEFILE.toString());
- assertNotSame(MISSING_IMAGE_DESCRIPTOR, descriptorFromUrl);
- assertSame(descriptorFromKey, descriptorFromUrl);
-
- // verify that it is the same image
- Image imageFromKey = MakeUIImages.getImage(KEY_ETOOL_MAKEFILE);
- Image imageFromUrl = MakeUIImages.getImage(URL_ETOOL_MAKEFILE.toString());
- assertSame(imageFromKey, imageFromUrl);
-
- // verify that no leaks on second access
- Image imageFromKey2 = MakeUIImages.getImage(KEY_ETOOL_MAKEFILE);
- assertSame(imageFromKey, imageFromKey2);
- }
-
- /**
- * Test images with overlays.
- */
- @Test
- public void testOverlays() throws Exception {
- {
- Image image1 = MakeUIImages.getImageOverlaid(KEY_ETOOL_MAKEFILE, new String[5]);
- Image image2 = MakeUIImages.getImage(KEY_ETOOL_MAKEFILE);
- assertSame(image1, image2);
- }
-
- {
- String[] overlayKeys = new String[5];
- overlayKeys[IDecoration.BOTTOM_LEFT] = MakeUIImages.IMG_OVR_AUTOMATIC;
- Image imageOver1 = MakeUIImages.getImageOverlaid(KEY_ETOOL_MAKEFILE, overlayKeys);
- Image imageOver2 = MakeUIImages.getImageOverlaid(KEY_ETOOL_MAKEFILE, MakeUIImages.IMG_OVR_AUTOMATIC, IDecoration.BOTTOM_LEFT);
- assertSame(imageOver1, imageOver2);
- }
- }
-
- /**
- * Verify that MakeUIImages constants define existing images.
- */
- @Test
- public void testVerifyFields() throws Exception {
- Class<MakeUIImages> clazz = MakeUIImages.class;
-
- Field[] fields = clazz.getDeclaredFields();
- for (Field field : fields) {
- String name = field.getName();
- if (name.startsWith("IMG_")) {
- assertEquals("MakeUIImages."+name+" is not a String", String.class, field.getType());
- assertTrue("MakeUIImages."+name+" is not a static field", (field.getModifiers() & Modifier.STATIC) != 0);
- assertTrue("MakeUIImages."+name+" is not a public field", (field.getModifiers() & Modifier.PUBLIC) != 0);
- String imageKey = (String) field.get(null);
- ImageDescriptor descriptor = MakeUIImages.getImageDescriptor(imageKey);
- assertTrue("Missing image MakeUIImages."+name+"=\""+imageKey+"\"", descriptor!=MISSING_IMAGE_DESCRIPTOR);
- }
- }
- }
-}
+/*******************************************************************************
+ * Copyright (c) 2013, 2013 Andrew Gvozdev and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Andrew Gvozdev - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.make.ui.tests;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotSame;
+import static org.junit.Assert.assertSame;
+import static org.junit.Assert.assertTrue;
+
+import java.lang.reflect.Field;
+import java.lang.reflect.Modifier;
+import java.net.URL;
+
+import org.eclipse.cdt.make.internal.ui.MakeUIImages;
+import org.eclipse.cdt.make.internal.ui.MakeUIPlugin;
+import org.eclipse.core.runtime.FileLocator;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.viewers.IDecoration;
+import org.eclipse.swt.graphics.Image;
+import org.junit.Test;
+
+public class MakeUIImagesTest {
+ private static final ImageDescriptor MISSING_IMAGE_DESCRIPTOR = ImageDescriptor.getMissingImageDescriptor();
+
+ // sample image (IMG_ETOOL_MAKEFILE) from MakeUIPlugin bundle
+ private static final String KEY_ETOOL_MAKEFILE = MakeUIImages.IMG_ETOOL_MAKEFILE;
+ private static final IPath PATH_ETOOL_MAKEFILE = new Path("icons/etool16/makefile.gif");
+ private static final URL URL_ETOOL_MAKEFILE= FileLocator.find(MakeUIPlugin.getDefault().getBundle(), PATH_ETOOL_MAKEFILE, null);
+
+ /**
+ * Handling of missing keys.
+ */
+ @Test
+ public void testNoImage() throws Exception {
+ ImageDescriptor descriptor = MakeUIImages.getImageDescriptor("missing key 1");
+ assertSame(MISSING_IMAGE_DESCRIPTOR, descriptor);
+
+ Image image1 = MakeUIImages.getImage("missing key 1");
+ Image image2 = MakeUIImages.getImage("missing key 2");
+ assertSame(image1, image2);
+ }
+
+ /**
+ * Test regular images.
+ */
+ @Test
+ public void testImage() throws Exception {
+ // create descriptor from MakeUIImages key
+ ImageDescriptor descriptorFromKey = MakeUIImages.getImageDescriptor(KEY_ETOOL_MAKEFILE);
+ assertNotSame(MISSING_IMAGE_DESCRIPTOR, descriptorFromKey);
+
+ // create descriptor from registered bundle URL as a key
+ MakeUIImages.register(URL_ETOOL_MAKEFILE);
+ ImageDescriptor descriptorFromUrl = MakeUIImages.getImageDescriptor(URL_ETOOL_MAKEFILE.toString());
+ assertNotSame(MISSING_IMAGE_DESCRIPTOR, descriptorFromUrl);
+ assertSame(descriptorFromKey, descriptorFromUrl);
+
+ // verify that it is the same image
+ Image imageFromKey = MakeUIImages.getImage(KEY_ETOOL_MAKEFILE);
+ Image imageFromUrl = MakeUIImages.getImage(URL_ETOOL_MAKEFILE.toString());
+ assertSame(imageFromKey, imageFromUrl);
+
+ // verify that no leaks on second access
+ Image imageFromKey2 = MakeUIImages.getImage(KEY_ETOOL_MAKEFILE);
+ assertSame(imageFromKey, imageFromKey2);
+ }
+
+ /**
+ * Test images with overlays.
+ */
+ @Test
+ public void testOverlays() throws Exception {
+ {
+ Image image1 = MakeUIImages.getImageOverlaid(KEY_ETOOL_MAKEFILE, new String[5]);
+ Image image2 = MakeUIImages.getImage(KEY_ETOOL_MAKEFILE);
+ assertSame(image1, image2);
+ }
+
+ {
+ String[] overlayKeys = new String[5];
+ overlayKeys[IDecoration.BOTTOM_LEFT] = MakeUIImages.IMG_OVR_AUTOMATIC;
+ Image imageOver1 = MakeUIImages.getImageOverlaid(KEY_ETOOL_MAKEFILE, overlayKeys);
+ Image imageOver2 = MakeUIImages.getImageOverlaid(KEY_ETOOL_MAKEFILE, MakeUIImages.IMG_OVR_AUTOMATIC, IDecoration.BOTTOM_LEFT);
+ assertSame(imageOver1, imageOver2);
+ }
+ }
+
+ /**
+ * Verify that MakeUIImages constants define existing images.
+ */
+ @Test
+ public void testVerifyFields() throws Exception {
+ Class<MakeUIImages> clazz = MakeUIImages.class;
+
+ Field[] fields = clazz.getDeclaredFields();
+ for (Field field : fields) {
+ String name = field.getName();
+ if (name.startsWith("IMG_")) {
+ assertEquals("MakeUIImages."+name+" is not a String", String.class, field.getType());
+ assertTrue("MakeUIImages."+name+" is not a static field", (field.getModifiers() & Modifier.STATIC) != 0);
+ assertTrue("MakeUIImages."+name+" is not a public field", (field.getModifiers() & Modifier.PUBLIC) != 0);
+ String imageKey = (String) field.get(null);
+ ImageDescriptor descriptor = MakeUIImages.getImageDescriptor(imageKey);
+ assertTrue("Missing image MakeUIImages."+name+"=\""+imageKey+"\"", descriptor!=MISSING_IMAGE_DESCRIPTOR);
+ }
+ }
+ }
+}
diff --git a/build/org.eclipse.cdt.make.ui.tests/src/org/eclipse/cdt/make/ui/tests/MakeUITestBase.java b/build/org.eclipse.cdt.make.ui.tests/src/org/eclipse/cdt/make/ui/tests/MakeUITestBase.java
index cca0e43d7f..82e00fc552 100644
--- a/build/org.eclipse.cdt.make.ui.tests/src/org/eclipse/cdt/make/ui/tests/MakeUITestBase.java
+++ b/build/org.eclipse.cdt.make.ui.tests/src/org/eclipse/cdt/make/ui/tests/MakeUITestBase.java
@@ -1,63 +1,63 @@
-/*******************************************************************************
- * Copyright (c) 2013, 2013 Andrew Gvozdev and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Andrew Gvozdev - initial API and implementation
- *******************************************************************************/
-package org.eclipse.cdt.make.ui.tests;
-
-import java.io.IOException;
-
-import org.eclipse.cdt.core.testplugin.util.TestSourceReader;
-import org.junit.Rule;
-import org.junit.rules.TestName;
-
-/**
- * Base for unit testing of Make UI test suite.
- */
-public class MakeUITestBase {
- @Rule
- public TestName testNameRule = new TestName();
- private TestSourceReader commentReader;
-
- /**
- * Constructor.
- */
- protected MakeUITestBase() {
- this("src");
- }
-
- /**
- * Constructor.
- *
- * @param srcRoot - project folder where the test package is rooted.
- */
- protected MakeUITestBase(String srcRoot) {
- this.commentReader = new TestSourceReader(MakeUITestsPlugin.getDefault().getBundle(), srcRoot, this.getClass(), 1);
- }
-
- /**
- * Get name of the current test method.
- *
- * @return Name of the current test method.
- */
- public String getName() {
- return testNameRule.getMethodName();
- }
-
- /**
- * Retrieve comments above the current test method.
- *
- * @return First section of comments above the current test method.
- * A sections is defined as a block of comments starting with "//". Sections are separated by empty lines.
- * @throws IOException
- */
- public StringBuilder getTestComments() throws IOException {
- return commentReader.getContentsForTest(getName())[0];
- }
-
-}
+/*******************************************************************************
+ * Copyright (c) 2013, 2013 Andrew Gvozdev and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Andrew Gvozdev - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.make.ui.tests;
+
+import java.io.IOException;
+
+import org.eclipse.cdt.core.testplugin.util.TestSourceReader;
+import org.junit.Rule;
+import org.junit.rules.TestName;
+
+/**
+ * Base for unit testing of Make UI test suite.
+ */
+public class MakeUITestBase {
+ @Rule
+ public TestName testNameRule = new TestName();
+ private TestSourceReader commentReader;
+
+ /**
+ * Constructor.
+ */
+ protected MakeUITestBase() {
+ this("src");
+ }
+
+ /**
+ * Constructor.
+ *
+ * @param srcRoot - project folder where the test package is rooted.
+ */
+ protected MakeUITestBase(String srcRoot) {
+ this.commentReader = new TestSourceReader(MakeUITestsPlugin.getDefault().getBundle(), srcRoot, this.getClass(), 1);
+ }
+
+ /**
+ * Get name of the current test method.
+ *
+ * @return Name of the current test method.
+ */
+ public String getName() {
+ return testNameRule.getMethodName();
+ }
+
+ /**
+ * Retrieve comments above the current test method.
+ *
+ * @return First section of comments above the current test method.
+ * A sections is defined as a block of comments starting with "//". Sections are separated by empty lines.
+ * @throws IOException
+ */
+ public StringBuilder getTestComments() throws IOException {
+ return commentReader.getContentsForTest(getName())[0];
+ }
+
+}
diff --git a/build/org.eclipse.cdt.make.ui.tests/src/org/eclipse/cdt/make/ui/tests/MakeUITestsPlugin.java b/build/org.eclipse.cdt.make.ui.tests/src/org/eclipse/cdt/make/ui/tests/MakeUITestsPlugin.java
index 2c7eba9706..7c926fbce0 100644
--- a/build/org.eclipse.cdt.make.ui.tests/src/org/eclipse/cdt/make/ui/tests/MakeUITestsPlugin.java
+++ b/build/org.eclipse.cdt.make.ui.tests/src/org/eclipse/cdt/make/ui/tests/MakeUITestsPlugin.java
@@ -1,53 +1,53 @@
-/*******************************************************************************
- * Copyright (c) 2013, 2013 Andrew Gvozdev and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Andrew Gvozdev - initial API and implementation
- *******************************************************************************/
-package org.eclipse.cdt.make.ui.tests;
-
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.osgi.framework.BundleContext;
-
-/**
- * The activator class controls the plug-in life cycle
- */
-public class MakeUITestsPlugin extends AbstractUIPlugin {
- // The plug-in ID
- public static final String PLUGIN_ID = "org.eclipse.cdt.make.ui.tests"; //$NON-NLS-1$
-
- // The shared instance
- private static MakeUITestsPlugin plugin;
-
- /**
- * The constructor
- */
- public MakeUITestsPlugin() {
- }
-
- @Override
- public void start(BundleContext context) throws Exception {
- super.start(context);
- plugin = this;
- }
-
- @Override
- public void stop(BundleContext context) throws Exception {
- plugin = null;
- super.stop(context);
- }
-
- /**
- * Returns the shared instance
- *
- * @return the shared instance
- */
- public static MakeUITestsPlugin getDefault() {
- return plugin;
- }
-
-}
+/*******************************************************************************
+ * Copyright (c) 2013, 2013 Andrew Gvozdev and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Andrew Gvozdev - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.make.ui.tests;
+
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class MakeUITestsPlugin extends AbstractUIPlugin {
+ // The plug-in ID
+ public static final String PLUGIN_ID = "org.eclipse.cdt.make.ui.tests"; //$NON-NLS-1$
+
+ // The shared instance
+ private static MakeUITestsPlugin plugin;
+
+ /**
+ * The constructor
+ */
+ public MakeUITestsPlugin() {
+ }
+
+ @Override
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ }
+
+ @Override
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static MakeUITestsPlugin getDefault() {
+ return plugin;
+ }
+
+}
diff --git a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/MakeBuildSettingsTab.java b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/MakeBuildSettingsTab.java
index 8caf73f4d0..5b82dd4f22 100644
--- a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/MakeBuildSettingsTab.java
+++ b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/MakeBuildSettingsTab.java
@@ -1,214 +1,214 @@
-/*******************************************************************************
- * Copyright (c) 2017 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
- *******************************************************************************/
-package org.eclipse.cdt.make.internal.ui;
-
-import java.util.Map;
-
-import org.eclipse.cdt.core.build.ICBuildConfiguration;
-import org.eclipse.cdt.core.build.StandardBuildConfiguration;
-import org.eclipse.cdt.launch.ui.corebuild.CommonBuildTab;
-import org.eclipse.cdt.make.core.MakefileBuildConfigurationProvider;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
-import org.eclipse.swt.SWT;
-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.Group;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Text;
-
-public class MakeBuildSettingsTab extends CommonBuildTab {
-
- private Button projectButton;
- private Button configButton;
- private Text buildCmdText;
- private Text cleanCmdText;
-
- private boolean defaultProject;
-
- @Override
- protected String getBuildConfigProviderId() {
- return MakefileBuildConfigurationProvider.ID;
- }
-
- @Override
- public void createControl(Composite parent) {
- Composite comp = new Composite(parent, SWT.NONE);
- comp.setLayout(new GridLayout());
- setControl(comp);
-
- // Toolchain selector
- Control tcControl = createToolchainSelector(comp);
- tcControl.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
-
- // Build Output Group
- Group outputGroup = new Group(comp, SWT.NONE);
- outputGroup.setText(Messages.MakeBuildSettingsTab_BuildOutputLocation);
- outputGroup.setLayout(new GridLayout());
- outputGroup.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
-
- projectButton = new Button(outputGroup, SWT.RADIO);
- projectButton.setText(Messages.MakeBuildSettingsTab_BuildInProjectDir);
- projectButton.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
-
- configButton = new Button(outputGroup, SWT.RADIO);
- configButton.setText(Messages.MakeBuildSettingsTab_BuildInConfigDir);
- configButton.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
-
- Group cmdGroup = new Group(comp, SWT.NONE);
- cmdGroup.setText(Messages.MakeBuildSettingsTab_BuildCommands);
- cmdGroup.setLayout(new GridLayout(2, false));
- cmdGroup.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
-
- Label label = new Label(cmdGroup, SWT.NONE);
- label.setText(Messages.MakeBuildSettingsTab_Build);
-
- buildCmdText = new Text(cmdGroup, SWT.BORDER);
- buildCmdText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
-
- label = new Label(cmdGroup, SWT.NONE);
- label.setText(Messages.MakeBuildSettingsTab_Clean);
-
- cleanCmdText = new Text(cmdGroup, SWT.BORDER);
- cleanCmdText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
- }
-
- @Override
- public String getName() {
- return Messages.MakeBuildSettingsTab_Makefile;
- }
-
- @Override
- protected void restoreProperties(Map<String, String> properties) {
- // TODO Auto-generated method stub
- super.restoreProperties(properties);
-
- String container = properties.get(StandardBuildConfiguration.BUILD_CONTAINER);
- if (container != null && !container.trim().isEmpty()) {
- IPath containerLoc = new Path(container);
- if (containerLoc.segmentCount() == 1) {
- // TODO what if it's not the project?
- projectButton.setSelection(true);
- defaultProject = true;
- } else {
- configButton.setSelection(true);
- defaultProject = false;
- }
- }
-
- String buildCommand = properties.get(StandardBuildConfiguration.BUILD_COMMAND);
- if (buildCommand != null && !buildCommand.trim().isEmpty()) {
- buildCmdText.setText(buildCommand);
- }
-
- String cleanCommand = properties.get(StandardBuildConfiguration.CLEAN_COMMAND);
- if (cleanCommand != null && !cleanCommand.trim().isEmpty()) {
- cleanCmdText.setText(cleanCommand);
- }
- }
-
- @Override
- protected void saveProperties(Map<String, String> properties) {
- super.saveProperties(properties);
-
- try {
- ICBuildConfiguration buildConfig = getBuildConfiguration();
- if (buildConfig instanceof StandardBuildConfiguration) {
- StandardBuildConfiguration stdConfig = (StandardBuildConfiguration) buildConfig;
- if (defaultProject && !projectButton.getSelection()) {
- properties.put(StandardBuildConfiguration.BUILD_CONTAINER,
- stdConfig.getDefaultBuildContainer().getFullPath().toString());
- } else if (!defaultProject && projectButton.getSelection()) {
- properties.put(StandardBuildConfiguration.BUILD_CONTAINER,
- stdConfig.getProject().getFullPath().toString());
- }
-
- String buildCommand = buildCmdText.getText().trim();
- if (!buildCommand.isEmpty()) {
- properties.put(StandardBuildConfiguration.BUILD_COMMAND, buildCommand);
- }
-
- String cleanCommand = cleanCmdText.getText().trim();
- if (!cleanCommand.isEmpty()) {
- properties.put(StandardBuildConfiguration.CLEAN_COMMAND, cleanCommand);
- }
- }
- } catch (CoreException e) {
- MakeUIPlugin.log(e.getStatus());
- }
- }
-
- @Override
- public void initializeFrom(ILaunchConfiguration configuration) {
- super.initializeFrom(configuration);
-
- ICBuildConfiguration buildConfig = getBuildConfiguration();
- String container = buildConfig.getProperty(StandardBuildConfiguration.BUILD_CONTAINER);
- if (container != null && !container.trim().isEmpty()) {
- IPath containerLoc = new Path(container);
- if (containerLoc.segmentCount() == 1) {
- // TODO what if it's not the project?
- projectButton.setSelection(true);
- defaultProject = true;
- } else {
- configButton.setSelection(true);
- defaultProject = false;
- }
- }
-
- String buildCommand = buildConfig.getProperty(StandardBuildConfiguration.BUILD_COMMAND);
- if (buildCommand != null && !buildCommand.trim().isEmpty()) {
- buildCmdText.setText(buildCommand);
- }
-
- String cleanCommand = buildConfig.getProperty(StandardBuildConfiguration.CLEAN_COMMAND);
- if (cleanCommand != null && !cleanCommand.trim().isEmpty()) {
- cleanCmdText.setText(cleanCommand);
- }
- }
-
- @Override
- public void performApply(ILaunchConfigurationWorkingCopy configuration) {
- super.performApply(configuration);
-
- try {
- ICBuildConfiguration buildConfig = getBuildConfiguration();
- if (buildConfig instanceof StandardBuildConfiguration) {
- StandardBuildConfiguration stdConfig = (StandardBuildConfiguration) buildConfig;
- if (defaultProject && !projectButton.getSelection()) {
- stdConfig.setBuildContainer(stdConfig.getDefaultBuildContainer());
- } else if (!defaultProject && projectButton.getSelection()) {
- stdConfig.setBuildContainer(stdConfig.getProject());
- }
-
- String buildCommand = buildCmdText.getText().trim();
- if (!buildCommand.isEmpty()) {
- stdConfig.setBuildCommand(buildCommand.split(" ")); //$NON-NLS-1$
- } else {
- stdConfig.setBuildCommand(null);
- }
-
- String cleanCommand = cleanCmdText.getText().trim();
- if (!cleanCommand.isEmpty()) {
- stdConfig.setCleanCommand(cleanCommand.split(" ")); //$NON-NLS-1$
- } else {
- stdConfig.setCleanCommand(null);
- }
- }
- } catch (CoreException e) {
- MakeUIPlugin.log(e.getStatus());
- }
- }
-
-}
+/*******************************************************************************
+ * Copyright (c) 2017 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
+ *******************************************************************************/
+package org.eclipse.cdt.make.internal.ui;
+
+import java.util.Map;
+
+import org.eclipse.cdt.core.build.ICBuildConfiguration;
+import org.eclipse.cdt.core.build.StandardBuildConfiguration;
+import org.eclipse.cdt.launch.ui.corebuild.CommonBuildTab;
+import org.eclipse.cdt.make.core.MakefileBuildConfigurationProvider;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.debug.core.ILaunchConfiguration;
+import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
+import org.eclipse.swt.SWT;
+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.Group;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Text;
+
+public class MakeBuildSettingsTab extends CommonBuildTab {
+
+ private Button projectButton;
+ private Button configButton;
+ private Text buildCmdText;
+ private Text cleanCmdText;
+
+ private boolean defaultProject;
+
+ @Override
+ protected String getBuildConfigProviderId() {
+ return MakefileBuildConfigurationProvider.ID;
+ }
+
+ @Override
+ public void createControl(Composite parent) {
+ Composite comp = new Composite(parent, SWT.NONE);
+ comp.setLayout(new GridLayout());
+ setControl(comp);
+
+ // Toolchain selector
+ Control tcControl = createToolchainSelector(comp);
+ tcControl.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
+
+ // Build Output Group
+ Group outputGroup = new Group(comp, SWT.NONE);
+ outputGroup.setText(Messages.MakeBuildSettingsTab_BuildOutputLocation);
+ outputGroup.setLayout(new GridLayout());
+ outputGroup.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
+
+ projectButton = new Button(outputGroup, SWT.RADIO);
+ projectButton.setText(Messages.MakeBuildSettingsTab_BuildInProjectDir);
+ projectButton.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
+
+ configButton = new Button(outputGroup, SWT.RADIO);
+ configButton.setText(Messages.MakeBuildSettingsTab_BuildInConfigDir);
+ configButton.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
+
+ Group cmdGroup = new Group(comp, SWT.NONE);
+ cmdGroup.setText(Messages.MakeBuildSettingsTab_BuildCommands);
+ cmdGroup.setLayout(new GridLayout(2, false));
+ cmdGroup.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
+
+ Label label = new Label(cmdGroup, SWT.NONE);
+ label.setText(Messages.MakeBuildSettingsTab_Build);
+
+ buildCmdText = new Text(cmdGroup, SWT.BORDER);
+ buildCmdText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
+
+ label = new Label(cmdGroup, SWT.NONE);
+ label.setText(Messages.MakeBuildSettingsTab_Clean);
+
+ cleanCmdText = new Text(cmdGroup, SWT.BORDER);
+ cleanCmdText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
+ }
+
+ @Override
+ public String getName() {
+ return Messages.MakeBuildSettingsTab_Makefile;
+ }
+
+ @Override
+ protected void restoreProperties(Map<String, String> properties) {
+ // TODO Auto-generated method stub
+ super.restoreProperties(properties);
+
+ String container = properties.get(StandardBuildConfiguration.BUILD_CONTAINER);
+ if (container != null && !container.trim().isEmpty()) {
+ IPath containerLoc = new Path(container);
+ if (containerLoc.segmentCount() == 1) {
+ // TODO what if it's not the project?
+ projectButton.setSelection(true);
+ defaultProject = true;
+ } else {
+ configButton.setSelection(true);
+ defaultProject = false;
+ }
+ }
+
+ String buildCommand = properties.get(StandardBuildConfiguration.BUILD_COMMAND);
+ if (buildCommand != null && !buildCommand.trim().isEmpty()) {
+ buildCmdText.setText(buildCommand);
+ }
+
+ String cleanCommand = properties.get(StandardBuildConfiguration.CLEAN_COMMAND);
+ if (cleanCommand != null && !cleanCommand.trim().isEmpty()) {
+ cleanCmdText.setText(cleanCommand);
+ }
+ }
+
+ @Override
+ protected void saveProperties(Map<String, String> properties) {
+ super.saveProperties(properties);
+
+ try {
+ ICBuildConfiguration buildConfig = getBuildConfiguration();
+ if (buildConfig instanceof StandardBuildConfiguration) {
+ StandardBuildConfiguration stdConfig = (StandardBuildConfiguration) buildConfig;
+ if (defaultProject && !projectButton.getSelection()) {
+ properties.put(StandardBuildConfiguration.BUILD_CONTAINER,
+ stdConfig.getDefaultBuildContainer().getFullPath().toString());
+ } else if (!defaultProject && projectButton.getSelection()) {
+ properties.put(StandardBuildConfiguration.BUILD_CONTAINER,
+ stdConfig.getProject().getFullPath().toString());
+ }
+
+ String buildCommand = buildCmdText.getText().trim();
+ if (!buildCommand.isEmpty()) {
+ properties.put(StandardBuildConfiguration.BUILD_COMMAND, buildCommand);
+ }
+
+ String cleanCommand = cleanCmdText.getText().trim();
+ if (!cleanCommand.isEmpty()) {
+ properties.put(StandardBuildConfiguration.CLEAN_COMMAND, cleanCommand);
+ }
+ }
+ } catch (CoreException e) {
+ MakeUIPlugin.log(e.getStatus());
+ }
+ }
+
+ @Override
+ public void initializeFrom(ILaunchConfiguration configuration) {
+ super.initializeFrom(configuration);
+
+ ICBuildConfiguration buildConfig = getBuildConfiguration();
+ String container = buildConfig.getProperty(StandardBuildConfiguration.BUILD_CONTAINER);
+ if (container != null && !container.trim().isEmpty()) {
+ IPath containerLoc = new Path(container);
+ if (containerLoc.segmentCount() == 1) {
+ // TODO what if it's not the project?
+ projectButton.setSelection(true);
+ defaultProject = true;
+ } else {
+ configButton.setSelection(true);
+ defaultProject = false;
+ }
+ }
+
+ String buildCommand = buildConfig.getProperty(StandardBuildConfiguration.BUILD_COMMAND);
+ if (buildCommand != null && !buildCommand.trim().isEmpty()) {
+ buildCmdText.setText(buildCommand);
+ }
+
+ String cleanCommand = buildConfig.getProperty(StandardBuildConfiguration.CLEAN_COMMAND);
+ if (cleanCommand != null && !cleanCommand.trim().isEmpty()) {
+ cleanCmdText.setText(cleanCommand);
+ }
+ }
+
+ @Override
+ public void performApply(ILaunchConfigurationWorkingCopy configuration) {
+ super.performApply(configuration);
+
+ try {
+ ICBuildConfiguration buildConfig = getBuildConfiguration();
+ if (buildConfig instanceof StandardBuildConfiguration) {
+ StandardBuildConfiguration stdConfig = (StandardBuildConfiguration) buildConfig;
+ if (defaultProject && !projectButton.getSelection()) {
+ stdConfig.setBuildContainer(stdConfig.getDefaultBuildContainer());
+ } else if (!defaultProject && projectButton.getSelection()) {
+ stdConfig.setBuildContainer(stdConfig.getProject());
+ }
+
+ String buildCommand = buildCmdText.getText().trim();
+ if (!buildCommand.isEmpty()) {
+ stdConfig.setBuildCommand(buildCommand.split(" ")); //$NON-NLS-1$
+ } else {
+ stdConfig.setBuildCommand(null);
+ }
+
+ String cleanCommand = cleanCmdText.getText().trim();
+ if (!cleanCommand.isEmpty()) {
+ stdConfig.setCleanCommand(cleanCommand.split(" ")); //$NON-NLS-1$
+ } else {
+ stdConfig.setCleanCommand(null);
+ }
+ }
+ } catch (CoreException e) {
+ MakeUIPlugin.log(e.getStatus());
+ }
+ }
+
+}
diff --git a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/Messages.java b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/Messages.java
index cfc24769b6..9a9af8bbdd 100644
--- a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/Messages.java
+++ b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/Messages.java
@@ -1,21 +1,21 @@
-package org.eclipse.cdt.make.internal.ui;
-
-import org.eclipse.osgi.util.NLS;
-
-public class Messages extends NLS {
- private static final String BUNDLE_NAME = "org.eclipse.cdt.make.internal.ui.messages"; //$NON-NLS-1$
- public static String MakeBuildSettingsTab_Build;
- public static String MakeBuildSettingsTab_BuildCommands;
- public static String MakeBuildSettingsTab_BuildInConfigDir;
- public static String MakeBuildSettingsTab_BuildInProjectDir;
- public static String MakeBuildSettingsTab_BuildOutputLocation;
- public static String MakeBuildSettingsTab_Clean;
- public static String MakeBuildSettingsTab_Makefile;
- static {
- // initialize resource bundle
- NLS.initializeMessages(BUNDLE_NAME, Messages.class);
- }
-
- private Messages() {
- }
-}
+package org.eclipse.cdt.make.internal.ui;
+
+import org.eclipse.osgi.util.NLS;
+
+public class Messages extends NLS {
+ private static final String BUNDLE_NAME = "org.eclipse.cdt.make.internal.ui.messages"; //$NON-NLS-1$
+ public static String MakeBuildSettingsTab_Build;
+ public static String MakeBuildSettingsTab_BuildCommands;
+ public static String MakeBuildSettingsTab_BuildInConfigDir;
+ public static String MakeBuildSettingsTab_BuildInProjectDir;
+ public static String MakeBuildSettingsTab_BuildOutputLocation;
+ public static String MakeBuildSettingsTab_Clean;
+ public static String MakeBuildSettingsTab_Makefile;
+ static {
+ // initialize resource bundle
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+
+ private Messages() {
+ }
+}
diff --git a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/messages.properties b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/messages.properties
index 0b143a70f3..30e41542d7 100644
--- a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/messages.properties
+++ b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/messages.properties
@@ -1,7 +1,7 @@
-MakeBuildSettingsTab_Build=Build:
-MakeBuildSettingsTab_BuildCommands=Build Commands
-MakeBuildSettingsTab_BuildInConfigDir=Build in configuration specific directory
-MakeBuildSettingsTab_BuildInProjectDir=Build in project directory
-MakeBuildSettingsTab_BuildOutputLocation=Build Output Location
-MakeBuildSettingsTab_Clean=Clean:
-MakeBuildSettingsTab_Makefile=Makefile
+MakeBuildSettingsTab_Build=Build:
+MakeBuildSettingsTab_BuildCommands=Build Commands
+MakeBuildSettingsTab_BuildInConfigDir=Build in configuration specific directory
+MakeBuildSettingsTab_BuildInProjectDir=Build in project directory
+MakeBuildSettingsTab_BuildOutputLocation=Build Output Location
+MakeBuildSettingsTab_Clean=Clean:
+MakeBuildSettingsTab_Makefile=Makefile
diff --git a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/wizards/NewMakefileProjectWizard.java b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/wizards/NewMakefileProjectWizard.java
index 183556dfe6..f9aaa3a1ac 100644
--- a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/wizards/NewMakefileProjectWizard.java
+++ b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/wizards/NewMakefileProjectWizard.java
@@ -1,78 +1,78 @@
-/*******************************************************************************
- * Copyright (c) 2017 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
- *******************************************************************************/
-package org.eclipse.cdt.make.internal.ui.wizards;
-
-import org.eclipse.cdt.make.core.MakefileProjectGenerator;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.wizard.IWizardContainer;
-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.tools.templates.core.IGenerator;
-import org.eclipse.tools.templates.ui.TemplateWizard;
-import org.eclipse.ui.dialogs.WizardNewProjectCreationPage;
-
-public class NewMakefileProjectWizard extends TemplateWizard {
-
- private WizardNewProjectCreationPage mainPage;
- private boolean generateSource = true;
-
- @Override
- public void setContainer(IWizardContainer wizardContainer) {
- super.setContainer(wizardContainer);
- setWindowTitle("New Makefile Project");
- }
-
- @Override
- public void addPages() {
- mainPage = new WizardNewProjectCreationPage("basicNewProjectPage") { //$NON-NLS-1$
- @Override
- public void createControl(Composite parent) {
- super.createControl(parent);
- Composite comp = (Composite) getControl();
- createWorkingSetGroup(comp, getSelection(),
- new String[] { "org.eclipse.ui.resourceWorkingSetPage" }); //$NON-NLS-1$
-
- Composite buttonComp = new Composite(comp, SWT.NONE);
- buttonComp.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
- buttonComp.setLayout(new GridLayout());
-
- Button genSourceButton = new Button(buttonComp, SWT.CHECK);
- genSourceButton.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
- genSourceButton.setText("Generate Source and Makefile");
- genSourceButton.setSelection(generateSource);
- genSourceButton.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- generateSource = genSourceButton.getSelection();
- }
- });
- Dialog.applyDialogFont(getControl());
- }
- };
- mainPage.setTitle("New Makefile Project");
- mainPage.setDescription("Specify properties of new Makefile project.");
- this.addPage(mainPage);
- }
-
- @Override
- protected IGenerator getGenerator() {
- String manifest = generateSource ? "templates/simple/manifest.xml" : null; //$NON-NLS-1$
- MakefileProjectGenerator generator = new MakefileProjectGenerator(manifest);
- generator.setProjectName(mainPage.getProjectName());
- if (!mainPage.useDefaults()) {
- generator.setLocationURI(mainPage.getLocationURI());
- }
- return generator;
- }
-
-}
+/*******************************************************************************
+ * Copyright (c) 2017 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
+ *******************************************************************************/
+package org.eclipse.cdt.make.internal.ui.wizards;
+
+import org.eclipse.cdt.make.core.MakefileProjectGenerator;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.wizard.IWizardContainer;
+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.tools.templates.core.IGenerator;
+import org.eclipse.tools.templates.ui.TemplateWizard;
+import org.eclipse.ui.dialogs.WizardNewProjectCreationPage;
+
+public class NewMakefileProjectWizard extends TemplateWizard {
+
+ private WizardNewProjectCreationPage mainPage;
+ private boolean generateSource = true;
+
+ @Override
+ public void setContainer(IWizardContainer wizardContainer) {
+ super.setContainer(wizardContainer);
+ setWindowTitle("New Makefile Project");
+ }
+
+ @Override
+ public void addPages() {
+ mainPage = new WizardNewProjectCreationPage("basicNewProjectPage") { //$NON-NLS-1$
+ @Override
+ public void createControl(Composite parent) {
+ super.createControl(parent);
+ Composite comp = (Composite) getControl();
+ createWorkingSetGroup(comp, getSelection(),
+ new String[] { "org.eclipse.ui.resourceWorkingSetPage" }); //$NON-NLS-1$
+
+ Composite buttonComp = new Composite(comp, SWT.NONE);
+ buttonComp.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
+ buttonComp.setLayout(new GridLayout());
+
+ Button genSourceButton = new Button(buttonComp, SWT.CHECK);
+ genSourceButton.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
+ genSourceButton.setText("Generate Source and Makefile");
+ genSourceButton.setSelection(generateSource);
+ genSourceButton.addSelectionListener(new SelectionAdapter() {
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ generateSource = genSourceButton.getSelection();
+ }
+ });
+ Dialog.applyDialogFont(getControl());
+ }
+ };
+ mainPage.setTitle("New Makefile Project");
+ mainPage.setDescription("Specify properties of new Makefile project.");
+ this.addPage(mainPage);
+ }
+
+ @Override
+ protected IGenerator getGenerator() {
+ String manifest = generateSource ? "templates/simple/manifest.xml" : null; //$NON-NLS-1$
+ MakefileProjectGenerator generator = new MakefileProjectGenerator(manifest);
+ generator.setProjectName(mainPage.getProjectName());
+ if (!mainPage.useDefaults()) {
+ generator.setLocationURI(mainPage.getLocationURI());
+ }
+ return generator;
+ }
+
+}
diff --git a/build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/ManagedBuildDependencyLibsTests.java b/build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/ManagedBuildDependencyLibsTests.java
index 965ee5a043..af78d7c8a9 100644
--- a/build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/ManagedBuildDependencyLibsTests.java
+++ b/build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/ManagedBuildDependencyLibsTests.java
@@ -1,294 +1,294 @@
-/*******************************************************************************
- * Copyright (c) 2011, 2012 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.cdt.managedbuilder.core.tests;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-import org.eclipse.cdt.core.model.CoreModel;
-import org.eclipse.cdt.core.settings.model.ICProjectDescription;
-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.IToolChain;
-import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager;
-import org.eclipse.cdt.managedbuilder.internal.core.FolderInfo;
-import org.eclipse.cdt.managedbuilder.tcmodification.IConfigurationModification;
-import org.eclipse.cdt.managedbuilder.tcmodification.IToolChainModificationManager;
-import org.eclipse.cdt.managedbuilder.testplugin.AbstractBuilderTest;
-import org.eclipse.cdt.managedbuilder.testplugin.ManagedBuildTestHelper;
-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.IProjectDescription;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IWorkspaceDescription;
-import org.eclipse.core.resources.IncrementalProjectBuilder;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.OperationCanceledException;
-
-public class ManagedBuildDependencyLibsTests extends AbstractBuilderTest {
- private static final String PROJ_PATH = "depLibsProjects";
- private static final String MESSAGE_TAIL = " (see .log file for more details).";
-
- private IProject fTapp, fTlib, fTobjs;
-
- private IToolChain[] allToolChains;
-
- public ManagedBuildDependencyLibsTests(String name) {
- super(name);
- }
-
- public static Test suite() {
- TestSuite suite = new TestSuite(ManagedBuildDependencyLibsTests.class.getName());
-
- suite.addTest(new ManagedBuildDependencyLibsTests("testDepLibs"));
- suite.addTest(new ManagedBuildDependencyLibsTests("testDepUObjs"));
- suite.addTest(new ManagedBuildDependencyLibsTests("testGetArtifactTimeStampEscapeURI_bug377295"));
- return suite;
- }
-
- private void buildProject(IProject curProject) {
-
- try {
- IProject[] referencedProjects = curProject.getReferencedProjects();
- for(int i = 0; i < referencedProjects.length; ++i)
- buildProject(referencedProjects[i]);
-
- // Build the project in order to generate the makefiles
- curProject.build(IncrementalProjectBuilder.INCREMENTAL_BUILD,new NullProgressMonitor());
- }
- catch(CoreException e){
- fail(e.getStatus().getMessage());
- }
- catch(OperationCanceledException e){
- fail("the project \"" + curProject.getName() + "\" build was cancelled, exception message: " + e.getMessage());
- }
-
-
- }
-
-
-
- @Override
- protected void setUp() throws Exception {
- super.setUp();
- allToolChains = ManagedBuildManager.
- getRealToolChains();
- IWorkspaceDescription wsDescription = ResourcesPlugin.getWorkspace().getDescription();
- wsDescription.setAutoBuilding(false);
- ResourcesPlugin.getWorkspace().setDescription(wsDescription);
- assertNotNull("Cannot create tapp project",
- fTapp = ManagedBuildTestHelper.loadProject("tapp", PROJ_PATH));
- assertNotNull("Cannot create tlib project",
- fTlib = ManagedBuildTestHelper.loadProject("tlib", PROJ_PATH));
- assertNotNull("Cannot create tobjs project",
- fTobjs = ManagedBuildTestHelper.loadProject("tobjs", PROJ_PATH));
- IProjectDescription projDescription = fTapp.getDescription();
- projDescription.setReferencedProjects(new IProject[]
- {fTlib, fTobjs});
- fTapp.setDescription(projDescription, new NullProgressMonitor());
- IToolChain toolChain = setToolChain(fTapp, null);
- assertNotNull("No compatible tool chain.", toolChain);
- setToolChain(fTlib, toolChain);
- setToolChain(fTobjs, toolChain);
- }
-
- @Override
- protected void tearDown() throws Exception {
- super.tearDown();
- ManagedBuildTestHelper.removeProject(fTapp.getName());
- ManagedBuildTestHelper.removeProject(fTlib.getName());
- ManagedBuildTestHelper.removeProject(fTobjs.getName());
- }
-
- private void findFiles(IResource dir, String pattern, List<IFile> files) {
- IResource resource = null;
- try {
- IResource[] members;
- if(dir instanceof IContainer)
- members = ((IContainer)dir).members(IFolder.INCLUDE_PHANTOMS);
- else
- if(dir instanceof IFolder)
- members = ((IFolder)dir).members(IFolder.INCLUDE_PHANTOMS);
- else // Not possible
- return;
- for(int i = 0; i < members.length; ++i) {
- resource = members[i];
- if(resource.getType() == IResource.FOLDER)
- findFiles(resource, pattern, files);
- else {
- if(resource.getName().matches(pattern))
- files.add((IFile)resource);
- }
- }
- } catch (CoreException e) {
- e.printStackTrace();
- fail("Error while collecting files." + MESSAGE_TAIL);
- }
- }
-
- private IToolChain setToolChain(IProject project, IToolChain setTo) {
- try {
- IConfiguration cfg = getProjectConfiguration(project);
- IToolChain currentToolChain = cfg.getToolChain();
-
- IToolChainModificationManager mngr =
- ManagedBuildManager.getToolChainModificationManager();
- IConfigurationModification cfgM =
- (IConfigurationModification)mngr.
- createModification(cfg.getRootFolderInfo());
- FolderInfo folderInfo = (FolderInfo)cfg.getRootFolderInfo();
-
- if(setTo == null) {
- for(int i = 0; i < allToolChains.length; ++i) {
- // If predefined tool chain supported, leave it alone
- if(allToolChains[i].equals(currentToolChain))
- return currentToolChain;
- // In the same loop try to find compatible tool chain
- if(setTo == null) {
- IBuilder builder = allToolChains[i].getBuilder();
- if(cfg.isBuilderCompatible(builder) &&
- folderInfo.isToolChainCompatible(allToolChains[i]))
- setTo = allToolChains[i];
- }
- }
- }
- if(null != setTo) {
- cfgM.setToolChain(setTo);
- assertEquals(setTo, cfgM.getToolChain());
- assertEquals(setTo.getBuilder(), cfgM.getBuilder());
- }
- } catch (CoreException e) {
- e.printStackTrace();
- fail("Error. " + MESSAGE_TAIL);
- }
- return setTo;
- }
-
- private IConfiguration getProjectConfiguration(IProject project) throws CoreException {
- ICProjectDescription cProjDescription = CoreModel.getDefault().
- createProjectDescription(project, true);
- return ManagedBuildManager.
- getConfigurationForDescription(
- cProjDescription.getConfigurations()[0]);
-
- }
-
- private void rebuildArtefact(IProject project) {
-// deleteFiles(getProjectFolder(project),
-// getArtefactFullName(project),
-// new NullProgressMonitor());
- try {
- project.build(IncrementalProjectBuilder.CLEAN_BUILD, new NullProgressMonitor());
- } catch (CoreException e) {
- e.printStackTrace();
- fail("Cannot clean project " + fTapp.getName() + '.' + MESSAGE_TAIL);
- }
- buildProject(project);
- }
-
- private long getArtifactTimeStamp(IProject project) {
- List<IFile> files = new ArrayList<IFile>();
- findFiles(project, getArtefactFullName(project), files);
- if(files.size() == 0) // File not exists
- return 0;
- IFile artefact = files.iterator().next();
- return artefact.getModificationStamp();
- }
-
- private String getArtefactFullName(IProject project) {
- IConfiguration cfg = null;
- try {
- cfg = getProjectConfiguration(project);
- } catch (CoreException e) {
- e.printStackTrace();
- fail("Error. " + MESSAGE_TAIL);
- }
- String name = cfg.getArtifactName();
- String ext = cfg.getArtifactExtension();
- if((null != ext) && (ext.length() > 0)) {
- name += '.';
- name += ext;
- }
- return name;
- }
-
-
- public void testDepLibs() {
- buildProject(fTapp);
- long timeStamp = getArtifactTimeStamp(fTapp);
- if(timeStamp == 0) {
- fail("Cannot build project " + fTapp.getName());
- }
- try { // To be sure that in case of build the time should be changed
- Thread.sleep(1000);
- } catch (InterruptedException e) {
- // Do nothing
- }
- // Check if no build any more
- buildProject(fTapp);
- if(timeStamp != getArtifactTimeStamp(fTapp)) {
- fail("Error. This time it should be nothing to build");
- }
- rebuildArtefact(fTlib);
- buildProject(fTapp);
- if(timeStamp == getArtifactTimeStamp(fTapp)) {
- fail("Error. This time it should build application.");
- }
- }
-
- public void testDepUObjs() {
- buildProject(fTapp);
- long timeStamp = getArtifactTimeStamp(fTapp);
- if(timeStamp == 0) {
- fail("Cannot build project " + fTapp.getName());
- }
- try { // To be sure that in case of build the time should be changed
- Thread.sleep(1000);
- } catch (InterruptedException e) {
- // Do nothing
- }
- // Check if no build any more
- buildProject(fTapp);
- if(timeStamp != getArtifactTimeStamp(fTapp)) {
- fail("Error. This time it should be nothing to build");
- }
-// deleteFiles(getProjectFolder(fTobjs), "*.o", new NullProgressMonitor());
- rebuildArtefact(fTobjs);
- buildProject(fTapp);
- if(timeStamp == getArtifactTimeStamp(fTapp)) {
- fail("Error. This time it should build application.");
- }
- }
-
- // Tests that the URI used to get the time stamp of the artifact is escaped correctly
- // See AdditionalInput.getArtifactTimeStamp(IToolChain toolChain)
- public void testGetArtifactTimeStampEscapeURI_bug377295() throws CoreException {
- setWorkspace("regressions");
- final IProject project = loadProject("helloworldC");
- IManagedBuildInfo buildInfo = ManagedBuildManager.getBuildInfo(project);
- IConfiguration[] configs = buildInfo.getManagedProject().getConfigurations();
- for (IConfiguration configuration : configs) {
- configuration.setArtifactName("test [377295]");
- }
-
- project.build(IncrementalProjectBuilder.FULL_BUILD, null);
- // This will trigger AdditionalInput.getArtifactTimeStamp to get called, no IllegalArgumentException should be thrown
- project.build(IncrementalProjectBuilder.FULL_BUILD, null);
- }
+/*******************************************************************************
+ * Copyright (c) 2011, 2012 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.cdt.managedbuilder.core.tests;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+import org.eclipse.cdt.core.model.CoreModel;
+import org.eclipse.cdt.core.settings.model.ICProjectDescription;
+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.IToolChain;
+import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager;
+import org.eclipse.cdt.managedbuilder.internal.core.FolderInfo;
+import org.eclipse.cdt.managedbuilder.tcmodification.IConfigurationModification;
+import org.eclipse.cdt.managedbuilder.tcmodification.IToolChainModificationManager;
+import org.eclipse.cdt.managedbuilder.testplugin.AbstractBuilderTest;
+import org.eclipse.cdt.managedbuilder.testplugin.ManagedBuildTestHelper;
+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.IProjectDescription;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IWorkspaceDescription;
+import org.eclipse.core.resources.IncrementalProjectBuilder;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.OperationCanceledException;
+
+public class ManagedBuildDependencyLibsTests extends AbstractBuilderTest {
+ private static final String PROJ_PATH = "depLibsProjects";
+ private static final String MESSAGE_TAIL = " (see .log file for more details).";
+
+ private IProject fTapp, fTlib, fTobjs;
+
+ private IToolChain[] allToolChains;
+
+ public ManagedBuildDependencyLibsTests(String name) {
+ super(name);
+ }
+
+ public static Test suite() {
+ TestSuite suite = new TestSuite(ManagedBuildDependencyLibsTests.class.getName());
+
+ suite.addTest(new ManagedBuildDependencyLibsTests("testDepLibs"));
+ suite.addTest(new ManagedBuildDependencyLibsTests("testDepUObjs"));
+ suite.addTest(new ManagedBuildDependencyLibsTests("testGetArtifactTimeStampEscapeURI_bug377295"));
+ return suite;
+ }
+
+ private void buildProject(IProject curProject) {
+
+ try {
+ IProject[] referencedProjects = curProject.getReferencedProjects();
+ for(int i = 0; i < referencedProjects.length; ++i)
+ buildProject(referencedProjects[i]);
+
+ // Build the project in order to generate the makefiles
+ curProject.build(IncrementalProjectBuilder.INCREMENTAL_BUILD,new NullProgressMonitor());
+ }
+ catch(CoreException e){
+ fail(e.getStatus().getMessage());
+ }
+ catch(OperationCanceledException e){
+ fail("the project \"" + curProject.getName() + "\" build was cancelled, exception message: " + e.getMessage());
+ }
+
+
+ }
+
+
+
+ @Override
+ protected void setUp() throws Exception {
+ super.setUp();
+ allToolChains = ManagedBuildManager.
+ getRealToolChains();
+ IWorkspaceDescription wsDescription = ResourcesPlugin.getWorkspace().getDescription();
+ wsDescription.setAutoBuilding(false);
+ ResourcesPlugin.getWorkspace().setDescription(wsDescription);
+ assertNotNull("Cannot create tapp project",
+ fTapp = ManagedBuildTestHelper.loadProject("tapp", PROJ_PATH));
+ assertNotNull("Cannot create tlib project",
+ fTlib = ManagedBuildTestHelper.loadProject("tlib", PROJ_PATH));
+ assertNotNull("Cannot create tobjs project",
+ fTobjs = ManagedBuildTestHelper.loadProject("tobjs", PROJ_PATH));
+ IProjectDescription projDescription = fTapp.getDescription();
+ projDescription.setReferencedProjects(new IProject[]
+ {fTlib, fTobjs});
+ fTapp.setDescription(projDescription, new NullProgressMonitor());
+ IToolChain toolChain = setToolChain(fTapp, null);
+ assertNotNull("No compatible tool chain.", toolChain);
+ setToolChain(fTlib, toolChain);
+ setToolChain(fTobjs, toolChain);
+ }
+
+ @Override
+ protected void tearDown() throws Exception {
+ super.tearDown();
+ ManagedBuildTestHelper.removeProject(fTapp.getName());
+ ManagedBuildTestHelper.removeProject(fTlib.getName());
+ ManagedBuildTestHelper.removeProject(fTobjs.getName());
+ }
+
+ private void findFiles(IResource dir, String pattern, List<IFile> files) {
+ IResource resource = null;
+ try {
+ IResource[] members;
+ if(dir instanceof IContainer)
+ members = ((IContainer)dir).members(IFolder.INCLUDE_PHANTOMS);
+ else
+ if(dir instanceof IFolder)
+ members = ((IFolder)dir).members(IFolder.INCLUDE_PHANTOMS);
+ else // Not possible
+ return;
+ for(int i = 0; i < members.length; ++i) {
+ resource = members[i];
+ if(resource.getType() == IResource.FOLDER)
+ findFiles(resource, pattern, files);
+ else {
+ if(resource.getName().matches(pattern))
+ files.add((IFile)resource);
+ }
+ }
+ } catch (CoreException e) {
+ e.printStackTrace();
+ fail("Error while collecting files." + MESSAGE_TAIL);
+ }
+ }
+
+ private IToolChain setToolChain(IProject project, IToolChain setTo) {
+ try {
+ IConfiguration cfg = getProjectConfiguration(project);
+ IToolChain currentToolChain = cfg.getToolChain();
+
+ IToolChainModificationManager mngr =
+ ManagedBuildManager.getToolChainModificationManager();
+ IConfigurationModification cfgM =
+ (IConfigurationModification)mngr.
+ createModification(cfg.getRootFolderInfo());
+ FolderInfo folderInfo = (FolderInfo)cfg.getRootFolderInfo();
+
+ if(setTo == null) {
+ for(int i = 0; i < allToolChains.length; ++i) {
+ // If predefined tool chain supported, leave it alone
+ if(allToolChains[i].equals(currentToolChain))
+ return currentToolChain;
+ // In the same loop try to find compatible tool chain
+ if(setTo == null) {
+ IBuilder builder = allToolChains[i].getBuilder();
+ if(cfg.isBuilderCompatible(builder) &&
+ folderInfo.isToolChainCompatible(allToolChains[i]))
+ setTo = allToolChains[i];
+ }
+ }
+ }
+ if(null != setTo) {
+ cfgM.setToolChain(setTo);
+ assertEquals(setTo, cfgM.getToolChain());
+ assertEquals(setTo.getBuilder(), cfgM.getBuilder());
+ }
+ } catch (CoreException e) {
+ e.printStackTrace();
+ fail("Error. " + MESSAGE_TAIL);
+ }
+ return setTo;
+ }
+
+ private IConfiguration getProjectConfiguration(IProject project) throws CoreException {
+ ICProjectDescription cProjDescription = CoreModel.getDefault().
+ createProjectDescription(project, true);
+ return ManagedBuildManager.
+ getConfigurationForDescription(
+ cProjDescription.getConfigurations()[0]);
+
+ }
+
+ private void rebuildArtefact(IProject project) {
+// deleteFiles(getProjectFolder(project),
+// getArtefactFullName(project),
+// new NullProgressMonitor());
+ try {
+ project.build(IncrementalProjectBuilder.CLEAN_BUILD, new NullProgressMonitor());
+ } catch (CoreException e) {
+ e.printStackTrace();
+ fail("Cannot clean project " + fTapp.getName() + '.' + MESSAGE_TAIL);
+ }
+ buildProject(project);
+ }
+
+ private long getArtifactTimeStamp(IProject project) {
+ List<IFile> files = new ArrayList<IFile>();
+ findFiles(project, getArtefactFullName(project), files);
+ if(files.size() == 0) // File not exists
+ return 0;
+ IFile artefact = files.iterator().next();
+ return artefact.getModificationStamp();
+ }
+
+ private String getArtefactFullName(IProject project) {
+ IConfiguration cfg = null;
+ try {
+ cfg = getProjectConfiguration(project);
+ } catch (CoreException e) {
+ e.printStackTrace();
+ fail("Error. " + MESSAGE_TAIL);
+ }
+ String name = cfg.getArtifactName();
+ String ext = cfg.getArtifactExtension();
+ if((null != ext) && (ext.length() > 0)) {
+ name += '.';
+ name += ext;
+ }
+ return name;
+ }
+
+
+ public void testDepLibs() {
+ buildProject(fTapp);
+ long timeStamp = getArtifactTimeStamp(fTapp);
+ if(timeStamp == 0) {
+ fail("Cannot build project " + fTapp.getName());
+ }
+ try { // To be sure that in case of build the time should be changed
+ Thread.sleep(1000);
+ } catch (InterruptedException e) {
+ // Do nothing
+ }
+ // Check if no build any more
+ buildProject(fTapp);
+ if(timeStamp != getArtifactTimeStamp(fTapp)) {
+ fail("Error. This time it should be nothing to build");
+ }
+ rebuildArtefact(fTlib);
+ buildProject(fTapp);
+ if(timeStamp == getArtifactTimeStamp(fTapp)) {
+ fail("Error. This time it should build application.");
+ }
+ }
+
+ public void testDepUObjs() {
+ buildProject(fTapp);
+ long timeStamp = getArtifactTimeStamp(fTapp);
+ if(timeStamp == 0) {
+ fail("Cannot build project " + fTapp.getName());
+ }
+ try { // To be sure that in case of build the time should be changed
+ Thread.sleep(1000);
+ } catch (InterruptedException e) {
+ // Do nothing
+ }
+ // Check if no build any more
+ buildProject(fTapp);
+ if(timeStamp != getArtifactTimeStamp(fTapp)) {
+ fail("Error. This time it should be nothing to build");
+ }
+// deleteFiles(getProjectFolder(fTobjs), "*.o", new NullProgressMonitor());
+ rebuildArtefact(fTobjs);
+ buildProject(fTapp);
+ if(timeStamp == getArtifactTimeStamp(fTapp)) {
+ fail("Error. This time it should build application.");
+ }
+ }
+
+ // Tests that the URI used to get the time stamp of the artifact is escaped correctly
+ // See AdditionalInput.getArtifactTimeStamp(IToolChain toolChain)
+ public void testGetArtifactTimeStampEscapeURI_bug377295() throws CoreException {
+ setWorkspace("regressions");
+ final IProject project = loadProject("helloworldC");
+ IManagedBuildInfo buildInfo = ManagedBuildManager.getBuildInfo(project);
+ IConfiguration[] configs = buildInfo.getManagedProject().getConfigurations();
+ for (IConfiguration configuration : configs) {
+ configuration.setArtifactName("test [377295]");
+ }
+
+ project.build(IncrementalProjectBuilder.FULL_BUILD, null);
+ // This will trigger AdditionalInput.getArtifactTimeStamp to get called, no IllegalArgumentException should be thrown
+ project.build(IncrementalProjectBuilder.FULL_BUILD, null);
+ }
} \ No newline at end of file
diff --git a/build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/test_commands b/build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/test_commands
index 067d069e1c..8478858654 100644
--- a/build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/test_commands
+++ b/build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/test_commands
@@ -1,3 +1,3 @@
-test.provider.Test_One=cmd1
-test.provider.Test_Two=cmd2
+test.provider.Test_One=cmd1
+test.provider.Test_Two=cmd2
test.provider.Test_Three=cmd \ No newline at end of file
diff --git a/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/internal/ui/language/settings/providers/ScannerDiscoveryConsole.java b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/internal/ui/language/settings/providers/ScannerDiscoveryConsole.java
index b12bf1c19c..f70dd251b4 100644
--- a/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/internal/ui/language/settings/providers/ScannerDiscoveryConsole.java
+++ b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/internal/ui/language/settings/providers/ScannerDiscoveryConsole.java
@@ -1,39 +1,39 @@
-/*******************************************************************************
- * Copyright (c) 2010, 2012 Andrew Gvozdev and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Andrew Gvozdev - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.cdt.managedbuilder.internal.ui.language.settings.providers;
-
-import java.net.URL;
-
-import org.eclipse.cdt.internal.ui.buildconsole.CBuildConsole;
-import org.eclipse.cdt.managedbuilder.language.settings.providers.AbstractBuiltinSpecsDetector;
-import org.eclipse.cdt.ui.language.settings.providers.LanguageSettingsProvidersImages;
-
-/**
- * Console adapter for {@link AbstractBuiltinSpecsDetector}.
- */
-public class ScannerDiscoveryConsole extends CBuildConsole {
- /**
- * {@inheritDoc}
- * @param consoleId - a console ID is expected here which then is used as menu context ID.
- * @param defaultIconUrl - if {@code LanguageSettingsProviderAssociation} extension point
- * defines URL by provider id, {@code defaultIconUrl} will be ignored and the URL from the extension
- * point will be used. If not, supplied {@code defaultIconUrl} will be used.
- */
- @Override
- public void init(String consoleId, String name, URL defaultIconUrl) {
- URL iconUrl = LanguageSettingsProvidersImages.getImageUrl(consoleId);
- if (iconUrl == null) {
- iconUrl = defaultIconUrl;
- }
-
- super.init(consoleId, name, iconUrl);
- }
-}
+/*******************************************************************************
+ * Copyright (c) 2010, 2012 Andrew Gvozdev and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Andrew Gvozdev - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.managedbuilder.internal.ui.language.settings.providers;
+
+import java.net.URL;
+
+import org.eclipse.cdt.internal.ui.buildconsole.CBuildConsole;
+import org.eclipse.cdt.managedbuilder.language.settings.providers.AbstractBuiltinSpecsDetector;
+import org.eclipse.cdt.ui.language.settings.providers.LanguageSettingsProvidersImages;
+
+/**
+ * Console adapter for {@link AbstractBuiltinSpecsDetector}.
+ */
+public class ScannerDiscoveryConsole extends CBuildConsole {
+ /**
+ * {@inheritDoc}
+ * @param consoleId - a console ID is expected here which then is used as menu context ID.
+ * @param defaultIconUrl - if {@code LanguageSettingsProviderAssociation} extension point
+ * defines URL by provider id, {@code defaultIconUrl} will be ignored and the URL from the extension
+ * point will be used. If not, supplied {@code defaultIconUrl} will be used.
+ */
+ @Override
+ public void init(String consoleId, String name, URL defaultIconUrl) {
+ URL iconUrl = LanguageSettingsProvidersImages.getImageUrl(consoleId);
+ if (iconUrl == null) {
+ iconUrl = defaultIconUrl;
+ }
+
+ super.init(consoleId, name, iconUrl);
+ }
+}
diff --git a/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/internal/ui/language/settings/providers/ScannerDiscoveryGlobalConsole.java b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/internal/ui/language/settings/providers/ScannerDiscoveryGlobalConsole.java
index 0eed304893..efe4636f16 100644
--- a/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/internal/ui/language/settings/providers/ScannerDiscoveryGlobalConsole.java
+++ b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/internal/ui/language/settings/providers/ScannerDiscoveryGlobalConsole.java
@@ -1,117 +1,117 @@
-/*******************************************************************************
- * Copyright (c) 2011, 2012 Andrew Gvozdev and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Andrew Gvozdev - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.cdt.managedbuilder.internal.ui.language.settings.providers;
-
-import java.io.IOException;
-import java.net.URL;
-
-import org.eclipse.cdt.core.ConsoleOutputStream;
-import org.eclipse.cdt.internal.core.ICConsole;
-import org.eclipse.cdt.managedbuilder.language.settings.providers.AbstractBuiltinSpecsDetector;
-import org.eclipse.cdt.ui.CDTSharedImages;
-import org.eclipse.cdt.ui.language.settings.providers.LanguageSettingsProvidersImages;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.jface.resource.ImageDescriptor;
-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;
-
-/**
- * Console adapter for global {@link AbstractBuiltinSpecsDetector}.
- *
- * Note that this console is not colored.
- */
-public class ScannerDiscoveryGlobalConsole implements ICConsole {
- private MessageConsole console;
-
- private class ConsoleOutputStreamAdapter extends ConsoleOutputStream {
- private MessageConsoleStream fConsoleStream;
- public ConsoleOutputStreamAdapter(MessageConsoleStream stream) {
- fConsoleStream = stream;
- }
- @Override
- public void write(int arg0) throws IOException {
- fConsoleStream.write(arg0);
- }
- @Override
- public synchronized void write(byte[] b, int off, int len) throws IOException {
- fConsoleStream.write(b, off, len);
- }
-
- @Override
- public void flush() throws IOException {
- fConsoleStream.flush();
- }
-
- @Override
- public void close() throws IOException {
- fConsoleStream.close();
- }
- }
-
- @Override
- public void start(IProject project) {
- Assert.isTrue(project == null);
- }
-
- @Override
- public ConsoleOutputStream getOutputStream() throws CoreException {
- return new ConsoleOutputStreamAdapter(console.newMessageStream());
- }
-
- @Override
- public ConsoleOutputStream getInfoStream() throws CoreException {
- return new ConsoleOutputStreamAdapter(console.newMessageStream());
- }
-
- @Override
- public ConsoleOutputStream getErrorStream() throws CoreException {
- return new ConsoleOutputStreamAdapter(console.newMessageStream());
- }
-
- @Override
- public void init(String consoleId, String name, URL defaultIconUrl) {
- console = null;
-
- IConsoleManager consoleManager = ConsolePlugin.getDefault().getConsoleManager();
- IConsole[] allConsoles = consoleManager.getConsoles();
- for (IConsole con : allConsoles) {
- if (name.equals(con.getName()) && con instanceof MessageConsole) {
- console = (MessageConsole) con;
- console.clearConsole();
- break;
- }
- }
-
- if (console==null) {
- URL iconUrl = LanguageSettingsProvidersImages.getImageUrl(consoleId);
- if (iconUrl == null) {
- iconUrl = defaultIconUrl;
- }
-
- ImageDescriptor imageDescriptor;
- if (iconUrl != null) {
- imageDescriptor = CDTSharedImages.getImageDescriptor(iconUrl.toString());
- } else {
- imageDescriptor = ImageDescriptor.getMissingImageDescriptor();
- }
-
- console = new MessageConsole(name, imageDescriptor);
- console.activate();
- consoleManager.addConsoles(new IConsole[]{ console });
- }
- }
-
-}
+/*******************************************************************************
+ * Copyright (c) 2011, 2012 Andrew Gvozdev and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Andrew Gvozdev - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.managedbuilder.internal.ui.language.settings.providers;
+
+import java.io.IOException;
+import java.net.URL;
+
+import org.eclipse.cdt.core.ConsoleOutputStream;
+import org.eclipse.cdt.internal.core.ICConsole;
+import org.eclipse.cdt.managedbuilder.language.settings.providers.AbstractBuiltinSpecsDetector;
+import org.eclipse.cdt.ui.CDTSharedImages;
+import org.eclipse.cdt.ui.language.settings.providers.LanguageSettingsProvidersImages;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.jface.resource.ImageDescriptor;
+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;
+
+/**
+ * Console adapter for global {@link AbstractBuiltinSpecsDetector}.
+ *
+ * Note that this console is not colored.
+ */
+public class ScannerDiscoveryGlobalConsole implements ICConsole {
+ private MessageConsole console;
+
+ private class ConsoleOutputStreamAdapter extends ConsoleOutputStream {
+ private MessageConsoleStream fConsoleStream;
+ public ConsoleOutputStreamAdapter(MessageConsoleStream stream) {
+ fConsoleStream = stream;
+ }
+ @Override
+ public void write(int arg0) throws IOException {
+ fConsoleStream.write(arg0);
+ }
+ @Override
+ public synchronized void write(byte[] b, int off, int len) throws IOException {
+ fConsoleStream.write(b, off, len);
+ }
+
+ @Override
+ public void flush() throws IOException {
+ fConsoleStream.flush();
+ }
+
+ @Override
+ public void close() throws IOException {
+ fConsoleStream.close();
+ }
+ }
+
+ @Override
+ public void start(IProject project) {
+ Assert.isTrue(project == null);
+ }
+
+ @Override
+ public ConsoleOutputStream getOutputStream() throws CoreException {
+ return new ConsoleOutputStreamAdapter(console.newMessageStream());
+ }
+
+ @Override
+ public ConsoleOutputStream getInfoStream() throws CoreException {
+ return new ConsoleOutputStreamAdapter(console.newMessageStream());
+ }
+
+ @Override
+ public ConsoleOutputStream getErrorStream() throws CoreException {
+ return new ConsoleOutputStreamAdapter(console.newMessageStream());
+ }
+
+ @Override
+ public void init(String consoleId, String name, URL defaultIconUrl) {
+ console = null;
+
+ IConsoleManager consoleManager = ConsolePlugin.getDefault().getConsoleManager();
+ IConsole[] allConsoles = consoleManager.getConsoles();
+ for (IConsole con : allConsoles) {
+ if (name.equals(con.getName()) && con instanceof MessageConsole) {
+ console = (MessageConsole) con;
+ console.clearConsole();
+ break;
+ }
+ }
+
+ if (console==null) {
+ URL iconUrl = LanguageSettingsProvidersImages.getImageUrl(consoleId);
+ if (iconUrl == null) {
+ iconUrl = defaultIconUrl;
+ }
+
+ ImageDescriptor imageDescriptor;
+ if (iconUrl != null) {
+ imageDescriptor = CDTSharedImages.getImageDescriptor(iconUrl.toString());
+ } else {
+ imageDescriptor = ImageDescriptor.getMissingImageDescriptor();
+ }
+
+ console = new MessageConsole(name, imageDescriptor);
+ console.activate();
+ consoleManager.addConsoles(new IConsole[]{ console });
+ }
+ }
+
+}
diff --git a/codan/org.eclipse.cdt.codan.checkers.ui/src/org/eclipse/cdt/codan/internal/checkers/ui/quickfix/CaseBreakQuickFixBreak.java b/codan/org.eclipse.cdt.codan.checkers.ui/src/org/eclipse/cdt/codan/internal/checkers/ui/quickfix/CaseBreakQuickFixBreak.java
index d71fcb1571..12aa760b5f 100644
--- a/codan/org.eclipse.cdt.codan.checkers.ui/src/org/eclipse/cdt/codan/internal/checkers/ui/quickfix/CaseBreakQuickFixBreak.java
+++ b/codan/org.eclipse.cdt.codan.checkers.ui/src/org/eclipse/cdt/codan/internal/checkers/ui/quickfix/CaseBreakQuickFixBreak.java
@@ -1,45 +1,45 @@
-/*******************************************************************************
- * Copyright (c) 2011, 2013 Gil Barash
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Gil Barash - Initial implementation
+/*******************************************************************************
+ * Copyright (c) 2011, 2013 Gil Barash
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Gil Barash - Initial implementation
*******************************************************************************/
-package org.eclipse.cdt.codan.internal.checkers.ui.quickfix;
-
-import org.eclipse.cdt.codan.internal.checkers.ui.CheckersUiActivator;
-import org.eclipse.cdt.core.dom.ast.IASTBreakStatement;
-import org.eclipse.cdt.core.dom.ast.IASTTranslationUnit;
-import org.eclipse.cdt.core.index.IIndex;
-import org.eclipse.cdt.core.model.ITranslationUnit;
-import org.eclipse.core.resources.IMarker;
-import org.eclipse.core.runtime.CoreException;
-
-public class CaseBreakQuickFixBreak extends AbstractCaseBreakQuickFix {
- @Override
- public boolean isApplicable(IMarker marker) {
- int line = marker.getAttribute(IMarker.LINE_NUMBER, 0) - 1;
- if (line < 0)
- return false;
- return true;
- }
-
- @Override
- public String getLabel() {
- return QuickFixMessages.CaseBreakQuickFixBreak_Label;
- }
-
- @Override
- public void modifyAST(IIndex index, IMarker marker) {
- try {
- IASTTranslationUnit ast = getTranslationUnitViaEditor(marker).getAST(index, ITranslationUnit.AST_SKIP_INDEXED_HEADERS);
- IASTBreakStatement breakStatement = ast.getASTNodeFactory().newBreakStatement();
- addNewNodeAtMarkedCaseEnd(breakStatement, ast, marker);
- } catch (CoreException e) {
- CheckersUiActivator.log(e);
- }
- }
-}
+package org.eclipse.cdt.codan.internal.checkers.ui.quickfix;
+
+import org.eclipse.cdt.codan.internal.checkers.ui.CheckersUiActivator;
+import org.eclipse.cdt.core.dom.ast.IASTBreakStatement;
+import org.eclipse.cdt.core.dom.ast.IASTTranslationUnit;
+import org.eclipse.cdt.core.index.IIndex;
+import org.eclipse.cdt.core.model.ITranslationUnit;
+import org.eclipse.core.resources.IMarker;
+import org.eclipse.core.runtime.CoreException;
+
+public class CaseBreakQuickFixBreak extends AbstractCaseBreakQuickFix {
+ @Override
+ public boolean isApplicable(IMarker marker) {
+ int line = marker.getAttribute(IMarker.LINE_NUMBER, 0) - 1;
+ if (line < 0)
+ return false;
+ return true;
+ }
+
+ @Override
+ public String getLabel() {
+ return QuickFixMessages.CaseBreakQuickFixBreak_Label;
+ }
+
+ @Override
+ public void modifyAST(IIndex index, IMarker marker) {
+ try {
+ IASTTranslationUnit ast = getTranslationUnitViaEditor(marker).getAST(index, ITranslationUnit.AST_SKIP_INDEXED_HEADERS);
+ IASTBreakStatement breakStatement = ast.getASTNodeFactory().newBreakStatement();
+ addNewNodeAtMarkedCaseEnd(breakStatement, ast, marker);
+ } catch (CoreException e) {
+ CheckersUiActivator.log(e);
+ }
+ }
+}
diff --git a/codan/org.eclipse.cdt.codan.checkers.ui/src/org/eclipse/cdt/codan/internal/checkers/ui/quickfix/CaseBreakQuickFixComment.java b/codan/org.eclipse.cdt.codan.checkers.ui/src/org/eclipse/cdt/codan/internal/checkers/ui/quickfix/CaseBreakQuickFixComment.java
index 57af76fa0b..0ad298b8d4 100644
--- a/codan/org.eclipse.cdt.codan.checkers.ui/src/org/eclipse/cdt/codan/internal/checkers/ui/quickfix/CaseBreakQuickFixComment.java
+++ b/codan/org.eclipse.cdt.codan.checkers.ui/src/org/eclipse/cdt/codan/internal/checkers/ui/quickfix/CaseBreakQuickFixComment.java
@@ -1,66 +1,66 @@
-/*******************************************************************************
- * Copyright (c) 2011 Alena Laskavaia and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Alena Laskavaia - initial API and implementation
- *******************************************************************************/
-package org.eclipse.cdt.codan.internal.checkers.ui.quickfix;
-
-import org.eclipse.cdt.codan.core.model.IProblem;
-import org.eclipse.cdt.codan.core.param.RootProblemPreference;
-import org.eclipse.cdt.codan.internal.checkers.CaseBreakChecker;
-import org.eclipse.cdt.codan.ui.AbstractCodanCMarkerResolution;
-import org.eclipse.core.resources.IMarker;
-import org.eclipse.jface.text.BadLocationException;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.IRegion;
-import org.eclipse.text.edits.InsertEdit;
-import org.eclipse.text.edits.MalformedTreeException;
-
-public class CaseBreakQuickFixComment extends AbstractCodanCMarkerResolution {
- @Override
- public String getLabel() {
- return QuickFixMessages.CaseBreakQuickFixComment_Label;
- }
-
- @Override
- public void apply(IMarker marker, IDocument document) {
- try {
- int line = marker.getAttribute(IMarker.LINE_NUMBER, -1);
- if (line < 0)
- return;
- int offset = document.getLineOffset(line);
- String indent = getIndentationStr(document, line);
- String comment = getNoBreakComment(marker);
- String editStr = String.format("%s/* %s */\n", indent, comment); //$NON-NLS-1$
- InsertEdit edit = new InsertEdit(offset, editStr);
- edit.apply(document);
- } catch (MalformedTreeException e) {
- return;
- } catch (BadLocationException e) {
- return;
- }
- }
-
- private String getIndentationStr(IDocument document, int line) throws BadLocationException {
- int prevLine = line - 1;
- IRegion lineInformation = document.getLineInformation(prevLine);
- String prevLineStr = document.get(lineInformation.getOffset(), lineInformation.getLength());
- int nonSpace = prevLineStr.indexOf(prevLineStr.trim());
- String indent = prevLineStr.substring(0, nonSpace);
- return indent;
- }
-
- private String getNoBreakComment(IMarker marker) {
- IProblem problem = getProblem(marker);
- RootProblemPreference map = (RootProblemPreference) problem.getPreference();
- String comment = (String) map.getChildValue(CaseBreakChecker.PARAM_NO_BREAK_COMMENT);
- if (comment == null || comment.trim().length() == 0)
- comment = "no break"; //$NON-NLS-1$
- return comment;
- }
-}
+/*******************************************************************************
+ * Copyright (c) 2011 Alena Laskavaia and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Alena Laskavaia - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.codan.internal.checkers.ui.quickfix;
+
+import org.eclipse.cdt.codan.core.model.IProblem;
+import org.eclipse.cdt.codan.core.param.RootProblemPreference;
+import org.eclipse.cdt.codan.internal.checkers.CaseBreakChecker;
+import org.eclipse.cdt.codan.ui.AbstractCodanCMarkerResolution;
+import org.eclipse.core.resources.IMarker;
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.IRegion;
+import org.eclipse.text.edits.InsertEdit;
+import org.eclipse.text.edits.MalformedTreeException;
+
+public class CaseBreakQuickFixComment extends AbstractCodanCMarkerResolution {
+ @Override
+ public String getLabel() {
+ return QuickFixMessages.CaseBreakQuickFixComment_Label;
+ }
+
+ @Override
+ public void apply(IMarker marker, IDocument document) {
+ try {
+ int line = marker.getAttribute(IMarker.LINE_NUMBER, -1);
+ if (line < 0)
+ return;
+ int offset = document.getLineOffset(line);
+ String indent = getIndentationStr(document, line);
+ String comment = getNoBreakComment(marker);
+ String editStr = String.format("%s/* %s */\n", indent, comment); //$NON-NLS-1$
+ InsertEdit edit = new InsertEdit(offset, editStr);
+ edit.apply(document);
+ } catch (MalformedTreeException e) {
+ return;
+ } catch (BadLocationException e) {
+ return;
+ }
+ }
+
+ private String getIndentationStr(IDocument document, int line) throws BadLocationException {
+ int prevLine = line - 1;
+ IRegion lineInformation = document.getLineInformation(prevLine);
+ String prevLineStr = document.get(lineInformation.getOffset(), lineInformation.getLength());
+ int nonSpace = prevLineStr.indexOf(prevLineStr.trim());
+ String indent = prevLineStr.substring(0, nonSpace);
+ return indent;
+ }
+
+ private String getNoBreakComment(IMarker marker) {
+ IProblem problem = getProblem(marker);
+ RootProblemPreference map = (RootProblemPreference) problem.getPreference();
+ String comment = (String) map.getChildValue(CaseBreakChecker.PARAM_NO_BREAK_COMMENT);
+ if (comment == null || comment.trim().length() == 0)
+ comment = "no break"; //$NON-NLS-1$
+ return comment;
+ }
+}
diff --git a/codan/org.eclipse.cdt.codan.core.tests/src/org/eclipse/cdt/codan/internal/checkers/ui/quickfix/CaseBreakQuickFixBreakTest.java b/codan/org.eclipse.cdt.codan.core.tests/src/org/eclipse/cdt/codan/internal/checkers/ui/quickfix/CaseBreakQuickFixBreakTest.java
index b14884a6e0..1a0ddec234 100644
--- a/codan/org.eclipse.cdt.codan.core.tests/src/org/eclipse/cdt/codan/internal/checkers/ui/quickfix/CaseBreakQuickFixBreakTest.java
+++ b/codan/org.eclipse.cdt.codan.core.tests/src/org/eclipse/cdt/codan/internal/checkers/ui/quickfix/CaseBreakQuickFixBreakTest.java
@@ -1,69 +1,69 @@
-/*******************************************************************************
- * Copyright (c) 2010, 2013 Tomasz Wesolowski and others
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Tomasz Wesolowski - initial API and implementation
+/*******************************************************************************
+ * Copyright (c) 2010, 2013 Tomasz Wesolowski and others
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Tomasz Wesolowski - initial API and implementation
*******************************************************************************/
-package org.eclipse.cdt.codan.internal.checkers.ui.quickfix;
-
-import org.eclipse.cdt.codan.ui.AbstractCodanCMarkerResolution;
-
-public class CaseBreakQuickFixBreakTest extends QuickFixTestCase {
- @SuppressWarnings("restriction")
- @Override
- protected AbstractCodanCMarkerResolution createQuickFix() {
- return new CaseBreakQuickFixBreak();
- }
-
- //void func() {
- // int a;
- // switch(a) {
- // case 1:
- // hello();
- // case 2:
- // break;
- // }
- //}
- public void testSimpleCase() throws Exception {
- loadcode(getAboveComment());
- String result = runQuickFixOneFile();
- assertContainedIn("break;\tcase 2:", result);
- }
-
- //void func() {
- // int a;
- // switch(a) {
- // case 1: {
- // hello();
- // }
- // default:
- // }
- //}
- public void testCompositeStatementCase() throws Exception {
- loadcode(getAboveComment());
- String result = runQuickFixOneFile();
- assertContainedIn("hello();\t\tbreak;", result);
- }
-
- // int main() {
- // int a;
- // switch(a)
- // {
- // case 0:
- // {
- // }
- // default:
- // break;
- // }
- // return 0;
- // }
- public void testNPE_bug363884() throws Exception {
- loadcode(getAboveComment());
- String result = runQuickFixOneFile();
- assertContainedIn("break;\t}\t\t\tdefault:", result);
- }
-}
+package org.eclipse.cdt.codan.internal.checkers.ui.quickfix;
+
+import org.eclipse.cdt.codan.ui.AbstractCodanCMarkerResolution;
+
+public class CaseBreakQuickFixBreakTest extends QuickFixTestCase {
+ @SuppressWarnings("restriction")
+ @Override
+ protected AbstractCodanCMarkerResolution createQuickFix() {
+ return new CaseBreakQuickFixBreak();
+ }
+
+ //void func() {
+ // int a;
+ // switch(a) {
+ // case 1:
+ // hello();
+ // case 2:
+ // break;
+ // }
+ //}
+ public void testSimpleCase() throws Exception {
+ loadcode(getAboveComment());
+ String result = runQuickFixOneFile();
+ assertContainedIn("break;\tcase 2:", result);
+ }
+
+ //void func() {
+ // int a;
+ // switch(a) {
+ // case 1: {
+ // hello();
+ // }
+ // default:
+ // }
+ //}
+ public void testCompositeStatementCase() throws Exception {
+ loadcode(getAboveComment());
+ String result = runQuickFixOneFile();
+ assertContainedIn("hello();\t\tbreak;", result);
+ }
+
+ // int main() {
+ // int a;
+ // switch(a)
+ // {
+ // case 0:
+ // {
+ // }
+ // default:
+ // break;
+ // }
+ // return 0;
+ // }
+ public void testNPE_bug363884() throws Exception {
+ loadcode(getAboveComment());
+ String result = runQuickFixOneFile();
+ assertContainedIn("break;\t}\t\t\tdefault:", result);
+ }
+}
diff --git a/codan/org.eclipse.cdt.codan.ui.cxx/.classpath b/codan/org.eclipse.cdt.codan.ui.cxx/.classpath
index b862a296d3..eca7bdba8f 100644
--- a/codan/org.eclipse.cdt.codan.ui.cxx/.classpath
+++ b/codan/org.eclipse.cdt.codan.ui.cxx/.classpath
@@ -1,7 +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.8"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
+<?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.8"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/codan/org.eclipse.cdt.codan.ui.cxx/.settings/org.eclipse.jdt.core.prefs b/codan/org.eclipse.cdt.codan.ui.cxx/.settings/org.eclipse.jdt.core.prefs
index 163ffca2c0..87fa35f303 100644
--- a/codan/org.eclipse.cdt.codan.ui.cxx/.settings/org.eclipse.jdt.core.prefs
+++ b/codan/org.eclipse.cdt.codan.ui.cxx/.settings/org.eclipse.jdt.core.prefs
@@ -1,346 +1,346 @@
-#Sat Jan 07 18:28:52 PST 2012
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.8
-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.comparingIdentical=error
-org.eclipse.jdt.core.compiler.problem.deadCode=warning
-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=warning
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.problem.fallthroughCase=warning
-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=warning
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=error
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=warning
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
-org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=warning
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=error
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=error
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
-org.eclipse.jdt.core.compiler.problem.nullReference=error
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
-org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=error
-org.eclipse.jdt.core.compiler.problem.potentialNullReference=warning
-org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
-org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning
-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=warning
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
-org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
-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=error
-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=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.8
-org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_assignment=0
-org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
-org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
-org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
-org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
-org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
-org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
-org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_after_package=1
-org.eclipse.jdt.core.formatter.blank_lines_before_field=0
-org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
-org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
-org.eclipse.jdt.core.formatter.blank_lines_before_method=1
-org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=0
-org.eclipse.jdt.core.formatter.blank_lines_before_package=0
-org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
-org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
-org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
-org.eclipse.jdt.core.formatter.comment.format_block_comments=true
-org.eclipse.jdt.core.formatter.comment.format_header=false
-org.eclipse.jdt.core.formatter.comment.format_html=false
-org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
-org.eclipse.jdt.core.formatter.comment.format_line_comments=false
-org.eclipse.jdt.core.formatter.comment.format_source_code=true
-org.eclipse.jdt.core.formatter.comment.indent_parameter_description=false
-org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
-org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
-org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert
-org.eclipse.jdt.core.formatter.comment.line_length=80
-org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
-org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
-org.eclipse.jdt.core.formatter.compact_else_if=true
-org.eclipse.jdt.core.formatter.continuation_indentation=2
-org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
-org.eclipse.jdt.core.formatter.disabling_tag=
-org.eclipse.jdt.core.formatter.enabling_tag=
-org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
-org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
-org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_empty_lines=false
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
-org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=true
-org.eclipse.jdt.core.formatter.indentation.size=4
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
-org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.join_lines_in_comments=false
-org.eclipse.jdt.core.formatter.join_wrapped_lines=true
-org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.lineSplit=140
-org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
-org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=0
-org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
-org.eclipse.jdt.core.formatter.tabulation.char=tab
-org.eclipse.jdt.core.formatter.tabulation.size=4
-org.eclipse.jdt.core.formatter.use_on_off_tags=false
-org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
-org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
-org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
+#Sat Jan 07 18:28:52 PST 2012
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+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.comparingIdentical=error
+org.eclipse.jdt.core.compiler.problem.deadCode=warning
+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=warning
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=warning
+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=warning
+org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
+org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=error
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=warning
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
+org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
+org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=warning
+org.eclipse.jdt.core.compiler.problem.noEffectAssignment=error
+org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=error
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
+org.eclipse.jdt.core.compiler.problem.nullReference=error
+org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
+org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=error
+org.eclipse.jdt.core.compiler.problem.potentialNullReference=warning
+org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning
+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=warning
+org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
+org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning
+org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
+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=error
+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=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.8
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=0
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=0
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
+org.eclipse.jdt.core.formatter.comment.format_block_comments=true
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=false
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
+org.eclipse.jdt.core.formatter.comment.format_line_comments=false
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=false
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert
+org.eclipse.jdt.core.formatter.comment.line_length=80
+org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
+org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.jdt.core.formatter.disabling_tag=
+org.eclipse.jdt.core.formatter.enabling_tag=
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=true
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.join_lines_in_comments=false
+org.eclipse.jdt.core.formatter.join_wrapped_lines=true
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.lineSplit=140
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=0
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=tab
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_on_off_tags=false
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
+org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
diff --git a/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/ImageConstants.java b/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/ImageConstants.java
index f65ad85333..9eca58919f 100644
--- a/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/ImageConstants.java
+++ b/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/ImageConstants.java
@@ -1,17 +1,17 @@
-/*******************************************************************************
- * Copyright (c) 2012 Marc-Andre Laperle
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Marc-Andre Laperle - initial API and implementation
- *******************************************************************************/
-package org.eclipse.cdt.codan.internal.ui;
-
-public interface ImageConstants {
- String ICON_WARNING = "icons/yellow_bug.gif"; //$NON-NLS-1$
- String ICON_ERROR = "icons/red_bug.gif"; //$NON-NLS-1$
- String ICON_INFO = "icons/blue_bug.gif"; //$NON-NLS-1$
-}
+/*******************************************************************************
+ * Copyright (c) 2012 Marc-Andre Laperle
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Marc-Andre Laperle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.codan.internal.ui;
+
+public interface ImageConstants {
+ String ICON_WARNING = "icons/yellow_bug.gif"; //$NON-NLS-1$
+ String ICON_ERROR = "icons/red_bug.gif"; //$NON-NLS-1$
+ String ICON_INFO = "icons/blue_bug.gif"; //$NON-NLS-1$
+}
diff --git a/core/org.eclipse.cdt.core.linux/library/SpawnerInputStream.h b/core/org.eclipse.cdt.core.linux/library/SpawnerInputStream.h
index 3b32d2b280..ecf8f8c6a7 100644
--- a/core/org.eclipse.cdt.core.linux/library/SpawnerInputStream.h
+++ b/core/org.eclipse.cdt.core.linux/library/SpawnerInputStream.h
@@ -1,32 +1,32 @@
-/* DO NOT EDIT THIS FILE - it is machine generated */
-#include <jni.h>
-/* Header for class com_qnx_tools_utils_spawner_SpawnerInputStream */
-
-#ifndef _Included_com_qnx_tools_utils_spawner_SpawnerInputStream
-#define _Included_com_qnx_tools_utils_spawner_SpawnerInputStream
-#ifdef __cplusplus
-extern "C" {
-#endif
-#undef com_qnx_tools_utils_spawner_SpawnerInputStream_SKIP_BUFFER_SIZE
-#define com_qnx_tools_utils_spawner_SpawnerInputStream_SKIP_BUFFER_SIZE 2048L
-/* Inaccessible static: skipBuffer */
-/*
- * Class: org_elipse_cdt_utils_spawner_SpawnerInputStream
- * Method: read0
- * Signature: (I[BI)I
- */
-JNIEXPORT jint JNICALL Java_org_eclipse_cdt_utils_spawner_SpawnerInputStream_read0
- (JNIEnv *, jobject, jint, jbyteArray, jint);
-
-/*
- * Class: org_eclipse_cdt_utils_spawner_SpawnerInputStream
- * Method: close0
- * Signature: (I)I
- */
-JNIEXPORT jint JNICALL Java_org_eclipse_cdt_utils_spawner_SpawnerInputStream_close0
- (JNIEnv *, jobject, jint);
-
-#ifdef __cplusplus
-}
-#endif
-#endif
+/* DO NOT EDIT THIS FILE - it is machine generated */
+#include <jni.h>
+/* Header for class com_qnx_tools_utils_spawner_SpawnerInputStream */
+
+#ifndef _Included_com_qnx_tools_utils_spawner_SpawnerInputStream
+#define _Included_com_qnx_tools_utils_spawner_SpawnerInputStream
+#ifdef __cplusplus
+extern "C" {
+#endif
+#undef com_qnx_tools_utils_spawner_SpawnerInputStream_SKIP_BUFFER_SIZE
+#define com_qnx_tools_utils_spawner_SpawnerInputStream_SKIP_BUFFER_SIZE 2048L
+/* Inaccessible static: skipBuffer */
+/*
+ * Class: org_elipse_cdt_utils_spawner_SpawnerInputStream
+ * Method: read0
+ * Signature: (I[BI)I
+ */
+JNIEXPORT jint JNICALL Java_org_eclipse_cdt_utils_spawner_SpawnerInputStream_read0
+ (JNIEnv *, jobject, jint, jbyteArray, jint);
+
+/*
+ * Class: org_eclipse_cdt_utils_spawner_SpawnerInputStream
+ * Method: close0
+ * Signature: (I)I
+ */
+JNIEXPORT jint JNICALL Java_org_eclipse_cdt_utils_spawner_SpawnerInputStream_close0
+ (JNIEnv *, jobject, jint);
+
+#ifdef __cplusplus
+}
+#endif
+#endif
diff --git a/core/org.eclipse.cdt.core.linux/library/SpawnerOutputStream.h b/core/org.eclipse.cdt.core.linux/library/SpawnerOutputStream.h
index f835947e06..444d71c698 100644
--- a/core/org.eclipse.cdt.core.linux/library/SpawnerOutputStream.h
+++ b/core/org.eclipse.cdt.core.linux/library/SpawnerOutputStream.h
@@ -1,29 +1,29 @@
-/* DO NOT EDIT THIS FILE - it is machine generated */
-#include <jni.h>
-/* Header for class com_qnx_tools_utils_spawner_SpawnerOutputStream */
-
-#ifndef _Included_com_qnx_tools_utils_spawner_SpawnerOutputStream
-#define _Included_com_qnx_tools_utils_spawner_SpawnerOutputStream
-#ifdef __cplusplus
-extern "C" {
-#endif
-/*
- * Class: org_eclipse_cdt_utils_spawner_SpawnerOutputStream
- * Method: write0
- * Signature: (I[BI)I
- */
-JNIEXPORT jint JNICALL Java_org_eclipse_cdt_utils_spawner_SpawnerOutputStream_write0
- (JNIEnv *, jobject, jint, jbyteArray, jint);
-
-/*
- * Class: org_eclipse_cdt_utils_spawner_SpawnerOutputStream
- * Method: close0
- * Signature: (I)I
- */
-JNIEXPORT jint JNICALL Java_org_eclipse_cdt_utils_spawner_SpawnerOutputStream_close0
- (JNIEnv *, jobject, jint);
-
-#ifdef __cplusplus
-}
-#endif
-#endif
+/* DO NOT EDIT THIS FILE - it is machine generated */
+#include <jni.h>
+/* Header for class com_qnx_tools_utils_spawner_SpawnerOutputStream */
+
+#ifndef _Included_com_qnx_tools_utils_spawner_SpawnerOutputStream
+#define _Included_com_qnx_tools_utils_spawner_SpawnerOutputStream
+#ifdef __cplusplus
+extern "C" {
+#endif
+/*
+ * Class: org_eclipse_cdt_utils_spawner_SpawnerOutputStream
+ * Method: write0
+ * Signature: (I[BI)I
+ */
+JNIEXPORT jint JNICALL Java_org_eclipse_cdt_utils_spawner_SpawnerOutputStream_write0
+ (JNIEnv *, jobject, jint, jbyteArray, jint);
+
+/*
+ * Class: org_eclipse_cdt_utils_spawner_SpawnerOutputStream
+ * Method: close0
+ * Signature: (I)I
+ */
+JNIEXPORT jint JNICALL Java_org_eclipse_cdt_utils_spawner_SpawnerOutputStream_close0
+ (JNIEnv *, jobject, jint);
+
+#ifdef __cplusplus
+}
+#endif
+#endif
diff --git a/core/org.eclipse.cdt.core.linux/library/exec0.h b/core/org.eclipse.cdt.core.linux/library/exec0.h
index 3033ec1a5a..bdc56dafa7 100644
--- a/core/org.eclipse.cdt.core.linux/library/exec0.h
+++ b/core/org.eclipse.cdt.core.linux/library/exec0.h
@@ -1,29 +1,29 @@
-/*******************************************************************************
- * Copyright (c) 2002, 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
- * Wind River Systems, Inc.
- * Mikhail Zabaluev (Nokia) - bug 82744
- *******************************************************************************/
-#include <unistd.h>
-#include <sys/wait.h>
-#include <sys/types.h>
-#include <signal.h>
-#include <errno.h>
-
-extern pid_t exec0(const char *path, char *const argv[],
- char *const envp[], const char *dirpath,
- int channels[3]);
-
-
-extern pid_t exec_pty(const char *path, char *const argv[],
- char *const envp[], const char *dirpath,
- int channels[3], const char *pts_name, int fdm,
- int console);
-
-extern int wait0(pid_t pid);
+/*******************************************************************************
+ * Copyright (c) 2002, 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
+ * Wind River Systems, Inc.
+ * Mikhail Zabaluev (Nokia) - bug 82744
+ *******************************************************************************/
+#include <unistd.h>
+#include <sys/wait.h>
+#include <sys/types.h>
+#include <signal.h>
+#include <errno.h>
+
+extern pid_t exec0(const char *path, char *const argv[],
+ char *const envp[], const char *dirpath,
+ int channels[3]);
+
+
+extern pid_t exec_pty(const char *path, char *const argv[],
+ char *const envp[], const char *dirpath,
+ int channels[3], const char *pts_name, int fdm,
+ int console);
+
+extern int wait0(pid_t pid);
diff --git a/core/org.eclipse.cdt.core.linux/library/exec_pty.c b/core/org.eclipse.cdt.core.linux/library/exec_pty.c
index dd68615f0e..752f545a98 100644
--- a/core/org.eclipse.cdt.core.linux/library/exec_pty.c
+++ b/core/org.eclipse.cdt.core.linux/library/exec_pty.c
@@ -1,186 +1,186 @@
-/*******************************************************************************
- * Copyright (c) 2004, 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
- * Wind River Systems, Inc.
- * Mikhail Zabaluev (Nokia) - bug 82744
- * Mikhail Sennikovsky - bug 145737
- *******************************************************************************/
-#include "exec0.h"
-#include "openpty.h"
-#include <unistd.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <errno.h>
-#include <string.h>
-#include <libgen.h>
-#include <stdlib.h>
-#include <termios.h>
-
-/* from pfind.c */
-extern char *pfind(const char *name, char * const envp[]);
-
-pid_t
-exec_pty(const char *path, char *const argv[], char *const envp[],
- const char *dirpath, int channels[3], const char *pts_name, int fdm, int console)
-{
- int pipe2[2];
- pid_t childpid;
- char *full_path;
-
- /*
- * We use pfind() to check that the program exists and is an executable.
- * If not pass the error up. Also execve() wants a full path.
- */
- full_path = pfind(path, envp);
- if (full_path == NULL) {
- fprintf(stderr, "Unable to find full path for \"%s\"\n", (path) ? path : "");
- return -1;
- }
-
- /*
- * Make sure we can create our pipes before forking.
- */
- if (channels != NULL && console) {
- if (pipe(pipe2) < 0) {
- fprintf(stderr, "%s(%d): returning due to error: %s\n", __FUNCTION__, __LINE__, strerror(errno));
- free(full_path);
- return -1;
- }
- }
-
- childpid = fork();
-
- if (childpid < 0) {
- fprintf(stderr, "%s(%d): returning due to error: %s\n", __FUNCTION__, __LINE__, strerror(errno));
- free(full_path);
- return -1;
- } else if (childpid == 0) { /* child */
-
- chdir(dirpath);
-
- if (channels != NULL) {
- int fds;
-
- if (!console && setsid() < 0) {
- perror("setsid()");
- return -1;
- }
-
- fds = ptys_open(fdm, pts_name);
- if (fds < 0) {
- fprintf(stderr, "%s(%d): returning due to error: %s\n", __FUNCTION__, __LINE__, strerror(errno));
- return -1;
- }
-
- /* Close the read end of pipe2 */
- if (console && close(pipe2[0]) == -1) {
- perror("close(pipe2[0]))");
- }
-
- /* close the master, no need in the child */
- close(fdm);
-
- if (console) {
- set_noecho(fds);
- if (setpgid(getpid(), getpid()) < 0) {
- perror("setpgid()");
- return -1;
- }
- }
-
- /* redirections */
- dup2(fds, STDIN_FILENO); /* dup stdin */
- dup2(fds, STDOUT_FILENO); /* dup stdout */
- if (console) {
- dup2(pipe2[1], STDERR_FILENO); /* dup stderr */
- } else {
- dup2(fds, STDERR_FILENO); /* dup stderr */
- }
- close(fds); /* done with fds. */
- }
-
- /* Close all the fd's in the child */
- {
- int fdlimit = sysconf(_SC_OPEN_MAX);
- int fd = 3;
-
- while (fd < fdlimit)
- close(fd++);
- }
-
- if (envp[0] == NULL) {
- execv(full_path, argv);
- } else {
- execve(full_path, argv, envp);
- }
-
- _exit(127);
-
- } else if (childpid != 0) { /* parent */
- if (console) {
- set_noecho(fdm);
- }
- if (channels != NULL) {
- channels[0] = fdm; /* Input Stream. */
- channels[1] = fdm; /* Output Stream. */
- if (console) {
- /* close the write end of pipe1 */
- if (close(pipe2[1]) == -1)
- perror("close(pipe2[1])");
- channels[2] = pipe2[0]; /* stderr Stream. */
- } else {
- channels[2] = fdm; /* Error Stream. */
- }
- }
-
- free(full_path);
- return childpid;
- }
-
- free(full_path);
- return -1; /*NOT REACHED */
-}
-#ifdef __STAND_ALONE__
-int main(int argc, char **argv, char **envp) {
- const char *path = "./bufferring_test";
- int channels[3] = { -1, -1, -1};
- int status;
- FILE *app_stdin;
- FILE *app_stdout;
- FILE *app_stderr;
- char pts_name[32];
- int fdm;
- char buffer[32];
-
- fdm = ptym_open(pts_name);
- status = exec_pty(path, argv, envp, ".", channels, pts_name, fdm);
- if (status >= 0) {
- app_stdin = fdopen(channels[0], "w");
- app_stdout = fdopen(channels[1], "r");
- app_stderr = fdopen(channels[2], "r");
- if (app_stdout == NULL || app_stderr == NULL || app_stdin == NULL) {
- fprintf(stderr, "PROBLEMS\n");
- } else {
- fputs("foo\n", app_stdin);
- fputs("bar\n", app_stdin);
- while(fgets(buffer, sizeof buffer, app_stdout) != NULL) {
- fprintf(stdout, "STDOUT: %s\n", buffer);
- }
- while(fgets(buffer, sizeof buffer, app_stderr) != NULL) {
- fprintf(stdout, "STDERR: %s\n", buffer);
- }
- }
- }
- fputs("bye\n", stdout);
- close(channels[0]);
- close(channels[1]);
- close(channels[2]);
- return 0;
-}
-#endif
+/*******************************************************************************
+ * Copyright (c) 2004, 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
+ * Wind River Systems, Inc.
+ * Mikhail Zabaluev (Nokia) - bug 82744
+ * Mikhail Sennikovsky - bug 145737
+ *******************************************************************************/
+#include "exec0.h"
+#include "openpty.h"
+#include <unistd.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <libgen.h>
+#include <stdlib.h>
+#include <termios.h>
+
+/* from pfind.c */
+extern char *pfind(const char *name, char * const envp[]);
+
+pid_t
+exec_pty(const char *path, char *const argv[], char *const envp[],
+ const char *dirpath, int channels[3], const char *pts_name, int fdm, int console)
+{
+ int pipe2[2];
+ pid_t childpid;
+ char *full_path;
+
+ /*
+ * We use pfind() to check that the program exists and is an executable.
+ * If not pass the error up. Also execve() wants a full path.
+ */
+ full_path = pfind(path, envp);
+ if (full_path == NULL) {
+ fprintf(stderr, "Unable to find full path for \"%s\"\n", (path) ? path : "");
+ return -1;
+ }
+
+ /*
+ * Make sure we can create our pipes before forking.
+ */
+ if (channels != NULL && console) {
+ if (pipe(pipe2) < 0) {
+ fprintf(stderr, "%s(%d): returning due to error: %s\n", __FUNCTION__, __LINE__, strerror(errno));
+ free(full_path);
+ return -1;
+ }
+ }
+
+ childpid = fork();
+
+ if (childpid < 0) {
+ fprintf(stderr, "%s(%d): returning due to error: %s\n", __FUNCTION__, __LINE__, strerror(errno));
+ free(full_path);
+ return -1;
+ } else if (childpid == 0) { /* child */
+
+ chdir(dirpath);
+
+ if (channels != NULL) {
+ int fds;
+
+ if (!console && setsid() < 0) {
+ perror("setsid()");
+ return -1;
+ }
+
+ fds = ptys_open(fdm, pts_name);
+ if (fds < 0) {
+ fprintf(stderr, "%s(%d): returning due to error: %s\n", __FUNCTION__, __LINE__, strerror(errno));
+ return -1;
+ }
+
+ /* Close the read end of pipe2 */
+ if (console && close(pipe2[0]) == -1) {
+ perror("close(pipe2[0]))");
+ }
+
+ /* close the master, no need in the child */
+ close(fdm);
+
+ if (console) {
+ set_noecho(fds);
+ if (setpgid(getpid(), getpid()) < 0) {
+ perror("setpgid()");
+ return -1;
+ }
+ }
+
+ /* redirections */
+ dup2(fds, STDIN_FILENO); /* dup stdin */
+ dup2(fds, STDOUT_FILENO); /* dup stdout */
+ if (console) {
+ dup2(pipe2[1], STDERR_FILENO); /* dup stderr */
+ } else {
+ dup2(fds, STDERR_FILENO); /* dup stderr */
+ }
+ close(fds); /* done with fds. */
+ }
+
+ /* Close all the fd's in the child */
+ {
+ int fdlimit = sysconf(_SC_OPEN_MAX);
+ int fd = 3;
+
+ while (fd < fdlimit)
+ close(fd++);
+ }
+
+ if (envp[0] == NULL) {
+ execv(full_path, argv);
+ } else {
+ execve(full_path, argv, envp);
+ }
+
+ _exit(127);
+
+ } else if (childpid != 0) { /* parent */
+ if (console) {
+ set_noecho(fdm);
+ }
+ if (channels != NULL) {
+ channels[0] = fdm; /* Input Stream. */
+ channels[1] = fdm; /* Output Stream. */
+ if (console) {
+ /* close the write end of pipe1 */
+ if (close(pipe2[1]) == -1)
+ perror("close(pipe2[1])");
+ channels[2] = pipe2[0]; /* stderr Stream. */
+ } else {
+ channels[2] = fdm; /* Error Stream. */
+ }
+ }
+
+ free(full_path);
+ return childpid;
+ }
+
+ free(full_path);
+ return -1; /*NOT REACHED */
+}
+#ifdef __STAND_ALONE__
+int main(int argc, char **argv, char **envp) {
+ const char *path = "./bufferring_test";
+ int channels[3] = { -1, -1, -1};
+ int status;
+ FILE *app_stdin;
+ FILE *app_stdout;
+ FILE *app_stderr;
+ char pts_name[32];
+ int fdm;
+ char buffer[32];
+
+ fdm = ptym_open(pts_name);
+ status = exec_pty(path, argv, envp, ".", channels, pts_name, fdm);
+ if (status >= 0) {
+ app_stdin = fdopen(channels[0], "w");
+ app_stdout = fdopen(channels[1], "r");
+ app_stderr = fdopen(channels[2], "r");
+ if (app_stdout == NULL || app_stderr == NULL || app_stdin == NULL) {
+ fprintf(stderr, "PROBLEMS\n");
+ } else {
+ fputs("foo\n", app_stdin);
+ fputs("bar\n", app_stdin);
+ while(fgets(buffer, sizeof buffer, app_stdout) != NULL) {
+ fprintf(stdout, "STDOUT: %s\n", buffer);
+ }
+ while(fgets(buffer, sizeof buffer, app_stderr) != NULL) {
+ fprintf(stdout, "STDERR: %s\n", buffer);
+ }
+ }
+ }
+ fputs("bye\n", stdout);
+ close(channels[0]);
+ close(channels[1]);
+ close(channels[2]);
+ return 0;
+}
+#endif
diff --git a/core/org.eclipse.cdt.core.linux/library/exec_unix.c b/core/org.eclipse.cdt.core.linux/library/exec_unix.c
index ced7b744da..0d68dd13c0 100644
--- a/core/org.eclipse.cdt.core.linux/library/exec_unix.c
+++ b/core/org.eclipse.cdt.core.linux/library/exec_unix.c
@@ -1,158 +1,158 @@
-/*******************************************************************************
- * Copyright (c) 2002, 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
- * Wind River Systems, Inc.
- * Mikhail Sennikovsky - bug 145737
- *******************************************************************************/
-#include "exec0.h"
-#include <unistd.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <errno.h>
-#include <string.h>
-#include <libgen.h>
-#include <stdlib.h>
-
-/* from pfind.c */
-extern char *pfind(const char *name, char * const envp[]);
-
-pid_t
-exec0(const char *path, char *const argv[], char *const envp[],
- const char *dirpath, int channels[3])
-{
- int pipe0[2], pipe1[2], pipe2[2];
- pid_t childpid;
- char *full_path;
-
- /*
- * We use pfind() to check that the program exists and is an executable.
- * If not pass the error up. Also execve() wants a full path.
- */
- full_path = pfind(path, envp);
- if (full_path == NULL) {
- fprintf(stderr, "Unable to find full path for \"%s\"\n", (path) ? path : "");
- return -1;
- }
-
- /*
- * Make sure we can create our pipes before forking.
- */
- if (channels != NULL) {
- if (pipe(pipe0) < 0 || pipe(pipe1) < 0 || pipe(pipe2) < 0) {
- fprintf(stderr, "%s(%d): returning due to error.\n",
- __FUNCTION__, __LINE__);
- free(full_path);
- return -1;
- }
- }
-
- childpid = fork();
-
- if (childpid < 0) {
- fprintf(stderr, "%s(%d): returning due to error: %s\n",
- __FUNCTION__, __LINE__, strerror(errno));
- free(full_path);
- return -1;
- } else if (childpid == 0) { /* child */
- char *ptr;
-
- chdir(dirpath);
-
- if (channels != NULL) {
- /* Close the write end of pipe0 */
- if (close(pipe0[1]) == -1)
- perror("close(pipe0[1])");
-
- /* Close the read end of pipe1 */
- if (close(pipe1[0]) == -1)
- perror("close(pipe1[0])");
-
- /* Close the read end of pipe2 */
- if (close(pipe2[0]) == -1)
- perror("close(pipe2[0]))");
-
- /* redirections */
- dup2(pipe0[0], STDIN_FILENO); /* dup stdin */
- dup2(pipe1[1], STDOUT_FILENO); /* dup stdout */
- dup2(pipe2[1], STDERR_FILENO); /* dup stderr */
- }
-
- /* Close all the fd's in the child */
- {
- int fdlimit = sysconf(_SC_OPEN_MAX);
- int fd = 3;
-
- while (fd < fdlimit)
- close(fd++);
- }
-
- setpgid(getpid(), getpid());
-
- if (envp[0] == NULL) {
- execv(full_path, argv);
- } else {
- execve(full_path, argv, envp);
- }
-
- _exit(127);
-
- } else if (childpid != 0) { /* parent */
-
- char b;
-
- if (channels != NULL) {
- /* close the read end of pipe1 */
- if (close(pipe0[0]) == -1)
- perror("close(pipe0[0])");
-
- /* close the write end of pipe2 */
- if (close(pipe1[1]) == -1)
- perror("close(pipe1[1])");
-
- /* close the write end of pipe2 */
- if (close(pipe2[1]) == -1)
- perror("close(pipe2[1])");
-
- channels[0] = pipe0[1]; /* Output Stream. */
- channels[1] = pipe1[0]; /* Input Stream. */
- channels[2] = pipe2[0]; /* Input Stream. */
- }
-
- free(full_path);
- return childpid;
- }
-
- free(full_path);
- return -1; /*NOT REACHED */
-}
-
-
-int wait0(pid_t pid)
-{
- int status;
- int val = -1;
-
- if (pid < 0)
- return -1;
-
- for (;;) {
- if (waitpid(pid, &status, 0) < 0) {
- if (errno == EINTR) {
- // interrupted system call - retry
- continue;
- }
- }
- break;
- }
- if (WIFEXITED(status)) {
- val = WEXITSTATUS(status);
- }
-
- return val;
-}
+/*******************************************************************************
+ * Copyright (c) 2002, 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
+ * Wind River Systems, Inc.
+ * Mikhail Sennikovsky - bug 145737
+ *******************************************************************************/
+#include "exec0.h"
+#include <unistd.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <libgen.h>
+#include <stdlib.h>
+
+/* from pfind.c */
+extern char *pfind(const char *name, char * const envp[]);
+
+pid_t
+exec0(const char *path, char *const argv[], char *const envp[],
+ const char *dirpath, int channels[3])
+{
+ int pipe0[2], pipe1[2], pipe2[2];
+ pid_t childpid;
+ char *full_path;
+
+ /*
+ * We use pfind() to check that the program exists and is an executable.
+ * If not pass the error up. Also execve() wants a full path.
+ */
+ full_path = pfind(path, envp);
+ if (full_path == NULL) {
+ fprintf(stderr, "Unable to find full path for \"%s\"\n", (path) ? path : "");
+ return -1;
+ }
+
+ /*
+ * Make sure we can create our pipes before forking.
+ */
+ if (channels != NULL) {
+ if (pipe(pipe0) < 0 || pipe(pipe1) < 0 || pipe(pipe2) < 0) {
+ fprintf(stderr, "%s(%d): returning due to error.\n",
+ __FUNCTION__, __LINE__);
+ free(full_path);
+ return -1;
+ }
+ }
+
+ childpid = fork();
+
+ if (childpid < 0) {
+ fprintf(stderr, "%s(%d): returning due to error: %s\n",
+ __FUNCTION__, __LINE__, strerror(errno));
+ free(full_path);
+ return -1;
+ } else if (childpid == 0) { /* child */
+ char *ptr;
+
+ chdir(dirpath);
+
+ if (channels != NULL) {
+ /* Close the write end of pipe0 */
+ if (close(pipe0[1]) == -1)
+ perror("close(pipe0[1])");
+
+ /* Close the read end of pipe1 */
+ if (close(pipe1[0]) == -1)
+ perror("close(pipe1[0])");
+
+ /* Close the read end of pipe2 */
+ if (close(pipe2[0]) == -1)
+ perror("close(pipe2[0]))");
+
+ /* redirections */
+ dup2(pipe0[0], STDIN_FILENO); /* dup stdin */
+ dup2(pipe1[1], STDOUT_FILENO); /* dup stdout */
+ dup2(pipe2[1], STDERR_FILENO); /* dup stderr */
+ }
+
+ /* Close all the fd's in the child */
+ {
+ int fdlimit = sysconf(_SC_OPEN_MAX);
+ int fd = 3;
+
+ while (fd < fdlimit)
+ close(fd++);
+ }
+
+ setpgid(getpid(), getpid());
+
+ if (envp[0] == NULL) {
+ execv(full_path, argv);
+ } else {
+ execve(full_path, argv, envp);
+ }
+
+ _exit(127);
+
+ } else if (childpid != 0) { /* parent */
+
+ char b;
+
+ if (channels != NULL) {
+ /* close the read end of pipe1 */
+ if (close(pipe0[0]) == -1)
+ perror("close(pipe0[0])");
+
+ /* close the write end of pipe2 */
+ if (close(pipe1[1]) == -1)
+ perror("close(pipe1[1])");
+
+ /* close the write end of pipe2 */
+ if (close(pipe2[1]) == -1)
+ perror("close(pipe2[1])");
+
+ channels[0] = pipe0[1]; /* Output Stream. */
+ channels[1] = pipe1[0]; /* Input Stream. */
+ channels[2] = pipe2[0]; /* Input Stream. */
+ }
+
+ free(full_path);
+ return childpid;
+ }
+
+ free(full_path);
+ return -1; /*NOT REACHED */
+}
+
+
+int wait0(pid_t pid)
+{
+ int status;
+ int val = -1;
+
+ if (pid < 0)
+ return -1;
+
+ for (;;) {
+ if (waitpid(pid, &status, 0) < 0) {
+ if (errno == EINTR) {
+ // interrupted system call - retry
+ continue;
+ }
+ }
+ break;
+ }
+ if (WIFEXITED(status)) {
+ val = WEXITSTATUS(status);
+ }
+
+ return val;
+}
diff --git a/core/org.eclipse.cdt.core.linux/library/io.c b/core/org.eclipse.cdt.core.linux/library/io.c
index 8540b82628..e42d6c2394 100644
--- a/core/org.eclipse.cdt.core.linux/library/io.c
+++ b/core/org.eclipse.cdt.core.linux/library/io.c
@@ -1,114 +1,114 @@
-/*******************************************************************************
- * 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
- * Wind River Systems, Inc.
- *******************************************************************************/
-#include <jni.h>
-#include <stdio.h>
-#include <SpawnerInputStream.h>
-#include <SpawnerOutputStream.h>
-#include <unistd.h>
-
-/* Header for class _org_eclipse_cdt_utils_spawner_SpawnerInputStream */
-/* Header for class _org_eclipse_cdt_utils_spawner_SpawnerOutputStream */
-
-/*
- * Class: org_eclipse_cdt_utils_spawner_SpawnerInputStream
- * Method: read0
- * Signature: (I)I
- */
-JNIEXPORT jint JNICALL
-Java_org_eclipse_cdt_utils_spawner_SpawnerInputStream_read0(JNIEnv * env,
- jobject jobj,
- jint jfd,
- jbyteArray buf,
- jint buf_len)
-{
- int fd;
- int status;
- jbyte *data;
- int data_len;
-
- data = (*env)->GetByteArrayElements(env, buf, 0);
- data_len = buf_len;
- fd = jfd;
-
- status = read( fd, data, data_len );
- (*env)->ReleaseByteArrayElements(env, buf, data, 0);
-
- if (status == 0) {
- /* EOF. */
- status = -1;
- } else if (status == -1) {
- /* Error, toss an exception */
- jclass exception = (*env)->FindClass(env, "java/io/IOException");
- if (exception == NULL) {
- /* Give up. */
- return -1;
- }
- (*env)->ThrowNew(env, exception, "read error");
- }
-
- return status;
-}
-
-
-/*
- * Class: org_eclipse_cdt_utils_spawner_SpawnerInputStream
- * Method: close0
- * Signature: (I)I
- */
-JNIEXPORT jint JNICALL
-Java_org_eclipse_cdt_utils_spawner_SpawnerInputStream_close0(JNIEnv * env,
- jobject jobj,
- jint fd)
-{
- return close(fd);
-}
-
-/*
- * Class: org_eclipse_cdt_utils_spawner_SpawnerOutputStream
- * Method: write0
- * Signature: (II)I
- */
-JNIEXPORT jint JNICALL
-Java_org_eclipse_cdt_utils_spawner_SpawnerOutputStream_write0(JNIEnv * env,
- jobject jobj,
- jint jfd,
- jbyteArray buf,
- jint buf_len)
-{
- int status;
- int fd;
- jbyte *data;
- int data_len;
-
- data = (*env)->GetByteArrayElements(env, buf, 0);
- data_len = buf_len;
- fd = jfd;
-
- status = write(fd, data, data_len);
- (*env)->ReleaseByteArrayElements(env, buf, data, 0);
-
- return status;
-}
-
-
-/*
- * Class: org_eclipse_cdt_utils_spawner_SpawnerOutputStream
- * Method: close0
- * Signature: (I)I
- */
-JNIEXPORT jint JNICALL
-Java_org_eclipse_cdt_utils_spawner_SpawnerOutputStream_close0(JNIEnv * env,
- jobject jobj,
- jint fd)
-{
- return close(fd);
-}
+/*******************************************************************************
+ * 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
+ * Wind River Systems, Inc.
+ *******************************************************************************/
+#include <jni.h>
+#include <stdio.h>
+#include <SpawnerInputStream.h>
+#include <SpawnerOutputStream.h>
+#include <unistd.h>
+
+/* Header for class _org_eclipse_cdt_utils_spawner_SpawnerInputStream */
+/* Header for class _org_eclipse_cdt_utils_spawner_SpawnerOutputStream */
+
+/*
+ * Class: org_eclipse_cdt_utils_spawner_SpawnerInputStream
+ * Method: read0
+ * Signature: (I)I
+ */
+JNIEXPORT jint JNICALL
+Java_org_eclipse_cdt_utils_spawner_SpawnerInputStream_read0(JNIEnv * env,
+ jobject jobj,
+ jint jfd,
+ jbyteArray buf,
+ jint buf_len)
+{
+ int fd;
+ int status;
+ jbyte *data;
+ int data_len;
+
+ data = (*env)->GetByteArrayElements(env, buf, 0);
+ data_len = buf_len;
+ fd = jfd;
+
+ status = read( fd, data, data_len );
+ (*env)->ReleaseByteArrayElements(env, buf, data, 0);
+
+ if (status == 0) {
+ /* EOF. */
+ status = -1;
+ } else if (status == -1) {
+ /* Error, toss an exception */
+ jclass exception = (*env)->FindClass(env, "java/io/IOException");
+ if (exception == NULL) {
+ /* Give up. */
+ return -1;
+ }
+ (*env)->ThrowNew(env, exception, "read error");
+ }
+
+ return status;
+}
+
+
+/*
+ * Class: org_eclipse_cdt_utils_spawner_SpawnerInputStream
+ * Method: close0
+ * Signature: (I)I
+ */
+JNIEXPORT jint JNICALL
+Java_org_eclipse_cdt_utils_spawner_SpawnerInputStream_close0(JNIEnv * env,
+ jobject jobj,
+ jint fd)
+{
+ return close(fd);
+}
+
+/*
+ * Class: org_eclipse_cdt_utils_spawner_SpawnerOutputStream
+ * Method: write0
+ * Signature: (II)I
+ */
+JNIEXPORT jint JNICALL
+Java_org_eclipse_cdt_utils_spawner_SpawnerOutputStream_write0(JNIEnv * env,
+ jobject jobj,
+ jint jfd,
+ jbyteArray buf,
+ jint buf_len)
+{
+ int status;
+ int fd;
+ jbyte *data;
+ int data_len;
+
+ data = (*env)->GetByteArrayElements(env, buf, 0);
+ data_len = buf_len;
+ fd = jfd;
+
+ status = write(fd, data, data_len);
+ (*env)->ReleaseByteArrayElements(env, buf, data, 0);
+
+ return status;
+}
+
+
+/*
+ * Class: org_eclipse_cdt_utils_spawner_SpawnerOutputStream
+ * Method: close0
+ * Signature: (I)I
+ */
+JNIEXPORT jint JNICALL
+Java_org_eclipse_cdt_utils_spawner_SpawnerOutputStream_close0(JNIEnv * env,
+ jobject jobj,
+ jint fd)
+{
+ return close(fd);
+}
diff --git a/core/org.eclipse.cdt.core.linux/library/spawner.c b/core/org.eclipse.cdt.core.linux/library/spawner.c
index 67b12b05b8..217349b439 100644
--- a/core/org.eclipse.cdt.core.linux/library/spawner.c
+++ b/core/org.eclipse.cdt.core.linux/library/spawner.c
@@ -1,302 +1,302 @@
-/*******************************************************************************
- * Copyright (c) 2002, 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
- * Wind River Systems, Inc.
- * Mikhail Zabaluev (Nokia) - bug 82744
- *******************************************************************************/
-#include <unistd.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <signal.h>
-#include <string.h>
-#include <jni.h>
-
-#include "exec0.h"
-#include <Spawner.h>
-
-
-#define DEBUGIT 0
-
-
-/*
- * Header for class org_eclipse_cdt_utils_spawner_Spawner
- */
-
-
-#if DEBUGIT
-static void print_array(char **c_array)
-{
- if (c_array) {
- char **p = c_array;
- for (; *p; p++) {
- if (*p) {
- fprintf(stderr, " %s", *p);
- }
- }
- } else {
- fprintf(stderr, "null");
- }
- fprintf(stderr, "\n");
-}
-#endif
-
-
-static char **alloc_c_array(JNIEnv * env, jobjectArray j_array)
-{
- int i;
- jint c_array_size = (*env)->GetArrayLength(env, j_array);
- char **c_array = calloc(c_array_size + 1, sizeof(*c_array));
-
- if (c_array == NULL)
- return NULL;
-
- for (i = 0; i < c_array_size; i++) {
- jstring j_str =
- (jstring) (*env)->GetObjectArrayElement(env, j_array, i);
- const char *c_str = (*env)->GetStringUTFChars(env, j_str, NULL);
- c_array[i] = (char *) strdup(c_str);
- (*env)->ReleaseStringUTFChars(env, j_str, c_str);
- (*env)->DeleteLocalRef(env, j_str);
- }
-
- return c_array;
-}
-
-
-static void free_c_array(char **c_array)
-{
- if (c_array) {
- char **p = c_array;
- for (; *p; p++) {
- if (*p) {
- free(*p);
- }
- }
- free(c_array);
- }
-}
-
-
-/*
- * Class: org_eclipse_cdt_utils_spawner_Spawner
- * Method: exec2
- * Signature: ([Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;[ILorg/eclipse/cdt/utils/pty/PTY;)I
- */
-JNIEXPORT jint JNICALL Java_org_eclipse_cdt_utils_spawner_Spawner_exec2
- (JNIEnv *env, jobject jobj, jobjectArray jcmd, jobjectArray jenv, jstring jdir, jintArray jchannels,
- jstring jslaveName, jint masterFD, jboolean console)
-{
- jint *channels = (*env)->GetIntArrayElements(env, jchannels, 0);
- const char *dirpath = (*env)->GetStringUTFChars(env, jdir, NULL);
- const char *pts_name = (*env)->GetStringUTFChars(env, jslaveName, NULL);
- char **cmd = NULL;
- char **envp = NULL;
- int fd[3];
- pid_t pid = -1;
-
- if (channels == NULL)
- goto bail_out;
-
- cmd = alloc_c_array(env, jcmd);
- if (cmd == NULL)
- goto bail_out;
-
- envp = alloc_c_array(env, jenv);
- if (envp == NULL)
- goto bail_out;
-
-#if DEBUGIT
- fprintf(stderr, "command:");
- print_array(cmd);
- fprintf(stderr, "Envp:");
- print_array(envp);
- fprintf(stderr, "dirpath: %s\n", dirpath);
- fprintf(stderr, "pts_name: %s\n", pts_name);
-#endif
-
- pid = exec_pty(cmd[0], cmd, envp, dirpath, fd, pts_name, masterFD, console);
- if (pid < 0)
- goto bail_out;
-
- channels[0] = fd[0];
- channels[1] = fd[1];
- channels[2] = fd[2];
-
- bail_out:
- (*env)->ReleaseIntArrayElements(env, jchannels, channels, 0);
- (*env)->ReleaseStringUTFChars(env, jdir, dirpath);
- (*env)->ReleaseStringUTFChars(env, jslaveName, pts_name);
- if (cmd)
- free_c_array(cmd);
- if (envp)
- free_c_array(envp);
- return pid;
-}
-
-
-JNIEXPORT jint JNICALL
-Java_org_eclipse_cdt_utils_spawner_Spawner_exec1(JNIEnv * env, jobject jobj,
- jobjectArray jcmd,
- jobjectArray jenv,
- jstring jdir)
-{
- const char *dirpath = (*env)->GetStringUTFChars(env, jdir, NULL);
- char **cmd = NULL;
- char **envp = NULL;
- pid_t pid = -1;
-
- cmd = alloc_c_array(env, jcmd);
- if (cmd == NULL)
- goto bail_out;
-
- envp = alloc_c_array(env, jenv);
- if (envp == NULL)
- goto bail_out;
-
-#if DEBUGIT
- fprintf(stderr, "command:");
- print_array(cmd);
- fprintf(stderr, "Envp:");
- print_array(envp);
- fprintf(stderr, "dirpath: %s\n", dirpath);
-#endif
-
- pid = exec0(cmd[0], cmd, envp, dirpath, NULL);
- if (pid < 0)
- goto bail_out;
-
- bail_out:
- (*env)->ReleaseStringUTFChars(env, jdir, dirpath);
- if (cmd)
- free_c_array(cmd);
- if (envp)
- free_c_array(envp);
- return pid;
-}
-
-/*
- * Class: org_eclipse_cdt_utils_spawner_Spawner
- * Method: exec0
- * Signature: ([Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;[I)I
- */
-JNIEXPORT jint JNICALL
-Java_org_eclipse_cdt_utils_spawner_Spawner_exec0(JNIEnv * env, jobject jobj,
- jobjectArray jcmd,
- jobjectArray jenv,
- jstring jdir,
- jintArray jchannels)
-{
- jint *channels = (*env)->GetIntArrayElements(env, jchannels, 0);
- const char *dirpath = (*env)->GetStringUTFChars(env, jdir, NULL);
- char **cmd = NULL;
- char **envp = NULL;
- int fd[3];
- pid_t pid = -1;
-
- if (channels == NULL)
- goto bail_out;
-
- cmd = alloc_c_array(env, jcmd);
- if (cmd == NULL)
- goto bail_out;
-
- envp = alloc_c_array(env, jenv);
- if (envp == NULL)
- goto bail_out;
-
-#if DEBUGIT
- fprintf(stderr, "command:");
- print_array(cmd);
- fprintf(stderr, "Envp:");
- print_array(envp);
- fprintf(stderr, "dirpath: %s\n", dirpath);
-#endif
-
- pid = exec0(cmd[0], cmd, envp, dirpath, fd);
- if (pid < 0)
- goto bail_out;
-
- channels[0] = fd[0];
- channels[1] = fd[1];
- channels[2] = fd[2];
-
- bail_out:
- (*env)->ReleaseIntArrayElements(env, jchannels, channels, 0);
- (*env)->ReleaseStringUTFChars(env, jdir, dirpath);
- if (cmd)
- free_c_array(cmd);
- if (envp)
- free_c_array(envp);
- return pid;
-}
-
-/*
- * Class: org_eclipse_cdt_utils_spawner_Spawner
- * Method: raise
- * Signature: (II)I
- */
-JNIEXPORT jint JNICALL
-Java_org_eclipse_cdt_utils_spawner_Spawner_raise(JNIEnv * env, jobject jobj,
- jint pid, jint sig)
-{
- int status = -1;
-
- switch (sig) {
- case 0: /* NOOP */
- status = killpg(pid, 0);
- if(status == -1) {
- status = kill(pid, 0);
- }
- break;
-
- case 2: /* INTERRUPT */
- status = killpg(pid, SIGINT);
- if(status == -1) {
- status = kill(pid, SIGINT);
- }
- break;
-
- case 9: /* KILL */
- status = killpg(pid, SIGKILL);
- if(status == -1) {
- status = kill(pid, SIGKILL);
- }
- break;
-
- case 15: /* TERM */
- status = killpg(pid, SIGTERM);
- if(status == -1) {
- status = kill(pid, SIGTERM);
- }
- break;
-
- default:
- status = killpg(pid, sig); /* WHAT ?? */
- if(status == -1) {
- status = kill(pid, sig); /* WHAT ?? */
- }
- break;
- }
-
- return status;
-}
-
-
-
-/*
- * Class: org_eclipse_cdt_utils_spawner_Spawner
- * Method: waitFor
- * Signature: (I)I
- */
-JNIEXPORT jint JNICALL
-Java_org_eclipse_cdt_utils_spawner_Spawner_waitFor(JNIEnv * env,
- jobject jobj, jint pid)
-{
- return wait0(pid);
-}
+/*******************************************************************************
+ * Copyright (c) 2002, 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
+ * Wind River Systems, Inc.
+ * Mikhail Zabaluev (Nokia) - bug 82744
+ *******************************************************************************/
+#include <unistd.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <signal.h>
+#include <string.h>
+#include <jni.h>
+
+#include "exec0.h"
+#include <Spawner.h>
+
+
+#define DEBUGIT 0
+
+
+/*
+ * Header for class org_eclipse_cdt_utils_spawner_Spawner
+ */
+
+
+#if DEBUGIT
+static void print_array(char **c_array)
+{
+ if (c_array) {
+ char **p = c_array;
+ for (; *p; p++) {
+ if (*p) {
+ fprintf(stderr, " %s", *p);
+ }
+ }
+ } else {
+ fprintf(stderr, "null");
+ }
+ fprintf(stderr, "\n");
+}
+#endif
+
+
+static char **alloc_c_array(JNIEnv * env, jobjectArray j_array)
+{
+ int i;
+ jint c_array_size = (*env)->GetArrayLength(env, j_array);
+ char **c_array = calloc(c_array_size + 1, sizeof(*c_array));
+
+ if (c_array == NULL)
+ return NULL;
+
+ for (i = 0; i < c_array_size; i++) {
+ jstring j_str =
+ (jstring) (*env)->GetObjectArrayElement(env, j_array, i);
+ const char *c_str = (*env)->GetStringUTFChars(env, j_str, NULL);
+ c_array[i] = (char *) strdup(c_str);
+ (*env)->ReleaseStringUTFChars(env, j_str, c_str);
+ (*env)->DeleteLocalRef(env, j_str);
+ }
+
+ return c_array;
+}
+
+
+static void free_c_array(char **c_array)
+{
+ if (c_array) {
+ char **p = c_array;
+ for (; *p; p++) {
+ if (*p) {
+ free(*p);
+ }
+ }
+ free(c_array);
+ }
+}
+
+
+/*
+ * Class: org_eclipse_cdt_utils_spawner_Spawner
+ * Method: exec2
+ * Signature: ([Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;[ILorg/eclipse/cdt/utils/pty/PTY;)I
+ */
+JNIEXPORT jint JNICALL Java_org_eclipse_cdt_utils_spawner_Spawner_exec2
+ (JNIEnv *env, jobject jobj, jobjectArray jcmd, jobjectArray jenv, jstring jdir, jintArray jchannels,
+ jstring jslaveName, jint masterFD, jboolean console)
+{
+ jint *channels = (*env)->GetIntArrayElements(env, jchannels, 0);
+ const char *dirpath = (*env)->GetStringUTFChars(env, jdir, NULL);
+ const char *pts_name = (*env)->GetStringUTFChars(env, jslaveName, NULL);
+ char **cmd = NULL;
+ char **envp = NULL;
+ int fd[3];
+ pid_t pid = -1;
+
+ if (channels == NULL)
+ goto bail_out;
+
+ cmd = alloc_c_array(env, jcmd);
+ if (cmd == NULL)
+ goto bail_out;
+
+ envp = alloc_c_array(env, jenv);
+ if (envp == NULL)
+ goto bail_out;
+
+#if DEBUGIT
+ fprintf(stderr, "command:");
+ print_array(cmd);
+ fprintf(stderr, "Envp:");
+ print_array(envp);
+ fprintf(stderr, "dirpath: %s\n", dirpath);
+ fprintf(stderr, "pts_name: %s\n", pts_name);
+#endif
+
+ pid = exec_pty(cmd[0], cmd, envp, dirpath, fd, pts_name, masterFD, console);
+ if (pid < 0)
+ goto bail_out;
+
+ channels[0] = fd[0];
+ channels[1] = fd[1];
+ channels[2] = fd[2];
+
+ bail_out:
+ (*env)->ReleaseIntArrayElements(env, jchannels, channels, 0);
+ (*env)->ReleaseStringUTFChars(env, jdir, dirpath);
+ (*env)->ReleaseStringUTFChars(env, jslaveName, pts_name);
+ if (cmd)
+ free_c_array(cmd);
+ if (envp)
+ free_c_array(envp);
+ return pid;
+}
+
+
+JNIEXPORT jint JNICALL
+Java_org_eclipse_cdt_utils_spawner_Spawner_exec1(JNIEnv * env, jobject jobj,
+ jobjectArray jcmd,
+ jobjectArray jenv,
+ jstring jdir)
+{
+ const char *dirpath = (*env)->GetStringUTFChars(env, jdir, NULL);
+ char **cmd = NULL;
+ char **envp = NULL;
+ pid_t pid = -1;
+
+ cmd = alloc_c_array(env, jcmd);
+ if (cmd == NULL)
+ goto bail_out;
+
+ envp = alloc_c_array(env, jenv);
+ if (envp == NULL)
+ goto bail_out;
+
+#if DEBUGIT
+ fprintf(stderr, "command:");
+ print_array(cmd);
+ fprintf(stderr, "Envp:");
+ print_array(envp);
+ fprintf(stderr, "dirpath: %s\n", dirpath);
+#endif
+
+ pid = exec0(cmd[0], cmd, envp, dirpath, NULL);
+ if (pid < 0)
+ goto bail_out;
+
+ bail_out:
+ (*env)->ReleaseStringUTFChars(env, jdir, dirpath);
+ if (cmd)
+ free_c_array(cmd);
+ if (envp)
+ free_c_array(envp);
+ return pid;
+}
+
+/*
+ * Class: org_eclipse_cdt_utils_spawner_Spawner
+ * Method: exec0
+ * Signature: ([Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;[I)I
+ */
+JNIEXPORT jint JNICALL
+Java_org_eclipse_cdt_utils_spawner_Spawner_exec0(JNIEnv * env, jobject jobj,
+ jobjectArray jcmd,
+ jobjectArray jenv,
+ jstring jdir,
+ jintArray jchannels)
+{
+ jint *channels = (*env)->GetIntArrayElements(env, jchannels, 0);
+ const char *dirpath = (*env)->GetStringUTFChars(env, jdir, NULL);
+ char **cmd = NULL;
+ char **envp = NULL;
+ int fd[3];
+ pid_t pid = -1;
+
+ if (channels == NULL)
+ goto bail_out;
+
+ cmd = alloc_c_array(env, jcmd);
+ if (cmd == NULL)
+ goto bail_out;
+
+ envp = alloc_c_array(env, jenv);
+ if (envp == NULL)
+ goto bail_out;
+
+#if DEBUGIT
+ fprintf(stderr, "command:");
+ print_array(cmd);
+ fprintf(stderr, "Envp:");
+ print_array(envp);
+ fprintf(stderr, "dirpath: %s\n", dirpath);
+#endif
+
+ pid = exec0(cmd[0], cmd, envp, dirpath, fd);
+ if (pid < 0)
+ goto bail_out;
+
+ channels[0] = fd[0];
+ channels[1] = fd[1];
+ channels[2] = fd[2];
+
+ bail_out:
+ (*env)->ReleaseIntArrayElements(env, jchannels, channels, 0);
+ (*env)->ReleaseStringUTFChars(env, jdir, dirpath);
+ if (cmd)
+ free_c_array(cmd);
+ if (envp)
+ free_c_array(envp);
+ return pid;
+}
+
+/*
+ * Class: org_eclipse_cdt_utils_spawner_Spawner
+ * Method: raise
+ * Signature: (II)I
+ */
+JNIEXPORT jint JNICALL
+Java_org_eclipse_cdt_utils_spawner_Spawner_raise(JNIEnv * env, jobject jobj,
+ jint pid, jint sig)
+{
+ int status = -1;
+
+ switch (sig) {
+ case 0: /* NOOP */
+ status = killpg(pid, 0);
+ if(status == -1) {
+ status = kill(pid, 0);
+ }
+ break;
+
+ case 2: /* INTERRUPT */
+ status = killpg(pid, SIGINT);
+ if(status == -1) {
+ status = kill(pid, SIGINT);
+ }
+ break;
+
+ case 9: /* KILL */
+ status = killpg(pid, SIGKILL);
+ if(status == -1) {
+ status = kill(pid, SIGKILL);
+ }
+ break;
+
+ case 15: /* TERM */
+ status = killpg(pid, SIGTERM);
+ if(status == -1) {
+ status = kill(pid, SIGTERM);
+ }
+ break;
+
+ default:
+ status = killpg(pid, sig); /* WHAT ?? */
+ if(status == -1) {
+ status = kill(pid, sig); /* WHAT ?? */
+ }
+ break;
+ }
+
+ return status;
+}
+
+
+
+/*
+ * Class: org_eclipse_cdt_utils_spawner_Spawner
+ * Method: waitFor
+ * Signature: (I)I
+ */
+JNIEXPORT jint JNICALL
+Java_org_eclipse_cdt_utils_spawner_Spawner_waitFor(JNIEnv * env,
+ jobject jobj, jint pid)
+{
+ return wait0(pid);
+}
diff --git a/core/org.eclipse.cdt.core.linux/plugin.properties b/core/org.eclipse.cdt.core.linux/plugin.properties
index 6c8e47ac7e..8895eaa75e 100644
--- a/core/org.eclipse.cdt.core.linux/plugin.properties
+++ b/core/org.eclipse.cdt.core.linux/plugin.properties
@@ -1,2 +1,2 @@
-fragmentName.linux=C/C++ Development Tools Core for Linux
-providerName=Eclipse CDT
+fragmentName.linux=C/C++ Development Tools Core for Linux
+providerName=Eclipse CDT
diff --git a/core/org.eclipse.cdt.core.macosx/library/exec_pty.c b/core/org.eclipse.cdt.core.macosx/library/exec_pty.c
index dd68615f0e..752f545a98 100644
--- a/core/org.eclipse.cdt.core.macosx/library/exec_pty.c
+++ b/core/org.eclipse.cdt.core.macosx/library/exec_pty.c
@@ -1,186 +1,186 @@
-/*******************************************************************************
- * Copyright (c) 2004, 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
- * Wind River Systems, Inc.
- * Mikhail Zabaluev (Nokia) - bug 82744
- * Mikhail Sennikovsky - bug 145737
- *******************************************************************************/
-#include "exec0.h"
-#include "openpty.h"
-#include <unistd.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <errno.h>
-#include <string.h>
-#include <libgen.h>
-#include <stdlib.h>
-#include <termios.h>
-
-/* from pfind.c */
-extern char *pfind(const char *name, char * const envp[]);
-
-pid_t
-exec_pty(const char *path, char *const argv[], char *const envp[],
- const char *dirpath, int channels[3], const char *pts_name, int fdm, int console)
-{
- int pipe2[2];
- pid_t childpid;
- char *full_path;
-
- /*
- * We use pfind() to check that the program exists and is an executable.
- * If not pass the error up. Also execve() wants a full path.
- */
- full_path = pfind(path, envp);
- if (full_path == NULL) {
- fprintf(stderr, "Unable to find full path for \"%s\"\n", (path) ? path : "");
- return -1;
- }
-
- /*
- * Make sure we can create our pipes before forking.
- */
- if (channels != NULL && console) {
- if (pipe(pipe2) < 0) {
- fprintf(stderr, "%s(%d): returning due to error: %s\n", __FUNCTION__, __LINE__, strerror(errno));
- free(full_path);
- return -1;
- }
- }
-
- childpid = fork();
-
- if (childpid < 0) {
- fprintf(stderr, "%s(%d): returning due to error: %s\n", __FUNCTION__, __LINE__, strerror(errno));
- free(full_path);
- return -1;
- } else if (childpid == 0) { /* child */
-
- chdir(dirpath);
-
- if (channels != NULL) {
- int fds;
-
- if (!console && setsid() < 0) {
- perror("setsid()");
- return -1;
- }
-
- fds = ptys_open(fdm, pts_name);
- if (fds < 0) {
- fprintf(stderr, "%s(%d): returning due to error: %s\n", __FUNCTION__, __LINE__, strerror(errno));
- return -1;
- }
-
- /* Close the read end of pipe2 */
- if (console && close(pipe2[0]) == -1) {
- perror("close(pipe2[0]))");
- }
-
- /* close the master, no need in the child */
- close(fdm);
-
- if (console) {
- set_noecho(fds);
- if (setpgid(getpid(), getpid()) < 0) {
- perror("setpgid()");
- return -1;
- }
- }
-
- /* redirections */
- dup2(fds, STDIN_FILENO); /* dup stdin */
- dup2(fds, STDOUT_FILENO); /* dup stdout */
- if (console) {
- dup2(pipe2[1], STDERR_FILENO); /* dup stderr */
- } else {
- dup2(fds, STDERR_FILENO); /* dup stderr */
- }
- close(fds); /* done with fds. */
- }
-
- /* Close all the fd's in the child */
- {
- int fdlimit = sysconf(_SC_OPEN_MAX);
- int fd = 3;
-
- while (fd < fdlimit)
- close(fd++);
- }
-
- if (envp[0] == NULL) {
- execv(full_path, argv);
- } else {
- execve(full_path, argv, envp);
- }
-
- _exit(127);
-
- } else if (childpid != 0) { /* parent */
- if (console) {
- set_noecho(fdm);
- }
- if (channels != NULL) {
- channels[0] = fdm; /* Input Stream. */
- channels[1] = fdm; /* Output Stream. */
- if (console) {
- /* close the write end of pipe1 */
- if (close(pipe2[1]) == -1)
- perror("close(pipe2[1])");
- channels[2] = pipe2[0]; /* stderr Stream. */
- } else {
- channels[2] = fdm; /* Error Stream. */
- }
- }
-
- free(full_path);
- return childpid;
- }
-
- free(full_path);
- return -1; /*NOT REACHED */
-}
-#ifdef __STAND_ALONE__
-int main(int argc, char **argv, char **envp) {
- const char *path = "./bufferring_test";
- int channels[3] = { -1, -1, -1};
- int status;
- FILE *app_stdin;
- FILE *app_stdout;
- FILE *app_stderr;
- char pts_name[32];
- int fdm;
- char buffer[32];
-
- fdm = ptym_open(pts_name);
- status = exec_pty(path, argv, envp, ".", channels, pts_name, fdm);
- if (status >= 0) {
- app_stdin = fdopen(channels[0], "w");
- app_stdout = fdopen(channels[1], "r");
- app_stderr = fdopen(channels[2], "r");
- if (app_stdout == NULL || app_stderr == NULL || app_stdin == NULL) {
- fprintf(stderr, "PROBLEMS\n");
- } else {
- fputs("foo\n", app_stdin);
- fputs("bar\n", app_stdin);
- while(fgets(buffer, sizeof buffer, app_stdout) != NULL) {
- fprintf(stdout, "STDOUT: %s\n", buffer);
- }
- while(fgets(buffer, sizeof buffer, app_stderr) != NULL) {
- fprintf(stdout, "STDERR: %s\n", buffer);
- }
- }
- }
- fputs("bye\n", stdout);
- close(channels[0]);
- close(channels[1]);
- close(channels[2]);
- return 0;
-}
-#endif
+/*******************************************************************************
+ * Copyright (c) 2004, 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
+ * Wind River Systems, Inc.
+ * Mikhail Zabaluev (Nokia) - bug 82744
+ * Mikhail Sennikovsky - bug 145737
+ *******************************************************************************/
+#include "exec0.h"
+#include "openpty.h"
+#include <unistd.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <libgen.h>
+#include <stdlib.h>
+#include <termios.h>
+
+/* from pfind.c */
+extern char *pfind(const char *name, char * const envp[]);
+
+pid_t
+exec_pty(const char *path, char *const argv[], char *const envp[],
+ const char *dirpath, int channels[3], const char *pts_name, int fdm, int console)
+{
+ int pipe2[2];
+ pid_t childpid;
+ char *full_path;
+
+ /*
+ * We use pfind() to check that the program exists and is an executable.
+ * If not pass the error up. Also execve() wants a full path.
+ */
+ full_path = pfind(path, envp);
+ if (full_path == NULL) {
+ fprintf(stderr, "Unable to find full path for \"%s\"\n", (path) ? path : "");
+ return -1;
+ }
+
+ /*
+ * Make sure we can create our pipes before forking.
+ */
+ if (channels != NULL && console) {
+ if (pipe(pipe2) < 0) {
+ fprintf(stderr, "%s(%d): returning due to error: %s\n", __FUNCTION__, __LINE__, strerror(errno));
+ free(full_path);
+ return -1;
+ }
+ }
+
+ childpid = fork();
+
+ if (childpid < 0) {
+ fprintf(stderr, "%s(%d): returning due to error: %s\n", __FUNCTION__, __LINE__, strerror(errno));
+ free(full_path);
+ return -1;
+ } else if (childpid == 0) { /* child */
+
+ chdir(dirpath);
+
+ if (channels != NULL) {
+ int fds;
+
+ if (!console && setsid() < 0) {
+ perror("setsid()");
+ return -1;
+ }
+
+ fds = ptys_open(fdm, pts_name);
+ if (fds < 0) {
+ fprintf(stderr, "%s(%d): returning due to error: %s\n", __FUNCTION__, __LINE__, strerror(errno));
+ return -1;
+ }
+
+ /* Close the read end of pipe2 */
+ if (console && close(pipe2[0]) == -1) {
+ perror("close(pipe2[0]))");
+ }
+
+ /* close the master, no need in the child */
+ close(fdm);
+
+ if (console) {
+ set_noecho(fds);
+ if (setpgid(getpid(), getpid()) < 0) {
+ perror("setpgid()");
+ return -1;
+ }
+ }
+
+ /* redirections */
+ dup2(fds, STDIN_FILENO); /* dup stdin */
+ dup2(fds, STDOUT_FILENO); /* dup stdout */
+ if (console) {
+ dup2(pipe2[1], STDERR_FILENO); /* dup stderr */
+ } else {
+ dup2(fds, STDERR_FILENO); /* dup stderr */
+ }
+ close(fds); /* done with fds. */
+ }
+
+ /* Close all the fd's in the child */
+ {
+ int fdlimit = sysconf(_SC_OPEN_MAX);
+ int fd = 3;
+
+ while (fd < fdlimit)
+ close(fd++);
+ }
+
+ if (envp[0] == NULL) {
+ execv(full_path, argv);
+ } else {
+ execve(full_path, argv, envp);
+ }
+
+ _exit(127);
+
+ } else if (childpid != 0) { /* parent */
+ if (console) {
+ set_noecho(fdm);
+ }
+ if (channels != NULL) {
+ channels[0] = fdm; /* Input Stream. */
+ channels[1] = fdm; /* Output Stream. */
+ if (console) {
+ /* close the write end of pipe1 */
+ if (close(pipe2[1]) == -1)
+ perror("close(pipe2[1])");
+ channels[2] = pipe2[0]; /* stderr Stream. */
+ } else {
+ channels[2] = fdm; /* Error Stream. */
+ }
+ }
+
+ free(full_path);
+ return childpid;
+ }
+
+ free(full_path);
+ return -1; /*NOT REACHED */
+}
+#ifdef __STAND_ALONE__
+int main(int argc, char **argv, char **envp) {
+ const char *path = "./bufferring_test";
+ int channels[3] = { -1, -1, -1};
+ int status;
+ FILE *app_stdin;
+ FILE *app_stdout;
+ FILE *app_stderr;
+ char pts_name[32];
+ int fdm;
+ char buffer[32];
+
+ fdm = ptym_open(pts_name);
+ status = exec_pty(path, argv, envp, ".", channels, pts_name, fdm);
+ if (status >= 0) {
+ app_stdin = fdopen(channels[0], "w");
+ app_stdout = fdopen(channels[1], "r");
+ app_stderr = fdopen(channels[2], "r");
+ if (app_stdout == NULL || app_stderr == NULL || app_stdin == NULL) {
+ fprintf(stderr, "PROBLEMS\n");
+ } else {
+ fputs("foo\n", app_stdin);
+ fputs("bar\n", app_stdin);
+ while(fgets(buffer, sizeof buffer, app_stdout) != NULL) {
+ fprintf(stdout, "STDOUT: %s\n", buffer);
+ }
+ while(fgets(buffer, sizeof buffer, app_stderr) != NULL) {
+ fprintf(stdout, "STDERR: %s\n", buffer);
+ }
+ }
+ }
+ fputs("bye\n", stdout);
+ close(channels[0]);
+ close(channels[1]);
+ close(channels[2]);
+ return 0;
+}
+#endif
diff --git a/core/org.eclipse.cdt.core.macosx/plugin.properties b/core/org.eclipse.cdt.core.macosx/plugin.properties
index dda4771c59..3ea2577f20 100644
--- a/core/org.eclipse.cdt.core.macosx/plugin.properties
+++ b/core/org.eclipse.cdt.core.macosx/plugin.properties
@@ -1,2 +1,2 @@
-fragmentName.linux=C/C++ Development Tools Core for Mac OS X
-providerName=Eclipse CDT
+fragmentName.linux=C/C++ Development Tools Core for Mac OS X
+providerName=Eclipse CDT
diff --git a/core/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/core/internal/tests/filesystem/ram/MemoryEFSExtensionProvider.java b/core/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/core/internal/tests/filesystem/ram/MemoryEFSExtensionProvider.java
index 17039f287f..0fde6d42f7 100644
--- a/core/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/core/internal/tests/filesystem/ram/MemoryEFSExtensionProvider.java
+++ b/core/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/core/internal/tests/filesystem/ram/MemoryEFSExtensionProvider.java
@@ -1,33 +1,33 @@
-/*******************************************************************************
- * Copyright (c) 2010, 2012 Andrew Gvozdev and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Andrew Gvozdev - initial API and implementation
+/*******************************************************************************
+ * Copyright (c) 2010, 2012 Andrew Gvozdev and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Andrew Gvozdev - initial API and implementation
*******************************************************************************/
-package org.eclipse.cdt.core.internal.tests.filesystem.ram;
-
-import java.net.URI;
-
-import org.eclipse.cdt.core.EFSExtensionProvider;
-
-/**
- * Test stub to test EFSExtensionProvider mappings.
- *
- */
-public class MemoryEFSExtensionProvider extends EFSExtensionProvider {
-
- public String getMappedPath(URI locationURI) {
-
- String path = locationURI.getPath();
- if (path.contains("/BeingMappedFrom/Folder")) {
- return path.replaceFirst("/BeingMappedFrom/Folder", "/LocallyMappedTo/Folder");
- }
-
- return super.getMappedPath(locationURI);
- }
-
-}
+package org.eclipse.cdt.core.internal.tests.filesystem.ram;
+
+import java.net.URI;
+
+import org.eclipse.cdt.core.EFSExtensionProvider;
+
+/**
+ * Test stub to test EFSExtensionProvider mappings.
+ *
+ */
+public class MemoryEFSExtensionProvider extends EFSExtensionProvider {
+
+ public String getMappedPath(URI locationURI) {
+
+ String path = locationURI.getPath();
+ if (path.contains("/BeingMappedFrom/Folder")) {
+ return path.replaceFirst("/BeingMappedFrom/Folder", "/LocallyMappedTo/Folder");
+ }
+
+ return super.getMappedPath(locationURI);
+ }
+
+}
diff --git a/core/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/language/settings/providers/LanguageSettingsProviderReferencedProjectsTests.java b/core/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/language/settings/providers/LanguageSettingsProviderReferencedProjectsTests.java
index 7613f726fd..a7c5811518 100644
--- a/core/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/language/settings/providers/LanguageSettingsProviderReferencedProjectsTests.java
+++ b/core/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/language/settings/providers/LanguageSettingsProviderReferencedProjectsTests.java
@@ -1,302 +1,302 @@
-/*******************************************************************************
- * Copyright (c) 2013 Andrew Gvozdev and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Andrew Gvozdev - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.cdt.core.language.settings.providers;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.LinkedHashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import junit.framework.TestSuite;
-
-import org.eclipse.cdt.core.model.CoreModel;
-import org.eclipse.cdt.core.settings.model.CIncludePathEntry;
-import org.eclipse.cdt.core.settings.model.ICConfigurationDescription;
-import org.eclipse.cdt.core.settings.model.ICLanguageSettingEntry;
-import org.eclipse.cdt.core.settings.model.ICProjectDescription;
-import org.eclipse.cdt.core.settings.model.ICProjectDescriptionManager;
-import org.eclipse.cdt.core.settings.model.ICSettingEntry;
-import org.eclipse.cdt.core.settings.model.util.CDataUtil;
-import org.eclipse.cdt.core.testplugin.ResourceHelper;
-import org.eclipse.cdt.core.testplugin.util.BaseTestCase;
-import org.eclipse.cdt.internal.core.language.settings.providers.ReferencedProjectsLanguageSettingsProvider;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.CoreException;
-
-/**
- * Test cases testing ReferencedProjectsLanguageSettingsProvider functionality
- */
-public class LanguageSettingsProviderReferencedProjectsTests extends BaseTestCase {
- /**
- * Constructor.
- * @param name - name of the test.
- */
- public LanguageSettingsProviderReferencedProjectsTests(String name) {
- super(name);
-
- }
-
- @Override
- protected void setUp() throws Exception {
- super.setUp();
- }
-
- @Override
- protected void tearDown() throws Exception {
- super.tearDown(); // includes ResourceHelper cleanup
- }
-
- /**
- * @return - new TestSuite.
- */
- public static TestSuite suite() {
- return new TestSuite(LanguageSettingsProviderReferencedProjectsTests.class);
- }
-
- /**
- * main function of the class.
- *
- * @param args - arguments
- */
- public static void main(String[] args) {
- junit.textui.TestRunner.run(suite());
- }
-
- /**
- * Helper method to fetch configuration descriptions.
- */
- private ICConfigurationDescription[] getConfigurationDescriptions(IProject project) {
- CoreModel coreModel = CoreModel.getDefault();
- ICProjectDescriptionManager mngr = coreModel.getProjectDescriptionManager();
- // project description
- ICProjectDescription projectDescription = mngr.getProjectDescription(project, false);
- assertNotNull(projectDescription);
- assertEquals(1, projectDescription.getConfigurations().length);
- // configuration description
- ICConfigurationDescription[] cfgDescriptions = projectDescription.getConfigurations();
- return cfgDescriptions;
- }
-
- /**
- * Helper method to set reference project.
- */
- private void setReference(IProject project, final IProject projectReferenced) throws CoreException {
- {
- CoreModel coreModel = CoreModel.getDefault();
- ICProjectDescriptionManager mngr = coreModel.getProjectDescriptionManager();
- // project description
- ICProjectDescription projectDescription = mngr.getProjectDescription(project);
- assertNotNull(projectDescription);
- assertEquals(1, projectDescription.getConfigurations().length);
- // configuration description
- ICConfigurationDescription[] cfgDescriptions = projectDescription.getConfigurations();
- ICConfigurationDescription cfgDescription = cfgDescriptions[0];
-
- final ICConfigurationDescription cfgDescriptionReferenced = getConfigurationDescriptions(projectReferenced)[0];
- cfgDescription.setReferenceInfo(new HashMap<String, String>() {{ put(projectReferenced.getName(), cfgDescriptionReferenced.getId()); }});
- coreModel.setProjectDescription(project, projectDescription);
- }
-
- {
- // doublecheck that it's set as expected
- ICConfigurationDescription[] cfgDescriptions = getConfigurationDescriptions(project);
- ICConfigurationDescription cfgDescription = cfgDescriptions[0];
- Map<String,String> refs = cfgDescription.getReferenceInfo();
- assertEquals(1, refs.size());
- Set<String> referencedProjectsNames = new LinkedHashSet<String>(refs.keySet());
- assertEquals(projectReferenced.getName(), referencedProjectsNames.toArray()[0]);
- }
-
- }
-
- /**
- * Test that null arguments don't crash the provider.
- */
- public void testNulls() throws Exception {
- ILanguageSettingsProvider provider = LanguageSettingsManager.getWorkspaceProvider(ReferencedProjectsLanguageSettingsProvider.ID);
- assertNotNull(provider);
- List<ICLanguageSettingEntry> entries = provider.getSettingEntries(null, null, null);
- assertEquals(null, entries);
- }
-
- /**
- * Test main functionality of ReferencedProjectsLanguageSettingsProvider.
- */
- public void testReferencedProjectProvider() throws Exception {
- // Create model project and accompanied descriptions
- String projectName = getName();
- IProject project = ResourceHelper.createCDTProjectWithConfig(projectName);
- IProject nonReferencedProject = ResourceHelper.createCDTProjectWithConfig(projectName+"-non-referenced");
- IProject referencedProject = ResourceHelper.createCDTProjectWithConfig(projectName+"-referenced");
- setReference(project, referencedProject);
-
- // get cfgDescription
- ICConfigurationDescription[] cfgDescriptions = getConfigurationDescriptions(project);
- ICConfigurationDescription cfgDescription = cfgDescriptions[0];
-
- {
- // double-check that provider for referenced projects is set in the configuration
- ILanguageSettingsProvider refProjectsProvider = LanguageSettingsManager.getWorkspaceProvider(ReferencedProjectsLanguageSettingsProvider.ID);
- assertNotNull(refProjectsProvider);
- List<ILanguageSettingsProvider> providers = ((ILanguageSettingsProvidersKeeper) cfgDescription).getLanguageSettingProviders();
- assertTrue(providers.contains(refProjectsProvider));
- }
-
- // Check that no setting entries are set initially
- {
- List<ICLanguageSettingEntry> entries = LanguageSettingsManager.getSettingEntriesByKind(cfgDescription, project, null, ICSettingEntry.ALL);
- assertEquals(0, entries.size());
- }
-
- // Add an entry into a non-referenced project
- CIncludePathEntry nonRefEntry = CDataUtil.createCIncludePathEntry("non-referenced-exported", ICSettingEntry.EXPORTED);
- {
- ICConfigurationDescription[] nonRefCfgDescriptions = getConfigurationDescriptions(nonReferencedProject);
- ICConfigurationDescription nonRefCfgDescription = nonRefCfgDescriptions[0];
- List<ILanguageSettingsProvider> providersNonRef = ((ILanguageSettingsProvidersKeeper) nonRefCfgDescription).getLanguageSettingProviders();
- // get user provider which is the first one
- ILanguageSettingsProvider userProviderNonRef = providersNonRef.get(0);
- assertEquals(ScannerDiscoveryLegacySupport.USER_LANGUAGE_SETTINGS_PROVIDER_ID, userProviderNonRef.getId());
- assertTrue(userProviderNonRef instanceof LanguageSettingsGenericProvider);
- // add sample entries
- ArrayList<ICLanguageSettingEntry> entries = new ArrayList<ICLanguageSettingEntry>();
- entries.add(nonRefEntry);
- ((LanguageSettingsGenericProvider) userProviderNonRef).setSettingEntries(null, null, null, entries);
- }
- // Confirm that that does not add entries to the main project
- {
- List<ICLanguageSettingEntry> entries = LanguageSettingsManager.getSettingEntriesByKind(cfgDescription, project, null, ICSettingEntry.ALL);
- assertEquals(0, entries.size());
- }
-
- CIncludePathEntry refEntry = CDataUtil.createCIncludePathEntry("referenced-exported", ICSettingEntry.EXPORTED);
- // Add entries into a referenced project
- {
- ICConfigurationDescription[] refCfgDescriptions = getConfigurationDescriptions(referencedProject);
- ICConfigurationDescription refCfgDescription = refCfgDescriptions[0];
- List<ILanguageSettingsProvider> providersRef = ((ILanguageSettingsProvidersKeeper) refCfgDescription).getLanguageSettingProviders();
- // get user provider which is the first one
- ILanguageSettingsProvider userProviderRef = providersRef.get(0);
- assertEquals(ScannerDiscoveryLegacySupport.USER_LANGUAGE_SETTINGS_PROVIDER_ID, userProviderRef.getId());
- assertTrue(userProviderRef instanceof LanguageSettingsGenericProvider);
- // add sample entries
- ArrayList<ICLanguageSettingEntry> entries = new ArrayList<ICLanguageSettingEntry>();
- CIncludePathEntry refEntryNotExported = CDataUtil.createCIncludePathEntry("referenced-not-exported", 0);
- entries.add(refEntry);
- entries.add(refEntryNotExported);
- ((LanguageSettingsGenericProvider) userProviderRef).setSettingEntries(null, null, null, entries);
- List<ICLanguageSettingEntry> entriesActual = LanguageSettingsManager.getSettingEntriesByKind(refCfgDescription, project, null, ICSettingEntry.ALL);
- assertEquals(entries, entriesActual);
- }
- // Check that the new entries from referenced project made it to the main project
- {
- List<ICLanguageSettingEntry> entries = LanguageSettingsManager.getSettingEntriesByKind(cfgDescription, project, null, ICSettingEntry.ALL);
- assertEquals(CDataUtil.createCIncludePathEntry(refEntry.getName(), 0), entries.get(0));
- assertEquals(1, entries.size());
- }
- }
-
- /**
- * Test case when projects reference each other recursively.
- */
- public void testRecursiveReferences() throws Exception {
- // Create model projects that reference each other
- String projectName = getName();
- IProject projectA = ResourceHelper.createCDTProjectWithConfig(projectName + "-A");
- IProject projectB = ResourceHelper.createCDTProjectWithConfig(projectName + "-B");
- setReference(projectA, projectB);
- setReference(projectB, projectA);
-
- {
- // get cfgDescriptions to work with
- ICConfigurationDescription[] cfgDescriptionsA = getConfigurationDescriptions(projectA);
- ICConfigurationDescription cfgDescriptionA = cfgDescriptionsA[0];
- ICConfigurationDescription[] cfgDescriptionsB = getConfigurationDescriptions(projectB);
- ICConfigurationDescription cfgDescriptionB = cfgDescriptionsB[0];
- // double-check that provider for referenced projects is set in the configurations
- ILanguageSettingsProvider refProjectsProvider = LanguageSettingsManager.getWorkspaceProvider(ReferencedProjectsLanguageSettingsProvider.ID);
- assertNotNull(refProjectsProvider);
- List<ILanguageSettingsProvider> providersA = ((ILanguageSettingsProvidersKeeper) cfgDescriptionA).getLanguageSettingProviders();
- assertTrue(providersA.contains(refProjectsProvider));
- List<ILanguageSettingsProvider> providersB = ((ILanguageSettingsProvidersKeeper) cfgDescriptionB).getLanguageSettingProviders();
- assertTrue(providersB.contains(refProjectsProvider));
-
- // Check that no setting entries are set initially
- List<ICLanguageSettingEntry> entriesA = LanguageSettingsManager.getSettingEntriesByKind(cfgDescriptionA, projectA, null, ICSettingEntry.ALL);
- assertEquals(0, entriesA.size());
- List<ICLanguageSettingEntry> entriesB = LanguageSettingsManager.getSettingEntriesByKind(cfgDescriptionA, projectB, null, ICSettingEntry.ALL);
- assertEquals(0, entriesB.size());
- }
-
- CIncludePathEntry entryExportedA = CDataUtil.createCIncludePathEntry("referenced-exported-A", ICSettingEntry.EXPORTED);
- CIncludePathEntry entryNotExportedA = CDataUtil.createCIncludePathEntry("referenced-not-exported-A", 0);
- // Add entries into a project A
- {
- ICConfigurationDescription[] refCfgDescriptions = getConfigurationDescriptions(projectA);
- ICConfigurationDescription refCfgDescription = refCfgDescriptions[0];
- List<ILanguageSettingsProvider> providersRef = ((ILanguageSettingsProvidersKeeper) refCfgDescription).getLanguageSettingProviders();
- // get user provider which is the first one
- ILanguageSettingsProvider userProviderRef = providersRef.get(0);
- assertEquals(ScannerDiscoveryLegacySupport.USER_LANGUAGE_SETTINGS_PROVIDER_ID, userProviderRef.getId());
- assertTrue(userProviderRef instanceof LanguageSettingsGenericProvider);
- // add sample entries
- ArrayList<ICLanguageSettingEntry> entries = new ArrayList<ICLanguageSettingEntry>();
- entries.add(entryExportedA);
- entries.add(entryNotExportedA);
- ((LanguageSettingsGenericProvider) userProviderRef).setSettingEntries(null, null, null, entries);
- }
-
- CIncludePathEntry entryExportedB = CDataUtil.createCIncludePathEntry("referenced-exported-B", ICSettingEntry.EXPORTED);
- CIncludePathEntry entryNotExportedB = CDataUtil.createCIncludePathEntry("referenced-not-exported-B", 0);
- // Add entries into a project B
- {
- ICConfigurationDescription[] refCfgDescriptions = getConfigurationDescriptions(projectB);
- ICConfigurationDescription refCfgDescription = refCfgDescriptions[0];
- List<ILanguageSettingsProvider> providersRef = ((ILanguageSettingsProvidersKeeper) refCfgDescription).getLanguageSettingProviders();
- // get user provider which is the first one
- ILanguageSettingsProvider userProviderRef = providersRef.get(0);
- assertEquals(ScannerDiscoveryLegacySupport.USER_LANGUAGE_SETTINGS_PROVIDER_ID, userProviderRef.getId());
- assertTrue(userProviderRef instanceof LanguageSettingsGenericProvider);
- // add sample entries
- ArrayList<ICLanguageSettingEntry> entries = new ArrayList<ICLanguageSettingEntry>();
- entries.add(entryExportedB);
- entries.add(entryNotExportedB);
- ((LanguageSettingsGenericProvider) userProviderRef).setSettingEntries(null, null, null, entries);
- }
-
- // Check that the new entries from projectB made it to projectA
- {
- ICConfigurationDescription[] cfgDescriptionsA = getConfigurationDescriptions(projectA);
- ICConfigurationDescription cfgDescriptionA = cfgDescriptionsA[0];
- List<ICLanguageSettingEntry> entries = LanguageSettingsManager.getSettingEntriesByKind(cfgDescriptionA, projectA, null, ICSettingEntry.ALL);
- assertEquals(entryExportedA, entries.get(0));
- assertEquals(entryNotExportedA, entries.get(1));
- assertEquals(CDataUtil.createCIncludePathEntry(entryExportedB.getName(), 0), entries.get(2));
- assertEquals(3, entries.size());
- }
- // Check that the new entries from projectA made it to projectB
- {
- ICConfigurationDescription[] cfgDescriptionsB = getConfigurationDescriptions(projectB);
- ICConfigurationDescription cfgDescriptionB = cfgDescriptionsB[0];
- List<ICLanguageSettingEntry> entries = LanguageSettingsManager.getSettingEntriesByKind(cfgDescriptionB, projectB, null, ICSettingEntry.ALL);
- assertEquals(entryExportedB, entries.get(0));
- assertEquals(entryNotExportedB, entries.get(1));
- assertEquals(CDataUtil.createCIncludePathEntry(entryExportedA.getName(), 0), entries.get(2));
- assertEquals(3, entries.size());
- }
-
- // Hopefully it gets here without stack overflow
- }
-
-}
+/*******************************************************************************
+ * Copyright (c) 2013 Andrew Gvozdev and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Andrew Gvozdev - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.cdt.core.language.settings.providers;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.LinkedHashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import junit.framework.TestSuite;
+
+import org.eclipse.cdt.core.model.CoreModel;
+import org.eclipse.cdt.core.settings.model.CIncludePathEntry;
+import org.eclipse.cdt.core.settings.model.ICConfigurationDescription;
+import org.eclipse.cdt.core.settings.model.ICLanguageSettingEntry;
+import org.eclipse.cdt.core.settings.model.ICProjectDescription;
+import org.eclipse.cdt.core.settings.model.ICProjectDescriptionManager;
+import org.eclipse.cdt.core.settings.model.ICSettingEntry;
+import org.eclipse.cdt.core.settings.model.util.CDataUtil;
+import org.eclipse.cdt.core.testplugin.ResourceHelper;
+import org.eclipse.cdt.core.testplugin.util.BaseTestCase;
+import org.eclipse.cdt.internal.core.language.settings.providers.ReferencedProjectsLanguageSettingsProvider;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
+
+/**
+ * Test cases testing ReferencedProjectsLanguageSettingsProvider functionality
+ */
+public class LanguageSettingsProviderReferencedProjectsTests extends BaseTestCase {
+ /**
+ * Constructor.
+ * @param name - name of the test.
+ */
+ public LanguageSettingsProviderReferencedProjectsTests(String name) {
+ super(name);
+
+ }
+
+ @Override
+ protected void setUp() throws Exception {
+ super.setUp();
+ }
+
+ @Override
+ protected void tearDown() throws Exception {
+ super.tearDown(); // includes ResourceHelper cleanup
+ }
+
+ /**
+ * @return - new TestSuite.
+ */
+ public static TestSuite suite() {
+ return new TestSuite(LanguageSettingsProviderReferencedProjectsTests.class);
+ }
+
+ /**
+ * main function of the class.
+ *
+ * @param args - arguments
+ */
+ public static void main(String[] args) {
+ junit.textui.TestRunner.run(suite());
+ }
+
+ /**
+ * Helper method to fetch configuration descriptions.
+ */
+ private ICConfigurationDescription[] getConfigurationDescriptions(IProject project) {
+ CoreModel coreModel = CoreModel.getDefault();
+ ICProjectDescriptionManager mngr = coreModel.getProjectDescriptionManager();
+ // project description
+ ICProjectDescription projectDescription = mngr.getProjectDescription(project, false);
+ assertNotNull(projectDescription);
+ assertEquals(1, projectDescription.getConfigurations().length);
+ // configuration description
+ ICConfigurationDescription[] cfgDescriptions = projectDescription.getConfigurations();
+ return cfgDescriptions;
+ }
+
+ /**
+ * Helper method to set reference project.
+ */
+ private void setReference(IProject project, final IProject projectReferenced) throws CoreException {
+ {
+ CoreModel coreModel = CoreModel.getDefault();
+ ICProjectDescriptionManager mngr = coreModel.getProjectDescriptionManager();
+ // project description
+ ICProjectDescription projectDescription = mngr.getProjectDescription(project);
+ assertNotNull(projectDescription);
+ assertEquals(1, projectDescription.getConfigurations().length);
+ // configuration description
+ ICConfigurationDescription[] cfgDescriptions = projectDescription.getConfigurations();
+ ICConfigurationDescription cfgDescription = cfgDescriptions[0];
+
+ final ICConfigurationDescription cfgDescriptionReferenced = getConfigurationDescriptions(projectReferenced)[0];
+ cfgDescription.setReferenceInfo(new HashMap<String, String>() {{ put(projectReferenced.getName(), cfgDescriptionReferenced.getId()); }});
+ coreModel.setProjectDescription(project, projectDescription);
+ }
+
+ {
+ // doublecheck that it's set as expected
+ ICConfigurationDescription[] cfgDescriptions = getConfigurationDescriptions(project);
+ ICConfigurationDescription cfgDescription = cfgDescriptions[0];
+ Map<String,String> refs = cfgDescription.getReferenceInfo();
+ assertEquals(1, refs.size());
+ Set<String> referencedProjectsNames = new LinkedHashSet<String>(refs.keySet());
+ assertEquals(projectReferenced.getName(), referencedProjectsNames.toArray()[0]);
+ }
+
+ }
+
+ /**
+ * Test that null arguments don't crash the provider.
+ */
+ public void testNulls() throws Exception {
+ ILanguageSettingsProvider provider = LanguageSettingsManager.getWorkspaceProvider(ReferencedProjectsLanguageSettingsProvider.ID);
+ assertNotNull(provider);
+ List<ICLanguageSettingEntry> entries = provider.getSettingEntries(null, null, null);
+ assertEquals(null, entries);
+ }
+
+ /**
+ * Test main functionality of ReferencedProjectsLanguageSettingsProvider.
+ */
+ public void testReferencedProjectProvider() throws Exception {
+ // Create model project and accompanied descriptions
+ String projectName = getName();
+ IProject project = ResourceHelper.createCDTProjectWithConfig(projectName);
+ IProject nonReferencedProject = ResourceHelper.createCDTProjectWithConfig(projectName+"-non-referenced");
+ IProject referencedProject = ResourceHelper.createCDTProjectWithConfig(projectName+"-referenced");
+ setReference(project, referencedProject);
+
+ // get cfgDescription
+ ICConfigurationDescription[] cfgDescriptions = getConfigurationDescriptions(project);
+ ICConfigurationDescription cfgDescription = cfgDescriptions[0];
+
+ {
+ // double-check that provider for referenced projects is set in the configuration
+ ILanguageSettingsProvider refProjectsProvider = LanguageSettingsManager.getWorkspaceProvider(ReferencedProjectsLanguageSettingsProvider.ID);
+ assertNotNull(refProjectsProvider);
+ List<ILanguageSettingsProvider> providers = ((ILanguageSettingsProvidersKeeper) cfgDescription).getLanguageSettingProviders();
+ assertTrue(providers.contains(refProjectsProvider));
+ }
+
+ // Check that no setting entries are set initially
+ {
+ List<ICLanguageSettingEntry> entries = LanguageSettingsManager.getSettingEntriesByKind(cfgDescription, project, null, ICSettingEntry.ALL);
+ assertEquals(0, entries.size());
+ }
+
+ // Add an entry into a non-referenced project
+ CIncludePathEntry nonRefEntry = CDataUtil.createCIncludePathEntry("non-referenced-exported", ICSettingEntry.EXPORTED);
+ {
+ ICConfigurationDescription[] nonRefCfgDescriptions = getConfigurationDescriptions(nonReferencedProject);
+ ICConfigurationDescription nonRefCfgDescription = nonRefCfgDescriptions[0];
+ List<ILanguageSettingsProvider> providersNonRef = ((ILanguageSettingsProvidersKeeper) nonRefCfgDescription).getLanguageSettingProviders();
+ // get user provider which is the first one
+ ILanguageSettingsProvider userProviderNonRef = providersNonRef.get(0);
+ assertEquals(ScannerDiscoveryLegacySupport.USER_LANGUAGE_SETTINGS_PROVIDER_ID, userProviderNonRef.getId());
+ assertTrue(userProviderNonRef instanceof LanguageSettingsGenericProvider);
+ // add sample entries
+ ArrayList<ICLanguageSettingEntry> entries = new ArrayList<ICLanguageSettingEntry>();
+ entries.add(nonRefEntry);
+ ((LanguageSettingsGenericProvider) userProviderNonRef).setSettingEntries(null, null, null, entries);
+ }
+ // Confirm that that does not add entries to the main project
+ {
+ List<ICLanguageSettingEntry> entries = LanguageSettingsManager.getSettingEntriesByKind(cfgDescription, project, null, ICSettingEntry.ALL);
+ assertEquals(0, entries.size());
+ }
+
+ CIncludePathEntry refEntry = CDataUtil.createCIncludePathEntry("referenced-exported", ICSettingEntry.EXPORTED);
+ // Add entries into a referenced project
+ {
+ ICConfigurationDescription[] refCfgDescriptions = getConfigurationDescriptions(referencedProject);
+ ICConfigurationDescription refCfgDescription = refCfgDescriptions[0];
+ List<ILanguageSettingsProvider> providersRef = ((ILanguageSettingsProvidersKeeper) refCfgDescription).getLanguageSettingProviders();
+ // get user provider which is the first one
+ ILanguageSettingsProvider userProviderRef = providersRef.get(0);
+ assertEquals(ScannerDiscoveryLegacySupport.USER_LANGUAGE_SETTINGS_PROVIDER_ID, userProviderRef.getId());
+ assertTrue(userProviderRef instanceof LanguageSettingsGenericProvider);
+ // add sample entries
+ ArrayList<ICLanguageSettingEntry> entries = new ArrayList<ICLanguageSettingEntry>();
+ CIncludePathEntry refEntryNotExported = CDataUtil.createCIncludePathEntry("referenced-not-exported", 0);
+ entries.add(refEntry);
+ entries.add(refEntryNotExported);
+ ((LanguageSettingsGenericProvider) userProviderRef).setSettingEntries(null, null, null, entries);
+ List<ICLanguageSettingEntry> entriesActual = LanguageSettingsManager.getSettingEntriesByKind(refCfgDescription, project, null, ICSettingEntry.ALL);
+ assertEquals(entries, entriesActual);
+ }
+ // Check that the new entries from referenced project made it to the main project
+ {
+ List<ICLanguageSettingEntry> entries = LanguageSettingsManager.getSettingEntriesByKind(cfgDescription, project, null, ICSettingEntry.ALL);
+ assertEquals(CDataUtil.createCIncludePathEntry(refEntry.getName(), 0), entries.get(0));
+ assertEquals(1, entries.size());
+ }
+ }
+
+ /**
+ * Test case when projects reference each other recursively.
+ */
+ public void testRecursiveReferences() throws Exception {
+ // Create model projects that reference each other
+ String projectName = getName();
+ IProject projectA = ResourceHelper.createCDTProjectWithConfig(projectName + "-A");
+ IProject projectB = ResourceHelper.createCDTProjectWithConfig(projectName + "-B");
+ setReference(projectA, projectB);
+ setReference(projectB, projectA);
+
+ {
+ // get cfgDescriptions to work with
+ ICConfigurationDescription[] cfgDescriptionsA = getConfigurationDescriptions(projectA);
+ ICConfigurationDescription cfgDescriptionA = cfgDescriptionsA[0];
+ ICConfigurationDescription[] cfgDescriptionsB = getConfigurationDescriptions(projectB);
+ ICConfigurationDescription cfgDescriptionB = cfgDescriptionsB[0];
+ // double-check that provider for referenced projects is set in the configurations
+ ILanguageSettingsProvider refProjectsProvider = LanguageSettingsManager.getWorkspaceProvider(ReferencedProjectsLanguageSettingsProvider.ID);
+ assertNotNull(refProjectsProvider);
+ List<ILanguageSettingsProvider> providersA = ((ILanguageSettingsProvidersKeeper) cfgDescriptionA).getLanguageSettingProviders();
+ assertTrue(providersA.contains(refProjectsProvider));
+ List<ILanguageSettingsProvider> providersB = ((ILanguageSettingsProvidersKeeper) cfgDescriptionB).getLanguageSettingProviders();
+ assertTrue(providersB.contains(refProjectsProvider));
+
+ // Check that no setting entries are set initially
+ List<ICLanguageSettingEntry> entriesA = LanguageSettingsManager.getSettingEntriesByKind(cfgDescriptionA, projectA, null, ICSettingEntry.ALL);
+ assertEquals(0, entriesA.size());
+ List<ICLanguageSettingEntry> entriesB = LanguageSettingsManager.getSettingEntriesByKind(cfgDescriptionA, projectB, null, ICSettingEntry.ALL);
+ assertEquals(0, entriesB.size());
+ }
+
+ CIncludePathEntry entryExportedA = CDataUtil.createCIncludePathEntry("referenced-exported-A", ICSettingEntry.EXPORTED);
+ CIncludePathEntry entryNotExportedA = CDataUtil.createCIncludePathEntry("referenced-not-exported-A", 0);
+ // Add entries into a project A
+ {
+ ICConfigurationDescription[] refCfgDescriptions = getConfigurationDescriptions(projectA);
+ ICConfigurationDescription refCfgDescription = refCfgDescriptions[0];
+ List<ILanguageSettingsProvider> providersRef = ((ILanguageSettingsProvidersKeeper) refCfgDescription).getLanguageSettingProviders();
+ // get user provider which is the first one
+ ILanguageSettingsProvider userProviderRef = providersRef.get(0);
+ assertEquals(ScannerDiscoveryLegacySupport.USER_LANGUAGE_SETTINGS_PROVIDER_ID, userProviderRef.getId());
+ assertTrue(userProviderRef instanceof LanguageSettingsGenericProvider);
+ // add sample entries
+ ArrayList<ICLanguageSettingEntry> entries = new ArrayList<ICLanguageSettingEntry>();
+ entries.add(entryExportedA);
+ entries.add(entryNotExportedA);
+ ((LanguageSettingsGenericProvider) userProviderRef).setSettingEntries(null, null, null, entries);
+ }
+
+ CIncludePathEntry entryExportedB = CDataUtil.createCIncludePathEntry("referenced-exported-B", ICSettingEntry.EXPORTED);
+ CIncludePathEntry entryNotExportedB = CDataUtil.createCIncludePathEntry("referenced-not-exported-B", 0);
+ // Add entries into a project B
+ {
+ ICConfigurationDescription[] refCfgDescriptions = getConfigurationDescriptions(projectB);
+ ICConfigurationDescription refCfgDescription = refCfgDescriptions[0];
+ List<ILanguageSettingsProvider> providersRef = ((ILanguageSettingsProvidersKeeper) refCfgDescription).getLanguageSettingProviders();
+ // get user provider which is the first one
+ ILanguageSettingsProvider userProviderRef = providersRef.get(0);
+ assertEquals(ScannerDiscoveryLegacySupport.USER_LANGUAGE_SETTINGS_PROVIDER_ID, userProviderRef.getId());
+ assertTrue(userProviderRef instanceof LanguageSettingsGenericProvider);
+ // add sample entries
+ ArrayList<ICLanguageSettingEntry> entries = new ArrayList<ICLanguageSettingEntry>();
+ entries.add(entryExportedB);
+ entries.add(entryNotExportedB);
+ ((LanguageSettingsGenericProvider) userProviderRef).setSettingEntries(null, null, null, entries);
+ }
+
+ // Check that the new entries from projectB made it to projectA
+ {
+ ICConfigurationDescription[] cfgDescriptionsA = getConfigurationDescriptions(projectA);
+ ICConfigurationDescription cfgDescriptionA = cfgDescriptionsA[0];
+ List<ICLanguageSettingEntry> entries = LanguageSettingsManager.getSettingEntriesByKind(cfgDescriptionA, projectA, null, ICSettingEntry.ALL);
+ assertEquals(entryExportedA, entries.get(0));
+ assertEquals(entryNotExportedA, entries.get(1));
+ assertEquals(CDataUtil.createCIncludePathEntry(entryExportedB.getName(), 0), entries.get(2));
+ assertEquals(3, entries.size());
+ }
+ // Check that the new entries from projectA made it to projectB
+ {
+ ICConfigurationDescription[] cfgDescriptionsB = getConfigurationDescriptions(projectB);
+ ICConfigurationDescription cfgDescriptionB = cfgDescriptionsB[0];
+ List<ICLanguageSettingEntry> entries = LanguageSettingsManager.getSettingEntriesByKind(cfgDescriptionB, projectB, null, ICSettingEntry.ALL);
+ assertEquals(entryExportedB, entries.get(0));
+ assertEquals(entryNotExportedB, entries.get(1));
+ assertEquals(CDataUtil.createCIncludePathEntry(entryExportedA.getName(), 0), entries.get(2));
+ assertEquals(3, entries.size());
+ }
+
+ // Hopefully it gets here without stack overflow
+ }
+
+}
diff --git a/core/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/language/settings/providers/LanguageSettingsScannerInfoProviderTests.java b/core/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/language/settings/providers/LanguageSettingsScannerInfoProviderTests.java
index 72ee4c50cf..9d9bce06f5 100644
--- a/core/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/language/settings/providers/LanguageSettingsScannerInfoProviderTests.java
+++ b/core/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/language/settings/providers/LanguageSettingsScannerInfoProviderTests.java
@@ -1,958 +1,958 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2012 Andrew Gvozdev and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Andrew Gvozdev - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.cdt.core.language.settings.providers;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-
-import junit.framework.TestSuite;
-
-import org.eclipse.cdt.core.model.ILanguage;
-import org.eclipse.cdt.core.model.LanguageManager;
-import org.eclipse.cdt.core.parser.ExtendedScannerInfo;
-import org.eclipse.cdt.core.settings.model.CIncludeFileEntry;
-import org.eclipse.cdt.core.settings.model.CIncludePathEntry;
-import org.eclipse.cdt.core.settings.model.CMacroEntry;
-import org.eclipse.cdt.core.settings.model.CMacroFileEntry;
-import org.eclipse.cdt.core.settings.model.ICConfigurationDescription;
-import org.eclipse.cdt.core.settings.model.ICFolderDescription;
-import org.eclipse.cdt.core.settings.model.ICLanguageSetting;
-import org.eclipse.cdt.core.settings.model.ICLanguageSettingEntry;
-import org.eclipse.cdt.core.settings.model.ICProjectDescription;
-import org.eclipse.cdt.core.settings.model.ICSettingEntry;
-import org.eclipse.cdt.core.testplugin.ResourceHelper;
-import org.eclipse.cdt.core.testplugin.util.BaseTestCase;
-import org.eclipse.cdt.internal.core.language.settings.providers.LanguageSettingsScannerInfoProvider;
-import org.eclipse.cdt.internal.core.settings.model.CProjectDescriptionManager;
-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.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-
-/**
- * Test cases testing LanguageSettingsProvider functionality
- */
-public class LanguageSettingsScannerInfoProviderTests extends BaseTestCase {
- private static final IFile FAKE_FILE = ResourcesPlugin.getWorkspace().getRoot().getFile(new Path("/project/path0"));
- private static final String PROVIDER_ID = "test.provider.id";
- private static final String PROVIDER_ID_2 = "test.provider.id.2";
- private static final String PROVIDER_NAME = "test.provider.name";
-
- // constants for getProjectDescription()
- private static final boolean READ_ONLY = false;
- private static final boolean WRITEABLE = true;
-
- private class MockProvider extends LanguageSettingsBaseProvider implements ILanguageSettingsProvider {
- private final List<ICLanguageSettingEntry> entries;
-
- public MockProvider(String id, String name, List<ICLanguageSettingEntry> entries) {
- super(id, name);
- this.entries = entries;
- }
-
- @Override
- public List<ICLanguageSettingEntry> getSettingEntries(ICConfigurationDescription cfgDescription, IResource rc, String languageId) {
- return entries;
- }
- }
-
- /**
- * Constructor.
- * @param name - name of the test.
- */
- public LanguageSettingsScannerInfoProviderTests(String name) {
- super(name);
-
- }
-
- @Override
- protected void setUp() throws Exception {
- super.setUp();
- }
-
- @Override
- protected void tearDown() throws Exception {
- super.tearDown(); // includes ResourceHelper cleanup
- }
-
- /**
- * @return - new TestSuite.
- */
- public static TestSuite suite() {
- return new TestSuite(LanguageSettingsScannerInfoProviderTests.class);
- }
-
- /**
- * main function of the class.
- *
- * @param args - arguments
- */
- public static void main(String[] args) {
- junit.textui.TestRunner.run(suite());
- }
-
- /**
- * Sets build working directory for DefaultSettingConfiguration being tested.
- */
- private void setBuilderCWD(IProject project, IPath buildCWD) throws CoreException {
- CProjectDescriptionManager manager = CProjectDescriptionManager.getInstance();
- {
- ICProjectDescription prjDescription = manager.getProjectDescription(project, WRITEABLE);
- assertNotNull(prjDescription);
- ICConfigurationDescription cfgDescription = prjDescription.getDefaultSettingConfiguration();
- assertNotNull(cfgDescription);
-
- cfgDescription.getBuildSetting().setBuilderCWD(buildCWD);
- manager.setProjectDescription(project, prjDescription);
- // doublecheck builderCWD
- IPath actualBuildCWD = cfgDescription.getBuildSetting().getBuilderCWD();
- assertEquals(buildCWD, actualBuildCWD);
- }
- {
- // triplecheck builderCWD for different project/configuration descriptions
- ICProjectDescription prjDescription = CProjectDescriptionManager.getInstance().getProjectDescription(project, READ_ONLY);
- assertNotNull(prjDescription);
- ICConfigurationDescription cfgDescription = prjDescription.getDefaultSettingConfiguration();
- assertNotNull(cfgDescription);
-
- }
- }
-
- /**
- * Test cases when some objects are null.
- */
- public void testNulls() throws Exception {
- {
- // Handle project==null
- IResource root = ResourcesPlugin.getWorkspace().getRoot();
- assertNull(root.getProject());
-
- LanguageSettingsScannerInfoProvider scannerInfoProvider = new LanguageSettingsScannerInfoProvider();
- ExtendedScannerInfo info = scannerInfoProvider.getScannerInformation(root);
- assertEquals(0, info.getIncludePaths().length);
- assertEquals(0, info.getDefinedSymbols().size());
- assertEquals(0, info.getIncludeFiles().length);
- assertEquals(0, info.getMacroFiles().length);
- assertEquals(0, info.getLocalIncludePath().length);
- }
-
- {
- // Handle prjDescription==null
- IProject project = FAKE_FILE.getProject();
- ICProjectDescription prjDescription = CProjectDescriptionManager.getInstance().getProjectDescription(project, READ_ONLY);
- assertNull(prjDescription);
-
- LanguageSettingsScannerInfoProvider scannerInfoProvider = new LanguageSettingsScannerInfoProvider();
- ExtendedScannerInfo info = scannerInfoProvider.getScannerInformation(FAKE_FILE);
- assertEquals(0, info.getIncludePaths().length);
- assertEquals(0, info.getDefinedSymbols().size());
- assertEquals(0, info.getIncludeFiles().length);
- assertEquals(0, info.getMacroFiles().length);
- assertEquals(0, info.getLocalIncludePath().length);
- }
-
- {
- // Handle language==null
- LanguageSettingsScannerInfoProvider scannerInfoProvider = new LanguageSettingsScannerInfoProvider();
- IProject project = ResourceHelper.createCDTProjectWithConfig(getName());
- IFile file = ResourceHelper.createFile(project, "file");
-
- ICProjectDescription prjDescription = CProjectDescriptionManager.getInstance().getProjectDescription(project, READ_ONLY);
- assertNotNull(prjDescription);
- ICConfigurationDescription cfgDescription = prjDescription.getDefaultSettingConfiguration();
- assertNotNull(cfgDescription);
- ILanguage language = LanguageManager.getInstance().getLanguageForFile(file, cfgDescription);
- assertNull(language);
-
- // AG FIXME - temporarily ignore the entry in the log
- setExpectedNumberOfLoggedNonOKStatusObjects(1);
-
- ExtendedScannerInfo info = scannerInfoProvider.getScannerInformation(file);
- assertEquals(0, info.getIncludePaths().length);
- assertEquals(0, info.getDefinedSymbols().size());
- assertEquals(0, info.getIncludeFiles().length);
- assertEquals(0, info.getMacroFiles().length);
- assertEquals(0, info.getLocalIncludePath().length);
- }
- }
-
- /**
- * Test empty scanner info.
- */
- public void testEmpty() throws Exception {
- LanguageSettingsScannerInfoProvider scannerInfoProvider = new LanguageSettingsScannerInfoProvider();
- IProject project = ResourceHelper.createCDTProjectWithConfig(getName());
- IFile file = ResourceHelper.createFile(project, "file.c");
-
- // confirm that language==null
- ICProjectDescription prjDescription = CProjectDescriptionManager.getInstance().getProjectDescription(project, READ_ONLY);
- assertNotNull(prjDescription);
- ICConfigurationDescription cfgDescription = prjDescription.getDefaultSettingConfiguration();
- assertNotNull(cfgDescription);
- ILanguage language = LanguageManager.getInstance().getLanguageForFile(file, cfgDescription);
- assertNotNull(language);
-
- // test that the info is empty
- ExtendedScannerInfo info = scannerInfoProvider.getScannerInformation(file);
- assertEquals(0, info.getIncludePaths().length);
- assertEquals(0, info.getDefinedSymbols().size());
- assertEquals(0, info.getIncludeFiles().length);
- assertEquals(0, info.getMacroFiles().length);
- assertEquals(0, info.getLocalIncludePath().length);
- }
-
- /**
- * Test regular cases.
- */
- public void testRegular() throws Exception {
- // create a project
- IProject project = ResourceHelper.createCDTProjectWithConfig(getName());
- ICProjectDescription prjDescription = CProjectDescriptionManager.getInstance().getProjectDescription(project, WRITEABLE);
- assertNotNull(prjDescription);
- ICConfigurationDescription cfgDescription = prjDescription.getDefaultSettingConfiguration();
- assertNotNull(cfgDescription);
- assertTrue(cfgDescription instanceof ILanguageSettingsProvidersKeeper);
-
- // sample file
- IFile file = ResourceHelper.createFile(project, "file.c");
-
- // sanity test of language
- ILanguage language = LanguageManager.getInstance().getLanguageForFile(file, cfgDescription);
- assertNotNull(language);
-
- // contribute the entries
- IFolder includeFolder = ResourceHelper.createFolder(project, "/include-path");
- IFolder includeLocalFolder = ResourceHelper.createFolder(project, "/local-include-path");
- IFile macroFile = ResourceHelper.createFile(project, "macro-file");
- IFile includeFile = ResourceHelper.createFile(project, "include-file");
-
- CIncludePathEntry includePathEntry = new CIncludePathEntry(includeFolder, 0);
- CIncludePathEntry includeLocalPathEntry = new CIncludePathEntry(includeLocalFolder, ICSettingEntry.LOCAL); // #include "..."
- CMacroEntry macroEntry = new CMacroEntry("MACRO", "value",0);
- CIncludeFileEntry includeFileEntry = new CIncludeFileEntry(includeFile, 0);
- CMacroFileEntry macroFileEntry = new CMacroFileEntry(macroFile, 0);
-
- List<ICLanguageSettingEntry> entries = new ArrayList<ICLanguageSettingEntry>();
- entries.add(includePathEntry);
- entries.add(includeLocalPathEntry);
- entries.add(macroEntry);
- entries.add(includeFileEntry);
- entries.add(macroFileEntry);
-
- // add provider to the configuration
- ILanguageSettingsProvider provider = new MockProvider(PROVIDER_ID, PROVIDER_NAME, entries);
- List<ILanguageSettingsProvider> providers = new ArrayList<ILanguageSettingsProvider>();
- providers.add(provider);
- ((ILanguageSettingsProvidersKeeper) cfgDescription).setLanguageSettingProviders(providers);
-
- // set project description
- CProjectDescriptionManager.getInstance().setProjectDescription(project, prjDescription);
-
- // test that the scannerInfoProvider gets the entries
- LanguageSettingsScannerInfoProvider scannerInfoProvider = new LanguageSettingsScannerInfoProvider();
- ExtendedScannerInfo info = scannerInfoProvider.getScannerInformation(file);
- String[] actualIncludePaths = info.getIncludePaths();
- Map<String, String> actualDefinedSymbols = info.getDefinedSymbols();
- String[] actualIncludeFiles = info.getIncludeFiles();
- String[] actualMacroFiles = info.getMacroFiles();
- String[] actualLocalIncludePath = info.getLocalIncludePath();
- // include paths
- assertEquals(includeFolder.getLocation(), new Path(actualIncludePaths[0]));
- assertEquals(1, actualIncludePaths.length);
- // macros
- assertEquals(macroEntry.getValue(), actualDefinedSymbols.get(macroEntry.getName()));
- assertEquals(1, actualDefinedSymbols.size());
- // include file
- assertEquals(includeFile.getLocation(), new Path(actualIncludeFiles[0]));
- assertEquals(1, actualIncludeFiles.length);
- // macro file
- assertEquals(macroFile.getLocation(), new Path(actualMacroFiles[0]));
- assertEquals(1, actualMacroFiles.length);
- // local include files
- assertEquals(includeLocalFolder.getLocation(), new Path(actualLocalIncludePath[0]));
- assertEquals(1, actualLocalIncludePath.length);
- }
-
- /**
- * Test "local" flag (#include "...").
- */
- public void testLocal() throws Exception {
- // create a project
- IProject project = ResourceHelper.createCDTProjectWithConfig(getName());
- ICProjectDescription prjDescription = CProjectDescriptionManager.getInstance().getProjectDescription(project, WRITEABLE);
- assertNotNull(prjDescription);
- ICConfigurationDescription cfgDescription = prjDescription.getDefaultSettingConfiguration();
- assertNotNull(cfgDescription);
- assertTrue(cfgDescription instanceof ILanguageSettingsProvidersKeeper);
-
- // sample file
- IFile file = ResourceHelper.createFile(project, "file.c");
-
- // contribute the entries
- IFolder incFolder = ResourceHelper.createFolder(project, "include");
- IFolder incFolder2 = ResourceHelper.createFolder(project, "include2");
- CIncludePathEntry includePathEntry = new CIncludePathEntry(incFolder, 0);
- CIncludePathEntry includeLocalPathEntry = new CIncludePathEntry(incFolder, ICSettingEntry.LOCAL); // #include "..."
- CIncludePathEntry includeLocalPathEntry2 = new CIncludePathEntry(incFolder2, ICSettingEntry.LOCAL); // #include "..."
- CIncludePathEntry includePathEntry2 = new CIncludePathEntry(incFolder2, 0);
-
- List<ICLanguageSettingEntry> entries = new ArrayList<ICLanguageSettingEntry>();
- entries.add(includePathEntry);
- entries.add(includeLocalPathEntry);
- // reverse order for incPath2
- entries.add(includeLocalPathEntry2);
- entries.add(includePathEntry2);
-
- // add provider to the configuration
- ILanguageSettingsProvider provider = new MockProvider(PROVIDER_ID, PROVIDER_NAME, entries);
- List<ILanguageSettingsProvider> providers = new ArrayList<ILanguageSettingsProvider>();
- providers.add(provider);
- ((ILanguageSettingsProvidersKeeper) cfgDescription).setLanguageSettingProviders(providers);
-
- // set project description
- CProjectDescriptionManager.getInstance().setProjectDescription(project, prjDescription);
-
- // test that the scannerInfoProvider gets the entries
- LanguageSettingsScannerInfoProvider scannerInfoProvider = new LanguageSettingsScannerInfoProvider();
- ExtendedScannerInfo info = scannerInfoProvider.getScannerInformation(file);
- String[] actualIncludePaths = info.getIncludePaths();
- String[] actualLocalIncludePath = info.getLocalIncludePath();
- // include paths
- assertEquals(incFolder.getLocation(), new Path(actualIncludePaths[0]));
- assertEquals(incFolder2.getLocation(), new Path(actualIncludePaths[1]));
- assertEquals(2, actualIncludePaths.length);
- // local include files
- assertEquals(incFolder.getLocation(), new Path(actualLocalIncludePath[0]));
- assertEquals(incFolder2.getLocation(), new Path(actualLocalIncludePath[1]));
- assertEquals(2, actualLocalIncludePath.length);
- }
-
- /**
- * Test Mac frameworks.
- */
- public void testFramework() throws Exception {
- // create a project
- IProject project = ResourceHelper.createCDTProjectWithConfig(getName());
- ICProjectDescription prjDescription = CProjectDescriptionManager.getInstance().getProjectDescription(project, WRITEABLE);
- assertNotNull(prjDescription);
- ICConfigurationDescription cfgDescription = prjDescription.getDefaultSettingConfiguration();
- assertNotNull(cfgDescription);
- assertTrue(cfgDescription instanceof ILanguageSettingsProvidersKeeper);
-
- // sample file
- IFile file = ResourceHelper.createFile(project, "file.c");
-
- // contribute the entries
- IFolder frameworkFolder = ResourceHelper.createFolder(project, "Fmwk");
- CIncludePathEntry frameworkPathEntry = new CIncludePathEntry(frameworkFolder, ICSettingEntry.FRAMEWORKS_MAC);
-
- List<ICLanguageSettingEntry> entries = new ArrayList<ICLanguageSettingEntry>();
- entries.add(frameworkPathEntry);
-
- // add provider to the configuration
- ILanguageSettingsProvider provider = new MockProvider(PROVIDER_ID, PROVIDER_NAME, entries);
- List<ILanguageSettingsProvider> providers = new ArrayList<ILanguageSettingsProvider>();
- providers.add(provider);
- ((ILanguageSettingsProvidersKeeper) cfgDescription).setLanguageSettingProviders(providers);
-
- // set project description
- CProjectDescriptionManager.getInstance().setProjectDescription(project, prjDescription);
-
- // test that the scannerInfoProvider gets the entries
- LanguageSettingsScannerInfoProvider scannerInfoProvider = new LanguageSettingsScannerInfoProvider();
- ExtendedScannerInfo info = scannerInfoProvider.getScannerInformation(file);
- String[] actualIncludePaths = info.getIncludePaths();
- // include paths
- assertEquals(frameworkFolder.getLocation().append("/__framework__.framework/Headers/__header__"),
- new Path(actualIncludePaths[0]));
- assertEquals(frameworkFolder.getLocation().append("/__framework__.framework/PrivateHeaders/__header__"),
- new Path(actualIncludePaths[1]));
- assertEquals(2, actualIncludePaths.length);
- }
-
- /**
- * Test duplicate entries.
- */
- public void testDuplicate() throws Exception {
- // create a project
- IProject project = ResourceHelper.createCDTProjectWithConfig(getName());
- ICProjectDescription prjDescription = CProjectDescriptionManager.getInstance().getProjectDescription(project, WRITEABLE);
- assertNotNull(prjDescription);
- ICConfigurationDescription cfgDescription = prjDescription.getDefaultSettingConfiguration();
- assertNotNull(cfgDescription);
- assertTrue(cfgDescription instanceof ILanguageSettingsProvidersKeeper);
-
- // sample file
- IFile file = ResourceHelper.createFile(project, "file.c");
-
- // contribute the entries
- IFolder incFolder = ResourceHelper.createFolder(project, "include");
- CIncludePathEntry includePathEntry = new CIncludePathEntry(incFolder, 0);
- CIncludePathEntry includeLocalPathEntry = new CIncludePathEntry(incFolder, ICSettingEntry.LOCAL); // #include "..."
- CIncludePathEntry includePathEntry2 = new CIncludePathEntry(incFolder, 0);
- CIncludePathEntry includeLocalPathEntry2 = new CIncludePathEntry(incFolder, ICSettingEntry.LOCAL); // #include "..."
-
- List<ICLanguageSettingEntry> entries = new ArrayList<ICLanguageSettingEntry>();
- entries.add(includePathEntry);
- entries.add(includeLocalPathEntry);
- entries.add(includePathEntry2);
- entries.add(includeLocalPathEntry2);
-
- // add provider to the configuration
- ILanguageSettingsProvider provider = new MockProvider(PROVIDER_ID, PROVIDER_NAME, entries);
- List<ILanguageSettingsProvider> providers = new ArrayList<ILanguageSettingsProvider>();
- providers.add(provider);
- ((ILanguageSettingsProvidersKeeper) cfgDescription).setLanguageSettingProviders(providers);
-
- // set project description
- CProjectDescriptionManager.getInstance().setProjectDescription(project, prjDescription);
-
- // test that the scannerInfoProvider gets the entries
- LanguageSettingsScannerInfoProvider scannerInfoProvider = new LanguageSettingsScannerInfoProvider();
- ExtendedScannerInfo info = scannerInfoProvider.getScannerInformation(file);
- String[] actualIncludePaths = info.getIncludePaths();
- String[] actualLocalIncludePath = info.getLocalIncludePath();
- // include paths
- assertEquals(incFolder.getLocation(), new Path(actualIncludePaths[0]));
- assertEquals(1, actualIncludePaths.length);
- // local include files
- assertEquals(incFolder.getLocation(), new Path(actualLocalIncludePath[0]));
- assertEquals(1, actualLocalIncludePath.length);
- }
-
- /**
- * Test include path managed by eclipse as a workspace path.
- */
- public void testWorkspacePath() throws Exception {
- // create a project
- IProject project = ResourceHelper.createCDTProjectWithConfig(getName());
- ICProjectDescription prjDescription = CProjectDescriptionManager.getInstance().getProjectDescription(project, WRITEABLE);
- assertNotNull(prjDescription);
- ICConfigurationDescription cfgDescription = prjDescription.getDefaultSettingConfiguration();
- assertNotNull(cfgDescription);
- assertTrue(cfgDescription instanceof ILanguageSettingsProvidersKeeper);
-
- // create sample file
- IFile file = ResourceHelper.createFile(project, "file.c");
- // eclipse-managed folder in workspace
- IFolder incWorkspace_1 = ResourceHelper.createFolder(project, "include_1");
- IPath incWorkspaceLocation_1 = incWorkspace_1.getLocation();
- IFolder incWorkspace_2 = ResourceHelper.createFolder(project, "include_2");
- IPath incWorkspacePath_2 = incWorkspace_2.getFullPath();
- IPath incWorkspaceLocation_2 = incWorkspace_2.getLocation();
- IFolder incWorkspace_3 = ResourceHelper.createFolder(project, "include_3");
- // "relative" should make no difference for VALUE_WORKSPACE_PATH
- IPath incWorkspaceRelativePath_3 = incWorkspace_3.getFullPath().makeRelative();
- IPath incWorkspaceLocation_3 = incWorkspace_3.getLocation();
- // not having "RESOLVED" should make no difference for well formed path
- IFolder incWorkspace_4 = ResourceHelper.createFolder(project, "include_4");
- IPath incWorkspacePathNoResolved_4 = incWorkspace_4.getFullPath();
- IPath incWorkspaceLocation_4 = incWorkspace_4.getLocation();
- // folder defined by absolute path on the filesystem
- IPath incFilesystem = ResourceHelper.createWorkspaceFolder("includeFilesystem");
-
- // contribute the entries
- CIncludePathEntry incWorkspaceEntry_1 = new CIncludePathEntry(incWorkspace_1, 0);
- CIncludePathEntry incWorkspaceEntry_2 = new CIncludePathEntry(incWorkspacePath_2, ICSettingEntry.VALUE_WORKSPACE_PATH | ICSettingEntry.RESOLVED);
- CIncludePathEntry incWorkspaceEntry_3 = new CIncludePathEntry(incWorkspaceRelativePath_3, ICSettingEntry.VALUE_WORKSPACE_PATH | ICSettingEntry.RESOLVED);
- CIncludePathEntry incWorkspaceEntry_4 = new CIncludePathEntry(incWorkspacePathNoResolved_4, ICSettingEntry.VALUE_WORKSPACE_PATH);
- CIncludePathEntry incFilesystemEntry = new CIncludePathEntry(incFilesystem, 0);
-
- List<ICLanguageSettingEntry> entries = new ArrayList<ICLanguageSettingEntry>();
- entries.add(incWorkspaceEntry_1);
- entries.add(incWorkspaceEntry_2);
- entries.add(incWorkspaceEntry_3);
- entries.add(incWorkspaceEntry_4);
- entries.add(incFilesystemEntry);
-
- // add provider to the configuration
- ILanguageSettingsProvider provider = new MockProvider(PROVIDER_ID, PROVIDER_NAME, entries);
- List<ILanguageSettingsProvider> providers = new ArrayList<ILanguageSettingsProvider>();
- providers.add(provider);
- ((ILanguageSettingsProvidersKeeper) cfgDescription).setLanguageSettingProviders(providers);
-
- // set project description
- CProjectDescriptionManager.getInstance().setProjectDescription(project, prjDescription);
-
- // test the entries received from the scannerInfoProvider
- LanguageSettingsScannerInfoProvider scannerInfoProvider = new LanguageSettingsScannerInfoProvider();
- ExtendedScannerInfo info = scannerInfoProvider.getScannerInformation(file);
- String[] actualIncludePaths = info.getIncludePaths();
-
- assertEquals(incWorkspaceLocation_1, new Path(actualIncludePaths[0]));
- assertEquals(incWorkspaceLocation_2, new Path(actualIncludePaths[1]));
- assertEquals(incWorkspaceLocation_3, new Path(actualIncludePaths[2]));
- assertEquals(incWorkspaceLocation_4, new Path(actualIncludePaths[3]));
- assertEquals(incFilesystem, new Path(actualIncludePaths[4]));
- assertEquals(5, actualIncludePaths.length);
-
- }
-
- /**
- * Confirm that device letter is prepended on filesystems that support that.
- */
- public void testFilesystemPathNoDriveLetter() throws Exception {
- // create a project
- IProject project = ResourceHelper.createCDTProjectWithConfig(getName());
- // change drive on build working directory
- String buildCwdDevice = project.getLocation().getDevice();
-
-// // Test manually with a device which is different from project location device (path should exist)
-// IPath buildCWD = new Path("D:/build/path");
-// String buildCwdDevice = buildCWD.getDevice();
-
- // get project/configuration descriptions
- ICProjectDescription prjDescription = CProjectDescriptionManager.getInstance().getProjectDescription(project, WRITEABLE);
- assertNotNull(prjDescription);
- ICConfigurationDescription cfgDescription = prjDescription.getDefaultSettingConfiguration();
- assertNotNull(cfgDescription);
- assertTrue(cfgDescription instanceof ILanguageSettingsProvidersKeeper);
-
- // create sample file
- IFile file = ResourceHelper.createFile(project, "file.c");
-
- // contribute the entries
- // no-drive-letter folder defined by absolute path on the filesystem
- IPath incFilesystem = ResourceHelper.createWorkspaceFolder("includeFilesystem").setDevice(null);
- CIncludePathEntry incFilesystemEntry = new CIncludePathEntry(incFilesystem, 0);
- List<ICLanguageSettingEntry> entries = new ArrayList<ICLanguageSettingEntry>();
- entries.add(incFilesystemEntry);
-
- // add provider to the configuration
- ILanguageSettingsProvider provider = new MockProvider(PROVIDER_ID, PROVIDER_NAME, entries);
- List<ILanguageSettingsProvider> providers = new ArrayList<ILanguageSettingsProvider>();
- providers.add(provider);
- ((ILanguageSettingsProvidersKeeper) cfgDescription).setLanguageSettingProviders(providers);
-
- // set project description
- CProjectDescriptionManager.getInstance().setProjectDescription(project, prjDescription);
-
- // test the entries received from the scannerInfoProvider
- LanguageSettingsScannerInfoProvider scannerInfoProvider = new LanguageSettingsScannerInfoProvider();
- ExtendedScannerInfo info = scannerInfoProvider.getScannerInformation(file);
- String[] actualIncludePaths = info.getIncludePaths();
-
- IPath expectedInclude = incFilesystem.setDevice(buildCwdDevice);
- assertEquals(expectedInclude, new Path(actualIncludePaths[0]));
- assertEquals(1, actualIncludePaths.length);
- }
-
- /**
- * Test relative paths.
- */
- public void testRelativePath() throws Exception {
- // create a project
- String prjName = getName();
- IProject project = ResourceHelper.createCDTProjectWithConfig(prjName);
- String relativePath = "include";
- IFolder buildFolder = ResourceHelper.createFolder(project, "buildDir");
- IFolder relativeFolder = ResourceHelper.createFolder(project, "buildDir/"+relativePath);
- IFolder relativeFolderProjName = ResourceHelper.createFolder(project, "buildDir/"+prjName);
- String markedResolved = "-MarkedResolved";
- IFolder relativeFolderProjNameResolved = ResourceHelper.createFolder(project, "buildDir/" + prjName+markedResolved);
- IPath buildCWD=buildFolder.getLocation();
- setBuilderCWD(project, buildCWD);
-
- // get project/configuration descriptions
- ICProjectDescription prjDescription = CProjectDescriptionManager.getInstance().getProjectDescription(project, WRITEABLE);
- assertNotNull(prjDescription);
- ICConfigurationDescription cfgDescription = prjDescription.getDefaultSettingConfiguration();
- assertNotNull(cfgDescription);
- assertTrue(cfgDescription instanceof ILanguageSettingsProvidersKeeper);
-
- // create sample file
- IFile file = ResourceHelper.createFile(project, "file.c");
-
- // contribute the entries
- CIncludePathEntry incRelativeEntry = new CIncludePathEntry(new Path(relativePath), 0);
- CIncludePathEntry incProjNameEntry = new CIncludePathEntry(new Path("${ProjName}"), 0);
- CIncludePathEntry incProjNameMarkedResolvedEntry = new CIncludePathEntry(new Path("${ProjName}"+markedResolved), ICSettingEntry.RESOLVED);
- List<ICLanguageSettingEntry> entries = new ArrayList<ICLanguageSettingEntry>();
- entries.add(incRelativeEntry);
- entries.add(incProjNameEntry);
- entries.add(incProjNameMarkedResolvedEntry);
-
- // add provider to the configuration
- ILanguageSettingsProvider provider = new MockProvider(PROVIDER_ID, PROVIDER_NAME, entries);
- List<ILanguageSettingsProvider> providers = new ArrayList<ILanguageSettingsProvider>();
- providers.add(provider);
- ((ILanguageSettingsProvidersKeeper) cfgDescription).setLanguageSettingProviders(providers);
-
- // set project description
- CProjectDescriptionManager.getInstance().setProjectDescription(project, prjDescription);
-
- // test the entries received from the scannerInfoProvider
- LanguageSettingsScannerInfoProvider scannerInfoProvider = new LanguageSettingsScannerInfoProvider();
- ExtendedScannerInfo info = scannerInfoProvider.getScannerInformation(file);
- String[] actualIncludePaths = info.getIncludePaths();
-
- // pair of entries, one from build dir another relative path
- assertEquals(relativeFolder.getLocation(), new Path(actualIncludePaths[0]));
- assertEquals(new Path(relativePath), new Path(actualIncludePaths[1]));
-
- // pair of entries, one resolved from build dir another expanded relative path
- assertEquals(relativeFolderProjName.getLocation(), new Path(actualIncludePaths[2]));
- assertEquals(new Path(prjName), new Path(actualIncludePaths[3]));
-
- // if marked RESOLVED only that path stays
- assertEquals(new Path("${ProjName}"+markedResolved), new Path(actualIncludePaths[4]));
-
- assertEquals(5, actualIncludePaths.length);
- }
-
- /**
- * Test relative paths - some combinations of dot paths.
- */
- public void testRelativePathWithDots() throws Exception {
- // create a project
- IProject project = ResourceHelper.createCDTProjectWithConfig(getName());
- // set build CWD
- IFolder buildFolder = ResourceHelper.createFolder(project, "buildDir");
- IPath buildCWD=buildFolder.getLocation();
- setBuilderCWD(project, buildCWD);
-
- // define a few variations of paths
- String relativePath_dot = ".";
- String relativePath_dot_slash = "./";
- String relativePath_dot_slash_path = "./include";
- IFolder relativeFolder_dot_slash_path = ResourceHelper.createFolder(project, "buildDir/include");
- String relativePath_dotdot = "..";
- String relativePath_dotdot_slash = "../";
- String relativePath_dotdot_slash_path = "../include";
- IFolder relativeFolder_dotdot_slash_path = ResourceHelper.createFolder(project, "include");
- String locationPath_dotdot_path = buildCWD.toString()+"/../include2";
- IFolder incFolder_dotdot_slash_path = ResourceHelper.createFolder(project, "include2"); // "/ProjPath/buildDir/../include2"
-
- // get project/configuration descriptions
- ICProjectDescription prjDescription = CProjectDescriptionManager.getInstance().getProjectDescription(project, WRITEABLE);
- assertNotNull(prjDescription);
- ICConfigurationDescription cfgDescription = prjDescription.getDefaultSettingConfiguration();
- assertNotNull(cfgDescription);
- assertTrue(cfgDescription instanceof ILanguageSettingsProvidersKeeper);
-
- // create sample file
- IFile file = ResourceHelper.createFile(project, "file.c");
-
- // contribute the entries
- CIncludePathEntry incRelativeEntry_dot = new CIncludePathEntry(new Path(relativePath_dot), 0);
- CIncludePathEntry incRelativeEntry_dot_slash_path = new CIncludePathEntry(new Path(relativePath_dot_slash_path), 0);
- CIncludePathEntry incRelativeEntry_dotdot = new CIncludePathEntry(new Path(relativePath_dotdot), 0);
- CIncludePathEntry incRelativeEntry_dotdot_slash_path = new CIncludePathEntry(new Path(relativePath_dotdot_slash_path), 0);
- CIncludePathEntry incEntry_dotdot_path = new CIncludePathEntry(locationPath_dotdot_path, 0);
- // use LOCAL flag not to clash with plain dot entries
- CIncludePathEntry incRelativeEntry_dotdot_slash = new CIncludePathEntry(new Path(relativePath_dotdot_slash), ICSettingEntry.LOCAL);
- CIncludePathEntry incRelativeEntry_dot_slash = new CIncludePathEntry(new Path(relativePath_dot_slash), ICSettingEntry.LOCAL);
-
- List<ICLanguageSettingEntry> entries = new ArrayList<ICLanguageSettingEntry>();
- entries.add(incRelativeEntry_dot);
- entries.add(incRelativeEntry_dot_slash);
- entries.add(incRelativeEntry_dot_slash_path);
- entries.add(incRelativeEntry_dotdot);
- entries.add(incRelativeEntry_dotdot_slash);
- entries.add(incRelativeEntry_dotdot_slash_path);
- entries.add(incEntry_dotdot_path);
-
- // add provider to the configuration
- ILanguageSettingsProvider provider = new MockProvider(PROVIDER_ID, PROVIDER_NAME, entries);
- List<ILanguageSettingsProvider> providers = new ArrayList<ILanguageSettingsProvider>();
- providers.add(provider);
- ((ILanguageSettingsProvidersKeeper) cfgDescription).setLanguageSettingProviders(providers);
-
- // set project description
- CProjectDescriptionManager.getInstance().setProjectDescription(project, prjDescription);
-
- // test the entries received from the scannerInfoProvider
- LanguageSettingsScannerInfoProvider scannerInfoProvider = new LanguageSettingsScannerInfoProvider();
- ExtendedScannerInfo info = scannerInfoProvider.getScannerInformation(file);
- String[] actualIncludePaths = info.getIncludePaths();
- String[] actualLocalIncludePaths = info.getLocalIncludePath();
-
- IPath expectedLocation_dot = buildFolder.getLocation();
- IPath expectedLocation_dot_slash = buildFolder.getLocation();
- IPath expectedLocation_dot_slash_path = relativeFolder_dot_slash_path.getLocation();
- IPath expectedLocation_dotdot = project.getLocation();
- IPath expectedLocation_dotdot_slash = project.getLocation();
- IPath expectedLocation_dotdot_slash_path = relativeFolder_dotdot_slash_path.getLocation();
-
- assertEquals(expectedLocation_dot, new Path(actualIncludePaths[0]));
- assertEquals(".", actualIncludePaths[1]);
- assertEquals(expectedLocation_dot_slash_path, new Path(actualIncludePaths[2]));
- assertEquals(new Path(relativePath_dot_slash_path), new Path(actualIncludePaths[3]));
-
- assertEquals(expectedLocation_dotdot, new Path(actualIncludePaths[4]));
- assertEquals("..", actualIncludePaths[5]);
- assertEquals(expectedLocation_dotdot_slash_path, new Path(actualIncludePaths[6]));
- assertEquals(new Path(relativePath_dotdot_slash_path), new Path(actualIncludePaths[7]));
- assertTrue(actualIncludePaths[7].startsWith(".."));
- assertEquals(new Path(locationPath_dotdot_path), new Path(actualIncludePaths[8]));
- assertTrue(actualIncludePaths[8].contains(".."));
- assertEquals(9, actualIncludePaths.length);
-
- assertEquals(expectedLocation_dot_slash, new Path(actualLocalIncludePaths[0]));
- assertEquals(new Path(relativePath_dot_slash), new Path(actualLocalIncludePaths[1]));
- assertTrue(actualLocalIncludePaths[1].startsWith("."));
- assertEquals(expectedLocation_dotdot_slash, new Path(actualLocalIncludePaths[2]));
- assertEquals(new Path(relativePath_dotdot_slash), new Path(actualLocalIncludePaths[3]));
- assertTrue(actualLocalIncludePaths[3].startsWith(".."));
- assertEquals(4, actualLocalIncludePaths.length);
- }
-
- /**
- * Test if build/environment variables are expanded
- */
- public void testEnvironmentVars() throws Exception {
- // create a project
- IProject project = ResourceHelper.createCDTProjectWithConfig(getName());
- IFolder folder = ResourceHelper.createFolder(project, "Folder");
- String envPathStr = "${ProjDirPath}/Folder";
-
- // get project/configuration descriptions
- ICProjectDescription prjDescription = CProjectDescriptionManager.getInstance().getProjectDescription(project, WRITEABLE);
- assertNotNull(prjDescription);
- ICConfigurationDescription cfgDescription = prjDescription.getDefaultSettingConfiguration();
- assertNotNull(cfgDescription);
- assertTrue(cfgDescription instanceof ILanguageSettingsProvidersKeeper);
-
- // create sample file
- IFile file = ResourceHelper.createFile(project, "file.c");
-
- // contribute the entries
- CIncludePathEntry incRelativeEntry = new CIncludePathEntry(envPathStr, 0);
- List<ICLanguageSettingEntry> entries = new ArrayList<ICLanguageSettingEntry>();
- entries.add(incRelativeEntry);
-
- // add provider to the configuration
- ILanguageSettingsProvider provider = new MockProvider(PROVIDER_ID, PROVIDER_NAME, entries);
- List<ILanguageSettingsProvider> providers = new ArrayList<ILanguageSettingsProvider>();
- providers.add(provider);
- ((ILanguageSettingsProvidersKeeper) cfgDescription).setLanguageSettingProviders(providers);
-
- // set project description
- CProjectDescriptionManager.getInstance().setProjectDescription(project, prjDescription);
-
- // test the entries received from the scannerInfoProvider
- LanguageSettingsScannerInfoProvider scannerInfoProvider = new LanguageSettingsScannerInfoProvider();
- ExtendedScannerInfo info = scannerInfoProvider.getScannerInformation(file);
- String[] actualIncludePaths = info.getIncludePaths();
-
- IPath expectedLocation = folder.getLocation();
- assertEquals(expectedLocation, new Path(actualIncludePaths[0]));
- assertEquals(1, actualIncludePaths.length);
- }
-
- /**
- * Test from parent folder's entries.
- */
- public void testParentFolder() throws Exception {
- class MockProviderForResource extends LanguageSettingsBaseProvider implements ILanguageSettingsProvider {
- private IResource rc;
- private final List<ICLanguageSettingEntry> entries;
-
- public MockProviderForResource(IResource rc, List<ICLanguageSettingEntry> entries) {
- this.rc = rc;
- this.entries = entries;
- }
-
- @Override
- public List<ICLanguageSettingEntry> getSettingEntries(ICConfigurationDescription cfgDescription, IResource rc, String languageId) {
- if (this.rc.equals(rc))
- return entries;
- return null;
- }
- }
-
- // create a project
- IProject project = ResourceHelper.createCDTProjectWithConfig(getName());
- ICProjectDescription prjDescription = CProjectDescriptionManager.getInstance().getProjectDescription(project, WRITEABLE);
- assertNotNull(prjDescription);
- ICConfigurationDescription cfgDescription = prjDescription.getDefaultSettingConfiguration();
- assertNotNull(cfgDescription);
- assertTrue(cfgDescription instanceof ILanguageSettingsProvidersKeeper);
-
- // sample file
- IFolder parentFolder = ResourceHelper.createFolder(project, "ParentFolder");
- IFile file = ResourceHelper.createFile(project, "ParentFolder/file.c");
-
- // contribute the entries
- IFolder incFolder = ResourceHelper.createFolder(project, "include");
- CIncludePathEntry includePathEntry = new CIncludePathEntry(incFolder, 0);
-
- List<ICLanguageSettingEntry> entries = new ArrayList<ICLanguageSettingEntry>();
- entries.add(includePathEntry);
-
- // add provider for parent folder
- ILanguageSettingsProvider provider = new MockProviderForResource(parentFolder, entries);
- assertNull(provider.getSettingEntries(cfgDescription, file, null));
- assertEquals(includePathEntry, provider.getSettingEntries(cfgDescription, parentFolder, null).get(0));
-
- List<ILanguageSettingsProvider> providers = new ArrayList<ILanguageSettingsProvider>();
- providers.add(provider);
- ((ILanguageSettingsProvidersKeeper) cfgDescription).setLanguageSettingProviders(providers);
-
- // set project description
- CProjectDescriptionManager.getInstance().setProjectDescription(project, prjDescription);
-
- // test that the scannerInfoProvider gets the entries for
- LanguageSettingsScannerInfoProvider scannerInfoProvider = new LanguageSettingsScannerInfoProvider();
- ExtendedScannerInfo info = scannerInfoProvider.getScannerInformation(file);
- String[] actualIncludePaths = info.getIncludePaths();
- // include paths
- assertEquals(incFolder.getLocation(), new Path(actualIncludePaths[0]));
- assertEquals(1, actualIncludePaths.length);
- }
-
- /**
- * Test resolved paths.
- */
- public void testResolvedPath() throws Exception {
- // create a project
- IProject project = ResourceHelper.createCDTProjectWithConfig(getName());
- IFolder folder = ResourceHelper.createFolder(project, "Folder");
- String envPathStr = "${ProjDirPath}/Folder";
-
- // get project/configuration descriptions
- ICProjectDescription prjDescription = CProjectDescriptionManager.getInstance().getProjectDescription(project, WRITEABLE);
- assertNotNull(prjDescription);
- ICConfigurationDescription cfgDescription = prjDescription.getDefaultSettingConfiguration();
- assertNotNull(cfgDescription);
- assertTrue(cfgDescription instanceof ILanguageSettingsProvidersKeeper);
-
- // create sample file
- IFile file = ResourceHelper.createFile(project, "file.c");
-
- // contribute the entries
- CIncludePathEntry incRelativeEntry = new CIncludePathEntry(envPathStr, ICSettingEntry.RESOLVED);
- List<ICLanguageSettingEntry> entries = new ArrayList<ICLanguageSettingEntry>();
- entries.add(incRelativeEntry);
-
- // add provider to the configuration
- ILanguageSettingsProvider provider = new MockProvider(PROVIDER_ID, PROVIDER_NAME, entries);
- List<ILanguageSettingsProvider> providers = new ArrayList<ILanguageSettingsProvider>();
- providers.add(provider);
- ((ILanguageSettingsProvidersKeeper) cfgDescription).setLanguageSettingProviders(providers);
-
- // set project description
- CProjectDescriptionManager.getInstance().setProjectDescription(project, prjDescription);
-
- // test the entries received from the scannerInfoProvider
- LanguageSettingsScannerInfoProvider scannerInfoProvider = new LanguageSettingsScannerInfoProvider();
- ExtendedScannerInfo info = scannerInfoProvider.getScannerInformation(file);
- String[] actualIncludePaths = info.getIncludePaths();
-
- // test that RESOLVED entries are not modified
- IPath expectedLocation = new Path(envPathStr);
- assertEquals(expectedLocation, new Path(actualIncludePaths[0]));
- assertEquals(1, actualIncludePaths.length);
- }
-
- /**
- * Get languages for the folder.
- */
- private List<String> getLanguages(IFolder folder, ICConfigurationDescription cfgDescription) {
- IPath rcPath = folder.getProjectRelativePath();
- ICFolderDescription rcDes = (ICFolderDescription) cfgDescription.getResourceDescription(rcPath, false);
- ICLanguageSetting[] langSettings = rcDes.getLanguageSettings();
- assertNotNull(langSettings);
-
- List<String> languageIds = new ArrayList<String>();
- for (ICLanguageSetting ls : langSettings) {
- String langId = ls.getLanguageId();
- if (langId!=null && !languageIds.contains(langId)) {
- languageIds.add(langId);
- }
- }
- return languageIds;
- }
-
- /**
- * Test composition of 2 languages.
- */
- public void testResourceLanguages() throws Exception {
- class MockProviderLang extends LanguageSettingsBaseProvider implements ILanguageSettingsProvider {
- private final String langId;
- private final List<ICLanguageSettingEntry> entries;
-
- public MockProviderLang(String id, String name, String langId, List<ICLanguageSettingEntry> entries) {
- super(id, name);
- this.langId = langId;
- this.entries = entries;
- }
-
- @Override
- public List<ICLanguageSettingEntry> getSettingEntries(ICConfigurationDescription cfgDescription, IResource rc, String languageId) {
- if (langId==null || langId.equals(languageId))
- return entries;
- return new ArrayList<ICLanguageSettingEntry>();
- }
- }
-
- // create a project
- IProject project = ResourceHelper.createCDTProjectWithConfig(getName());
- IFolder folder = ResourceHelper.createFolder(project, "Folder");
-
- IFolder incFolderA = ResourceHelper.createFolder(project, "includeA");
- IFolder incFolderB = ResourceHelper.createFolder(project, "includeB");
- IFolder incFolderC = ResourceHelper.createFolder(project, "includeC");
-
- // get project/configuration descriptions
- ICProjectDescription prjDescription = CProjectDescriptionManager.getInstance().getProjectDescription(project, WRITEABLE);
- assertNotNull(prjDescription);
- ICConfigurationDescription cfgDescription = prjDescription.getDefaultSettingConfiguration();
- assertNotNull(cfgDescription);
- assertTrue(cfgDescription instanceof ILanguageSettingsProvidersKeeper);
-
- // find 2 languages applicable to the folder
- List<String> languageIds = getLanguages(folder, cfgDescription);
- assertTrue(languageIds.size() >= 2);
- String langId1 = languageIds.get(0);
- String langId2 = languageIds.get(1);
-
- // define overlapping entries
- CIncludePathEntry incEntryA = new CIncludePathEntry(incFolderA, 0);
- CIncludePathEntry incEntryB = new CIncludePathEntry(incFolderB, 0);
- CIncludePathEntry incEntryC = new CIncludePathEntry(incFolderC, 0);
- List<ICLanguageSettingEntry> entries1 = new ArrayList<ICLanguageSettingEntry>();
- entries1.add(incEntryA);
- entries1.add(incEntryB);
- List<ICLanguageSettingEntry> entries2 = new ArrayList<ICLanguageSettingEntry>();
- entries2.add(incEntryC);
- entries2.add(incEntryB);
-
- // add providers to the configuration
- ILanguageSettingsProvider provider1 = new MockProviderLang(PROVIDER_ID, PROVIDER_NAME, langId1, entries1);
- ILanguageSettingsProvider provider2 = new MockProviderLang(PROVIDER_ID_2, PROVIDER_NAME, langId2, entries2);
- List<ILanguageSettingsProvider> providers = new ArrayList<ILanguageSettingsProvider>();
- providers.add(provider1);
- providers.add(provider2);
- ((ILanguageSettingsProvidersKeeper) cfgDescription).setLanguageSettingProviders(providers);
-
- // set project description
- CProjectDescriptionManager.getInstance().setProjectDescription(project, prjDescription);
-
- // test the entries received from the scannerInfoProvider
- LanguageSettingsScannerInfoProvider scannerInfoProvider = new LanguageSettingsScannerInfoProvider();
- ExtendedScannerInfo info = scannerInfoProvider.getScannerInformation(folder);
- String[] actualIncludePaths = info.getIncludePaths();
-
- // Test that the result is the union of entries
- assertEquals(incFolderA.getLocation(), new Path(actualIncludePaths[0]));
- assertEquals(incFolderB.getLocation(), new Path(actualIncludePaths[1]));
- assertEquals(incFolderC.getLocation(), new Path(actualIncludePaths[2]));
- assertEquals(3, actualIncludePaths.length);
- }
-
-}
+/*******************************************************************************
+ * Copyright (c) 2009, 2012 Andrew Gvozdev and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Andrew Gvozdev - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.cdt.core.language.settings.providers;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+import junit.framework.TestSuite;
+
+import org.eclipse.cdt.core.model.ILanguage;
+import org.eclipse.cdt.core.model.LanguageManager;
+import org.eclipse.cdt.core.parser.ExtendedScannerInfo;
+import org.eclipse.cdt.core.settings.model.CIncludeFileEntry;
+import org.eclipse.cdt.core.settings.model.CIncludePathEntry;
+import org.eclipse.cdt.core.settings.model.CMacroEntry;
+import org.eclipse.cdt.core.settings.model.CMacroFileEntry;
+import org.eclipse.cdt.core.settings.model.ICConfigurationDescription;
+import org.eclipse.cdt.core.settings.model.ICFolderDescription;
+import org.eclipse.cdt.core.settings.model.ICLanguageSetting;
+import org.eclipse.cdt.core.settings.model.ICLanguageSettingEntry;
+import org.eclipse.cdt.core.settings.model.ICProjectDescription;
+import org.eclipse.cdt.core.settings.model.ICSettingEntry;
+import org.eclipse.cdt.core.testplugin.ResourceHelper;
+import org.eclipse.cdt.core.testplugin.util.BaseTestCase;
+import org.eclipse.cdt.internal.core.language.settings.providers.LanguageSettingsScannerInfoProvider;
+import org.eclipse.cdt.internal.core.settings.model.CProjectDescriptionManager;
+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.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Path;
+
+/**
+ * Test cases testing LanguageSettingsProvider functionality
+ */
+public class LanguageSettingsScannerInfoProviderTests extends BaseTestCase {
+ private static final IFile FAKE_FILE = ResourcesPlugin.getWorkspace().getRoot().getFile(new Path("/project/path0"));
+ private static final String PROVIDER_ID = "test.provider.id";
+ private static final String PROVIDER_ID_2 = "test.provider.id.2";
+ private static final String PROVIDER_NAME = "test.provider.name";
+
+ // constants for getProjectDescription()
+ private static final boolean READ_ONLY = false;
+ private static final boolean WRITEABLE = true;
+
+ private class MockProvider extends LanguageSettingsBaseProvider implements ILanguageSettingsProvider {
+ private final List<ICLanguageSettingEntry> entries;
+
+ public MockProvider(String id, String name, List<ICLanguageSettingEntry> entries) {
+ super(id, name);
+ this.entries = entries;
+ }
+
+ @Override
+ public List<ICLanguageSettingEntry> getSettingEntries(ICConfigurationDescription cfgDescription, IResource rc, String languageId) {
+ return entries;
+ }
+ }
+
+ /**
+ * Constructor.
+ * @param name - name of the test.
+ */
+ public LanguageSettingsScannerInfoProviderTests(String name) {
+ super(name);
+
+ }
+
+ @Override
+ protected void setUp() throws Exception {
+ super.setUp();
+ }
+
+ @Override
+ protected void tearDown() throws Exception {
+ super.tearDown(); // includes ResourceHelper cleanup
+ }
+
+ /**
+ * @return - new TestSuite.
+ */
+ public static TestSuite suite() {
+ return new TestSuite(LanguageSettingsScannerInfoProviderTests.class);
+ }
+
+ /**
+ * main function of the class.
+ *
+ * @param args - arguments
+ */
+ public static void main(String[] args) {
+ junit.textui.TestRunner.run(suite());
+ }
+
+ /**
+ * Sets build working directory for DefaultSettingConfiguration being tested.
+ */
+ private void setBuilderCWD(IProject project, IPath buildCWD) throws CoreException {
+ CProjectDescriptionManager manager = CProjectDescriptionManager.getInstance();
+ {
+ ICProjectDescription prjDescription = manager.getProjectDescription(project, WRITEABLE);
+ assertNotNull(prjDescription);
+ ICConfigurationDescription cfgDescription = prjDescription.getDefaultSettingConfiguration();
+ assertNotNull(cfgDescription);
+
+ cfgDescription.getBuildSetting().setBuilderCWD(buildCWD);
+ manager.setProjectDescription(project, prjDescription);
+ // doublecheck builderCWD
+ IPath actualBuildCWD = cfgDescription.getBuildSetting().getBuilderCWD();
+ assertEquals(buildCWD, actualBuildCWD);
+ }
+ {
+ // triplecheck builderCWD for different project/configuration descriptions
+ ICProjectDescription prjDescription = CProjectDescriptionManager.getInstance().getProjectDescription(project, READ_ONLY);
+ assertNotNull(prjDescription);
+ ICConfigurationDescription cfgDescription = prjDescription.getDefaultSettingConfiguration();
+ assertNotNull(cfgDescription);
+
+ }
+ }
+
+ /**
+ * Test cases when some objects are null.
+ */
+ public void testNulls() throws Exception {
+ {
+ // Handle project==null
+ IResource root = ResourcesPlugin.getWorkspace().getRoot();
+ assertNull(root.getProject());
+
+ LanguageSettingsScannerInfoProvider scannerInfoProvider = new LanguageSettingsScannerInfoProvider();
+ ExtendedScannerInfo info = scannerInfoProvider.getScannerInformation(root);
+ assertEquals(0, info.getIncludePaths().length);
+ assertEquals(0, info.getDefinedSymbols().size());
+ assertEquals(0, info.getIncludeFiles().length);
+ assertEquals(0, info.getMacroFiles().length);
+ assertEquals(0, info.getLocalIncludePath().length);
+ }
+
+ {
+ // Handle prjDescription==null
+ IProject project = FAKE_FILE.getProject();
+ ICProjectDescription prjDescription = CProjectDescriptionManager.getInstance().getProjectDescription(project, READ_ONLY);
+ assertNull(prjDescription);
+
+ LanguageSettingsScannerInfoProvider scannerInfoProvider = new LanguageSettingsScannerInfoProvider();
+ ExtendedScannerInfo info = scannerInfoProvider.getScannerInformation(FAKE_FILE);
+ assertEquals(0, info.getIncludePaths().length);
+ assertEquals(0, info.getDefinedSymbols().size());
+ assertEquals(0, info.getIncludeFiles().length);
+ assertEquals(0, info.getMacroFiles().length);
+ assertEquals(0, info.getLocalIncludePath().length);
+ }
+
+ {
+ // Handle language==null
+ LanguageSettingsScannerInfoProvider scannerInfoProvider = new LanguageSettingsScannerInfoProvider();
+ IProject project = ResourceHelper.createCDTProjectWithConfig(getName());
+ IFile file = ResourceHelper.createFile(project, "file");
+
+ ICProjectDescription prjDescription = CProjectDescriptionManager.getInstance().getProjectDescription(project, READ_ONLY);
+ assertNotNull(prjDescription);
+ ICConfigurationDescription cfgDescription = prjDescription.getDefaultSettingConfiguration();
+ assertNotNull(cfgDescription);
+ ILanguage language = LanguageManager.getInstance().getLanguageForFile(file, cfgDescription);
+ assertNull(language);
+
+ // AG FIXME - temporarily ignore the entry in the log
+ setExpectedNumberOfLoggedNonOKStatusObjects(1);
+
+ ExtendedScannerInfo info = scannerInfoProvider.getScannerInformation(file);
+ assertEquals(0, info.getIncludePaths().length);
+ assertEquals(0, info.getDefinedSymbols().size());
+ assertEquals(0, info.getIncludeFiles().length);
+ assertEquals(0, info.getMacroFiles().length);
+ assertEquals(0, info.getLocalIncludePath().length);
+ }
+ }
+
+ /**
+ * Test empty scanner info.
+ */
+ public void testEmpty() throws Exception {
+ LanguageSettingsScannerInfoProvider scannerInfoProvider = new LanguageSettingsScannerInfoProvider();
+ IProject project = ResourceHelper.createCDTProjectWithConfig(getName());
+ IFile file = ResourceHelper.createFile(project, "file.c");
+
+ // confirm that language==null
+ ICProjectDescription prjDescription = CProjectDescriptionManager.getInstance().getProjectDescription(project, READ_ONLY);
+ assertNotNull(prjDescription);
+ ICConfigurationDescription cfgDescription = prjDescription.getDefaultSettingConfiguration();
+ assertNotNull(cfgDescription);
+ ILanguage language = LanguageManager.getInstance().getLanguageForFile(file, cfgDescription);
+ assertNotNull(language);
+
+ // test that the info is empty
+ ExtendedScannerInfo info = scannerInfoProvider.getScannerInformation(file);
+ assertEquals(0, info.getIncludePaths().length);
+ assertEquals(0, info.getDefinedSymbols().size());
+ assertEquals(0, info.getIncludeFiles().length);
+ assertEquals(0, info.getMacroFiles().length);
+ assertEquals(0, info.getLocalIncludePath().length);
+ }
+
+ /**
+ * Test regular cases.
+ */
+ public void testRegular() throws Exception {
+ // create a project
+ IProject project = ResourceHelper.createCDTProjectWithConfig(getName());
+ ICProjectDescription prjDescription = CProjectDescriptionManager.getInstance().getProjectDescription(project, WRITEABLE);
+ assertNotNull(prjDescription);
+ ICConfigurationDescription cfgDescription = prjDescription.getDefaultSettingConfiguration();
+ assertNotNull(cfgDescription);
+ assertTrue(cfgDescription instanceof ILanguageSettingsProvidersKeeper);
+
+ // sample file
+ IFile file = ResourceHelper.createFile(project, "file.c");
+
+ // sanity test of language
+ ILanguage language = LanguageManager.getInstance().getLanguageForFile(file, cfgDescription);
+ assertNotNull(language);
+
+ // contribute the entries
+ IFolder includeFolder = ResourceHelper.createFolder(project, "/include-path");
+ IFolder includeLocalFolder = ResourceHelper.createFolder(project, "/local-include-path");
+ IFile macroFile = ResourceHelper.createFile(project, "macro-file");
+ IFile includeFile = ResourceHelper.createFile(project, "include-file");
+
+ CIncludePathEntry includePathEntry = new CIncludePathEntry(includeFolder, 0);
+ CIncludePathEntry includeLocalPathEntry = new CIncludePathEntry(includeLocalFolder, ICSettingEntry.LOCAL); // #include "..."
+ CMacroEntry macroEntry = new CMacroEntry("MACRO", "value",0);
+ CIncludeFileEntry includeFileEntry = new CIncludeFileEntry(includeFile, 0);
+ CMacroFileEntry macroFileEntry = new CMacroFileEntry(macroFile, 0);
+
+ List<ICLanguageSettingEntry> entries = new ArrayList<ICLanguageSettingEntry>();
+ entries.add(includePathEntry);
+ entries.add(includeLocalPathEntry);
+ entries.add(macroEntry);
+ entries.add(includeFileEntry);
+ entries.add(macroFileEntry);
+
+ // add provider to the configuration
+ ILanguageSettingsProvider provider = new MockProvider(PROVIDER_ID, PROVIDER_NAME, entries);
+ List<ILanguageSettingsProvider> providers = new ArrayList<ILanguageSettingsProvider>();
+ providers.add(provider);
+ ((ILanguageSettingsProvidersKeeper) cfgDescription).setLanguageSettingProviders(providers);
+
+ // set project description
+ CProjectDescriptionManager.getInstance().setProjectDescription(project, prjDescription);
+
+ // test that the scannerInfoProvider gets the entries
+ LanguageSettingsScannerInfoProvider scannerInfoProvider = new LanguageSettingsScannerInfoProvider();
+ ExtendedScannerInfo info = scannerInfoProvider.getScannerInformation(file);
+ String[] actualIncludePaths = info.getIncludePaths();
+ Map<String, String> actualDefinedSymbols = info.getDefinedSymbols();
+ String[] actualIncludeFiles = info.getIncludeFiles();
+ String[] actualMacroFiles = info.getMacroFiles();
+ String[] actualLocalIncludePath = info.getLocalIncludePath();
+ // include paths
+ assertEquals(includeFolder.getLocation(), new Path(actualIncludePaths[0]));
+ assertEquals(1, actualIncludePaths.length);
+ // macros
+ assertEquals(macroEntry.getValue(), actualDefinedSymbols.get(macroEntry.getName()));
+ assertEquals(1, actualDefinedSymbols.size());
+ // include file
+ assertEquals(includeFile.getLocation(), new Path(actualIncludeFiles[0]));
+ assertEquals(1, actualIncludeFiles.length);
+ // macro file
+ assertEquals(macroFile.getLocation(), new Path(actualMacroFiles[0]));
+ assertEquals(1, actualMacroFiles.length);
+ // local include files
+ assertEquals(includeLocalFolder.getLocation(), new Path(actualLocalIncludePath[0]));
+ assertEquals(1, actualLocalIncludePath.length);
+ }
+
+ /**
+ * Test "local" flag (#include "...").
+ */
+ public void testLocal() throws Exception {
+ // create a project
+ IProject project = ResourceHelper.createCDTProjectWithConfig(getName());
+ ICProjectDescription prjDescription = CProjectDescriptionManager.getInstance().getProjectDescription(project, WRITEABLE);
+ assertNotNull(prjDescription);
+ ICConfigurationDescription cfgDescription = prjDescription.getDefaultSettingConfiguration();
+ assertNotNull(cfgDescription);
+ assertTrue(cfgDescription instanceof ILanguageSettingsProvidersKeeper);
+
+ // sample file
+ IFile file = ResourceHelper.createFile(project, "file.c");
+
+ // contribute the entries
+ IFolder incFolder = ResourceHelper.createFolder(project, "include");
+ IFolder incFolder2 = ResourceHelper.createFolder(project, "include2");
+ CIncludePathEntry includePathEntry = new CIncludePathEntry(incFolder, 0);
+ CIncludePathEntry includeLocalPathEntry = new CIncludePathEntry(incFolder, ICSettingEntry.LOCAL); // #include "..."
+ CIncludePathEntry includeLocalPathEntry2 = new CIncludePathEntry(incFolder2, ICSettingEntry.LOCAL); // #include "..."
+ CIncludePathEntry includePathEntry2 = new CIncludePathEntry(incFolder2, 0);
+
+ List<ICLanguageSettingEntry> entries = new ArrayList<ICLanguageSettingEntry>();
+ entries.add(includePathEntry);
+ entries.add(includeLocalPathEntry);
+ // reverse order for incPath2
+ entries.add(includeLocalPathEntry2);
+ entries.add(includePathEntry2);
+
+ // add provider to the configuration
+ ILanguageSettingsProvider provider = new MockProvider(PROVIDER_ID, PROVIDER_NAME, entries);
+ List<ILanguageSettingsProvider> providers = new ArrayList<ILanguageSettingsProvider>();
+ providers.add(provider);
+ ((ILanguageSettingsProvidersKeeper) cfgDescription).setLanguageSettingProviders(providers);
+
+ // set project description
+ CProjectDescriptionManager.getInstance().setProjectDescription(project, prjDescription);
+
+ // test that the scannerInfoProvider gets the entries
+ LanguageSettingsScannerInfoProvider scannerInfoProvider = new LanguageSettingsScannerInfoProvider();
+ ExtendedScannerInfo info = scannerInfoProvider.getScannerInformation(file);
+ String[] actualIncludePaths = info.getIncludePaths();
+ String[] actualLocalIncludePath = info.getLocalIncludePath();
+ // include paths
+ assertEquals(incFolder.getLocation(), new Path(actualIncludePaths[0]));
+ assertEquals(incFolder2.getLocation(), new Path(actualIncludePaths[1]));
+ assertEquals(2, actualIncludePaths.length);
+ // local include files
+ assertEquals(incFolder.getLocation(), new Path(actualLocalIncludePath[0]));
+ assertEquals(incFolder2.getLocation(), new Path(actualLocalIncludePath[1]));
+ assertEquals(2, actualLocalIncludePath.length);
+ }
+
+ /**
+ * Test Mac frameworks.
+ */
+ public void testFramework() throws Exception {
+ // create a project
+ IProject project = ResourceHelper.createCDTProjectWithConfig(getName());
+ ICProjectDescription prjDescription = CProjectDescriptionManager.getInstance().getProjectDescription(project, WRITEABLE);
+ assertNotNull(prjDescription);
+ ICConfigurationDescription cfgDescription = prjDescription.getDefaultSettingConfiguration();
+ assertNotNull(cfgDescription);
+ assertTrue(cfgDescription instanceof ILanguageSettingsProvidersKeeper);
+
+ // sample file
+ IFile file = ResourceHelper.createFile(project, "file.c");
+
+ // contribute the entries
+ IFolder frameworkFolder = ResourceHelper.createFolder(project, "Fmwk");
+ CIncludePathEntry frameworkPathEntry = new CIncludePathEntry(frameworkFolder, ICSettingEntry.FRAMEWORKS_MAC);
+
+ List<ICLanguageSettingEntry> entries = new ArrayList<ICLanguageSettingEntry>();
+ entries.add(frameworkPathEntry);
+
+ // add provider to the configuration
+ ILanguageSettingsProvider provider = new MockProvider(PROVIDER_ID, PROVIDER_NAME, entries);
+ List<ILanguageSettingsProvider> providers = new ArrayList<ILanguageSettingsProvider>();
+ providers.add(provider);
+ ((ILanguageSettingsProvidersKeeper) cfgDescription).setLanguageSettingProviders(providers);
+
+ // set project description
+ CProjectDescriptionManager.getInstance().setProjectDescription(project, prjDescription);
+
+ // test that the scannerInfoProvider gets the entries
+ LanguageSettingsScannerInfoProvider scannerInfoProvider = new LanguageSettingsScannerInfoProvider();
+ ExtendedScannerInfo info = scannerInfoProvider.getScannerInformation(file);
+ String[] actualIncludePaths = info.getIncludePaths();
+ // include paths
+ assertEquals(frameworkFolder.getLocation().append("/__framework__.framework/Headers/__header__"),
+ new Path(actualIncludePaths[0]));
+ assertEquals(frameworkFolder.getLocation().append("/__framework__.framework/PrivateHeaders/__header__"),
+ new Path(actualIncludePaths[1]));
+ assertEquals(2, actualIncludePaths.length);
+ }
+
+ /**
+ * Test duplicate entries.
+ */
+ public void testDuplicate() throws Exception {
+ // create a project
+ IProject project = ResourceHelper.createCDTProjectWithConfig(getName());
+ ICProjectDescription prjDescription = CProjectDescriptionManager.getInstance().getProjectDescription(project, WRITEABLE);
+ assertNotNull(prjDescription);
+ ICConfigurationDescription cfgDescription = prjDescription.getDefaultSettingConfiguration();
+ assertNotNull(cfgDescription);
+ assertTrue(cfgDescription instanceof ILanguageSettingsProvidersKeeper);
+
+ // sample file
+ IFile file = ResourceHelper.createFile(project, "file.c");
+
+ // contribute the entries
+ IFolder incFolder = ResourceHelper.createFolder(project, "include");
+ CIncludePathEntry includePathEntry = new CIncludePathEntry(incFolder, 0);
+ CIncludePathEntry includeLocalPathEntry = new CIncludePathEntry(incFolder, ICSettingEntry.LOCAL); // #include "..."
+ CIncludePathEntry includePathEntry2 = new CIncludePathEntry(incFolder, 0);
+ CIncludePathEntry includeLocalPathEntry2 = new CIncludePathEntry(incFolder, ICSettingEntry.LOCAL); // #include "..."
+
+ List<ICLanguageSettingEntry> entries = new ArrayList<ICLanguageSettingEntry>();
+ entries.add(includePathEntry);
+ entries.add(includeLocalPathEntry);
+ entries.add(includePathEntry2);
+ entries.add(includeLocalPathEntry2);
+
+ // add provider to the configuration
+ ILanguageSettingsProvider provider = new MockProvider(PROVIDER_ID, PROVIDER_NAME, entries);
+ List<ILanguageSettingsProvider> providers = new ArrayList<ILanguageSettingsProvider>();
+ providers.add(provider);
+ ((ILanguageSettingsProvidersKeeper) cfgDescription).setLanguageSettingProviders(providers);
+
+ // set project description
+ CProjectDescriptionManager.getInstance().setProjectDescription(project, prjDescription);
+
+ // test that the scannerInfoProvider gets the entries
+ LanguageSettingsScannerInfoProvider scannerInfoProvider = new LanguageSettingsScannerInfoProvider();
+ ExtendedScannerInfo info = scannerInfoProvider.getScannerInformation(file);
+ String[] actualIncludePaths = info.getIncludePaths();
+ String[] actualLocalIncludePath = info.getLocalIncludePath();
+ // include paths
+ assertEquals(incFolder.getLocation(), new Path(actualIncludePaths[0]));
+ assertEquals(1, actualIncludePaths.length);
+ // local include files
+ assertEquals(incFolder.getLocation(), new Path(actualLocalIncludePath[0]));
+ assertEquals(1, actualLocalIncludePath.length);
+ }
+
+ /**
+ * Test include path managed by eclipse as a workspace path.
+ */
+ public void testWorkspacePath() throws Exception {
+ // create a project
+ IProject project = ResourceHelper.createCDTProjectWithConfig(getName());
+ ICProjectDescription prjDescription = CProjectDescriptionManager.getInstance().getProjectDescription(project, WRITEABLE);
+ assertNotNull(prjDescription);
+ ICConfigurationDescription cfgDescription = prjDescription.getDefaultSettingConfiguration();
+ assertNotNull(cfgDescription);
+ assertTrue(cfgDescription instanceof ILanguageSettingsProvidersKeeper);
+
+ // create sample file
+ IFile file = ResourceHelper.createFile(project, "file.c");
+ // eclipse-managed folder in workspace
+ IFolder incWorkspace_1 = ResourceHelper.createFolder(project, "include_1");
+ IPath incWorkspaceLocation_1 = incWorkspace_1.getLocation();
+ IFolder incWorkspace_2 = ResourceHelper.createFolder(project, "include_2");
+ IPath incWorkspacePath_2 = incWorkspace_2.getFullPath();
+ IPath incWorkspaceLocation_2 = incWorkspace_2.getLocation();
+ IFolder incWorkspace_3 = ResourceHelper.createFolder(project, "include_3");
+ // "relative" should make no difference for VALUE_WORKSPACE_PATH
+ IPath incWorkspaceRelativePath_3 = incWorkspace_3.getFullPath().makeRelative();
+ IPath incWorkspaceLocation_3 = incWorkspace_3.getLocation();
+ // not having "RESOLVED" should make no difference for well formed path
+ IFolder incWorkspace_4 = ResourceHelper.createFolder(project, "include_4");
+ IPath incWorkspacePathNoResolved_4 = incWorkspace_4.getFullPath();
+ IPath incWorkspaceLocation_4 = incWorkspace_4.getLocation();
+ // folder defined by absolute path on the filesystem
+ IPath incFilesystem = ResourceHelper.createWorkspaceFolder("includeFilesystem");
+
+ // contribute the entries
+ CIncludePathEntry incWorkspaceEntry_1 = new CIncludePathEntry(incWorkspace_1, 0);
+ CIncludePathEntry incWorkspaceEntry_2 = new CIncludePathEntry(incWorkspacePath_2, ICSettingEntry.VALUE_WORKSPACE_PATH | ICSettingEntry.RESOLVED);
+ CIncludePathEntry incWorkspaceEntry_3 = new CIncludePathEntry(incWorkspaceRelativePath_3, ICSettingEntry.VALUE_WORKSPACE_PATH | ICSettingEntry.RESOLVED);
+ CIncludePathEntry incWorkspaceEntry_4 = new CIncludePathEntry(incWorkspacePathNoResolved_4, ICSettingEntry.VALUE_WORKSPACE_PATH);
+ CIncludePathEntry incFilesystemEntry = new CIncludePathEntry(incFilesystem, 0);
+
+ List<ICLanguageSettingEntry> entries = new ArrayList<ICLanguageSettingEntry>();
+ entries.add(incWorkspaceEntry_1);
+ entries.add(incWorkspaceEntry_2);
+ entries.add(incWorkspaceEntry_3);
+ entries.add(incWorkspaceEntry_4);
+ entries.add(incFilesystemEntry);
+
+ // add provider to the configuration
+ ILanguageSettingsProvider provider = new MockProvider(PROVIDER_ID, PROVIDER_NAME, entries);
+ List<ILanguageSettingsProvider> providers = new ArrayList<ILanguageSettingsProvider>();
+ providers.add(provider);
+ ((ILanguageSettingsProvidersKeeper) cfgDescription).setLanguageSettingProviders(providers);
+
+ // set project description
+ CProjectDescriptionManager.getInstance().setProjectDescription(project, prjDescription);
+
+ // test the entries received from the scannerInfoProvider
+ LanguageSettingsScannerInfoProvider scannerInfoProvider = new LanguageSettingsScannerInfoProvider();
+ ExtendedScannerInfo info = scannerInfoProvider.getScannerInformation(file);
+ String[] actualIncludePaths = info.getIncludePaths();
+
+ assertEquals(incWorkspaceLocation_1, new Path(actualIncludePaths[0]));
+ assertEquals(incWorkspaceLocation_2, new Path(actualIncludePaths[1]));
+ assertEquals(incWorkspaceLocation_3, new Path(actualIncludePaths[2]));
+ assertEquals(incWorkspaceLocation_4, new Path(actualIncludePaths[3]));
+ assertEquals(incFilesystem, new Path(actualIncludePaths[4]));
+ assertEquals(5, actualIncludePaths.length);
+
+ }
+
+ /**
+ * Confirm that device letter is prepended on filesystems that support that.
+ */
+ public void testFilesystemPathNoDriveLetter() throws Exception {
+ // create a project
+ IProject project = ResourceHelper.createCDTProjectWithConfig(getName());
+ // change drive on build working directory
+ String buildCwdDevice = project.getLocation().getDevice();
+
+// // Test manually with a device which is different from project location device (path should exist)
+// IPath buildCWD = new Path("D:/build/path");
+// String buildCwdDevice = buildCWD.getDevice();
+
+ // get project/configuration descriptions
+ ICProjectDescription prjDescription = CProjectDescriptionManager.getInstance().getProjectDescription(project, WRITEABLE);
+ assertNotNull(prjDescription);
+ ICConfigurationDescription cfgDescription = prjDescription.getDefaultSettingConfiguration();
+ assertNotNull(cfgDescription);
+ assertTrue(cfgDescription instanceof ILanguageSettingsProvidersKeeper);
+
+ // create sample file
+ IFile file = ResourceHelper.createFile(project, "file.c");
+
+ // contribute the entries
+ // no-drive-letter folder defined by absolute path on the filesystem
+ IPath incFilesystem = ResourceHelper.createWorkspaceFolder("includeFilesystem").setDevice(null);
+ CIncludePathEntry incFilesystemEntry = new CIncludePathEntry(incFilesystem, 0);
+ List<ICLanguageSettingEntry> entries = new ArrayList<ICLanguageSettingEntry>();
+ entries.add(incFilesystemEntry);
+
+ // add provider to the configuration
+ ILanguageSettingsProvider provider = new MockProvider(PROVIDER_ID, PROVIDER_NAME, entries);
+ List<ILanguageSettingsProvider> providers = new ArrayList<ILanguageSettingsProvider>();
+ providers.add(provider);
+ ((ILanguageSettingsProvidersKeeper) cfgDescription).setLanguageSettingProviders(providers);
+
+ // set project description
+ CProjectDescriptionManager.getInstance().setProjectDescription(project, prjDescription);
+
+ // test the entries received from the scannerInfoProvider
+ LanguageSettingsScannerInfoProvider scannerInfoProvider = new LanguageSettingsScannerInfoProvider();
+ ExtendedScannerInfo info = scannerInfoProvider.getScannerInformation(file);
+ String[] actualIncludePaths = info.getIncludePaths();
+
+ IPath expectedInclude = incFilesystem.setDevice(buildCwdDevice);
+ assertEquals(expectedInclude, new Path(actualIncludePaths[0]));
+ assertEquals(1, actualIncludePaths.length);
+ }
+
+ /**
+ * Test relative paths.
+ */
+ public void testRelativePath() throws Exception {
+ // create a project
+ String prjName = getName();
+ IProject project = ResourceHelper.createCDTProjectWithConfig(prjName);
+ String relativePath = "include";
+ IFolder buildFolder = ResourceHelper.createFolder(project, "buildDir");
+ IFolder relativeFolder = ResourceHelper.createFolder(project, "buildDir/"+relativePath);
+ IFolder relativeFolderProjName = ResourceHelper.createFolder(project, "buildDir/"+prjName);
+ String markedResolved = "-MarkedResolved";
+ IFolder relativeFolderProjNameResolved = ResourceHelper.createFolder(project, "buildDir/" + prjName+markedResolved);
+ IPath buildCWD=buildFolder.getLocation();
+ setBuilderCWD(project, buildCWD);
+
+ // get project/configuration descriptions
+ ICProjectDescription prjDescription = CProjectDescriptionManager.getInstance().getProjectDescription(project, WRITEABLE);
+ assertNotNull(prjDescription);
+ ICConfigurationDescription cfgDescription = prjDescription.getDefaultSettingConfiguration();
+ assertNotNull(cfgDescription);
+ assertTrue(cfgDescription instanceof ILanguageSettingsProvidersKeeper);
+
+ // create sample file
+ IFile file = ResourceHelper.createFile(project, "file.c");
+
+ // contribute the entries
+ CIncludePathEntry incRelativeEntry = new CIncludePathEntry(new Path(relativePath), 0);
+ CIncludePathEntry incProjNameEntry = new CIncludePathEntry(new Path("${ProjName}"), 0);
+ CIncludePathEntry incProjNameMarkedResolvedEntry = new CIncludePathEntry(new Path("${ProjName}"+markedResolved), ICSettingEntry.RESOLVED);
+ List<ICLanguageSettingEntry> entries = new ArrayList<ICLanguageSettingEntry>();
+ entries.add(incRelativeEntry);
+ entries.add(incProjNameEntry);
+ entries.add(incProjNameMarkedResolvedEntry);
+
+ // add provider to the configuration
+ ILanguageSettingsProvider provider = new MockProvider(PROVIDER_ID, PROVIDER_NAME, entries);
+ List<ILanguageSettingsProvider> providers = new ArrayList<ILanguageSettingsProvider>();
+ providers.add(provider);
+ ((ILanguageSettingsProvidersKeeper) cfgDescription).setLanguageSettingProviders(providers);
+
+ // set project description
+ CProjectDescriptionManager.getInstance().setProjectDescription(project, prjDescription);
+
+ // test the entries received from the scannerInfoProvider
+ LanguageSettingsScannerInfoProvider scannerInfoProvider = new LanguageSettingsScannerInfoProvider();
+ ExtendedScannerInfo info = scannerInfoProvider.getScannerInformation(file);
+ String[] actualIncludePaths = info.getIncludePaths();
+
+ // pair of entries, one from build dir another relative path
+ assertEquals(relativeFolder.getLocation(), new Path(actualIncludePaths[0]));
+ assertEquals(new Path(relativePath), new Path(actualIncludePaths[1]));
+
+ // pair of entries, one resolved from build dir another expanded relative path
+ assertEquals(relativeFolderProjName.getLocation(), new Path(actualIncludePaths[2]));
+ assertEquals(new Path(prjName), new Path(actualIncludePaths[3]));
+
+ // if marked RESOLVED only that path stays
+ assertEquals(new Path("${ProjName}"+markedResolved), new Path(actualIncludePaths[4]));
+
+ assertEquals(5, actualIncludePaths.length);
+ }
+
+ /**
+ * Test relative paths - some combinations of dot paths.
+ */
+ public void testRelativePathWithDots() throws Exception {
+ // create a project
+ IProject project = ResourceHelper.createCDTProjectWithConfig(getName());
+ // set build CWD
+ IFolder buildFolder = ResourceHelper.createFolder(project, "buildDir");
+ IPath buildCWD=buildFolder.getLocation();
+ setBuilderCWD(project, buildCWD);
+
+ // define a few variations of paths
+ String relativePath_dot = ".";
+ String relativePath_dot_slash = "./";
+ String relativePath_dot_slash_path = "./include";
+ IFolder relativeFolder_dot_slash_path = ResourceHelper.createFolder(project, "buildDir/include");
+ String relativePath_dotdot = "..";
+ String relativePath_dotdot_slash = "../";
+ String relativePath_dotdot_slash_path = "../include";
+ IFolder relativeFolder_dotdot_slash_path = ResourceHelper.createFolder(project, "include");
+ String locationPath_dotdot_path = buildCWD.toString()+"/../include2";
+ IFolder incFolder_dotdot_slash_path = ResourceHelper.createFolder(project, "include2"); // "/ProjPath/buildDir/../include2"
+
+ // get project/configuration descriptions
+ ICProjectDescription prjDescription = CProjectDescriptionManager.getInstance().getProjectDescription(project, WRITEABLE);
+ assertNotNull(prjDescription);
+ ICConfigurationDescription cfgDescription = prjDescription.getDefaultSettingConfiguration();
+ assertNotNull(cfgDescription);
+ assertTrue(cfgDescription instanceof ILanguageSettingsProvidersKeeper);
+
+ // create sample file
+ IFile file = ResourceHelper.createFile(project, "file.c");
+
+ // contribute the entries
+ CIncludePathEntry incRelativeEntry_dot = new CIncludePathEntry(new Path(relativePath_dot), 0);
+ CIncludePathEntry incRelativeEntry_dot_slash_path = new CIncludePathEntry(new Path(relativePath_dot_slash_path), 0);
+ CIncludePathEntry incRelativeEntry_dotdot = new CIncludePathEntry(new Path(relativePath_dotdot), 0);
+ CIncludePathEntry incRelativeEntry_dotdot_slash_path = new CIncludePathEntry(new Path(relativePath_dotdot_slash_path), 0);
+ CIncludePathEntry incEntry_dotdot_path = new CIncludePathEntry(locationPath_dotdot_path, 0);
+ // use LOCAL flag not to clash with plain dot entries
+ CIncludePathEntry incRelativeEntry_dotdot_slash = new CIncludePathEntry(new Path(relativePath_dotdot_slash), ICSettingEntry.LOCAL);
+ CIncludePathEntry incRelativeEntry_dot_slash = new CIncludePathEntry(new Path(relativePath_dot_slash), ICSettingEntry.LOCAL);
+
+ List<ICLanguageSettingEntry> entries = new ArrayList<ICLanguageSettingEntry>();
+ entries.add(incRelativeEntry_dot);
+ entries.add(incRelativeEntry_dot_slash);
+ entries.add(incRelativeEntry_dot_slash_path);
+ entries.add(incRelativeEntry_dotdot);
+ entries.add(incRelativeEntry_dotdot_slash);
+ entries.add(incRelativeEntry_dotdot_slash_path);
+ entries.add(incEntry_dotdot_path);
+
+ // add provider to the configuration
+ ILanguageSettingsProvider provider = new MockProvider(PROVIDER_ID, PROVIDER_NAME, entries);
+ List<ILanguageSettingsProvider> providers = new ArrayList<ILanguageSettingsProvider>();
+ providers.add(provider);
+ ((ILanguageSettingsProvidersKeeper) cfgDescription).setLanguageSettingProviders(providers);
+
+ // set project description
+ CProjectDescriptionManager.getInstance().setProjectDescription(project, prjDescription);
+
+ // test the entries received from the scannerInfoProvider
+ LanguageSettingsScannerInfoProvider scannerInfoProvider = new LanguageSettingsScannerInfoProvider();
+ ExtendedScannerInfo info = scannerInfoProvider.getScannerInformation(file);
+ String[] actualIncludePaths = info.getIncludePaths();
+ String[] actualLocalIncludePaths = info.getLocalIncludePath();
+
+ IPath expectedLocation_dot = buildFolder.getLocation();
+ IPath expectedLocation_dot_slash = buildFolder.getLocation();
+ IPath expectedLocation_dot_slash_path = relativeFolder_dot_slash_path.getLocation();
+ IPath expectedLocation_dotdot = project.getLocation();
+ IPath expectedLocation_dotdot_slash = project.getLocation();
+ IPath expectedLocation_dotdot_slash_path = relativeFolder_dotdot_slash_path.getLocation();
+
+ assertEquals(expectedLocation_dot, new Path(actualIncludePaths[0]));
+ assertEquals(".", actualIncludePaths[1]);
+ assertEquals(expectedLocation_dot_slash_path, new Path(actualIncludePaths[2]));
+ assertEquals(new Path(relativePath_dot_slash_path), new Path(actualIncludePaths[3]));
+
+ assertEquals(expectedLocation_dotdot, new Path(actualIncludePaths[4]));
+ assertEquals("..", actualIncludePaths[5]);
+ assertEquals(expectedLocation_dotdot_slash_path, new Path(actualIncludePaths[6]));
+ assertEquals(new Path(relativePath_dotdot_slash_path), new Path(actualIncludePaths[7]));
+ assertTrue(actualIncludePaths[7].startsWith(".."));
+ assertEquals(new Path(locationPath_dotdot_path), new Path(actualIncludePaths[8]));
+ assertTrue(actualIncludePaths[8].contains(".."));
+ assertEquals(9, actualIncludePaths.length);
+
+ assertEquals(expectedLocation_dot_slash, new Path(actualLocalIncludePaths[0]));
+ assertEquals(new Path(relativePath_dot_slash), new Path(actualLocalIncludePaths[1]));
+ assertTrue(actualLocalIncludePaths[1].startsWith("."));
+ assertEquals(expectedLocation_dotdot_slash, new Path(actualLocalIncludePaths[2]));
+ assertEquals(new Path(relativePath_dotdot_slash), new Path(actualLocalIncludePaths[3]));
+ assertTrue(actualLocalIncludePaths[3].startsWith(".."));
+ assertEquals(4, actualLocalIncludePaths.length);
+ }
+
+ /**
+ * Test if build/environment variables are expanded
+ */
+ public void testEnvironmentVars() throws Exception {
+ // create a project
+ IProject project = ResourceHelper.createCDTProjectWithConfig(getName());
+ IFolder folder = ResourceHelper.createFolder(project, "Folder");
+ String envPathStr = "${ProjDirPath}/Folder";
+
+ // get project/configuration descriptions
+ ICProjectDescription prjDescription = CProjectDescriptionManager.getInstance().getProjectDescription(project, WRITEABLE);
+ assertNotNull(prjDescription);
+ ICConfigurationDescription cfgDescription = prjDescription.getDefaultSettingConfiguration();
+ assertNotNull(cfgDescription);
+ assertTrue(cfgDescription instanceof ILanguageSettingsProvidersKeeper);
+
+ // create sample file
+ IFile file = ResourceHelper.createFile(project, "file.c");
+
+ // contribute the entries
+ CIncludePathEntry incRelativeEntry = new CIncludePathEntry(envPathStr, 0);
+ List<ICLanguageSettingEntry> entries = new ArrayList<ICLanguageSettingEntry>();
+ entries.add(incRelativeEntry);
+
+ // add provider to the configuration
+ ILanguageSettingsProvider provider = new MockProvider(PROVIDER_ID, PROVIDER_NAME, entries);
+ List<ILanguageSettingsProvider> providers = new ArrayList<ILanguageSettingsProvider>();
+ providers.add(provider);
+ ((ILanguageSettingsProvidersKeeper) cfgDescription).setLanguageSettingProviders(providers);
+
+ // set project description
+ CProjectDescriptionManager.getInstance().setProjectDescription(project, prjDescription);
+
+ // test the entries received from the scannerInfoProvider
+ LanguageSettingsScannerInfoProvider scannerInfoProvider = new LanguageSettingsScannerInfoProvider();
+ ExtendedScannerInfo info = scannerInfoProvider.getScannerInformation(file);
+ String[] actualIncludePaths = info.getIncludePaths();
+
+ IPath expectedLocation = folder.getLocation();
+ assertEquals(expectedLocation, new Path(actualIncludePaths[0]));
+ assertEquals(1, actualIncludePaths.length);
+ }
+
+ /**
+ * Test from parent folder's entries.
+ */
+ public void testParentFolder() throws Exception {
+ class MockProviderForResource extends LanguageSettingsBaseProvider implements ILanguageSettingsProvider {
+ private IResource rc;
+ private final List<ICLanguageSettingEntry> entries;
+
+ public MockProviderForResource(IResource rc, List<ICLanguageSettingEntry> entries) {
+ this.rc = rc;
+ this.entries = entries;
+ }
+
+ @Override
+ public List<ICLanguageSettingEntry> getSettingEntries(ICConfigurationDescription cfgDescription, IResource rc, String languageId) {
+ if (this.rc.equals(rc))
+ return entries;
+ return null;
+ }
+ }
+
+ // create a project
+ IProject project = ResourceHelper.createCDTProjectWithConfig(getName());
+ ICProjectDescription prjDescription = CProjectDescriptionManager.getInstance().getProjectDescription(project, WRITEABLE);
+ assertNotNull(prjDescription);
+ ICConfigurationDescription cfgDescription = prjDescription.getDefaultSettingConfiguration();
+ assertNotNull(cfgDescription);
+ assertTrue(cfgDescription instanceof ILanguageSettingsProvidersKeeper);
+
+ // sample file
+ IFolder parentFolder = ResourceHelper.createFolder(project, "ParentFolder");
+ IFile file = ResourceHelper.createFile(project, "ParentFolder/file.c");
+
+ // contribute the entries
+ IFolder incFolder = ResourceHelper.createFolder(project, "include");
+ CIncludePathEntry includePathEntry = new CIncludePathEntry(incFolder, 0);
+
+ List<ICLanguageSettingEntry> entries = new ArrayList<ICLanguageSettingEntry>();
+ entries.add(includePathEntry);
+
+ // add provider for parent folder
+ ILanguageSettingsProvider provider = new MockProviderForResource(parentFolder, entries);
+ assertNull(provider.getSettingEntries(cfgDescription, file, null));
+ assertEquals(includePathEntry, provider.getSettingEntries(cfgDescription, parentFolder, null).get(0));
+
+ List<ILanguageSettingsProvider> providers = new ArrayList<ILanguageSettingsProvider>();
+ providers.add(provider);
+ ((ILanguageSettingsProvidersKeeper) cfgDescription).setLanguageSettingProviders(providers);
+
+ // set project description
+ CProjectDescriptionManager.getInstance().setProjectDescription(project, prjDescription);
+
+ // test that the scannerInfoProvider gets the entries for
+ LanguageSettingsScannerInfoProvider scannerInfoProvider = new LanguageSettingsScannerInfoProvider();
+ ExtendedScannerInfo info = scannerInfoProvider.getScannerInformation(file);
+ String[] actualIncludePaths = info.getIncludePaths();
+ // include paths
+ assertEquals(incFolder.getLocation(), new Path(actualIncludePaths[0]));
+ assertEquals(1, actualIncludePaths.length);
+ }
+
+ /**
+ * Test resolved paths.
+ */
+ public void testResolvedPath() throws Exception {
+ // create a project
+ IProject project = ResourceHelper.createCDTProjectWithConfig(getName());
+ IFolder folder = ResourceHelper.createFolder(project, "Folder");
+ String envPathStr = "${ProjDirPath}/Folder";
+
+ // get project/configuration descriptions
+ ICProjectDescription prjDescription = CProjectDescriptionManager.getInstance().getProjectDescription(project, WRITEABLE);
+ assertNotNull(prjDescription);
+ ICConfigurationDescription cfgDescription = prjDescription.getDefaultSettingConfiguration();
+ assertNotNull(cfgDescription);
+ assertTrue(cfgDescription instanceof ILanguageSettingsProvidersKeeper);
+
+ // create sample file
+ IFile file = ResourceHelper.createFile(project, "file.c");
+
+ // contribute the entries
+ CIncludePathEntry incRelativeEntry = new CIncludePathEntry(envPathStr, ICSettingEntry.RESOLVED);
+ List<ICLanguageSettingEntry> entries = new ArrayList<ICLanguageSettingEntry>();
+ entries.add(incRelativeEntry);
+
+ // add provider to the configuration
+ ILanguageSettingsProvider provider = new MockProvider(PROVIDER_ID, PROVIDER_NAME, entries);
+ List<ILanguageSettingsProvider> providers = new ArrayList<ILanguageSettingsProvider>();
+ providers.add(provider);
+ ((ILanguageSettingsProvidersKeeper) cfgDescription).setLanguageSettingProviders(providers);
+
+ // set project description
+ CProjectDescriptionManager.getInstance().setProjectDescription(project, prjDescription);
+
+ // test the entries received from the scannerInfoProvider
+ LanguageSettingsScannerInfoProvider scannerInfoProvider = new LanguageSettingsScannerInfoProvider();
+ ExtendedScannerInfo info = scannerInfoProvider.getScannerInformation(file);
+ String[] actualIncludePaths = info.getIncludePaths();
+
+ // test that RESOLVED entries are not modified
+ IPath expectedLocation = new Path(envPathStr);
+ assertEquals(expectedLocation, new Path(actualIncludePaths[0]));
+ assertEquals(1, actualIncludePaths.length);
+ }
+
+ /**
+ * Get languages for the folder.
+ */
+ private List<String> getLanguages(IFolder folder, ICConfigurationDescription cfgDescription) {
+ IPath rcPath = folder.getProjectRelativePath();
+ ICFolderDescription rcDes = (ICFolderDescription) cfgDescription.getResourceDescription(rcPath, false);
+ ICLanguageSetting[] langSettings = rcDes.getLanguageSettings();
+ assertNotNull(langSettings);
+
+ List<String> languageIds = new ArrayList<String>();
+ for (ICLanguageSetting ls : langSettings) {
+ String langId = ls.getLanguageId();
+ if (langId!=null && !languageIds.contains(langId)) {
+ languageIds.add(langId);
+ }
+ }
+ return languageIds;
+ }
+
+ /**
+ * Test composition of 2 languages.
+ */
+ public void testResourceLanguages() throws Exception {
+ class MockProviderLang extends LanguageSettingsBaseProvider implements ILanguageSettingsProvider {
+ private final String langId;
+ private final List<ICLanguageSettingEntry> entries;
+
+ public MockProviderLang(String id, String name, String langId, List<ICLanguageSettingEntry> entries) {
+ super(id, name);
+ this.langId = langId;
+ this.entries = entries;
+ }
+
+ @Override
+ public List<ICLanguageSettingEntry> getSettingEntries(ICConfigurationDescription cfgDescription, IResource rc, String languageId) {
+ if (langId==null || langId.equals(languageId))
+ return entries;
+ return new ArrayList<ICLanguageSettingEntry>();
+ }
+ }
+
+ // create a project
+ IProject project = ResourceHelper.createCDTProjectWithConfig(getName());
+ IFolder folder = ResourceHelper.createFolder(project, "Folder");
+
+ IFolder incFolderA = ResourceHelper.createFolder(project, "includeA");
+ IFolder incFolderB = ResourceHelper.createFolder(project, "includeB");
+ IFolder incFolderC = ResourceHelper.createFolder(project, "includeC");
+
+ // get project/configuration descriptions
+ ICProjectDescription prjDescription = CProjectDescriptionManager.getInstance().getProjectDescription(project, WRITEABLE);
+ assertNotNull(prjDescription);
+ ICConfigurationDescription cfgDescription = prjDescription.getDefaultSettingConfiguration();
+ assertNotNull(cfgDescription);
+ assertTrue(cfgDescription instanceof ILanguageSettingsProvidersKeeper);
+
+ // find 2 languages applicable to the folder
+ List<String> languageIds = getLanguages(folder, cfgDescription);
+ assertTrue(languageIds.size() >= 2);
+ String langId1 = languageIds.get(0);
+ String langId2 = languageIds.get(1);
+
+ // define overlapping entries
+ CIncludePathEntry incEntryA = new CIncludePathEntry(incFolderA, 0);
+ CIncludePathEntry incEntryB = new CIncludePathEntry(incFolderB, 0);
+ CIncludePathEntry incEntryC = new CIncludePathEntry(incFolderC, 0);
+ List<ICLanguageSettingEntry> entries1 = new ArrayList<ICLanguageSettingEntry>();
+ entries1.add(incEntryA);
+ entries1.add(incEntryB);
+ List<ICLanguageSettingEntry> entries2 = new ArrayList<ICLanguageSettingEntry>();
+ entries2.add(incEntryC);
+ entries2.add(incEntryB);
+
+ // add providers to the configuration
+ ILanguageSettingsProvider provider1 = new MockProviderLang(PROVIDER_ID, PROVIDER_NAME, langId1, entries1);
+ ILanguageSettingsProvider provider2 = new MockProviderLang(PROVIDER_ID_2, PROVIDER_NAME, langId2, entries2);
+ List<ILanguageSettingsProvider> providers = new ArrayList<ILanguageSettingsProvider>();
+ providers.add(provider1);
+ providers.add(provider2);
+ ((ILanguageSettingsProvidersKeeper) cfgDescription).setLanguageSettingProviders(providers);
+
+ // set project description
+ CProjectDescriptionManager.getInstance().setProjectDescription(project, prjDescription);
+
+ // test the entries received from the scannerInfoProvider
+ LanguageSettingsScannerInfoProvider scannerInfoProvider = new LanguageSettingsScannerInfoProvider();
+ ExtendedScannerInfo info = scannerInfoProvider.getScannerInformation(folder);
+ String[] actualIncludePaths = info.getIncludePaths();
+
+ // Test that the result is the union of entries
+ assertEquals(incFolderA.getLocation(), new Path(actualIncludePaths[0]));
+ assertEquals(incFolderB.getLocation(), new Path(actualIncludePaths[1]));
+ assertEquals(incFolderC.getLocation(), new Path(actualIncludePaths[2]));
+ assertEquals(3, actualIncludePaths.length);
+ }
+
+}
diff --git a/core/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/language/settings/providers/MockListenerRegisterer.java b/core/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/language/settings/providers/MockListenerRegisterer.java
index c39835629e..d6887eb6e0 100644
--- a/core/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/language/settings/providers/MockListenerRegisterer.java
+++ b/core/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/language/settings/providers/MockListenerRegisterer.java
@@ -1,104 +1,104 @@
-/*******************************************************************************
- * Copyright (c) 2011, 2012 Andrew Gvozdev and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Andrew Gvozdev - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.cdt.core.language.settings.providers;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.cdt.core.settings.model.ICConfigurationDescription;
-import org.eclipse.core.runtime.Assert;
-
-/**
- * Mock Language Settings Provider that keeps count how many times it has been registered.
- */
-public class MockListenerRegisterer extends LanguageSettingsSerializableProvider implements ILanguageSettingsEditableProvider, ICListenerAgent {
- private static MockListenerManager mockListenerManager = new MockListenerManager();
-
- private static class MockListenerManager {
- private class ListenerCount {
- private MockListenerRegisterer listener;
- private int count;
- public ListenerCount(MockListenerRegisterer l, int cnt) {
- listener = l;
- count = cnt;
- }
- }
- private List<ListenerCount> register = new ArrayList<ListenerCount>();
-
- public void registerListener(MockListenerRegisterer listener) {
- for (ListenerCount lc : register) {
- if (lc.listener == listener) {
- lc.count++;
- return;
- }
- }
-
- register.add(new ListenerCount(listener, 1));
- }
-
- public void unregisterListener(MockListenerRegisterer listener) {
- for (ListenerCount lc : register) {
- if (lc.listener == listener) {
- lc.count--;
- Assert.isTrue(lc.count>=0);
- return;
- }
- }
-
- // attempt to unregister non-registered listener
- Assert.isTrue(false);
- }
-
- /**
- * Note that that count includes all listeners with that id.
- */
- public int getCount(String id) {
- int count = 0;
-
- for (ListenerCount lc : register) {
- if (lc.listener.getId().equals(id)) {
- count = count + lc.count;
- }
- }
-
- return count;
- }
- }
-
- public MockListenerRegisterer() {
- super();
- }
- public MockListenerRegisterer(String id, String name) {
- super(id, name);
- }
- @Override
- public void registerListener(ICConfigurationDescription cfgDescription) {
- mockListenerManager.registerListener(this);
- }
-
- @Override
- public void unregisterListener() {
- mockListenerManager.unregisterListener(this);
- }
- @Override
- public MockListenerRegisterer cloneShallow() throws CloneNotSupportedException {
- return (MockListenerRegisterer) super.cloneShallow();
- }
- @Override
- public MockListenerRegisterer clone() throws CloneNotSupportedException {
- return (MockListenerRegisterer) super.clone();
- }
-
- public static int getCount(String id) {
- return mockListenerManager.getCount(id);
- }
+/*******************************************************************************
+ * Copyright (c) 2011, 2012 Andrew Gvozdev and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Andrew Gvozdev - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.cdt.core.language.settings.providers;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.cdt.core.settings.model.ICConfigurationDescription;
+import org.eclipse.core.runtime.Assert;
+
+/**
+ * Mock Language Settings Provider that keeps count how many times it has been registered.
+ */
+public class MockListenerRegisterer extends LanguageSettingsSerializableProvider implements ILanguageSettingsEditableProvider, ICListenerAgent {
+ private static MockListenerManager mockListenerManager = new MockListenerManager();
+
+ private static class MockListenerManager {
+ private class ListenerCount {
+ private MockListenerRegisterer listener;
+ private int count;
+ public ListenerCount(MockListenerRegisterer l, int cnt) {
+ listener = l;
+ count = cnt;
+ }
+ }
+ private List<ListenerCount> register = new ArrayList<ListenerCount>();
+
+ public void registerListener(MockListenerRegisterer listener) {
+ for (ListenerCount lc : register) {
+ if (lc.listener == listener) {
+ lc.count++;
+ return;
+ }
+ }
+
+ register.add(new ListenerCount(listener, 1));