mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-03-28 14:56:28 +01:00
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
This commit is contained in:
parent
3cf0297769
commit
48d2271a58
609 changed files with 72673 additions and 72509 deletions
142
.gitattributes
vendored
Normal file
142
.gitattributes
vendored
Normal file
|
@ -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
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -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() {
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 {
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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];
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -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());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -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() {
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
|
@ -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
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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 });
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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$
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
||||
}
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -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));
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
|
@ -1,146 +1,146 @@
|
|||
// include
|
||||
#include "included.h"
|
||||
|
||||
// macro
|
||||
#define PRINT(string,msg) printf(string, msg)
|
||||
|
||||
//namespace
|
||||
namespace MyPackage
|
||||
{
|
||||
// check class
|
||||
// class
|
||||
class Hello
|
||||
{
|
||||
// protected visibility
|
||||
protected:
|
||||
// field
|
||||
int x;
|
||||
// method
|
||||
inline void setX(int X)
|
||||
{
|
||||
x = X;
|
||||
};
|
||||
// check nested pachage
|
||||
// nested namespace
|
||||
namespace MyNestedPackage {
|
||||
// check parent nested class
|
||||
// nested class
|
||||
class Y
|
||||
{ // public visibility
|
||||
public:
|
||||
// constructor
|
||||
Y();
|
||||
// virtual destructor
|
||||
virtual ~Y();
|
||||
};
|
||||
// check derived nested class
|
||||
// derived class
|
||||
class X : public Y {
|
||||
// private visibility
|
||||
private:
|
||||
// private field
|
||||
B b;
|
||||
|
||||
public:
|
||||
// constructor chain
|
||||
X(int x) : Y(x) {
|
||||
cout << "In consturctor\n";
|
||||
}
|
||||
// method declaration
|
||||
int doNothing();
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
// check enums
|
||||
// enum without name
|
||||
enum {
|
||||
first = 1,
|
||||
second,
|
||||
third
|
||||
}
|
||||
;
|
||||
// enum with name
|
||||
enum MyEnum {
|
||||
f,
|
||||
s,
|
||||
t };
|
||||
|
||||
// check variables
|
||||
// variable
|
||||
int v;
|
||||
// unsigned long variable
|
||||
unsigned long vuLong;
|
||||
// unsigned short variable
|
||||
unsigned short vuShort;
|
||||
|
||||
// check variable declarations
|
||||
// variable declaration
|
||||
extern int evar;
|
||||
// function pointer
|
||||
static void * (*orig_malloc_hook)(const char *file, int line, size_t size);
|
||||
|
||||
// check functions
|
||||
// simple function declaration
|
||||
void foo();
|
||||
// function declaration with parameters
|
||||
char* foo(int& x,
|
||||
char**y);
|
||||
// simple function definition
|
||||
void boo(){
|
||||
int g = 0;
|
||||
};
|
||||
// check Structs
|
||||
// struct
|
||||
struct MyStruct{
|
||||
int sint;
|
||||
};
|
||||
// typedef and elaborated types
|
||||
typedef struct MyStruct myStruct;
|
||||
// typedef
|
||||
typedef struct{
|
||||
int ss;
|
||||
} myTypedef;
|
||||
// unions
|
||||
union U{
|
||||
int U1;
|
||||
};
|
||||
|
||||
|
||||
// check templates
|
||||
// template function
|
||||
template<class A, typename B=C>
|
||||
A aTemplatedFunction( B bInstance );
|
||||
// template method
|
||||
class enclosing {
|
||||
// public visibility
|
||||
public:
|
||||
template<class A, typename B=C>
|
||||
A aTemplatedMethod( B bInstance );
|
||||
};
|
||||
// template class
|
||||
template<class T, typename Tibor = junk>
|
||||
class myarray { /* */ };
|
||||
// template struct
|
||||
template<class T, typename Tibor = junk>
|
||||
struct mystruct { /* */ };
|
||||
// template variable
|
||||
// template <bool __threads, int __inst>
|
||||
// char* default_alloc_template<__threads, __inst>::_S_start_free = 0;
|
||||
};
|
||||
// check arrays
|
||||
// arrays
|
||||
int myArray [5][];
|
||||
int main(int argc, char * argv[])
|
||||
{
|
||||
}
|
||||
|
||||
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=180815
|
||||
struct bug180815 {
|
||||
int i,j;
|
||||
} bug180815_var0, bug180815_var1;
|
||||
|
||||
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=352350
|
||||
namespace {
|
||||
int bug352350;
|
||||
// include
|
||||
#include "included.h"
|
||||
|
||||
// macro
|
||||
#define PRINT(string,msg) printf(string, msg)
|
||||
|
||||
//namespace
|
||||
namespace MyPackage
|
||||
{
|
||||
// check class
|
||||
// class
|
||||
class Hello
|
||||
{
|
||||
// protected visibility
|
||||
protected:
|
||||
// field
|
||||
int x;
|
||||
// method
|
||||
inline void setX(int X)
|
||||
{
|
||||
x = X;
|
||||
};
|
||||
// check nested pachage
|
||||
// nested namespace
|
||||
namespace MyNestedPackage {
|
||||
// check parent nested class
|
||||
// nested class
|
||||
class Y
|
||||
{ // public visibility
|
||||
public:
|
||||
// constructor
|
||||
Y();
|
||||
// virtual destructor
|
||||
virtual ~Y();
|
||||
};
|
||||
// check derived nested class
|
||||
// derived class
|
||||
class X : public Y {
|
||||
// private visibility
|
||||
private:
|
||||
// private field
|
||||
B b;
|
||||
|
||||
public:
|
||||
// constructor chain
|
||||
X(int x) : Y(x) {
|
||||
cout << "In consturctor\n";
|
||||
}
|
||||
// method declaration
|
||||
int doNothing();
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
// check enums
|
||||
// enum without name
|
||||
enum {
|
||||
first = 1,
|
||||
second,
|
||||
third
|
||||
}
|
||||
;
|
||||
// enum with name
|
||||
enum MyEnum {
|
||||
f,
|
||||
s,
|
||||
t };
|
||||
|
||||
// check variables
|
||||
// variable
|
||||
int v;
|
||||
// unsigned long variable
|
||||
unsigned long vuLong;
|
||||
// unsigned short variable
|
||||
unsigned short vuShort;
|
||||
|
||||
// check variable declarations
|
||||
// variable declaration
|
||||
extern int evar;
|
||||
// function pointer
|
||||
static void * (*orig_malloc_hook)(const char *file, int line, size_t size);
|
||||
|
||||
// check functions
|
||||
// simple function declaration
|
||||
void foo();
|
||||
// function declaration with parameters
|
||||
char* foo(int& x,
|
||||
char**y);
|
||||
// simple function definition
|
||||
void boo(){
|
||||
int g = 0;
|
||||
};
|
||||
// check Structs
|
||||
// struct
|
||||
struct MyStruct{
|
||||
int sint;
|
||||
};
|
||||
// typedef and elaborated types
|
||||
typedef struct MyStruct myStruct;
|
||||
// typedef
|
||||
typedef struct{
|
||||
int ss;
|
||||
} myTypedef;
|
||||
// unions
|
||||
union U{
|
||||
int U1;
|
||||
};
|
||||
|
||||
|
||||
// check templates
|
||||
// template function
|
||||
template<class A, typename B=C>
|
||||
A aTemplatedFunction( B bInstance );
|
||||
// template method
|
||||
class enclosing {
|
||||
// public visibility
|
||||
public:
|
||||
template<class A, typename B=C>
|
||||
A aTemplatedMethod( B bInstance );
|
||||
};
|
||||
// template class
|
||||
template<class T, typename Tibor = junk>
|
||||
class myarray { /* */ };
|
||||
// template struct
|
||||
template<class T, typename Tibor = junk>
|
||||
struct mystruct { /* */ };
|
||||
// template variable
|
||||
// template <bool __threads, int __inst>
|
||||
// char* default_alloc_template<__threads, __inst>::_S_start_free = 0;
|
||||
};
|
||||
// check arrays
|
||||
// arrays
|
||||
int myArray [5][];
|
||||
int main(int argc, char * argv[])
|
||||
{
|
||||
}
|
||||
|
||||
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=180815
|
||||
struct bug180815 {
|
||||
int i,j;
|
||||
} bug180815_var0, bug180815_var1;
|
||||
|
||||
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=352350
|
||||
namespace {
|
||||
int bug352350;
|
||||
}
|
|
@ -1,70 +1,70 @@
|
|||
/*
|
||||
* (c) Copyright QNX Software Systems Ltd. 2002, 2003.
|
||||
* All Rights Reserved.
|
||||
/*
|
||||
* (c) Copyright QNX Software Systems Ltd. 2002, 2003.
|
||||
* All Rights Reserved.
|
||||
*/
|
||||
/********
|
||||
* This is a sample C file that will be used in testing the TranslationUnit
|
||||
* class. It has a specific structure that will be looked for within the
|
||||
* test case.
|
||||
* This file is only ment to contain various C elements, and may not compile
|
||||
* into a running application (but should be valid C)
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
|
||||
/* A function prototype */
|
||||
int func2p(void);
|
||||
|
||||
/* A global variable */
|
||||
int globalvar;
|
||||
|
||||
/* A enumeration */
|
||||
enum myenum {ENUM_A=1, ENUM_B=2, ENUM_C=3, ENUM_D=4};
|
||||
|
||||
/* A structure. This also includes a typedef around the strcture def
|
||||
* which at the time of writing was not picked up.
|
||||
*/
|
||||
typedef struct mystruct {
|
||||
int a;
|
||||
char b;
|
||||
long c;
|
||||
} mystruct_t;
|
||||
|
||||
/* A union */
|
||||
union myunion {
|
||||
int x;
|
||||
char y;
|
||||
long z;
|
||||
};
|
||||
|
||||
/* A typedef */
|
||||
typedef struct mystruct mytype;
|
||||
|
||||
|
||||
/* A couple functions */
|
||||
|
||||
void * func1(void)
|
||||
{
|
||||
return(NULL);
|
||||
}
|
||||
|
||||
|
||||
int func2(void)
|
||||
{
|
||||
return(0);
|
||||
}
|
||||
|
||||
int main(int argc, char ** argv)
|
||||
{
|
||||
int var1;
|
||||
printf("Hello world\n");
|
||||
}
|
||||
|
||||
|
||||
void func3()
|
||||
{
|
||||
printf("This is not really here\n");
|
||||
}
|
||||
|
||||
|
||||
/********
|
||||
* This is a sample C file that will be used in testing the TranslationUnit
|
||||
* class. It has a specific structure that will be looked for within the
|
||||
* test case.
|
||||
* This file is only ment to contain various C elements, and may not compile
|
||||
* into a running application (but should be valid C)
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
|
||||
/* A function prototype */
|
||||
int func2p(void);
|
||||
|
||||
/* A global variable */
|
||||
int globalvar;
|
||||
|
||||
/* A enumeration */
|
||||
enum myenum {ENUM_A=1, ENUM_B=2, ENUM_C=3, ENUM_D=4};
|
||||
|
||||
/* A structure. This also includes a typedef around the strcture def
|
||||
* which at the time of writing was not picked up.
|
||||
*/
|
||||
typedef struct mystruct {
|
||||
int a;
|
||||
char b;
|
||||
long c;
|
||||
} mystruct_t;
|
||||
|
||||
/* A union */
|
||||
union myunion {
|
||||
int x;
|
||||
char y;
|
||||
long z;
|
||||
};
|
||||
|
||||
/* A typedef */
|
||||
typedef struct mystruct mytype;
|
||||
|
||||
|
||||
/* A couple functions */
|
||||
|
||||
void * func1(void)
|
||||
{
|
||||
return(NULL);
|
||||
}
|
||||
|
||||
|
||||
int func2(void)
|
||||
{
|
||||
return(0);
|
||||
}
|
||||
|
||||
int main(int argc, char ** argv)
|
||||
{
|
||||
int var1;
|
||||
printf("Hello world\n");
|
||||
}
|
||||
|
||||
|
||||
void func3()
|
||||
{
|
||||
printf("This is not really here\n");
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
#define size_t int
|
||||
class A;
|
||||
|
||||
class B;
|
||||
|
||||
class C;
|
||||
|
||||
class T;
|
||||
|
||||
class junk;
|
||||
#define size_t int
|
||||
class A;
|
||||
|
||||
class B;
|
||||
|
||||
class C;
|
||||
|
||||
class T;
|
||||
|
||||
class junk;
|
||||
|
|
|
@ -1,24 +1,24 @@
|
|||
void decl_0001(char);
|
||||
void (decl_0002)(char);
|
||||
void ((decl_0003))(char);
|
||||
|
||||
void *decl_0004(char);
|
||||
void (*decl_0005)(char);
|
||||
void (*(decl_0006))(char);
|
||||
void ((*decl_0007))(char);
|
||||
|
||||
typedef void decl_0011(char);
|
||||
typedef void (decl_0012)(char);
|
||||
typedef void ((decl_0013))(char);
|
||||
|
||||
typedef void *decl_0014(char);
|
||||
typedef void (*decl_0015)(char);
|
||||
typedef void (*(decl_0016))(char);
|
||||
typedef void ((*decl_0017))(char);
|
||||
|
||||
typedef void decl_0021(char);
|
||||
void (*decl_0022)(char);
|
||||
void (*(*decl_0023(int a)))(char) { return &decl_0021; }
|
||||
void (*(*(*((decl_0024)))(int))(float))(char);
|
||||
|
||||
int (*decl_0031)(char(*yyy)(bool));
|
||||
void decl_0001(char);
|
||||
void (decl_0002)(char);
|
||||
void ((decl_0003))(char);
|
||||
|
||||
void *decl_0004(char);
|
||||
void (*decl_0005)(char);
|
||||
void (*(decl_0006))(char);
|
||||
void ((*decl_0007))(char);
|
||||
|
||||
typedef void decl_0011(char);
|
||||
typedef void (decl_0012)(char);
|
||||
typedef void ((decl_0013))(char);
|
||||
|
||||
typedef void *decl_0014(char);
|
||||
typedef void (*decl_0015)(char);
|
||||
typedef void (*(decl_0016))(char);
|
||||
typedef void ((*decl_0017))(char);
|
||||
|
||||
typedef void decl_0021(char);
|
||||
void (*decl_0022)(char);
|
||||
void (*(*decl_0023(int a)))(char) { return &decl_0021; }
|
||||
void (*(*(*((decl_0024)))(int))(float))(char);
|
||||
|
||||
int (*decl_0031)(char(*yyy)(bool));
|
||||
|
|
|
@ -1,42 +1,42 @@
|
|||
// include
|
||||
#include <stdio.h>
|
||||
#include "whatever.h"
|
||||
#include <src/slash.h>
|
||||
#include <src\backslash.h>
|
||||
#include "Program Files/space.h"
|
||||
#include "../up1dir.h"
|
||||
#include "./samedir.h"
|
||||
#include "different_extension1.hpp"
|
||||
#include "different_extension2.hh"
|
||||
#include "different_extension3.x"
|
||||
#include <no_extension>
|
||||
# include "whitespace_after_hash"
|
||||
#include "whitespace_before_hash"
|
||||
|
||||
// failure cases:
|
||||
#include garbage
|
||||
#include "resync_after_bad_parse_1"
|
||||
#include
|
||||
#include "resync_after_bad_parse_2"
|
||||
#include "one" "two" "three"
|
||||
#include "resync_after_bad_parse_3"
|
||||
|
||||
// from the Spec:
|
||||
|
||||
// from [C, 6.10.p8]
|
||||
// should fail
|
||||
#define EMPTY
|
||||
EMPTY #include "invalid.h"
|
||||
|
||||
// from [C, 6.10.2.p8]:
|
||||
// should equal #include "myInclude1.h"
|
||||
#define MYINCFILE "myInclude1.h"
|
||||
#include MYINCFILE
|
||||
|
||||
// from [C, 6.10.3.5.p6]:
|
||||
// should equal #include "vers2.h"
|
||||
#define INCFILE(x) vers ## x
|
||||
#define xstr(x) str(x)
|
||||
#define str(x) #x
|
||||
#include xstr(INCFILE(2).h)
|
||||
|
||||
// include
|
||||
#include <stdio.h>
|
||||
#include "whatever.h"
|
||||
#include <src/slash.h>
|
||||
#include <src\backslash.h>
|
||||
#include "Program Files/space.h"
|
||||
#include "../up1dir.h"
|
||||
#include "./samedir.h"
|
||||
#include "different_extension1.hpp"
|
||||
#include "different_extension2.hh"
|
||||
#include "different_extension3.x"
|
||||
#include <no_extension>
|
||||
# include "whitespace_after_hash"
|
||||
#include "whitespace_before_hash"
|
||||
|
||||
// failure cases:
|
||||
#include garbage
|
||||
#include "resync_after_bad_parse_1"
|
||||
#include
|
||||
#include "resync_after_bad_parse_2"
|
||||
#include "one" "two" "three"
|
||||
#include "resync_after_bad_parse_3"
|
||||
|
||||
// from the Spec:
|
||||
|
||||
// from [C, 6.10.p8]
|
||||
// should fail
|
||||
#define EMPTY
|
||||
EMPTY #include "invalid.h"
|
||||
|
||||
// from [C, 6.10.2.p8]:
|
||||
// should equal #include "myInclude1.h"
|
||||
#define MYINCFILE "myInclude1.h"
|
||||
#include MYINCFILE
|
||||
|
||||
// from [C, 6.10.3.5.p6]:
|
||||
// should equal #include "vers2.h"
|
||||
#define INCFILE(x) vers ## x
|
||||
#define xstr(x) str(x)
|
||||
#define str(x) #x
|
||||
#include xstr(INCFILE(2).h)
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// macro
|
||||
#define SINGLETON
|
||||
#define NUMBER 1
|
||||
#define PRINT(string,msg) printf(string, msg)
|
||||
// macro
|
||||
#define SINGLETON
|
||||
#define NUMBER 1
|
||||
#define PRINT(string,msg) printf(string, msg)
|
||||
|
|
|
@ -1,72 +1,72 @@
|
|||
class Key;
|
||||
class Value;
|
||||
class SortAlgorithm;
|
||||
class DefaultSort;
|
||||
class T;
|
||||
class X;
|
||||
class Y;
|
||||
class Bar;
|
||||
class Foo {
|
||||
template<class Bar> void fum(int i);
|
||||
};
|
||||
|
||||
// TEMPLATE_STRUCT
|
||||
template<class Key, class Value, class SortAlgorithm=DefaultSort>
|
||||
struct Map
|
||||
{
|
||||
Key* keys;
|
||||
Value* values;
|
||||
SortAlgorithm* sortAlgorithm;
|
||||
Map();
|
||||
};
|
||||
|
||||
// TEMPLATE_CLASS
|
||||
template<class T> class nonVector {
|
||||
private:
|
||||
T* head;
|
||||
|
||||
public:
|
||||
nonVector() { head =new T(); }
|
||||
int length() { return 1; }
|
||||
const T& first();
|
||||
};
|
||||
|
||||
// TEMPLATE_UNION
|
||||
template<class X, class Y, int size=16>
|
||||
union ArrayOverlay {
|
||||
public:
|
||||
X x[size];
|
||||
Y y[size];
|
||||
|
||||
static int<X,Y> numArrays;
|
||||
};
|
||||
|
||||
|
||||
// TEMPLATE_METHODS
|
||||
class TemplateContainer {
|
||||
// these are in an enclosing class
|
||||
template<class Bar> void fum(int i);
|
||||
template<int> void scrum(void) {};
|
||||
};
|
||||
|
||||
// TEMPLATE_FUNCTION
|
||||
template<class T> const T& nonVector<T>::first() const
|
||||
{
|
||||
return *head;
|
||||
}
|
||||
|
||||
template<class X> bool IsGreaterThan(X,X);
|
||||
|
||||
template<class Bar> void Foo::fum(int i) {}
|
||||
|
||||
// TEMPLATE_VARIABLES
|
||||
template <bool threads, int inst> char* default_alloc_template<threads, inst>::S_start_free = 0;
|
||||
|
||||
// an instantiation, not a template:
|
||||
complex<float> cf(0,0);
|
||||
//template<class Language, class CharacterSet, class SortAlgorithm<CharacterSet> >
|
||||
//Dictionary* TheSpellCheckDictionary;
|
||||
|
||||
int success;
|
||||
|
||||
|
||||
class Key;
|
||||
class Value;
|
||||
class SortAlgorithm;
|
||||
class DefaultSort;
|
||||
class T;
|
||||
class X;
|
||||
class Y;
|
||||
class Bar;
|
||||
class Foo {
|
||||
template<class Bar> void fum(int i);
|
||||
};
|
||||
|
||||
// TEMPLATE_STRUCT
|
||||
template<class Key, class Value, class SortAlgorithm=DefaultSort>
|
||||
struct Map
|
||||
{
|
||||
Key* keys;
|
||||
Value* values;
|
||||
SortAlgorithm* sortAlgorithm;
|
||||
Map();
|
||||
};
|
||||
|
||||
// TEMPLATE_CLASS
|
||||
template<class T> class nonVector {
|
||||
private:
|
||||
T* head;
|
||||
|
||||
public:
|
||||
nonVector() { head =new T(); }
|
||||
int length() { return 1; }
|
||||
const T& first();
|
||||
};
|
||||
|
||||
// TEMPLATE_UNION
|
||||
template<class X, class Y, int size=16>
|
||||
union ArrayOverlay {
|
||||
public:
|
||||
X x[size];
|
||||
Y y[size];
|
||||
|
||||
static int<X,Y> numArrays;
|
||||
};
|
||||
|
||||
|
||||
// TEMPLATE_METHODS
|
||||
class TemplateContainer {
|
||||
// these are in an enclosing class
|
||||
template<class Bar> void fum(int i);
|
||||
template<int> void scrum(void) {};
|
||||
};
|
||||
|
||||
// TEMPLATE_FUNCTION
|
||||
template<class T> const T& nonVector<T>::first() const
|
||||
{
|
||||
return *head;
|
||||
}
|
||||
|
||||
template<class X> bool IsGreaterThan(X,X);
|
||||
|
||||
template<class Bar> void Foo::fum(int i) {}
|
||||
|
||||
// TEMPLATE_VARIABLES
|
||||
template <bool threads, int inst> char* default_alloc_template<threads, inst>::S_start_free = 0;
|
||||
|
||||
// an instantiation, not a template:
|
||||
complex<float> cf(0,0);
|
||||
//template<class Language, class CharacterSet, class SortAlgorithm<CharacterSet> >
|
||||
//Dictionary* TheSpellCheckDictionary;
|
||||
|
||||
int success;
|
||||
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
#include "DepTest.h"
|
||||
#include "d.h"
|
||||
|
||||
DepTest::DepTest()
|
||||
{};
|
||||
DepTest::~DepTest()
|
||||
{};
|
||||
|
||||
#include "DepTest.h"
|
||||
#include "d.h"
|
||||
|
||||
DepTest::DepTest()
|
||||
{};
|
||||
DepTest::~DepTest()
|
||||
{};
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
#include "Inc1.h"
|
||||
#include "a.h"
|
||||
class DepTest{
|
||||
public:
|
||||
|
||||
DepTest();
|
||||
~DepTest();
|
||||
};
|
||||
#include "Inc1.h"
|
||||
#include "a.h"
|
||||
class DepTest{
|
||||
public:
|
||||
|
||||
DepTest();
|
||||
~DepTest();
|
||||
};
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
#include "DepTest2.h"
|
||||
#include "d.h"
|
||||
|
||||
DepTest2::DepTest2()
|
||||
{};
|
||||
DepTest2::~DepTest2()
|
||||
{};
|
||||
|
||||
#include "DepTest2.h"
|
||||
#include "d.h"
|
||||
|
||||
DepTest2::DepTest2()
|
||||
{};
|
||||
DepTest2::~DepTest2()
|
||||
{};
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
#include "d.h"
|
||||
|
||||
class DepTest2{
|
||||
public:
|
||||
|
||||
DepTest2();
|
||||
~DepTest2();
|
||||
};
|
||||
#include "d.h"
|
||||
|
||||
class DepTest2{
|
||||
public:
|
||||
|
||||
DepTest2();
|
||||
~DepTest2();
|
||||
};
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#include "DepTest3.h"
|
||||
|
||||
DepTest3::DepTest3()
|
||||
{};
|
||||
DepTest3::~DepTest3()
|
||||
{};
|
||||
|
||||
#include "DepTest3.h"
|
||||
|
||||
DepTest3::DepTest3()
|
||||
{};
|
||||
DepTest3::~DepTest3()
|
||||
{};
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
#include "a.h"
|
||||
|
||||
class DepTest3{
|
||||
public:
|
||||
|
||||
DepTest3();
|
||||
~DepTest3();
|
||||
};
|
||||
#include "a.h"
|
||||
|
||||
class DepTest3{
|
||||
public:
|
||||
|
||||
DepTest3();
|
||||
~DepTest3();
|
||||
};
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
#include "c.h"
|
||||
|
||||
class X
|
||||
{
|
||||
public:
|
||||
X(){};
|
||||
~X(){};
|
||||
#include "c.h"
|
||||
|
||||
class X
|
||||
{
|
||||
public:
|
||||
X(){};
|
||||
~X(){};
|
||||
};
|
|
@ -1,8 +1,8 @@
|
|||
#include "c.h"
|
||||
|
||||
class Z
|
||||
{
|
||||
public:
|
||||
Z(){};
|
||||
~Z(){};
|
||||
#include "c.h"
|
||||
|
||||
class Z
|
||||
{
|
||||
public:
|
||||
Z(){};
|
||||
~Z(){};
|
||||
};
|
|
@ -1,6 +1,6 @@
|
|||
class Y
|
||||
{
|
||||
public:
|
||||
Y(){};
|
||||
~Y(){};
|
||||
class Y
|
||||
{
|
||||
public:
|
||||
Y(){};
|
||||
~Y(){};
|
||||
};
|
|
@ -1,6 +1,6 @@
|
|||
class d
|
||||
{
|
||||
public:
|
||||
d(){};
|
||||
~d(){};
|
||||
class d
|
||||
{
|
||||
public:
|
||||
d(){};
|
||||
~d(){};
|
||||
};
|
|
@ -1,25 +1,25 @@
|
|||
//#include "StdAfx.h"
|
||||
#include "DocumentManager.h"
|
||||
|
||||
CDocumentManager::CDocumentManager(void)
|
||||
{
|
||||
}
|
||||
|
||||
CDocumentManager::~CDocumentManager(void)
|
||||
{
|
||||
}
|
||||
|
||||
void CDocumentManager::addToControlMap(UINT threadID, IUnknown * theControl)
|
||||
{
|
||||
_controlMap.insert(MUL2IUnk_Pair(threadID,theControl));
|
||||
}
|
||||
|
||||
void CDocumentManager::getControl(ULONG threadID, IUnknown ** theControl)
|
||||
{
|
||||
if (_controlMap.find(threadID) != _controlMap.end())
|
||||
{
|
||||
theControl = &_controlMap[threadID];
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
//#include "StdAfx.h"
|
||||
#include "DocumentManager.h"
|
||||
|
||||
CDocumentManager::CDocumentManager(void)
|
||||
{
|
||||
}
|
||||
|
||||
CDocumentManager::~CDocumentManager(void)
|
||||
{
|
||||
}
|
||||
|
||||
void CDocumentManager::addToControlMap(UINT threadID, IUnknown * theControl)
|
||||
{
|
||||
_controlMap.insert(MUL2IUnk_Pair(threadID,theControl));
|
||||
}
|
||||
|
||||
void CDocumentManager::getControl(ULONG threadID, IUnknown ** theControl)
|
||||
{
|
||||
if (_controlMap.find(threadID) != _controlMap.end())
|
||||
{
|
||||
theControl = &_controlMap[threadID];
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -1,112 +1,112 @@
|
|||
#include <iostream.h>
|
||||
#include <stdlib.h>
|
||||
#include <alloc.h>
|
||||
#include <iomanip.h>
|
||||
|
||||
#define PRINT(a,b) cout<<(a)<<(b)
|
||||
#define CASE break;case
|
||||
#define MAX(a,b) (((a)>(b))?(a):(b))
|
||||
|
||||
typedef int int32;
|
||||
|
||||
static void doSomething();
|
||||
|
||||
namespace Z{
|
||||
int x;
|
||||
namespace X{
|
||||
namespace Y{
|
||||
enum test{cool,hi,bye,why};
|
||||
class Mail
|
||||
{
|
||||
public:
|
||||
Mail(){}
|
||||
virtual void print()=0; //Pure Virtual Function, forces redefinition
|
||||
protected:
|
||||
float postage;
|
||||
char *type;
|
||||
friend ostream& operator << (ostream& os, Mail *m);
|
||||
};
|
||||
|
||||
class postcard : public Mail
|
||||
{
|
||||
public:
|
||||
postcard(): Mail(){postage = 0.20; type = "Postcard";}
|
||||
void print(){cout << type << ": $" << setiosflags(ios::fixed)
|
||||
<<setprecision(2) << postage <<endl;}
|
||||
};
|
||||
|
||||
class first_class : public Mail
|
||||
{
|
||||
public:
|
||||
first_class() : Mail(){postage = 0.32; type = "First Class";}
|
||||
void print(){cout << type << ": $" <<setiosflags(ios::fixed)
|
||||
<< setprecision(2) << postage <<endl;}
|
||||
|
||||
};
|
||||
|
||||
class Unknown : public postcard, first_class // ??? Multiple Inheritance
|
||||
{
|
||||
public:
|
||||
Unknown(): postcard(), first_class()
|
||||
{
|
||||
postcard::postage = 1.50; // MUST disambiguate
|
||||
postcard::type = "Unknown";
|
||||
}
|
||||
void print(){cout << postcard::type << ": $" <<setiosflags(ios::fixed)
|
||||
<<setprecision(2)<<postcard::postage <<endl;}
|
||||
};
|
||||
|
||||
class container
|
||||
{
|
||||
private:
|
||||
Mail **array;
|
||||
int index;
|
||||
int sz;
|
||||
public:
|
||||
container(){array = 0;}
|
||||
~container(){
|
||||
for(int x = 0; x <sz; x++)
|
||||
delete array[x];
|
||||
free(array);
|
||||
}
|
||||
int size() {return sz;}
|
||||
Mail* operator[](int index);
|
||||
Mail* operator = (Mail* mail);
|
||||
};
|
||||
|
||||
main()
|
||||
{
|
||||
container PO_Box;
|
||||
PO_Box = new postcard;
|
||||
PO_Box = new first_class;
|
||||
PO_Box = new parcel_Post;
|
||||
//PO_Box = new Unknown;
|
||||
//one way of printing information
|
||||
for(int x =0; x <3; x++){
|
||||
PO_Box[x]->print();
|
||||
}
|
||||
//Overloaded <<
|
||||
for(int x =0; x <PO_Box.size(); x++){
|
||||
cout << PO_Box[x];
|
||||
}
|
||||
}
|
||||
|
||||
ostream& operator << (ostream &os, Mail *m)
|
||||
{
|
||||
os <<setiosflags(ios::fixed) << setprecision(2)<< m->type
|
||||
<< ": $" << m->postage <<endl;
|
||||
|
||||
return os;
|
||||
}
|
||||
Mail* container::operator[](int index) {return array[index];}
|
||||
Mail* container::operator = (Mail* mail)
|
||||
{
|
||||
int size = sizeof(Mail*) * (++sz);
|
||||
int temp = sz -1;
|
||||
array = (Mail**)realloc(array, size);
|
||||
array[temp] = mail;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#include <iostream.h>
|
||||
#include <stdlib.h>
|
||||
#include <alloc.h>
|
||||
#include <iomanip.h>
|
||||
|
||||
#define PRINT(a,b) cout<<(a)<<(b)
|
||||
#define CASE break;case
|
||||
#define MAX(a,b) (((a)>(b))?(a):(b))
|
||||
|
||||
typedef int int32;
|
||||
|
||||
static void doSomething();
|
||||
|
||||
namespace Z{
|
||||
int x;
|
||||
namespace X{
|
||||
namespace Y{
|
||||
enum test{cool,hi,bye,why};
|
||||
class Mail
|
||||
{
|
||||
public:
|
||||
Mail(){}
|
||||
virtual void print()=0; //Pure Virtual Function, forces redefinition
|
||||
protected:
|
||||
float postage;
|
||||
char *type;
|
||||
friend ostream& operator << (ostream& os, Mail *m);
|
||||
};
|
||||
|
||||
class postcard : public Mail
|
||||
{
|
||||
public:
|
||||
postcard(): Mail(){postage = 0.20; type = "Postcard";}
|
||||
void print(){cout << type << ": $" << setiosflags(ios::fixed)
|
||||
<<setprecision(2) << postage <<endl;}
|
||||
};
|
||||
|
||||
class first_class : public Mail
|
||||
{
|
||||
public:
|
||||
first_class() : Mail(){postage = 0.32; type = "First Class";}
|
||||
void print(){cout << type << ": $" <<setiosflags(ios::fixed)
|
||||
<< setprecision(2) << postage <<endl;}
|
||||
|
||||
};
|
||||
|
||||
class Unknown : public postcard, first_class // ??? Multiple Inheritance
|
||||
{
|
||||
public:
|
||||
Unknown(): postcard(), first_class()
|
||||
{
|
||||
postcard::postage = 1.50; // MUST disambiguate
|
||||
postcard::type = "Unknown";
|
||||
}
|
||||
void print(){cout << postcard::type << ": $" <<setiosflags(ios::fixed)
|
||||
<<setprecision(2)<<postcard::postage <<endl;}
|
||||
};
|
||||
|
||||
class container
|
||||
{
|
||||
private:
|
||||
Mail **array;
|
||||
int index;
|
||||
int sz;
|
||||
public:
|
||||
container(){array = 0;}
|
||||
~container(){
|
||||
for(int x = 0; x <sz; x++)
|
||||
delete array[x];
|
||||
free(array);
|
||||
}
|
||||
int size() {return sz;}
|
||||
Mail* operator[](int index);
|
||||
Mail* operator = (Mail* mail);
|
||||
};
|
||||
|
||||
main()
|
||||
{
|
||||
container PO_Box;
|
||||
PO_Box = new postcard;
|
||||
PO_Box = new first_class;
|
||||
PO_Box = new parcel_Post;
|
||||
//PO_Box = new Unknown;
|
||||
//one way of printing information
|
||||
for(int x =0; x <3; x++){
|
||||
PO_Box[x]->print();
|
||||
}
|
||||
//Overloaded <<
|
||||
for(int x =0; x <PO_Box.size(); x++){
|
||||
cout << PO_Box[x];
|
||||
}
|
||||
}
|
||||
|
||||
ostream& operator << (ostream &os, Mail *m)
|
||||
{
|
||||
os <<setiosflags(ios::fixed) << setprecision(2)<< m->type
|
||||
<< ": $" << m->postage <<endl;
|
||||
|
||||
return os;
|
||||
}
|
||||
Mail* container::operator[](int index) {return array[index];}
|
||||
Mail* container::operator = (Mail* mail)
|
||||
{
|
||||
int size = sizeof(Mail*) * (++sz);
|
||||
int temp = sz -1;
|
||||
array = (Mail**)realloc(array, size);
|
||||
array[temp] = mail;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,22 +1,22 @@
|
|||
namespace A
|
||||
{
|
||||
class ForwardA;
|
||||
ForwardA * tmp;
|
||||
int something(void);
|
||||
namespace B
|
||||
{
|
||||
enum e1{dude1,dude2};
|
||||
int x;
|
||||
class C
|
||||
{ static int y = 5;
|
||||
static int bar(void);
|
||||
};
|
||||
}
|
||||
}
|
||||
using namespace A::B;
|
||||
using A::B::x;
|
||||
using A::B::C;
|
||||
using A::B::C::y;
|
||||
using A::B::C::bar;
|
||||
using A::something;
|
||||
namespace A
|
||||
{
|
||||
class ForwardA;
|
||||
ForwardA * tmp;
|
||||
int something(void);
|
||||
namespace B
|
||||
{
|
||||
enum e1{dude1,dude2};
|
||||
int x;
|
||||
class C
|
||||
{ static int y = 5;
|
||||
static int bar(void);
|
||||
};
|
||||
}
|
||||
}
|
||||
using namespace A::B;
|
||||
using A::B::x;
|
||||
using A::B::C;
|
||||
using A::B::C::y;
|
||||
using A::B::C::bar;
|
||||
using A::something;
|
||||
using A::B::e1;
|
|
@ -1,43 +1,43 @@
|
|||
#include <Simple.h>
|
||||
|
||||
const SimpleStruct simpleStruct =
|
||||
{
|
||||
1
|
||||
, "mySimple"
|
||||
, 0.1232
|
||||
};
|
||||
|
||||
#define SIZEOF( A, B ) sizeof( A.B )
|
||||
|
||||
const OtherStruct array[] =
|
||||
{
|
||||
{
|
||||
#if FOO
|
||||
"foo"
|
||||
#else
|
||||
"bar"
|
||||
#endif
|
||||
, SIZEOF( simpleStruct, num )
|
||||
, &t_int
|
||||
, 0
|
||||
}
|
||||
, {
|
||||
"name"
|
||||
, SIZEOF( simpleStruct, floatnum )
|
||||
, &t_float
|
||||
, 1
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
void SimpleStruct_construct( struct SimpleStruct * const this )
|
||||
{
|
||||
this->num = 1;
|
||||
this->name = "boo";
|
||||
this->floatNum = 1.5;
|
||||
}
|
||||
|
||||
int ConnectParams_doSomething( const struct SimpleStruct * const this )
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
#include <Simple.h>
|
||||
|
||||
const SimpleStruct simpleStruct =
|
||||
{
|
||||
1
|
||||
, "mySimple"
|
||||
, 0.1232
|
||||
};
|
||||
|
||||
#define SIZEOF( A, B ) sizeof( A.B )
|
||||
|
||||
const OtherStruct array[] =
|
||||
{
|
||||
{
|
||||
#if FOO
|
||||
"foo"
|
||||
#else
|
||||
"bar"
|
||||
#endif
|
||||
, SIZEOF( simpleStruct, num )
|
||||
, &t_int
|
||||
, 0
|
||||
}
|
||||
, {
|
||||
"name"
|
||||
, SIZEOF( simpleStruct, floatnum )
|
||||
, &t_float
|
||||
, 1
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
void SimpleStruct_construct( struct SimpleStruct * const this )
|
||||
{
|
||||
this->num = 1;
|
||||
this->name = "boo";
|
||||
this->floatNum = 1.5;
|
||||
}
|
||||
|
||||
int ConnectParams_doSomething( const struct SimpleStruct * const this )
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
|
|
@ -1,17 +1,17 @@
|
|||
#ifndef SIMPLE_H
|
||||
#define SIMPLE_H
|
||||
|
||||
struct SimpleStruct
|
||||
{
|
||||
int num;
|
||||
char name[ ];
|
||||
float floatNum;
|
||||
};
|
||||
|
||||
|
||||
void SimpleStruct_construct( struct SimpleStruct * const this );
|
||||
|
||||
int SimpleStruct_doSomething( const struct SimpleStruct * const this );
|
||||
|
||||
#endif /* SIMPLE_H */
|
||||
|
||||
#ifndef SIMPLE_H
|
||||
#define SIMPLE_H
|
||||
|
||||
struct SimpleStruct
|
||||
{
|
||||
int num;
|
||||
char name[ ];
|
||||
float floatNum;
|
||||
};
|
||||
|
||||
|
||||
void SimpleStruct_construct( struct SimpleStruct * const this );
|
||||
|
||||
int SimpleStruct_doSomething( const struct SimpleStruct * const this );
|
||||
|
||||
#endif /* SIMPLE_H */
|
||||
|
||||
|
|
|
@ -1,37 +1,37 @@
|
|||
#include <Simple.h>
|
||||
|
||||
#include <iostream>
|
||||
|
||||
#define NULL (void *)0
|
||||
|
||||
SimpleClass::SimpleClass( void )
|
||||
{
|
||||
init( NULL );
|
||||
}
|
||||
|
||||
SimpleClass::~SimpleClass( void )
|
||||
{
|
||||
}
|
||||
|
||||
SimpleClass::SimpleClass( const SimpleClass & arg )
|
||||
{
|
||||
//TODO: copy constructor
|
||||
}
|
||||
|
||||
SimpleClass & SimpleClass::operator=( const SimpleClass & arg )
|
||||
{
|
||||
if( this != &arg )
|
||||
{
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
void SimpleClass::init( void * foo)
|
||||
{
|
||||
}
|
||||
|
||||
InnerStruct & SimpleClass::getInner( void )
|
||||
{
|
||||
return inner;
|
||||
}
|
||||
#include <Simple.h>
|
||||
|
||||
#include <iostream>
|
||||
|
||||
#define NULL (void *)0
|
||||
|
||||
SimpleClass::SimpleClass( void )
|
||||
{
|
||||
init( NULL );
|
||||
}
|
||||
|
||||
SimpleClass::~SimpleClass( void )
|
||||
{
|
||||
}
|
||||
|
||||
SimpleClass::SimpleClass( const SimpleClass & arg )
|
||||
{
|
||||
//TODO: copy constructor
|
||||
}
|
||||
|
||||
SimpleClass & SimpleClass::operator=( const SimpleClass & arg )
|
||||
{
|
||||
if( this != &arg )
|
||||
{
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
void SimpleClass::init( void * foo)
|
||||
{
|
||||
}
|
||||
|
||||
InnerStruct & SimpleClass::getInner( void )
|
||||
{
|
||||
return inner;
|
||||
}
|
||||
|
|
|
@ -1,32 +1,32 @@
|
|||
#ifndef SIMPLE_H
|
||||
#define SIMPLE_H
|
||||
|
||||
class OtherClass;
|
||||
|
||||
class SimpleClass
|
||||
{
|
||||
public:
|
||||
SimpleClass( void );
|
||||
SimpleClass( const SimpleClass & arg );
|
||||
|
||||
virtual ~SimpleClass( void );
|
||||
|
||||
SimpleClass & operator=( const SimpleClass & arg );
|
||||
|
||||
private:
|
||||
struct InnerStruct
|
||||
{
|
||||
inline InnerStruct( int a ){ _a = a; }
|
||||
inline ~InnerStruct( void ){}
|
||||
unsigned int _a;
|
||||
};
|
||||
|
||||
InnerStruct inner;
|
||||
|
||||
void init( void * );
|
||||
|
||||
public:
|
||||
InnerStruct & getInner( void );
|
||||
};
|
||||
|
||||
#endif /* SIMPLE_H */
|
||||
#ifndef SIMPLE_H
|
||||
#define SIMPLE_H
|
||||
|
||||
class OtherClass;
|
||||
|
||||
class SimpleClass
|
||||
{
|
||||
public:
|
||||
SimpleClass( void );
|
||||
SimpleClass( const SimpleClass & arg );
|
||||
|
||||
virtual ~SimpleClass( void );
|
||||
|
||||
SimpleClass & operator=( const SimpleClass & arg );
|
||||
|
||||
private:
|
||||
struct InnerStruct
|
||||
{
|
||||
inline InnerStruct( int a ){ _a = a; }
|
||||
inline ~InnerStruct( void ){}
|
||||
unsigned int _a;
|
||||
};
|
||||
|
||||
InnerStruct inner;
|
||||
|
||||
void init( void * );
|
||||
|
||||
public:
|
||||
InnerStruct & getInner( void );
|
||||
};
|
||||
|
||||
#endif /* SIMPLE_H */
|
||||
|
|
|
@ -1,43 +1,43 @@
|
|||
// inclusion begins and ends on line 2
|
||||
#include <stdio.h>
|
||||
|
||||
// simple macro begins and ends on line 5; ANOTHER on line 6
|
||||
#define SIMPLE_MACRO simple
|
||||
#define ANOTHER
|
||||
// namespace begins on line 7, ends on line 22
|
||||
namespace MyPackage{
|
||||
// class specification begins on line 10, ends on line 21
|
||||
class Hello{
|
||||
protected:
|
||||
// simple declaration begins and ends on line 13
|
||||
int x;
|
||||
// simple declaration begins and ends on line 15
|
||||
void setX(int X);
|
||||
public:
|
||||
// simple declaration begins on line 18 and ends on line 20
|
||||
Hello( void ) : x
|
||||
( 5 ) {
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
// simple declaration begins on line 25 and ends on line 27
|
||||
int *
|
||||
y =
|
||||
0;
|
||||
|
||||
// complex macro begins on line 30 and ends on line 31
|
||||
#define COMPLEX_MACRO 33 \
|
||||
+ 44
|
||||
|
||||
// template declaration begins on line 34 and ends on line 35
|
||||
template <class A >
|
||||
A createA( void );
|
||||
|
||||
// enumeration begins on line 38 and ends on line 43
|
||||
enum {
|
||||
one, // enumerator begins and ends on line 39
|
||||
two, // enumerator begins and ends on line 40
|
||||
three // enumerator begins on line 41, ends on line 42
|
||||
= 4
|
||||
// inclusion begins and ends on line 2
|
||||
#include <stdio.h>
|
||||
|
||||
// simple macro begins and ends on line 5; ANOTHER on line 6
|
||||
#define SIMPLE_MACRO simple
|
||||
#define ANOTHER
|
||||
// namespace begins on line 7, ends on line 22
|
||||
namespace MyPackage{
|
||||
// class specification begins on line 10, ends on line 21
|
||||
class Hello{
|
||||
protected:
|
||||
// simple declaration begins and ends on line 13
|
||||
int x;
|
||||
// simple declaration begins and ends on line 15
|
||||
void setX(int X);
|
||||
public:
|
||||
// simple declaration begins on line 18 and ends on line 20
|
||||
Hello( void ) : x
|
||||
( 5 ) {
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
// simple declaration begins on line 25 and ends on line 27
|
||||
int *
|
||||
y =
|
||||
0;
|
||||
|
||||
// complex macro begins on line 30 and ends on line 31
|
||||
#define COMPLEX_MACRO 33 \
|
||||
+ 44
|
||||
|
||||
// template declaration begins on line 34 and ends on line 35
|
||||
template <class A >
|
||||
A createA( void );
|
||||
|
||||
// enumeration begins on line 38 and ends on line 43
|
||||
enum {
|
||||
one, // enumerator begins and ends on line 39
|
||||
two, // enumerator begins and ends on line 40
|
||||
three // enumerator begins on line 41, ends on line 42
|
||||
= 4
|
||||
};
|
|
@ -1,102 +1,102 @@
|
|||
#include "include.h"
|
||||
|
||||
#define FOO bar
|
||||
|
||||
class Heal{};
|
||||
|
||||
class A {
|
||||
A() {}
|
||||
~A(){}
|
||||
class B {
|
||||
void f( A );
|
||||
void f( A & );
|
||||
void f( A* );
|
||||
void f( int &, const char [], A ** );
|
||||
};
|
||||
};
|
||||
|
||||
namespace NS {
|
||||
namespace NS2{
|
||||
struct a{};
|
||||
}
|
||||
class B: public A {
|
||||
public:
|
||||
struct AA {};
|
||||
enum e {
|
||||
One,
|
||||
Two,
|
||||
Three
|
||||
};
|
||||
|
||||
void f(){
|
||||
using namespace NS2;
|
||||
a aStruct;
|
||||
}
|
||||
|
||||
|
||||
|
||||
AA anotherStruct;
|
||||
};
|
||||
union u{ } ;
|
||||
}
|
||||
|
||||
namespace NS3{
|
||||
class C : public NS::B {
|
||||
e eE = One;
|
||||
};
|
||||
}
|
||||
|
||||
A::B b1;
|
||||
|
||||
typedef NS::B NS_B;
|
||||
NS_B b2;
|
||||
|
||||
union u{
|
||||
};
|
||||
|
||||
class AClassForFoo {};
|
||||
|
||||
AClassForFoo foo( AClassForFoo ){
|
||||
AClassForFoo b;
|
||||
return b;
|
||||
}
|
||||
|
||||
Head * Head::operator *= ( int index ){
|
||||
return array[ index ];
|
||||
}
|
||||
|
||||
Head * Head::operator += ( int index ){
|
||||
return array[ index ];
|
||||
}
|
||||
|
||||
extern int externalInt;
|
||||
extern int externalIntWithInitializer = 2;
|
||||
extern "C" int externCInt;
|
||||
extern "C" int externCIntWithInitializer = 3;
|
||||
|
||||
void forwardFunction() { }
|
||||
void normalFunction() { }
|
||||
|
||||
void DeclsAndDefns::forwardMethod(){ }
|
||||
|
||||
int DeclsAndDefns::staticField = 5;
|
||||
|
||||
|
||||
namespace bug68235{
|
||||
struct xTag {
|
||||
int x;
|
||||
};
|
||||
typedef xTag xType;
|
||||
|
||||
typedef struct yTag {
|
||||
int x;
|
||||
} yType;
|
||||
|
||||
class C1{
|
||||
public:
|
||||
xType x;
|
||||
yType y;
|
||||
C1();
|
||||
~C1();
|
||||
};
|
||||
#include "include.h"
|
||||
|
||||
#define FOO bar
|
||||
|
||||
class Heal{};
|
||||
|
||||
class A {
|
||||
A() {}
|
||||
~A(){}
|
||||
class B {
|
||||
void f( A );
|
||||
void f( A & );
|
||||
void f( A* );
|
||||
void f( int &, const char [], A ** );
|
||||
};
|
||||
};
|
||||
|
||||
namespace NS {
|
||||
namespace NS2{
|
||||
struct a{};
|
||||
}
|
||||
class B: public A {
|
||||
public:
|
||||
struct AA {};
|
||||
enum e {
|
||||
One,
|
||||
Two,
|
||||
Three
|
||||
};
|
||||
|
||||
void f(){
|
||||
using namespace NS2;
|
||||
a aStruct;
|
||||
}
|
||||
|
||||
|
||||
|
||||
AA anotherStruct;
|
||||
};
|
||||
union u{ } ;
|
||||
}
|
||||
|
||||
namespace NS3{
|
||||
class C : public NS::B {
|
||||
e eE = One;
|
||||
};
|
||||
}
|
||||
|
||||
A::B b1;
|
||||
|
||||
typedef NS::B NS_B;
|
||||
NS_B b2;
|
||||
|
||||
union u{
|
||||
};
|
||||
|
||||
class AClassForFoo {};
|
||||
|
||||
AClassForFoo foo( AClassForFoo ){
|
||||
AClassForFoo b;
|
||||
return b;
|
||||
}
|
||||
|
||||
Head * Head::operator *= ( int index ){
|
||||
return array[ index ];
|
||||
}
|
||||
|
||||
Head * Head::operator += ( int index ){
|
||||
return array[ index ];
|
||||
}
|
||||
|
||||
extern int externalInt;
|
||||
extern int externalIntWithInitializer = 2;
|
||||
extern "C" int externCInt;
|
||||
extern "C" int externCIntWithInitializer = 3;
|
||||
|
||||
void forwardFunction() { }
|
||||
void normalFunction() { }
|
||||
|
||||
void DeclsAndDefns::forwardMethod(){ }
|
||||
|
||||
int DeclsAndDefns::staticField = 5;
|
||||
|
||||
|
||||
namespace bug68235{
|
||||
struct xTag {
|
||||
int x;
|
||||
};
|
||||
typedef xTag xType;
|
||||
|
||||
typedef struct yTag {
|
||||
int x;
|
||||
} yType;
|
||||
|
||||
class C1{
|
||||
public:
|
||||
xType x;
|
||||
yType y;
|
||||
C1();
|
||||
~C1();
|
||||
};
|
||||
}
|
|
@ -1,36 +1,36 @@
|
|||
#ifndef INCLUDE_H
|
||||
#define INCLUDE_H
|
||||
|
||||
class Head {
|
||||
Head ** array;
|
||||
|
||||
Head * operator *= ( int index );
|
||||
Head * operator * ( int index ){ return array[ index ]; }
|
||||
Head * operator += ( int index );
|
||||
|
||||
operator const short & ();
|
||||
operator short ();
|
||||
operator short int ();
|
||||
|
||||
};
|
||||
|
||||
class DeclsAndDefns{
|
||||
static int staticField;
|
||||
int nonStaticField;
|
||||
|
||||
void forwardMethod();
|
||||
void inlineMethod() {}
|
||||
};
|
||||
|
||||
void forwardFunction();
|
||||
|
||||
|
||||
class Direction{
|
||||
void turn();
|
||||
void turn(int);
|
||||
void turnAgain(void);
|
||||
};
|
||||
class Right : public Direction {
|
||||
void turn() { }
|
||||
};
|
||||
#ifndef INCLUDE_H
|
||||
#define INCLUDE_H
|
||||
|
||||
class Head {
|
||||
Head ** array;
|
||||
|
||||
Head * operator *= ( int index );
|
||||
Head * operator * ( int index ){ return array[ index ]; }
|
||||
Head * operator += ( int index );
|
||||
|
||||
operator const short & ();
|
||||
operator short ();
|
||||
operator short int ();
|
||||
|
||||
};
|
||||
|
||||
class DeclsAndDefns{
|
||||
static int staticField;
|
||||
int nonStaticField;
|
||||
|
||||
void forwardMethod();
|
||||
void inlineMethod() {}
|
||||
};
|
||||
|
||||
void forwardFunction();
|
||||
|
||||
|
||||
class Direction{
|
||||
void turn();
|
||||
void turn(int);
|
||||
void turnAgain(void);
|
||||
};
|
||||
class Right : public Direction {
|
||||
void turn() { }
|
||||
};
|
||||
#endif
|
|
@ -1,496 +1,496 @@
|
|||
/*******************************************************************************
|
||||
* 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.testplugin;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import org.eclipse.cdt.core.cdtvariables.ICdtVariablesContributor;
|
||||
import org.eclipse.cdt.core.settings.model.CConfigurationStatus;
|
||||
import org.eclipse.cdt.core.settings.model.ICBuildSetting;
|
||||
import org.eclipse.cdt.core.settings.model.ICConfigExtensionReference;
|
||||
import org.eclipse.cdt.core.settings.model.ICConfigurationDescription;
|
||||
import org.eclipse.cdt.core.settings.model.ICExternalSetting;
|
||||
import org.eclipse.cdt.core.settings.model.ICFileDescription;
|
||||
import org.eclipse.cdt.core.settings.model.ICFolderDescription;
|
||||
import org.eclipse.cdt.core.settings.model.ICLanguageSetting;
|
||||
import org.eclipse.cdt.core.settings.model.ICProjectDescription;
|
||||
import org.eclipse.cdt.core.settings.model.ICResourceDescription;
|
||||
import org.eclipse.cdt.core.settings.model.ICSettingContainer;
|
||||
import org.eclipse.cdt.core.settings.model.ICSettingEntry;
|
||||
import org.eclipse.cdt.core.settings.model.ICSettingObject;
|
||||
import org.eclipse.cdt.core.settings.model.ICSourceEntry;
|
||||
import org.eclipse.cdt.core.settings.model.ICStorageElement;
|
||||
import org.eclipse.cdt.core.settings.model.ICTargetPlatformSetting;
|
||||
import org.eclipse.cdt.core.settings.model.WriteAccessException;
|
||||
import org.eclipse.cdt.core.settings.model.extension.CConfigurationData;
|
||||
import org.eclipse.core.resources.IProject;
|
||||
import org.eclipse.core.runtime.CoreException;
|
||||
import org.eclipse.core.runtime.IPath;
|
||||
import org.eclipse.core.runtime.QualifiedName;
|
||||
|
||||
/**
|
||||
* Collection of mock classes for testing
|
||||
*/
|
||||
public class CModelMock {
|
||||
/**
|
||||
* Dummy implementation of ICProjectDescription for testing.
|
||||
* Feel free to override the methods you are interested to mock.
|
||||
*/
|
||||
public static class DummyCProjectDescription implements ICProjectDescription {
|
||||
|
||||
@Override
|
||||
public ICSettingObject[] getChildSettings() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getId() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getType() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isValid() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ICConfigurationDescription getConfiguration() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ICSettingContainer getParent() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isReadOnly() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ICStorageElement getStorage(String id, boolean create)
|
||||
throws CoreException {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removeStorage(String id) throws CoreException {
|
||||
}
|
||||
|
||||
@Override
|
||||
public ICStorageElement importStorage(String id, ICStorageElement el)
|
||||
throws UnsupportedOperationException, CoreException {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setReadOnly(boolean readOnly, boolean keepModify) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getConfigurationRelations() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setConfigurationRelations(int status) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void useDefaultConfigurationRelations() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isDefaultConfigurationRelations() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ICConfigurationDescription[] getConfigurations() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ICConfigurationDescription getActiveConfiguration() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setActiveConfiguration(ICConfigurationDescription cfg)
|
||||
throws WriteAccessException {
|
||||
}
|
||||
|
||||
@Override
|
||||
public ICConfigurationDescription createConfiguration(String id,
|
||||
String name, ICConfigurationDescription base)
|
||||
throws CoreException, WriteAccessException {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ICConfigurationDescription createConfiguration(
|
||||
String buildSystemId, CConfigurationData data)
|
||||
throws CoreException, WriteAccessException {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ICConfigurationDescription getConfigurationByName(String name) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ICConfigurationDescription getConfigurationById(String id) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removeConfiguration(String name)
|
||||
throws WriteAccessException {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removeConfiguration(ICConfigurationDescription cfg)
|
||||
throws WriteAccessException {
|
||||
}
|
||||
|
||||
@Override
|
||||
public IProject getProject() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isModified() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getSessionProperty(QualifiedName name) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setSessionProperty(QualifiedName name, Object value) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public ICConfigurationDescription getDefaultSettingConfiguration() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setDefaultSettingConfiguration(
|
||||
ICConfigurationDescription cfg) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isCdtProjectCreating() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setCdtProjectCreated() {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Dummy implementation of ICConfigurationDescription for testing.
|
||||
* Feel free to override the methods you are interested to mock.
|
||||
*/
|
||||
public static class DummyCConfigurationDescription implements ICConfigurationDescription {
|
||||
private String id;
|
||||
private ICProjectDescription projectDescription;
|
||||
|
||||
public DummyCConfigurationDescription(String id) {
|
||||
this.id = id;
|
||||
this.projectDescription = new DummyCProjectDescription();
|
||||
}
|
||||
|
||||
@Override
|
||||
public ICSettingObject[] getChildSettings() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getType() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isValid() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ICConfigurationDescription getConfiguration() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ICSettingContainer getParent() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isReadOnly() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ICStorageElement getStorage(String id, boolean create)
|
||||
throws CoreException {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removeStorage(String id) throws CoreException {
|
||||
}
|
||||
|
||||
@Override
|
||||
public ICStorageElement importStorage(String id, ICStorageElement el)
|
||||
throws UnsupportedOperationException, CoreException {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setReadOnly(boolean readOnly, boolean keepModify) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isActive() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDescription() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setDescription(String des) throws WriteAccessException {
|
||||
}
|
||||
|
||||
@Override
|
||||
public ICProjectDescription getProjectDescription() {
|
||||
return projectDescription;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ICFolderDescription getRootFolderDescription() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ICFolderDescription[] getFolderDescriptions() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ICFileDescription[] getFileDescriptions() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ICResourceDescription[] getResourceDescriptions() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ICResourceDescription getResourceDescription(IPath path,
|
||||
boolean exactPath) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removeResourceDescription(ICResourceDescription des)
|
||||
throws CoreException, WriteAccessException {
|
||||
}
|
||||
|
||||
@Override
|
||||
public ICFileDescription createFileDescription(IPath path,
|
||||
ICResourceDescription base) throws CoreException,
|
||||
WriteAccessException {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ICFolderDescription createFolderDescription(IPath path,
|
||||
ICFolderDescription base) throws CoreException,
|
||||
WriteAccessException {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getBuildSystemId() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CConfigurationData getConfigurationData() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setActive() throws WriteAccessException {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setConfigurationData(String buildSystemId, CConfigurationData data) throws WriteAccessException {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isModified() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ICTargetPlatformSetting getTargetPlatformSetting() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ICSourceEntry[] getSourceEntries() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ICSourceEntry[] getResolvedSourceEntries() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setSourceEntries(ICSourceEntry[] entries) throws CoreException, WriteAccessException {
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, String> getReferenceInfo() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setReferenceInfo(Map<String, String> refs) throws WriteAccessException {
|
||||
}
|
||||
|
||||
@Override
|
||||
public ICExternalSetting[] getExternalSettings() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ICExternalSetting createExternalSetting(String[] languageIDs,
|
||||
String[] contentTypeIds, String[] extensions,
|
||||
ICSettingEntry[] entries) throws WriteAccessException {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removeExternalSetting(ICExternalSetting setting) throws WriteAccessException {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removeExternalSettings() throws WriteAccessException {
|
||||
}
|
||||
|
||||
@Override
|
||||
public ICBuildSetting getBuildSetting() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ICdtVariablesContributor getBuildVariablesContributor() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getSessionProperty(QualifiedName name) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setSessionProperty(QualifiedName name, Object value) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setName(String name) throws WriteAccessException {
|
||||
}
|
||||
|
||||
@Override
|
||||
public ICConfigExtensionReference[] get(String extensionPointID) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ICConfigExtensionReference create(String extensionPoint, String extension) throws CoreException {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void remove(ICConfigExtensionReference ext) throws CoreException {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void remove(String extensionPoint) throws CoreException {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isPreferenceConfiguration() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ICLanguageSetting getLanguageSettingForFile(IPath path, boolean ignoreExludeStatus) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setExternalSettingsProviderIds(String[] ids) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public String[] getExternalSettingsProviderIds() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateExternalSettingsProviders(String[] ids) throws WriteAccessException {
|
||||
}
|
||||
|
||||
@Override
|
||||
public CConfigurationStatus getConfigurationStatus() {
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
/*******************************************************************************
|
||||
* 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.testplugin;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import org.eclipse.cdt.core.cdtvariables.ICdtVariablesContributor;
|
||||
import org.eclipse.cdt.core.settings.model.CConfigurationStatus;
|
||||
import org.eclipse.cdt.core.settings.model.ICBuildSetting;
|
||||
import org.eclipse.cdt.core.settings.model.ICConfigExtensionReference;
|
||||
import org.eclipse.cdt.core.settings.model.ICConfigurationDescription;
|
||||
import org.eclipse.cdt.core.settings.model.ICExternalSetting;
|
||||
import org.eclipse.cdt.core.settings.model.ICFileDescription;
|
||||
import org.eclipse.cdt.core.settings.model.ICFolderDescription;
|
||||
import org.eclipse.cdt.core.settings.model.ICLanguageSetting;
|
||||
import org.eclipse.cdt.core.settings.model.ICProjectDescription;
|
||||
import org.eclipse.cdt.core.settings.model.ICResourceDescription;
|
||||
import org.eclipse.cdt.core.settings.model.ICSettingContainer;
|
||||
import org.eclipse.cdt.core.settings.model.ICSettingEntry;
|
||||
import org.eclipse.cdt.core.settings.model.ICSettingObject;
|
||||
import org.eclipse.cdt.core.settings.model.ICSourceEntry;
|
||||
import org.eclipse.cdt.core.settings.model.ICStorageElement;
|
||||
import org.eclipse.cdt.core.settings.model.ICTargetPlatformSetting;
|
||||
import org.eclipse.cdt.core.settings.model.WriteAccessException;
|
||||
import org.eclipse.cdt.core.settings.model.extension.CConfigurationData;
|
||||
import org.eclipse.core.resources.IProject;
|
||||
import org.eclipse.core.runtime.CoreException;
|
||||
import org.eclipse.core.runtime.IPath;
|
||||
import org.eclipse.core.runtime.QualifiedName;
|
||||
|
||||
/**
|
||||
* Collection of mock classes for testing
|
||||
*/
|
||||
public class CModelMock {
|
||||
/**
|
||||
* Dummy implementation of ICProjectDescription for testing.
|
||||
* Feel free to override the methods you are interested to mock.
|
||||
*/
|
||||
public static class DummyCProjectDescription implements ICProjectDescription {
|
||||
|
||||
@Override
|
||||
public ICSettingObject[] getChildSettings() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getId() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getType() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isValid() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ICConfigurationDescription getConfiguration() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ICSettingContainer getParent() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isReadOnly() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ICStorageElement getStorage(String id, boolean create)
|
||||
throws CoreException {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removeStorage(String id) throws CoreException {
|
||||
}
|
||||
|
||||
@Override
|
||||
public ICStorageElement importStorage(String id, ICStorageElement el)
|
||||
throws UnsupportedOperationException, CoreException {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setReadOnly(boolean readOnly, boolean keepModify) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getConfigurationRelations() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setConfigurationRelations(int status) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void useDefaultConfigurationRelations() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isDefaultConfigurationRelations() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ICConfigurationDescription[] getConfigurations() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ICConfigurationDescription getActiveConfiguration() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setActiveConfiguration(ICConfigurationDescription cfg)
|
||||
throws WriteAccessException {
|
||||
}
|
||||
|
||||
@Override
|
||||
public ICConfigurationDescription createConfiguration(String id,
|
||||
String name, ICConfigurationDescription base)
|
||||
throws CoreException, WriteAccessException {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ICConfigurationDescription createConfiguration(
|
||||
String buildSystemId, CConfigurationData data)
|
||||
throws CoreException, WriteAccessException {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ICConfigurationDescription getConfigurationByName(String name) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ICConfigurationDescription getConfigurationById(String id) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removeConfiguration(String name)
|
||||
throws WriteAccessException {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removeConfiguration(ICConfigurationDescription cfg)
|
||||
throws WriteAccessException {
|
||||
}
|
||||
|
||||
@Override
|
||||
public IProject getProject() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isModified() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getSessionProperty(QualifiedName name) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setSessionProperty(QualifiedName name, Object value) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public ICConfigurationDescription getDefaultSettingConfiguration() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setDefaultSettingConfiguration(
|
||||
ICConfigurationDescription cfg) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isCdtProjectCreating() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setCdtProjectCreated() {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Dummy implementation of ICConfigurationDescription for testing.
|
||||
* Feel free to override the methods you are interested to mock.
|
||||
*/
|
||||
public static class DummyCConfigurationDescription implements ICConfigurationDescription {
|
||||
private String id;
|
||||
private ICProjectDescription projectDescription;
|
||||
|
||||
public DummyCConfigurationDescription(String id) {
|
||||
this.id = id;
|
||||
this.projectDescription = new DummyCProjectDescription();
|
||||
}
|
||||
|
||||
@Override
|
||||
public ICSettingObject[] getChildSettings() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getType() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isValid() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ICConfigurationDescription getConfiguration() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ICSettingContainer getParent() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isReadOnly() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ICStorageElement getStorage(String id, boolean create)
|
||||
throws CoreException {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removeStorage(String id) throws CoreException {
|
||||
}
|
||||
|
||||
@Override
|
||||
public ICStorageElement importStorage(String id, ICStorageElement el)
|
||||
throws UnsupportedOperationException, CoreException {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setReadOnly(boolean readOnly, boolean keepModify) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isActive() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDescription() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setDescription(String des) throws WriteAccessException {
|
||||
}
|
||||
|
||||
@Override
|
||||
public ICProjectDescription getProjectDescription() {
|
||||
return projectDescription;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ICFolderDescription getRootFolderDescription() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ICFolderDescription[] getFolderDescriptions() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ICFileDescription[] getFileDescriptions() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ICResourceDescription[] getResourceDescriptions() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ICResourceDescription getResourceDescription(IPath path,
|
||||
boolean exactPath) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removeResourceDescription(ICResourceDescription des)
|
||||
throws CoreException, WriteAccessException {
|
||||
}
|
||||
|
||||
@Override
|
||||
public ICFileDescription createFileDescription(IPath path,
|
||||
ICResourceDescription base) throws CoreException,
|
||||
WriteAccessException {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ICFolderDescription createFolderDescription(IPath path,
|
||||
ICFolderDescription base) throws CoreException,
|
||||
WriteAccessException {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getBuildSystemId() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CConfigurationData getConfigurationData() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setActive() throws WriteAccessException {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setConfigurationData(String buildSystemId, CConfigurationData data) throws WriteAccessException {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isModified() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ICTargetPlatformSetting getTargetPlatformSetting() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ICSourceEntry[] getSourceEntries() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ICSourceEntry[] getResolvedSourceEntries() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setSourceEntries(ICSourceEntry[] entries) throws CoreException, WriteAccessException {
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, String> getReferenceInfo() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setReferenceInfo(Map<String, String> refs) throws WriteAccessException {
|
||||
}
|
||||
|
||||
@Override
|
||||
public ICExternalSetting[] getExternalSettings() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ICExternalSetting createExternalSetting(String[] languageIDs,
|
||||
String[] contentTypeIds, String[] extensions,
|
||||
ICSettingEntry[] entries) throws WriteAccessException {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removeExternalSetting(ICExternalSetting setting) throws WriteAccessException {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removeExternalSettings() throws WriteAccessException {
|
||||
}
|
||||
|
||||
@Override
|
||||
public ICBuildSetting getBuildSetting() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ICdtVariablesContributor getBuildVariablesContributor() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getSessionProperty(QualifiedName name) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setSessionProperty(QualifiedName name, Object value) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setName(String name) throws WriteAccessException {
|
||||
}
|
||||
|
||||
@Override
|
||||
public ICConfigExtensionReference[] get(String extensionPointID) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ICConfigExtensionReference create(String extensionPoint, String extension) throws CoreException {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void remove(ICConfigExtensionReference ext) throws CoreException {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void remove(String extensionPoint) throws CoreException {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isPreferenceConfiguration() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ICLanguageSetting getLanguageSettingForFile(IPath path, boolean ignoreExludeStatus) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setExternalSettingsProviderIds(String[] ids) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public String[] getExternalSettingsProviderIds() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateExternalSettingsProviders(String[] ids) throws WriteAccessException {
|
||||
}
|
||||
|
||||
@Override
|
||||
public CConfigurationStatus getConfigurationStatus() {
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,22 +1,22 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>org.eclipse.cdt.core.win32.x86</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.pde.ManifestBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.pde.SchemaBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.pde.PluginNature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>org.eclipse.cdt.core.win32.x86</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.pde.ManifestBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.pde.SchemaBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.pde.PluginNature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
||||
|
|
|
@ -1,24 +1,24 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>About</title></head>
|
||||
|
||||
<body lang="EN-US">
|
||||
<h2>About This Content</h2>
|
||||
|
||||
<p>June 22, 2007</p>
|
||||
<h3>License</h3>
|
||||
|
||||
<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise
|
||||
indicated below, the Content is provided to you under the terms and conditions of the
|
||||
Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available
|
||||
at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
|
||||
For purposes of the EPL, "Program" will mean the Content.</p>
|
||||
|
||||
<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
|
||||
being redistributed by another party ("Redistributor") and different terms and conditions may
|
||||
apply to your use of any object code in the Content. Check the Redistributor's license that was
|
||||
provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
|
||||
indicated below, the terms and conditions of the EPL still apply to any source code in the Content
|
||||
and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
|
||||
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>About</title></head>
|
||||
|
||||
<body lang="EN-US">
|
||||
<h2>About This Content</h2>
|
||||
|
||||
<p>June 22, 2007</p>
|
||||
<h3>License</h3>
|
||||
|
||||
<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise
|
||||
indicated below, the Content is provided to you under the terms and conditions of the
|
||||
Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available
|
||||
at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
|
||||
For purposes of the EPL, "Program" will mean the Content.</p>
|
||||
|
||||
<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
|
||||
being redistributed by another party ("Redistributor") and different terms and conditions may
|
||||
apply to your use of any object code in the Content. Check the Redistributor's license that was
|
||||
provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
|
||||
indicated below, the terms and conditions of the EPL still apply to any source code in the Content
|
||||
and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
|
||||
|
||||
</body></html>
|
|
@ -1,15 +1,15 @@
|
|||
###############################################################################
|
||||
# Copyright (c) 2011 Marc-Andre Laperle and others.
|
||||
# All rights reserved. This program and the accompanying materials
|
||||
# are made available under the terms 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
|
||||
###############################################################################
|
||||
bin.includes = META-INF/,\
|
||||
os/,\
|
||||
about.html,\
|
||||
plugin.properties
|
||||
src.includes = about.html
|
||||
###############################################################################
|
||||
# Copyright (c) 2011 Marc-Andre Laperle and others.
|
||||
# All rights reserved. This program and the accompanying materials
|
||||
# are made available under the terms 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
|
||||
###############################################################################
|
||||
bin.includes = META-INF/,\
|
||||
os/,\
|
||||
about.html,\
|
||||
plugin.properties
|
||||
src.includes = about.html
|
||||
|
|
|
@ -1,22 +1,22 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>org.eclipse.cdt.core.win32.x86_64</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.pde.ManifestBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.pde.SchemaBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.pde.PluginNature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>org.eclipse.cdt.core.win32.x86_64</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.pde.ManifestBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.pde.SchemaBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.pde.PluginNature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
||||
|
|
|
@ -1,24 +1,24 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>About</title></head>
|
||||
|
||||
<body lang="EN-US">
|
||||
<h2>About This Content</h2>
|
||||
|
||||
<p>June 22, 2007</p>
|
||||
<h3>License</h3>
|
||||
|
||||
<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise
|
||||
indicated below, the Content is provided to you under the terms and conditions of the
|
||||
Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available
|
||||
at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
|
||||
For purposes of the EPL, "Program" will mean the Content.</p>
|
||||
|
||||
<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
|
||||
being redistributed by another party ("Redistributor") and different terms and conditions may
|
||||
apply to your use of any object code in the Content. Check the Redistributor's license that was
|
||||
provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
|
||||
indicated below, the terms and conditions of the EPL still apply to any source code in the Content
|
||||
and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
|
||||
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>About</title></head>
|
||||
|
||||
<body lang="EN-US">
|
||||
<h2>About This Content</h2>
|
||||
|
||||
<p>June 22, 2007</p>
|
||||
<h3>License</h3>
|
||||
|
||||
<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise
|
||||
indicated below, the Content is provided to you under the terms and conditions of the
|
||||
Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available
|
||||
at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
|
||||
For purposes of the EPL, "Program" will mean the Content.</p>
|
||||
|
||||
<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
|
||||
being redistributed by another party ("Redistributor") and different terms and conditions may
|
||||
apply to your use of any object code in the Content. Check the Redistributor's license that was
|
||||
provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
|
||||
indicated below, the terms and conditions of the EPL still apply to any source code in the Content
|
||||
and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
|
||||
|
||||
</body></html>
|
|
@ -1,15 +1,15 @@
|
|||
###############################################################################
|
||||
# Copyright (c) 2011 Marc-Andre Laperle and others.
|
||||
# All rights reserved. This program and the accompanying materials
|
||||
# are made available under the terms 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
|
||||
###############################################################################
|
||||
bin.includes = META-INF/,\
|
||||
os/,\
|
||||
about.html,\
|
||||
plugin.properties
|
||||
src.includes = about.html
|
||||
###############################################################################
|
||||
# Copyright (c) 2011 Marc-Andre Laperle and others.
|
||||
# All rights reserved. This program and the accompanying materials
|
||||
# are made available under the terms 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
|
||||
###############################################################################
|
||||
bin.includes = META-INF/,\
|
||||
os/,\
|
||||
about.html,\
|
||||
plugin.properties
|
||||
src.includes = about.html
|
||||
|
|
|
@ -1,73 +1,73 @@
|
|||
#*******************************************************************************
|
||||
# Copyright (c) 2011 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
|
||||
#*******************************************************************************
|
||||
|
||||
# Makefile (nmake) for Core fragment on Windows x86_64
|
||||
|
||||
OS = win32
|
||||
ARCH = x86_64
|
||||
|
||||
JDK_INCLUDES= "$(JAVA_HOME)\include"
|
||||
JDK_OS_INCLUDES= "$(JAVA_HOME)\include/$(OS)"
|
||||
|
||||
CC=cl
|
||||
DEBUG_FLAGS = -DDEBUG_MONITOR -DREAD_REPORT
|
||||
CFLAGS = /TP /I$(JDK_INCLUDES) /I$(JDK_OS_INCLUDES) /EHs /nologo
|
||||
CFLAGS_UNICODE = /D "_UNICODE" /D "UNICODE" $(CFLAGS)
|
||||
|
||||
INSTALL_DIR = ..\..\org.eclipse.cdt.core.$(OS).$(ARCH)\os\$(OS)\$(ARCH)
|
||||
|
||||
DLL_SPAWNER = spawner.dll
|
||||
OBJS_SPAWNER=StdAfx.obj Win32ProcessEx.obj iostream.obj raise.obj spawner.obj
|
||||
|
||||
DLL_WINREG = winreg.dll
|
||||
OBJS_WINREG=winreg/winreg.obj
|
||||
|
||||
EXE_STARTER = starter.exe
|
||||
OBJS_STARTER=starter/starter.obj
|
||||
|
||||
EXE_LISTTASKS = listtasks.exe
|
||||
OBJS_LISTTASKS=listtasks/listtasks.obj listtasks/StdAfx.obj
|
||||
|
||||
.c.obj:
|
||||
cl /c $(CFLAGS_UNICODE) $*.c /Fo$@
|
||||
|
||||
.cpp.obj:
|
||||
cl /c $(CFLAGS_UNICODE) $*.cpp /Fo$@
|
||||
|
||||
#TODO: Use unicode for listtasks, see bug 353460
|
||||
listtasks/listtasks.obj:
|
||||
cl /c $(CFLAGS) $*.cpp /Fo$@
|
||||
|
||||
spawner: $(OBJS_SPAWNER)
|
||||
link /dll /nologo /out:$(DLL_SPAWNER) $(OBJS_SPAWNER) User32.lib
|
||||
|
||||
winreg: $(OBJS_WINREG)
|
||||
link /dll /nologo /out:$(DLL_WINREG) $(OBJS_WINREG) Advapi32.lib
|
||||
|
||||
starter: $(OBJS_STARTER)
|
||||
link /nologo /out:$(EXE_STARTER) $(OBJS_STARTER) Psapi.Lib Shell32.lib
|
||||
|
||||
listtasks: $(OBJS_LISTTASKS)
|
||||
link /nologo /out:$(EXE_LISTTASKS) $(OBJS_LISTTASKS) Psapi.Lib
|
||||
|
||||
all: spawner winreg starter listtasks
|
||||
|
||||
clean:
|
||||
del *.obj *.lib *.exp *.exe *.dll winreg\*.obj starter\*.obj listtasks\*.obj
|
||||
|
||||
rebuild: clean all
|
||||
|
||||
install: all
|
||||
copy *.dll $(INSTALL_DIR)
|
||||
copy *.exe $(INSTALL_DIR)
|
||||
|
||||
uninstall:
|
||||
del $(INSTALL_DIR)\*.dll $(INSTALL_DIR)\*.exe
|
||||
#*******************************************************************************
|
||||
# Copyright (c) 2011 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
|
||||
#*******************************************************************************
|
||||
|
||||
# Makefile (nmake) for Core fragment on Windows x86_64
|
||||
|
||||
OS = win32
|
||||
ARCH = x86_64
|
||||
|
||||
JDK_INCLUDES= "$(JAVA_HOME)\include"
|
||||
JDK_OS_INCLUDES= "$(JAVA_HOME)\include/$(OS)"
|
||||
|
||||
CC=cl
|
||||
DEBUG_FLAGS = -DDEBUG_MONITOR -DREAD_REPORT
|
||||
CFLAGS = /TP /I$(JDK_INCLUDES) /I$(JDK_OS_INCLUDES) /EHs /nologo
|
||||
CFLAGS_UNICODE = /D "_UNICODE" /D "UNICODE" $(CFLAGS)
|
||||
|
||||
INSTALL_DIR = ..\..\org.eclipse.cdt.core.$(OS).$(ARCH)\os\$(OS)\$(ARCH)
|
||||
|
||||
DLL_SPAWNER = spawner.dll
|
||||
OBJS_SPAWNER=StdAfx.obj Win32ProcessEx.obj iostream.obj raise.obj spawner.obj
|
||||
|
||||
DLL_WINREG = winreg.dll
|
||||
OBJS_WINREG=winreg/winreg.obj
|
||||
|
||||
EXE_STARTER = starter.exe
|
||||
OBJS_STARTER=starter/starter.obj
|
||||
|
||||
EXE_LISTTASKS = listtasks.exe
|
||||
OBJS_LISTTASKS=listtasks/listtasks.obj listtasks/StdAfx.obj
|
||||
|
||||
.c.obj:
|
||||
cl /c $(CFLAGS_UNICODE) $*.c /Fo$@
|
||||
|
||||
.cpp.obj:
|
||||
cl /c $(CFLAGS_UNICODE) $*.cpp /Fo$@
|
||||
|
||||
#TODO: Use unicode for listtasks, see bug 353460
|
||||
listtasks/listtasks.obj:
|
||||
cl /c $(CFLAGS) $*.cpp /Fo$@
|
||||
|
||||
spawner: $(OBJS_SPAWNER)
|
||||
link /dll /nologo /out:$(DLL_SPAWNER) $(OBJS_SPAWNER) User32.lib
|
||||
|
||||
winreg: $(OBJS_WINREG)
|
||||
link /dll /nologo /out:$(DLL_WINREG) $(OBJS_WINREG) Advapi32.lib
|
||||
|
||||
starter: $(OBJS_STARTER)
|
||||
link /nologo /out:$(EXE_STARTER) $(OBJS_STARTER) Psapi.Lib Shell32.lib
|
||||
|
||||
listtasks: $(OBJS_LISTTASKS)
|
||||
link /nologo /out:$(EXE_LISTTASKS) $(OBJS_LISTTASKS) Psapi.Lib
|
||||
|
||||
all: spawner winreg starter listtasks
|
||||
|
||||
clean:
|
||||
del *.obj *.lib *.exp *.exe *.dll winreg\*.obj starter\*.obj listtasks\*.obj
|
||||
|
||||
rebuild: clean all
|
||||
|
||||
install: all
|
||||
copy *.dll $(INSTALL_DIR)
|
||||
copy *.exe $(INSTALL_DIR)
|
||||
|
||||
uninstall:
|
||||
del $(INSTALL_DIR)\*.dll $(INSTALL_DIR)\*.exe
|
||||
|
|
|
@ -1,23 +1,23 @@
|
|||
#*******************************************************************************
|
||||
# Copyright (c) 2011 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
|
||||
#*******************************************************************************
|
||||
|
||||
How to build the Win32 x86_64 core fragment:
|
||||
|
||||
1. Prerequisites
|
||||
- Install Windows SDK 7.1. If the SDK is not installed in the default location or if you want to try a different SDK, modify setenv64.bat accordingly.
|
||||
- Make sure your JAVA_HOME environment variable is set and points to a 64 bit JDK (C:\Program Files\Java\jdkX.X.X not C:\Program Files (x86)\Java\jdkX.X.X )
|
||||
|
||||
2. Build and install
|
||||
- In a command prompt, execute setenv64.bat.
|
||||
The command prompt should turn to a different color and print a message about targeting x64.
|
||||
- Execute build64.bat
|
||||
This will build the dlls and executables, copy them to org.eclipse.cdt.core.win32.x86_64\os\win32\x86_64 then clean the build directories.
|
||||
Optionally, you can use nmake /f Makefile_x86_64.mk TARGET directly. Refer to Makefile_x86_64.mk for valid targets.
|
||||
#*******************************************************************************
|
||||
# Copyright (c) 2011 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
|
||||
#*******************************************************************************
|
||||
|
||||
How to build the Win32 x86_64 core fragment:
|
||||
|
||||
1. Prerequisites
|
||||
- Install Windows SDK 7.1. If the SDK is not installed in the default location or if you want to try a different SDK, modify setenv64.bat accordingly.
|
||||
- Make sure your JAVA_HOME environment variable is set and points to a 64 bit JDK (C:\Program Files\Java\jdkX.X.X not C:\Program Files (x86)\Java\jdkX.X.X )
|
||||
|
||||
2. Build and install
|
||||
- In a command prompt, execute setenv64.bat.
|
||||
The command prompt should turn to a different color and print a message about targeting x64.
|
||||
- Execute build64.bat
|
||||
This will build the dlls and executables, copy them to org.eclipse.cdt.core.win32.x86_64\os\win32\x86_64 then clean the build directories.
|
||||
Optionally, you can use nmake /f Makefile_x86_64.mk TARGET directly. Refer to Makefile_x86_64.mk for valid targets.
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
@rem ***************************************************************************
|
||||
@rem Copyright (c) 2011 Marc-Andre Laperle and others.
|
||||
@rem All rights reserved. This program and the accompanying materials
|
||||
@rem are made available under the terms of the Eclipse Public License v1.0
|
||||
@rem which accompanies this distribution, and is available at
|
||||
@rem http://www.eclipse.org/legal/epl-v10.html
|
||||
@rem
|
||||
@rem Contributors:
|
||||
@rem Marc-Andre Laperle - initial API and implementation
|
||||
@rem ***************************************************************************
|
||||
|
||||
@rem ***************************************************************************
|
||||
@rem Copyright (c) 2011 Marc-Andre Laperle and others.
|
||||
@rem All rights reserved. This program and the accompanying materials
|
||||
@rem are made available under the terms of the Eclipse Public License v1.0
|
||||
@rem which accompanies this distribution, and is available at
|
||||
@rem http://www.eclipse.org/legal/epl-v10.html
|
||||
@rem
|
||||
@rem Contributors:
|
||||
@rem Marc-Andre Laperle - initial API and implementation
|
||||
@rem ***************************************************************************
|
||||
|
||||
nmake /f Makefile_x86_64.mk /NOLOGO install clean
|
|
@ -1,33 +1,33 @@
|
|||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 2013
|
||||
VisualStudioVersion = 12.0.31101.0
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "winreg", "winreg\winreg.vcxproj", "{4CA57EA3-42F2-4CC1-8E95-5C707A8E7363}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Mixed Platforms = Debug|Mixed Platforms
|
||||
Debug|Win32 = Debug|Win32
|
||||
Debug|x64 = Debug|x64
|
||||
Release|Mixed Platforms = Release|Mixed Platforms
|
||||
Release|Win32 = Release|Win32
|
||||
Release|x64 = Release|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{4CA57EA3-42F2-4CC1-8E95-5C707A8E7363}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
|
||||
{4CA57EA3-42F2-4CC1-8E95-5C707A8E7363}.Debug|Mixed Platforms.Build.0 = Debug|Win32
|
||||
{4CA57EA3-42F2-4CC1-8E95-5C707A8E7363}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{4CA57EA3-42F2-4CC1-8E95-5C707A8E7363}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{4CA57EA3-42F2-4CC1-8E95-5C707A8E7363}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{4CA57EA3-42F2-4CC1-8E95-5C707A8E7363}.Release|Mixed Platforms.ActiveCfg = Release|Win32
|
||||
{4CA57EA3-42F2-4CC1-8E95-5C707A8E7363}.Release|Mixed Platforms.Build.0 = Release|Win32
|
||||
{4CA57EA3-42F2-4CC1-8E95-5C707A8E7363}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{4CA57EA3-42F2-4CC1-8E95-5C707A8E7363}.Release|Win32.Build.0 = Release|Win32
|
||||
{4CA57EA3-42F2-4CC1-8E95-5C707A8E7363}.Release|x64.ActiveCfg = Release|x64
|
||||
{4CA57EA3-42F2-4CC1-8E95-5C707A8E7363}.Release|x64.Build.0 = Release|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 2013
|
||||
VisualStudioVersion = 12.0.31101.0
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "winreg", "winreg\winreg.vcxproj", "{4CA57EA3-42F2-4CC1-8E95-5C707A8E7363}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Mixed Platforms = Debug|Mixed Platforms
|
||||
Debug|Win32 = Debug|Win32
|
||||
Debug|x64 = Debug|x64
|
||||
Release|Mixed Platforms = Release|Mixed Platforms
|
||||
Release|Win32 = Release|Win32
|
||||
Release|x64 = Release|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{4CA57EA3-42F2-4CC1-8E95-5C707A8E7363}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
|
||||
{4CA57EA3-42F2-4CC1-8E95-5C707A8E7363}.Debug|Mixed Platforms.Build.0 = Debug|Win32
|
||||
{4CA57EA3-42F2-4CC1-8E95-5C707A8E7363}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{4CA57EA3-42F2-4CC1-8E95-5C707A8E7363}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{4CA57EA3-42F2-4CC1-8E95-5C707A8E7363}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{4CA57EA3-42F2-4CC1-8E95-5C707A8E7363}.Release|Mixed Platforms.ActiveCfg = Release|Win32
|
||||
{4CA57EA3-42F2-4CC1-8E95-5C707A8E7363}.Release|Mixed Platforms.Build.0 = Release|Win32
|
||||
{4CA57EA3-42F2-4CC1-8E95-5C707A8E7363}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{4CA57EA3-42F2-4CC1-8E95-5C707A8E7363}.Release|Win32.Build.0 = Release|Win32
|
||||
{4CA57EA3-42F2-4CC1-8E95-5C707A8E7363}.Release|x64.ActiveCfg = Release|x64
|
||||
{4CA57EA3-42F2-4CC1-8E95-5C707A8E7363}.Release|x64.Build.0 = Release|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
|
|
|
@ -1,18 +1,18 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2002 - 2005 QNX Software Systems and others.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* QNX Software Systems - initial API and implementation
|
||||
*******************************************************************************/
|
||||
// stdafx.cpp : source file that includes just the standard includes
|
||||
// ProcList.pch will be the pre-compiled header
|
||||
// stdafx.obj will contain the pre-compiled type information
|
||||
|
||||
#include "stdafx.h"
|
||||
|
||||
// TODO: reference any additional headers you need in STDAFX.H
|
||||
// and not in this file
|
||||
/*******************************************************************************
|
||||
* Copyright (c) 2002 - 2005 QNX Software Systems and others.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* QNX Software Systems - initial API and implementation
|
||||
*******************************************************************************/
|
||||
// stdafx.cpp : source file that includes just the standard includes
|
||||
// ProcList.pch will be the pre-compiled header
|
||||
// stdafx.obj will contain the pre-compiled type information
|
||||
|
||||
#include "stdafx.h"
|
||||
|
||||
// TODO: reference any additional headers you need in STDAFX.H
|
||||
// and not in this file
|
||||
|
|
|
@ -1,29 +1,29 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2002 - 2005 QNX Software Systems and others.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* QNX Software Systems - initial API and implementation
|
||||
*******************************************************************************/
|
||||
// stdafx.h : include file for standard system include files,
|
||||
// or project specific include files that are used frequently, but
|
||||
// are changed infrequently
|
||||
//
|
||||
|
||||
#if !defined(AFX_STDAFX_H__CB3B970F_AA1A_4B59_9F98_DDBEA28470AF__INCLUDED_)
|
||||
#define AFX_STDAFX_H__CB3B970F_AA1A_4B59_9F98_DDBEA28470AF__INCLUDED_
|
||||
|
||||
#if _MSC_VER > 1000
|
||||
#pragma once
|
||||
#endif // _MSC_VER > 1000
|
||||
|
||||
|
||||
// TODO: reference additional headers your program requires here
|
||||
|
||||
//{{AFX_INSERT_LOCATION}}
|
||||
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
|
||||
|
||||
#endif // !defined(AFX_STDAFX_H__CB3B970F_AA1A_4B59_9F98_DDBEA28470AF__INCLUDED_)
|
||||
/*******************************************************************************
|
||||
* Copyright (c) 2002 - 2005 QNX Software Systems and others.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* QNX Software Systems - initial API and implementation
|
||||
*******************************************************************************/
|
||||
// stdafx.h : include file for standard system include files,
|
||||
// or project specific include files that are used frequently, but
|
||||
// are changed infrequently
|
||||
//
|
||||
|
||||
#if !defined(AFX_STDAFX_H__CB3B970F_AA1A_4B59_9F98_DDBEA28470AF__INCLUDED_)
|
||||
#define AFX_STDAFX_H__CB3B970F_AA1A_4B59_9F98_DDBEA28470AF__INCLUDED_
|
||||
|
||||
#if _MSC_VER > 1000
|
||||
#pragma once
|
||||
#endif // _MSC_VER > 1000
|
||||
|
||||
|
||||
// TODO: reference additional headers your program requires here
|
||||
|
||||
//{{AFX_INSERT_LOCATION}}
|
||||
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
|
||||
|
||||
#endif // !defined(AFX_STDAFX_H__CB3B970F_AA1A_4B59_9F98_DDBEA28470AF__INCLUDED_)
|
||||
|
|
|
@ -1,346 +1,346 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2002, 2011 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
|
||||
*******************************************************************************/
|
||||
// ProcList.cpp : Defines the entry point for the console application.
|
||||
//
|
||||
|
||||
#include "stdafx.h"
|
||||
|
||||
#include "listtasks.h"
|
||||
#include <tlhelp32.h>
|
||||
#include <vdmdbg.h>
|
||||
#include <iostream>
|
||||
#include <iomanip>
|
||||
|
||||
using namespace std;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
DWORD dwPID ;
|
||||
PROCENUMPROC lpProc ;
|
||||
DWORD lParam ;
|
||||
BOOL bEnd ;
|
||||
} EnumInfoStruct ;
|
||||
|
||||
BOOL WINAPI Enum16( DWORD dwThreadId, WORD hMod16, WORD hTask16,
|
||||
PSZ pszModName, PSZ pszFileName, LPARAM lpUserDefined ) ;
|
||||
|
||||
BOOL CALLBACK OutProcInfo( DWORD pid, WORD, LPSTR procName, LPARAM ) ;
|
||||
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
EnumProcs(OutProcInfo, 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*********************
|
||||
EnumProc.cpp
|
||||
*********************/
|
||||
|
||||
// The EnumProcs function takes a pointer to a callback function
|
||||
// that will be called once per process in the system providing
|
||||
// process EXE filename and process ID.
|
||||
// Callback function definition:
|
||||
// BOOL CALLBACK Proc( DWORD dw, LPCSTR lpstr, LPARAM lParam ) ;
|
||||
//
|
||||
// lpProc -- Address of callback routine.
|
||||
//
|
||||
// lParam -- A user-defined LPARAM value to be passed to
|
||||
// the callback routine.
|
||||
BOOL WINAPI EnumProcs( PROCENUMPROC lpProc, LPARAM lParam )
|
||||
{
|
||||
OSVERSIONINFO osver ;
|
||||
HINSTANCE hInstLib ;
|
||||
HINSTANCE hInstLib2 ;
|
||||
HANDLE hSnapShot ;
|
||||
PROCESSENTRY32 procentry ;
|
||||
BOOL bFlag ;
|
||||
LPDWORD lpdwPIDs ;
|
||||
DWORD dwSize, dwSize2, dwIndex ;
|
||||
HMODULE hMod ;
|
||||
HANDLE hProcess ;
|
||||
char szFileName[ MAX_PATH ] ;
|
||||
EnumInfoStruct sInfo ;
|
||||
|
||||
// ToolHelp Function Pointers.
|
||||
HANDLE (WINAPI *lpfCreateToolhelp32Snapshot)(DWORD,DWORD) ;
|
||||
BOOL (WINAPI *lpfProcess32First)(HANDLE,LPPROCESSENTRY32) ;
|
||||
BOOL (WINAPI *lpfProcess32Next)(HANDLE,LPPROCESSENTRY32) ;
|
||||
|
||||
// PSAPI Function Pointers.
|
||||
BOOL (WINAPI *lpfEnumProcesses)( DWORD *, DWORD cb, DWORD * );
|
||||
BOOL (WINAPI *lpfEnumProcessModules)( HANDLE, HMODULE *,
|
||||
DWORD, LPDWORD );
|
||||
DWORD (WINAPI *lpfGetModuleFileNameEx)( HANDLE, HMODULE,
|
||||
LPTSTR, DWORD );
|
||||
|
||||
// VDMDBG Function Pointers.
|
||||
INT (WINAPI *lpfVDMEnumTaskWOWEx)( DWORD,
|
||||
TASKENUMPROCEX fp, LPARAM );
|
||||
|
||||
|
||||
// Check to see if were running under Windows95 or
|
||||
// Windows NT.
|
||||
osver.dwOSVersionInfoSize = sizeof( osver ) ;
|
||||
if( !GetVersionEx( &osver ) )
|
||||
{
|
||||
return FALSE ;
|
||||
}
|
||||
|
||||
// If Windows NT:
|
||||
if( osver.dwPlatformId == VER_PLATFORM_WIN32_NT )
|
||||
{
|
||||
|
||||
// Load library and get the procedures explicitly. We do
|
||||
// this so that we don't have to worry about modules using
|
||||
// this code failing to load under Windows 95, because
|
||||
// it can't resolve references to the PSAPI.DLL.
|
||||
hInstLib = LoadLibraryA( "PSAPI.DLL" ) ;
|
||||
if( hInstLib == NULL )
|
||||
return FALSE ;
|
||||
|
||||
SYSTEM_INFO systemInfo;
|
||||
|
||||
GetSystemInfo(&systemInfo);
|
||||
bool isWin64 = systemInfo.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_AMD64;
|
||||
|
||||
if(!isWin64)
|
||||
{
|
||||
hInstLib2 = LoadLibraryA( "VDMDBG.DLL" ) ;
|
||||
if( hInstLib2 == NULL )
|
||||
return FALSE ;
|
||||
}
|
||||
|
||||
// Get procedure addresses.
|
||||
lpfEnumProcesses = (BOOL(WINAPI *)(DWORD *,DWORD,DWORD*))
|
||||
GetProcAddress( hInstLib, "EnumProcesses" ) ;
|
||||
lpfEnumProcessModules = (BOOL(WINAPI *)(HANDLE, HMODULE *,
|
||||
DWORD, LPDWORD)) GetProcAddress( hInstLib,
|
||||
"EnumProcessModules" ) ;
|
||||
lpfGetModuleFileNameEx =(DWORD (WINAPI *)(HANDLE, HMODULE,
|
||||
LPTSTR, DWORD )) GetProcAddress( hInstLib,
|
||||
"GetModuleFileNameExA" ) ;
|
||||
if(!isWin64)
|
||||
{
|
||||
lpfVDMEnumTaskWOWEx =(INT(WINAPI *)( DWORD, TASKENUMPROCEX,
|
||||
LPARAM))GetProcAddress( hInstLib2, "VDMEnumTaskWOWEx" );
|
||||
}
|
||||
if( lpfEnumProcesses == NULL ||
|
||||
lpfEnumProcessModules == NULL ||
|
||||
lpfGetModuleFileNameEx == NULL ||
|
||||
(!isWin64 && lpfVDMEnumTaskWOWEx == NULL))
|
||||
{
|
||||
FreeLibrary( hInstLib ) ;
|
||||
if(!isWin64)
|
||||
{
|
||||
FreeLibrary( hInstLib2 ) ;
|
||||
}
|
||||
return FALSE ;
|
||||
}
|
||||
|
||||
// Call the PSAPI function EnumProcesses to get all of the
|
||||
// ProcID's currently in the system.
|
||||
// NOTE: In the documentation, the third parameter of
|
||||
// EnumProcesses is named cbNeeded, which implies that you
|
||||
// can call the function once to find out how much space to
|
||||
// allocate for a buffer and again to fill the buffer.
|
||||
// This is not the case. The cbNeeded parameter returns
|
||||
// the number of PIDs returned, so if your buffer size is
|
||||
// zero cbNeeded returns zero.
|
||||
// NOTE: The "HeapAlloc" loop here ensures that we
|
||||
// actually allocate a buffer large enough for all the
|
||||
// PIDs in the system.
|
||||
dwSize2 = 256 * sizeof( DWORD ) ;
|
||||
lpdwPIDs = NULL ;
|
||||
do
|
||||
{
|
||||
if( lpdwPIDs )
|
||||
{
|
||||
HeapFree( GetProcessHeap(), 0, lpdwPIDs ) ;
|
||||
dwSize2 *= 2 ;
|
||||
}
|
||||
lpdwPIDs = (LPDWORD)HeapAlloc( GetProcessHeap(), 0, dwSize2 );
|
||||
if( lpdwPIDs == NULL )
|
||||
{
|
||||
FreeLibrary( hInstLib ) ;
|
||||
if(!isWin64)
|
||||
{
|
||||
FreeLibrary( hInstLib2 ) ;
|
||||
}
|
||||
return FALSE ;
|
||||
}
|
||||
if( !lpfEnumProcesses( lpdwPIDs, dwSize2, &dwSize ) )
|
||||
{
|
||||
HeapFree( GetProcessHeap(), 0, lpdwPIDs ) ;
|
||||
FreeLibrary( hInstLib ) ;
|
||||
if(!isWin64)
|
||||
{
|
||||
FreeLibrary( hInstLib2 ) ;
|
||||
}
|
||||
return FALSE ;
|
||||
}
|
||||
}while( dwSize == dwSize2 ) ;
|
||||
|
||||
// How many ProcID's did we get?
|
||||
dwSize /= sizeof( DWORD ) ;
|
||||
|
||||
// Loop through each ProcID.
|
||||
for( dwIndex = 0 ; dwIndex < dwSize ; dwIndex++ )
|
||||
{
|
||||
szFileName[0] = 0 ;
|
||||
// Open the process (if we can... security does not
|
||||
// permit every process in the system).
|
||||
hProcess = OpenProcess(
|
||||
PROCESS_QUERY_INFORMATION | PROCESS_VM_READ,
|
||||
FALSE, lpdwPIDs[ dwIndex ] ) ;
|
||||
if( hProcess != NULL )
|
||||
{
|
||||
// Here we call EnumProcessModules to get only the
|
||||
// first module in the process this is important,
|
||||
// because this will be the .EXE module for which we
|
||||
// will retrieve the full path name in a second.
|
||||
if( lpfEnumProcessModules( hProcess, &hMod,
|
||||
sizeof( hMod ), &dwSize2 ) )
|
||||
{
|
||||
// Get Full pathname:
|
||||
if( !lpfGetModuleFileNameEx( hProcess, hMod,
|
||||
szFileName, sizeof( szFileName ) ) )
|
||||
{
|
||||
szFileName[0] = 0 ;
|
||||
}
|
||||
}
|
||||
CloseHandle( hProcess ) ;
|
||||
}
|
||||
// Regardless of OpenProcess success or failure, we
|
||||
// still call the enum func with the ProcID.
|
||||
if(!lpProc( lpdwPIDs[dwIndex], 0, szFileName, lParam))
|
||||
break ;
|
||||
|
||||
// Did we just bump into an NTVDM?
|
||||
if(!isWin64 && _stricmp( szFileName+(strlen(szFileName)-9),
|
||||
"NTVDM.EXE")==0)
|
||||
{
|
||||
// Fill in some info for the 16-bit enum proc.
|
||||
sInfo.dwPID = lpdwPIDs[dwIndex] ;
|
||||
sInfo.lpProc = lpProc ;
|
||||
sInfo.lParam = lParam ;
|
||||
sInfo.bEnd = FALSE ;
|
||||
// Enum the 16-bit stuff.
|
||||
lpfVDMEnumTaskWOWEx( lpdwPIDs[dwIndex],
|
||||
(TASKENUMPROCEX) Enum16,
|
||||
(LPARAM) &sInfo);
|
||||
|
||||
// Did our main enum func say quit?
|
||||
if(sInfo.bEnd)
|
||||
break ;
|
||||
}
|
||||
}
|
||||
|
||||
HeapFree( GetProcessHeap(), 0, lpdwPIDs ) ;
|
||||
if(!isWin64)
|
||||
{
|
||||
FreeLibrary( hInstLib2 ) ;
|
||||
}
|
||||
|
||||
// If Windows 95:
|
||||
}else if( osver.dwPlatformId == VER_PLATFORM_WIN32_WINDOWS )
|
||||
{
|
||||
|
||||
|
||||
hInstLib = LoadLibraryA( "Kernel32.DLL" ) ;
|
||||
if( hInstLib == NULL )
|
||||
return FALSE ;
|
||||
|
||||
// Get procedure addresses.
|
||||
// We are linking to these functions of Kernel32
|
||||
// explicitly, because otherwise a module using
|
||||
// this code would fail to load under Windows NT,
|
||||
// which does not have the Toolhelp32
|
||||
// functions in the Kernel 32.
|
||||
lpfCreateToolhelp32Snapshot=
|
||||
(HANDLE(WINAPI *)(DWORD,DWORD))
|
||||
GetProcAddress( hInstLib,
|
||||
"CreateToolhelp32Snapshot" ) ;
|
||||
lpfProcess32First=
|
||||
(BOOL(WINAPI *)(HANDLE,LPPROCESSENTRY32))
|
||||
GetProcAddress( hInstLib, "Process32First" ) ;
|
||||
lpfProcess32Next=
|
||||
(BOOL(WINAPI *)(HANDLE,LPPROCESSENTRY32))
|
||||
GetProcAddress( hInstLib, "Process32Next" ) ;
|
||||
if( lpfProcess32Next == NULL ||
|
||||
lpfProcess32First == NULL ||
|
||||
lpfCreateToolhelp32Snapshot == NULL )
|
||||
{
|
||||
FreeLibrary( hInstLib ) ;
|
||||
return FALSE ;
|
||||
}
|
||||
|
||||
// Get a handle to a Toolhelp snapshot of the systems
|
||||
// processes.
|
||||
hSnapShot = lpfCreateToolhelp32Snapshot(
|
||||
TH32CS_SNAPPROCESS, 0 ) ;
|
||||
if( hSnapShot == INVALID_HANDLE_VALUE )
|
||||
{
|
||||
FreeLibrary( hInstLib ) ;
|
||||
return FALSE ;
|
||||
}
|
||||
|
||||
// Get the first process' information.
|
||||
procentry.dwSize = sizeof(PROCESSENTRY32) ;
|
||||
bFlag = lpfProcess32First( hSnapShot, &procentry ) ;
|
||||
|
||||
// While there are processes, keep looping.
|
||||
while( bFlag )
|
||||
{
|
||||
// Call the enum func with the filename and ProcID.
|
||||
if(lpProc( procentry.th32ProcessID, 0,
|
||||
procentry.szExeFile, lParam ))
|
||||
{
|
||||
procentry.dwSize = sizeof(PROCESSENTRY32) ;
|
||||
bFlag = lpfProcess32Next( hSnapShot, &procentry );
|
||||
}else
|
||||
bFlag = FALSE ;
|
||||
}
|
||||
|
||||
|
||||
}else
|
||||
return FALSE ;
|
||||
|
||||
// Free the library.
|
||||
FreeLibrary( hInstLib ) ;
|
||||
|
||||
return TRUE ;
|
||||
}
|
||||
|
||||
BOOL WINAPI Enum16( DWORD dwThreadId, WORD hMod16, WORD hTask16,
|
||||
PSZ pszModName, PSZ pszFileName, LPARAM lpUserDefined )
|
||||
{
|
||||
BOOL bRet ;
|
||||
|
||||
EnumInfoStruct *psInfo = (EnumInfoStruct *)lpUserDefined ;
|
||||
|
||||
bRet = psInfo->lpProc( psInfo->dwPID, hTask16, pszFileName,
|
||||
psInfo->lParam ) ;
|
||||
|
||||
if(!bRet)
|
||||
{
|
||||
psInfo->bEnd = TRUE ;
|
||||
}
|
||||
|
||||
return !bRet;
|
||||
}
|
||||
|
||||
BOOL CALLBACK OutProcInfo( DWORD pid, WORD, LPSTR procName, LPARAM )
|
||||
{
|
||||
cout << setw(10) << pid << '\t' << procName << '\n';
|
||||
return TRUE;
|
||||
}
|
||||
/*******************************************************************************
|
||||
* Copyright (c) 2002, 2011 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
|
||||
*******************************************************************************/
|
||||
// ProcList.cpp : Defines the entry point for the console application.
|
||||
//
|
||||
|
||||
#include "stdafx.h"
|
||||
|
||||
#include "listtasks.h"
|
||||
#include <tlhelp32.h>
|
||||
#include <vdmdbg.h>
|
||||
#include <iostream>
|
||||
#include <iomanip>
|
||||
|
||||
using namespace std;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
DWORD dwPID ;
|
||||
PROCENUMPROC lpProc ;
|
||||
DWORD lParam ;
|
||||
BOOL bEnd ;
|
||||
} EnumInfoStruct ;
|
||||
|
||||
BOOL WINAPI Enum16( DWORD dwThreadId, WORD hMod16, WORD hTask16,
|
||||
PSZ pszModName, PSZ pszFileName, LPARAM lpUserDefined ) ;
|
||||
|
||||
BOOL CALLBACK OutProcInfo( DWORD pid, WORD, LPSTR procName, LPARAM ) ;
|
||||
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
EnumProcs(OutProcInfo, 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*********************
|
||||
EnumProc.cpp
|
||||
*********************/
|
||||
|
||||
// The EnumProcs function takes a pointer to a callback function
|
||||
// that will be called once per process in the system providing
|
||||
// process EXE filename and process ID.
|
||||
// Callback function definition:
|
||||
// BOOL CALLBACK Proc( DWORD dw, LPCSTR lpstr, LPARAM lParam ) ;
|
||||
//
|
||||
// lpProc -- Address of callback routine.
|
||||
//
|
||||
// lParam -- A user-defined LPARAM value to be passed to
|
||||
// the callback routine.
|
||||
BOOL WINAPI EnumProcs( PROCENUMPROC lpProc, LPARAM lParam )
|
||||
{
|
||||
OSVERSIONINFO osver ;
|
||||
HINSTANCE hInstLib ;
|
||||
HINSTANCE hInstLib2 ;
|
||||
HANDLE hSnapShot ;
|
||||
PROCESSENTRY32 procentry ;
|
||||
BOOL bFlag ;
|
||||
LPDWORD lpdwPIDs ;
|
||||
DWORD dwSize, dwSize2, dwIndex ;
|
||||
HMODULE hMod ;
|
||||
HANDLE hProcess ;
|
||||
char szFileName[ MAX_PATH ] ;
|
||||
EnumInfoStruct sInfo ;
|
||||
|
||||
// ToolHelp Function Pointers.
|
||||
HANDLE (WINAPI *lpfCreateToolhelp32Snapshot)(DWORD,DWORD) ;
|
||||
BOOL (WINAPI *lpfProcess32First)(HANDLE,LPPROCESSENTRY32) ;
|
||||
BOOL (WINAPI *lpfProcess32Next)(HANDLE,LPPROCESSENTRY32) ;
|
||||
|
||||
// PSAPI Function Pointers.
|
||||
BOOL (WINAPI *lpfEnumProcesses)( DWORD *, DWORD cb, DWORD * );
|
||||
BOOL (WINAPI *lpfEnumProcessModules)( HANDLE, HMODULE *,
|
||||
DWORD, LPDWORD );
|
||||
DWORD (WINAPI *lpfGetModuleFileNameEx)( HANDLE, HMODULE,
|
||||
LPTSTR, DWORD );
|
||||
|
||||
// VDMDBG Function Pointers.
|
||||
INT (WINAPI *lpfVDMEnumTaskWOWEx)( DWORD,
|
||||
TASKENUMPROCEX fp, LPARAM );
|
||||
|
||||
|
||||
// Check to see if were running under Windows95 or
|
||||
// Windows NT.
|
||||
osver.dwOSVersionInfoSize = sizeof( osver ) ;
|
||||
if( !GetVersionEx( &osver ) )
|
||||
{
|
||||
return FALSE ;
|
||||
}
|
||||
|
||||
// If Windows NT:
|
||||
if( osver.dwPlatformId == VER_PLATFORM_WIN32_NT )
|
||||
{
|
||||
|
||||
// Load library and get the procedures explicitly. We do
|
||||
// this so that we don't have to worry about modules using
|
||||
// this code failing to load under Windows 95, because
|
||||
// it can't resolve references to the PSAPI.DLL.
|
||||
hInstLib = LoadLibraryA( "PSAPI.DLL" ) ;
|
||||
if( hInstLib == NULL )
|
||||
return FALSE ;
|
||||
|
||||
SYSTEM_INFO systemInfo;
|
||||
|
||||
GetSystemInfo(&systemInfo);
|
||||
bool isWin64 = systemInfo.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_AMD64;
|
||||
|
||||
if(!isWin64)
|
||||
{
|
||||
hInstLib2 = LoadLibraryA( "VDMDBG.DLL" ) ;
|
||||
if( hInstLib2 == NULL )
|
||||
return FALSE ;
|
||||
}
|
||||
|
||||
// Get procedure addresses.
|
||||
lpfEnumProcesses = (BOOL(WINAPI *)(DWORD *,DWORD,DWORD*))
|
||||
GetProcAddress( hInstLib, "EnumProcesses" ) ;
|
||||
lpfEnumProcessModules = (BOOL(WINAPI *)(HANDLE, HMODULE *,
|
||||
DWORD, LPDWORD)) GetProcAddress( hInstLib,
|
||||
"EnumProcessModules" ) ;
|
||||
lpfGetModuleFileNameEx =(DWORD (WINAPI *)(HANDLE, HMODULE,
|
||||
LPTSTR, DWORD )) GetProcAddress( hInstLib,
|
||||
"GetModuleFileNameExA" ) ;
|
||||
if(!isWin64)
|
||||
{
|
||||
lpfVDMEnumTaskWOWEx =(INT(WINAPI *)( DWORD, TASKENUMPROCEX,
|
||||
LPARAM))GetProcAddress( hInstLib2, "VDMEnumTaskWOWEx" );
|
||||
}
|
||||
if( lpfEnumProcesses == NULL ||
|
||||
lpfEnumProcessModules == NULL ||
|
||||
lpfGetModuleFileNameEx == NULL ||
|
||||
(!isWin64 && lpfVDMEnumTaskWOWEx == NULL))
|
||||
{
|
||||
FreeLibrary( hInstLib ) ;
|
||||
if(!isWin64)
|
||||
{
|
||||
FreeLibrary( hInstLib2 ) ;
|
||||
}
|
||||
return FALSE ;
|
||||
}
|
||||
|
||||
// Call the PSAPI function EnumProcesses to get all of the
|
||||
// ProcID's currently in the system.
|
||||
// NOTE: In the documentation, the third parameter of
|
||||
// EnumProcesses is named cbNeeded, which implies that you
|
||||
// can call the function once to find out how much space to
|
||||
// allocate for a buffer and again to fill the buffer.
|
||||
// This is not the case. The cbNeeded parameter returns
|
||||
// the number of PIDs returned, so if your buffer size is
|
||||
// zero cbNeeded returns zero.
|
||||
// NOTE: The "HeapAlloc" loop here ensures that we
|
||||
// actually allocate a buffer large enough for all the
|
||||
// PIDs in the system.
|
||||
dwSize2 = 256 * sizeof( DWORD ) ;
|
||||
lpdwPIDs = NULL ;
|
||||
do
|
||||
{
|
||||
if( lpdwPIDs )
|
||||
{
|
||||
HeapFree( GetProcessHeap(), 0, lpdwPIDs ) ;
|
||||
dwSize2 *= 2 ;
|
||||
}
|
||||
lpdwPIDs = (LPDWORD)HeapAlloc( GetProcessHeap(), 0, dwSize2 );
|
||||
if( lpdwPIDs == NULL )
|
||||
{
|
||||
FreeLibrary( hInstLib ) ;
|
||||
if(!isWin64)
|
||||
{
|
||||
FreeLibrary( hInstLib2 ) ;
|
||||
}
|
||||
return FALSE ;
|
||||
}
|
||||
if( !lpfEnumProcesses( lpdwPIDs, dwSize2, &dwSize ) )
|
||||
{
|
||||
HeapFree( GetProcessHeap(), 0, lpdwPIDs ) ;
|
||||
FreeLibrary( hInstLib ) ;
|
||||
if(!isWin64)
|
||||
{
|
||||
FreeLibrary( hInstLib2 ) ;
|
||||
}
|
||||
return FALSE ;
|
||||
}
|
||||
}while( dwSize == dwSize2 ) ;
|
||||
|
||||
// How many ProcID's did we get?
|
||||
dwSize /= sizeof( DWORD ) ;
|
||||
|
||||
// Loop through each ProcID.
|
||||
for( dwIndex = 0 ; dwIndex < dwSize ; dwIndex++ )
|
||||
{
|
||||
szFileName[0] = 0 ;
|
||||
// Open the process (if we can... security does not
|
||||
// permit every process in the system).
|
||||
hProcess = OpenProcess(
|
||||
PROCESS_QUERY_INFORMATION | PROCESS_VM_READ,
|
||||
FALSE, lpdwPIDs[ dwIndex ] ) ;
|
||||
if( hProcess != NULL )
|
||||
{
|
||||
// Here we call EnumProcessModules to get only the
|
||||
// first module in the process this is important,
|
||||
// because this will be the .EXE module for which we
|
||||
// will retrieve the full path name in a second.
|
||||
if( lpfEnumProcessModules( hProcess, &hMod,
|
||||
sizeof( hMod ), &dwSize2 ) )
|
||||
{
|
||||
// Get Full pathname:
|
||||
if( !lpfGetModuleFileNameEx( hProcess, hMod,
|
||||
szFileName, sizeof( szFileName ) ) )
|
||||
{
|
||||
szFileName[0] = 0 ;
|
||||
}
|
||||
}
|
||||
CloseHandle( hProcess ) ;
|
||||
}
|
||||
// Regardless of OpenProcess success or failure, we
|
||||
// still call the enum func with the ProcID.
|
||||
if(!lpProc( lpdwPIDs[dwIndex], 0, szFileName, lParam))
|
||||
break ;
|
||||
|
||||
// Did we just bump into an NTVDM?
|
||||
if(!isWin64 && _stricmp( szFileName+(strlen(szFileName)-9),
|
||||
"NTVDM.EXE")==0)
|
||||
{
|
||||
// Fill in some info for the 16-bit enum proc.
|
||||
sInfo.dwPID = lpdwPIDs[dwIndex] ;
|
||||
sInfo.lpProc = lpProc ;
|
||||
sInfo.lParam = lParam ;
|
||||
sInfo.bEnd = FALSE ;
|
||||
// Enum the 16-bit stuff.
|
||||
lpfVDMEnumTaskWOWEx( lpdwPIDs[dwIndex],
|
||||
(TASKENUMPROCEX) Enum16,
|
||||
(LPARAM) &sInfo);
|
||||
|
||||
// Did our main enum func say quit?
|
||||
if(sInfo.bEnd)
|
||||
break ;
|
||||
}
|
||||
}
|
||||
|
||||
HeapFree( GetProcessHeap(), 0, lpdwPIDs ) ;
|
||||
if(!isWin64)
|
||||
{
|
||||
FreeLibrary( hInstLib2 ) ;
|
||||
}
|
||||
|
||||
// If Windows 95:
|
||||
}else if( osver.dwPlatformId == VER_PLATFORM_WIN32_WINDOWS )
|
||||
{
|
||||
|
||||
|
||||
hInstLib = LoadLibraryA( "Kernel32.DLL" ) ;
|
||||
if( hInstLib == NULL )
|
||||
return FALSE ;
|
||||
|
||||
// Get procedure addresses.
|
||||
// We are linking to these functions of Kernel32
|
||||
// explicitly, because otherwise a module using
|
||||
// this code would fail to load under Windows NT,
|
||||
// which does not have the Toolhelp32
|
||||
// functions in the Kernel 32.
|
||||
lpfCreateToolhelp32Snapshot=
|
||||
(HANDLE(WINAPI *)(DWORD,DWORD))
|
||||
GetProcAddress( hInstLib,
|
||||
"CreateToolhelp32Snapshot" ) ;
|
||||
lpfProcess32First=
|
||||
(BOOL(WINAPI *)(HANDLE,LPPROCESSENTRY32))
|
||||
GetProcAddress( hInstLib, "Process32First" ) ;
|
||||
lpfProcess32Next=
|
||||
(BOOL(WINAPI *)(HANDLE,LPPROCESSENTRY32))
|
||||
GetProcAddress( hInstLib, "Process32Next" ) ;
|
||||
if( lpfProcess32Next == NULL ||
|
||||
lpfProcess32First == NULL ||
|
||||
lpfCreateToolhelp32Snapshot == NULL )
|
||||
{
|
||||
FreeLibrary( hInstLib ) ;
|
||||
return FALSE ;
|
||||
}
|
||||
|
||||
// Get a handle to a Toolhelp snapshot of the systems
|
||||
// processes.
|
||||
hSnapShot = lpfCreateToolhelp32Snapshot(
|
||||
TH32CS_SNAPPROCESS, 0 ) ;
|
||||
if( hSnapShot == INVALID_HANDLE_VALUE )
|
||||
{
|
||||
FreeLibrary( hInstLib ) ;
|
||||
return FALSE ;
|
||||
}
|
||||
|
||||
// Get the first process' information.
|
||||
procentry.dwSize = sizeof(PROCESSENTRY32) ;
|
||||
bFlag = lpfProcess32First( hSnapShot, &procentry ) ;
|
||||
|
||||
// While there are processes, keep looping.
|
||||
while( bFlag )
|
||||
{
|
||||
// Call the enum func with the filename and ProcID.
|
||||
if(lpProc( procentry.th32ProcessID, 0,
|
||||
procentry.szExeFile, lParam ))
|
||||
{
|
||||
procentry.dwSize = sizeof(PROCESSENTRY32) ;
|
||||
bFlag = lpfProcess32Next( hSnapShot, &procentry );
|
||||
}else
|
||||
bFlag = FALSE ;
|
||||
}
|
||||
|
||||
|
||||
}else
|
||||
return FALSE ;
|
||||
|
||||
// Free the library.
|
||||
FreeLibrary( hInstLib ) ;
|
||||
|
||||
return TRUE ;
|
||||
}
|
||||
|
||||
BOOL WINAPI Enum16( DWORD dwThreadId, WORD hMod16, WORD hTask16,
|
||||
PSZ pszModName, PSZ pszFileName, LPARAM lpUserDefined )
|
||||
{
|
||||
BOOL bRet ;
|
||||
|
||||
EnumInfoStruct *psInfo = (EnumInfoStruct *)lpUserDefined ;
|
||||
|
||||
bRet = psInfo->lpProc( psInfo->dwPID, hTask16, pszFileName,
|
||||
psInfo->lParam ) ;
|
||||
|
||||
if(!bRet)
|
||||
{
|
||||
psInfo->bEnd = TRUE ;
|
||||
}
|
||||
|
||||
return !bRet;
|
||||
}
|
||||
|
||||
BOOL CALLBACK OutProcInfo( DWORD pid, WORD, LPSTR procName, LPARAM )
|
||||
{
|
||||
cout << setw(10) << pid << '\t' << procName << '\n';
|
||||
return TRUE;
|
||||
}
|
||||
|
|
|
@ -1,117 +1,117 @@
|
|||
# Microsoft Developer Studio Project File - Name="listtasks" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 6.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Console Application" 0x0103
|
||||
|
||||
CFG=listtasks - Win32 Debug
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "listtasks.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "listtasks.mak" CFG="listtasks - Win32 Debug"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "listtasks - Win32 Release" (based on "Win32 (x86) Console Application")
|
||||
!MESSAGE "listtasks - Win32 Debug" (based on "Win32 (x86) Console Application")
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP AllowPerConfigDependencies 0
|
||||
# PROP Scc_ProjName ""
|
||||
# PROP Scc_LocalPath ""
|
||||
CPP=cl.exe
|
||||
RSC=rc.exe
|
||||
|
||||
!IF "$(CFG)" == "listtasks - Win32 Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "Release"
|
||||
# PROP BASE Intermediate_Dir "Release"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Release"
|
||||
# PROP Intermediate_Dir "Release"
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /Yu"stdafx.h" /FD /c
|
||||
# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /Yu"stdafx.h" /FD /c
|
||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
|
||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
|
||||
|
||||
!ELSEIF "$(CFG)" == "listtasks - Win32 Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "Debug"
|
||||
# PROP BASE Intermediate_Dir "Debug"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "Debug"
|
||||
# PROP Intermediate_Dir "Debug"
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /Yu"stdafx.h" /FD /GZ /c
|
||||
# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /Yu"stdafx.h" /FD /GZ /c
|
||||
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
||||
# ADD RSC /l 0x409 /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
|
||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "listtasks - Win32 Release"
|
||||
# Name "listtasks - Win32 Debug"
|
||||
# Begin Group "Source Files"
|
||||
|
||||
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\listtasks.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\StdAfx.cpp
|
||||
# ADD CPP /Yc"stdafx.h"
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Header Files"
|
||||
|
||||
# PROP Default_Filter "h;hpp;hxx;hm;inl"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\listtasks.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\StdAfx.h
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Resource Files"
|
||||
|
||||
# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
|
||||
# End Group
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\ReadMe.txt
|
||||
# End Source File
|
||||
# End Target
|
||||
# End Project
|
||||
# Microsoft Developer Studio Project File - Name="listtasks" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 6.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Console Application" 0x0103
|
||||
|
||||
CFG=listtasks - Win32 Debug
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "listtasks.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "listtasks.mak" CFG="listtasks - Win32 Debug"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "listtasks - Win32 Release" (based on "Win32 (x86) Console Application")
|
||||
!MESSAGE "listtasks - Win32 Debug" (based on "Win32 (x86) Console Application")
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP AllowPerConfigDependencies 0
|
||||
# PROP Scc_ProjName ""
|
||||
# PROP Scc_LocalPath ""
|
||||
CPP=cl.exe
|
||||
RSC=rc.exe
|
||||
|
||||
!IF "$(CFG)" == "listtasks - Win32 Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "Release"
|
||||
# PROP BASE Intermediate_Dir "Release"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Release"
|
||||
# PROP Intermediate_Dir "Release"
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /Yu"stdafx.h" /FD /c
|
||||
# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /Yu"stdafx.h" /FD /c
|
||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
|
||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
|
||||
|
||||
!ELSEIF "$(CFG)" == "listtasks - Win32 Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "Debug"
|
||||
# PROP BASE Intermediate_Dir "Debug"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "Debug"
|
||||
# PROP Intermediate_Dir "Debug"
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /Yu"stdafx.h" /FD /GZ /c
|
||||
# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /Yu"stdafx.h" /FD /GZ /c
|
||||
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
||||
# ADD RSC /l 0x409 /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
|
||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "listtasks - Win32 Release"
|
||||
# Name "listtasks - Win32 Debug"
|
||||
# Begin Group "Source Files"
|
||||
|
||||
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\listtasks.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\StdAfx.cpp
|
||||
# ADD CPP /Yc"stdafx.h"
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Header Files"
|
||||
|
||||
# PROP Default_Filter "h;hpp;hxx;hm;inl"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\listtasks.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\StdAfx.h
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Resource Files"
|
||||
|
||||
# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
|
||||
# End Group
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\ReadMe.txt
|
||||
# End Source File
|
||||
# End Target
|
||||
# End Project
|
||||
|
|
|
@ -1,29 +1,29 @@
|
|||
Microsoft Developer Studio Workspace File, Format Version 6.00
|
||||
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "listtasks"=.\listtasks.dsp - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Global:
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<3>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Microsoft Developer Studio Workspace File, Format Version 6.00
|
||||
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "listtasks"=.\listtasks.dsp - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Global:
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<3>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
|
|
|
@ -1,22 +1,22 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2002 - 2005 QNX Software Systems and others.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* QNX Software Systems - initial API and implementation
|
||||
*******************************************************************************/
|
||||
#include <windows.h>
|
||||
|
||||
#ifndef __LISTTASKS_H
|
||||
#define __LISTTASKS_H
|
||||
|
||||
typedef BOOL (CALLBACK *PROCENUMPROC)( DWORD, WORD, LPSTR,
|
||||
LPARAM ) ;
|
||||
|
||||
BOOL WINAPI EnumProcs( PROCENUMPROC lpProc, LPARAM lParam ) ;
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
* Copyright (c) 2002 - 2005 QNX Software Systems and others.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* QNX Software Systems - initial API and implementation
|
||||
*******************************************************************************/
|
||||
#include <windows.h>
|
||||
|
||||
#ifndef __LISTTASKS_H
|
||||
#define __LISTTASKS_H
|
||||
|
||||
typedef BOOL (CALLBACK *PROCENUMPROC)( DWORD, WORD, LPSTR,
|
||||
LPARAM ) ;
|
||||
|
||||
BOOL WINAPI EnumProcs( PROCENUMPROC lpProc, LPARAM lParam ) ;
|
||||
|
||||
|
||||
#endif
|
|
@ -1,45 +1,45 @@
|
|||
/* DO NOT EDIT THIS FILE - it is machine generated */
|
||||
#include <jni.h>
|
||||
/* Header for class org_eclipse_cdt_utils_pty_PTY */
|
||||
|
||||
#ifndef _Included_org_eclipse_cdt_utils_pty_PTY
|
||||
#define _Included_org_eclipse_cdt_utils_pty_PTY
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
/*
|
||||
* Class: org_eclipse_cdt_utils_pty_PTY
|
||||
* Method: openMaster
|
||||
* Signature: (Z)Ljava/lang/String;
|
||||
*/
|
||||
JNIEXPORT jstring JNICALL Java_org_eclipse_cdt_utils_pty_PTY_openMaster
|
||||
(JNIEnv *, jobject, jboolean);
|
||||
|
||||
/*
|
||||
* Class: org_eclipse_cdt_utils_pty_PTY
|
||||
* Method: change_window_size
|
||||
* Signature: (III)I
|
||||
*/
|
||||
JNIEXPORT jint JNICALL Java_org_eclipse_cdt_utils_pty_PTY_change_1window_1size
|
||||
(JNIEnv *, jobject, jint, jint, jint);
|
||||
|
||||
/*
|
||||
* Class: org_eclipse_cdt_utils_pty_PTY
|
||||
* Method: exec2
|
||||
* Signature: ([Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;[ILjava/lang/String;IZ)I
|
||||
*/
|
||||
JNIEXPORT jint JNICALL Java_org_eclipse_cdt_utils_pty_PTY_exec2
|
||||
(JNIEnv *, jobject, jobjectArray, jobjectArray, jstring, jintArray, jstring, jint, jboolean);
|
||||
|
||||
/*
|
||||
* Class: org_eclipse_cdt_utils_pty_PTY
|
||||
* Method: waitFor
|
||||
* Signature: (II)I
|
||||
*/
|
||||
JNIEXPORT jint JNICALL Java_org_eclipse_cdt_utils_pty_PTY_waitFor
|
||||
(JNIEnv *, jobject, jint, jint);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
/* DO NOT EDIT THIS FILE - it is machine generated */
|
||||
#include <jni.h>
|
||||
/* Header for class org_eclipse_cdt_utils_pty_PTY */
|
||||
|
||||
#ifndef _Included_org_eclipse_cdt_utils_pty_PTY
|
||||
#define _Included_org_eclipse_cdt_utils_pty_PTY
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
/*
|
||||
* Class: org_eclipse_cdt_utils_pty_PTY
|
||||
* Method: openMaster
|
||||
* Signature: (Z)Ljava/lang/String;
|
||||
*/
|
||||
JNIEXPORT jstring JNICALL Java_org_eclipse_cdt_utils_pty_PTY_openMaster
|
||||
(JNIEnv *, jobject, jboolean);
|
||||
|
||||
/*
|
||||
* Class: org_eclipse_cdt_utils_pty_PTY
|
||||
* Method: change_window_size
|
||||
* Signature: (III)I
|
||||
*/
|
||||
JNIEXPORT jint JNICALL Java_org_eclipse_cdt_utils_pty_PTY_change_1window_1size
|
||||
(JNIEnv *, jobject, jint, jint, jint);
|
||||
|
||||
/*
|
||||
* Class: org_eclipse_cdt_utils_pty_PTY
|
||||
* Method: exec2
|
||||
* Signature: ([Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;[ILjava/lang/String;IZ)I
|
||||
*/
|
||||
JNIEXPORT jint JNICALL Java_org_eclipse_cdt_utils_pty_PTY_exec2
|
||||
(JNIEnv *, jobject, jobjectArray, jobjectArray, jstring, jintArray, jstring, jint, jboolean);
|
||||
|
||||
/*
|
||||
* Class: org_eclipse_cdt_utils_pty_PTY
|
||||
* Method: waitFor
|
||||
* Signature: (II)I
|
||||
*/
|
||||
JNIEXPORT jint JNICALL Java_org_eclipse_cdt_utils_pty_PTY_waitFor
|
||||
(JNIEnv *, jobject, jint, jint);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -1,31 +1,31 @@
|
|||
/* DO NOT EDIT THIS FILE - it is machine generated */
|
||||
#include <jni.h>
|
||||
/* Header for class org_eclipse_cdt_utils_pty_PTYInputStream */
|
||||
|
||||
#ifndef _Included_org_eclipse_cdt_utils_pty_PTYInputStream
|
||||
#define _Included_org_eclipse_cdt_utils_pty_PTYInputStream
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
#undef org_eclipse_cdt_utils_pty_PTYInputStream_MAX_SKIP_BUFFER_SIZE
|
||||
#define org_eclipse_cdt_utils_pty_PTYInputStream_MAX_SKIP_BUFFER_SIZE 2048L
|
||||
/*
|
||||
* Class: org_eclipse_cdt_utils_pty_PTYInputStream
|
||||
* Method: read0
|
||||
* Signature: (I[BI)I
|
||||
*/
|
||||
JNIEXPORT jint JNICALL Java_org_eclipse_cdt_utils_pty_PTYInputStream_read0
|
||||
(JNIEnv *, jobject, jint, jbyteArray, jint);
|
||||
|
||||
/*
|
||||
* Class: org_eclipse_cdt_utils_pty_PTYInputStream
|
||||
* Method: close0
|
||||
* Signature: (I)I
|
||||
*/
|
||||
JNIEXPORT jint JNICALL Java_org_eclipse_cdt_utils_pty_PTYInputStream_close0
|
||||
(JNIEnv *, jobject, jint);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
/* DO NOT EDIT THIS FILE - it is machine generated */
|
||||
#include <jni.h>
|
||||
/* Header for class org_eclipse_cdt_utils_pty_PTYInputStream */
|
||||
|
||||
#ifndef _Included_org_eclipse_cdt_utils_pty_PTYInputStream
|
||||
#define _Included_org_eclipse_cdt_utils_pty_PTYInputStream
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
#undef org_eclipse_cdt_utils_pty_PTYInputStream_MAX_SKIP_BUFFER_SIZE
|
||||
#define org_eclipse_cdt_utils_pty_PTYInputStream_MAX_SKIP_BUFFER_SIZE 2048L
|
||||
/*
|
||||
* Class: org_eclipse_cdt_utils_pty_PTYInputStream
|
||||
* Method: read0
|
||||
* Signature: (I[BI)I
|
||||
*/
|
||||
JNIEXPORT jint JNICALL Java_org_eclipse_cdt_utils_pty_PTYInputStream_read0
|
||||
(JNIEnv *, jobject, jint, jbyteArray, jint);
|
||||
|
||||
/*
|
||||
* Class: org_eclipse_cdt_utils_pty_PTYInputStream
|
||||
* Method: close0
|
||||
* Signature: (I)I
|
||||
*/
|
||||
JNIEXPORT jint JNICALL Java_org_eclipse_cdt_utils_pty_PTYInputStream_close0
|
||||
(JNIEnv *, jobject, jint);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -1,29 +1,29 @@
|
|||
/* DO NOT EDIT THIS FILE - it is machine generated */
|
||||
#include <jni.h>
|
||||
/* Header for class org_eclipse_cdt_utils_pty_PTYOutputStream */
|
||||
|
||||
#ifndef _Included_org_eclipse_cdt_utils_pty_PTYOutputStream
|
||||
#define _Included_org_eclipse_cdt_utils_pty_PTYOutputStream
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
/*
|
||||
* Class: org_eclipse_cdt_utils_pty_PTYOutputStream
|
||||
* Method: write0
|
||||
* Signature: (I[BI)I
|
||||
*/
|
||||
JNIEXPORT jint JNICALL Java_org_eclipse_cdt_utils_pty_PTYOutputStream_write0
|
||||
(JNIEnv *, jobject, jint, jbyteArray, jint);
|
||||
|
||||
/*
|
||||
* Class: org_eclipse_cdt_utils_pty_PTYOutputStream
|
||||
* Method: close0
|
||||
* Signature: (I)I
|
||||
*/
|
||||
JNIEXPORT jint JNICALL Java_org_eclipse_cdt_utils_pty_PTYOutputStream_close0
|
||||
(JNIEnv *, jobject, jint);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
/* DO NOT EDIT THIS FILE - it is machine generated */
|
||||
#include <jni.h>
|
||||
/* Header for class org_eclipse_cdt_utils_pty_PTYOutputStream */
|
||||
|
||||
#ifndef _Included_org_eclipse_cdt_utils_pty_PTYOutputStream
|
||||
#define _Included_org_eclipse_cdt_utils_pty_PTYOutputStream
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
/*
|
||||
* Class: org_eclipse_cdt_utils_pty_PTYOutputStream
|
||||
* Method: write0
|
||||
* Signature: (I[BI)I
|
||||
*/
|
||||
JNIEXPORT jint JNICALL Java_org_eclipse_cdt_utils_pty_PTYOutputStream_write0
|
||||
(JNIEnv *, jobject, jint, jbyteArray, jint);
|
||||
|
||||
/*
|
||||
* Class: org_eclipse_cdt_utils_pty_PTYOutputStream
|
||||
* Method: close0
|
||||
* Signature: (I)I
|
||||
*/
|
||||
JNIEXPORT jint JNICALL Java_org_eclipse_cdt_utils_pty_PTYOutputStream_close0
|
||||
(JNIEnv *, jobject, jint);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -1,46 +1,46 @@
|
|||
|
||||
Microsoft Visual Studio Solution File, Format Version 11.00
|
||||
# Visual C++ Express 2010
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pty", "pty.vcxproj", "{5589D515-1C56-4641-97CF-3C4561109258}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "winpty", "winpty.vcxproj", "{D7BFF73A-A86A-47FF-AD2B-CC2EFCAD5ABD}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "winpty-agent", "winpty-agent.vcxproj", "{E7A42398-12E7-4BC1-B72B-5D62B71E9816}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Win32 = Debug|Win32
|
||||
Debug|x64 = Debug|x64
|
||||
Release|Win32 = Release|Win32
|
||||
Release|x64 = Release|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{5589D515-1C56-4641-97CF-3C4561109258}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{5589D515-1C56-4641-97CF-3C4561109258}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{5589D515-1C56-4641-97CF-3C4561109258}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{5589D515-1C56-4641-97CF-3C4561109258}.Debug|x64.Build.0 = Debug|x64
|
||||
{5589D515-1C56-4641-97CF-3C4561109258}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{5589D515-1C56-4641-97CF-3C4561109258}.Release|Win32.Build.0 = Release|Win32
|
||||
{5589D515-1C56-4641-97CF-3C4561109258}.Release|x64.ActiveCfg = Release|x64
|
||||
{5589D515-1C56-4641-97CF-3C4561109258}.Release|x64.Build.0 = Release|x64
|
||||
{D7BFF73A-A86A-47FF-AD2B-CC2EFCAD5ABD}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{D7BFF73A-A86A-47FF-AD2B-CC2EFCAD5ABD}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{D7BFF73A-A86A-47FF-AD2B-CC2EFCAD5ABD}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{D7BFF73A-A86A-47FF-AD2B-CC2EFCAD5ABD}.Debug|x64.Build.0 = Debug|x64
|
||||
{D7BFF73A-A86A-47FF-AD2B-CC2EFCAD5ABD}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{D7BFF73A-A86A-47FF-AD2B-CC2EFCAD5ABD}.Release|Win32.Build.0 = Release|Win32
|
||||
{D7BFF73A-A86A-47FF-AD2B-CC2EFCAD5ABD}.Release|x64.ActiveCfg = Release|x64
|
||||
{D7BFF73A-A86A-47FF-AD2B-CC2EFCAD5ABD}.Release|x64.Build.0 = Release|x64
|
||||
{E7A42398-12E7-4BC1-B72B-5D62B71E9816}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{E7A42398-12E7-4BC1-B72B-5D62B71E9816}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{E7A42398-12E7-4BC1-B72B-5D62B71E9816}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{E7A42398-12E7-4BC1-B72B-5D62B71E9816}.Debug|x64.Build.0 = Debug|x64
|
||||
{E7A42398-12E7-4BC1-B72B-5D62B71E9816}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{E7A42398-12E7-4BC1-B72B-5D62B71E9816}.Release|Win32.Build.0 = Release|Win32
|
||||
{E7A42398-12E7-4BC1-B72B-5D62B71E9816}.Release|x64.ActiveCfg = Release|x64
|
||||
{E7A42398-12E7-4BC1-B72B-5D62B71E9816}.Release|x64.Build.0 = Release|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 11.00
|
||||
# Visual C++ Express 2010
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pty", "pty.vcxproj", "{5589D515-1C56-4641-97CF-3C4561109258}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "winpty", "winpty.vcxproj", "{D7BFF73A-A86A-47FF-AD2B-CC2EFCAD5ABD}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "winpty-agent", "winpty-agent.vcxproj", "{E7A42398-12E7-4BC1-B72B-5D62B71E9816}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Win32 = Debug|Win32
|
||||
Debug|x64 = Debug|x64
|
||||
Release|Win32 = Release|Win32
|
||||
Release|x64 = Release|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{5589D515-1C56-4641-97CF-3C4561109258}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{5589D515-1C56-4641-97CF-3C4561109258}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{5589D515-1C56-4641-97CF-3C4561109258}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{5589D515-1C56-4641-97CF-3C4561109258}.Debug|x64.Build.0 = Debug|x64
|
||||
{5589D515-1C56-4641-97CF-3C4561109258}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{5589D515-1C56-4641-97CF-3C4561109258}.Release|Win32.Build.0 = Release|Win32
|
||||
{5589D515-1C56-4641-97CF-3C4561109258}.Release|x64.ActiveCfg = Release|x64
|
||||
{5589D515-1C56-4641-97CF-3C4561109258}.Release|x64.Build.0 = Release|x64
|
||||
{D7BFF73A-A86A-47FF-AD2B-CC2EFCAD5ABD}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{D7BFF73A-A86A-47FF-AD2B-CC2EFCAD5ABD}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{D7BFF73A-A86A-47FF-AD2B-CC2EFCAD5ABD}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{D7BFF73A-A86A-47FF-AD2B-CC2EFCAD5ABD}.Debug|x64.Build.0 = Debug|x64
|
||||
{D7BFF73A-A86A-47FF-AD2B-CC2EFCAD5ABD}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{D7BFF73A-A86A-47FF-AD2B-CC2EFCAD5ABD}.Release|Win32.Build.0 = Release|Win32
|
||||
{D7BFF73A-A86A-47FF-AD2B-CC2EFCAD5ABD}.Release|x64.ActiveCfg = Release|x64
|
||||
{D7BFF73A-A86A-47FF-AD2B-CC2EFCAD5ABD}.Release|x64.Build.0 = Release|x64
|
||||
{E7A42398-12E7-4BC1-B72B-5D62B71E9816}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{E7A42398-12E7-4BC1-B72B-5D62B71E9816}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{E7A42398-12E7-4BC1-B72B-5D62B71E9816}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{E7A42398-12E7-4BC1-B72B-5D62B71E9816}.Debug|x64.Build.0 = Debug|x64
|
||||
{E7A42398-12E7-4BC1-B72B-5D62B71E9816}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{E7A42398-12E7-4BC1-B72B-5D62B71E9816}.Release|Win32.Build.0 = Release|Win32
|
||||
{E7A42398-12E7-4BC1-B72B-5D62B71E9816}.Release|x64.ActiveCfg = Release|x64
|
||||
{E7A42398-12E7-4BC1-B72B-5D62B71E9816}.Release|x64.Build.0 = Release|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
|
|
|
@ -1,177 +1,177 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{5589D515-1C56-4641-97CF-3C4561109258}</ProjectGuid>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<RootNamespace>pty</RootNamespace>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>Windows7.1SDK</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>Windows7.1SDK</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>Windows7.1SDK</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>Windows7.1SDK</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
<OutDir>$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
|
||||
<IntDir>$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
<IntDir>$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<OutDir>$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
|
||||
<IntDir>$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<IntDir>$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;_SCL_SECURE_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>./jni/include;C:\NoScan\Apps\Java\jdk1.6.0_31\include;C:\NoScan\Apps\Java\jdk1.6.0_31\include\win32;..\winpty\include;.;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<AdditionalDependencies>DelayImp.lib;winpty.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>$(SolutionDir)$(Platform)\$(Configuration)\</AdditionalLibraryDirectories>
|
||||
<DelayLoadDLLs>winpty.dll;%(DelayLoadDLLs)</DelayLoadDLLs>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>_SCL_SECURE_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;WIN32;_DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>./jni/include;C:\NoScan\Apps\Java\jdk1.6.0_31\include;C:\NoScan\Apps\Java\jdk1.6.0_31\include\win32;..\winpty\include;.;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<AdditionalDependencies>DelayImp.lib;winpty.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>$(SolutionDir)$(Platform)\$(Configuration)\</AdditionalLibraryDirectories>
|
||||
<DelayLoadDLLs>winpty.dll;%(DelayLoadDLLs)</DelayLoadDLLs>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;_SCL_SECURE_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>./jni/include;C:\NoScan\Apps\Java\jdk1.6.0_31\include;C:\NoScan\Apps\Java\jdk1.6.0_31\include\win32;..\winpty\include;.;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<AdditionalDependencies>DelayImp.lib;winpty.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>$(SolutionDir)$(Platform)\$(Configuration)\</AdditionalLibraryDirectories>
|
||||
<DelayLoadDLLs>winpty.dll;%(DelayLoadDLLs)</DelayLoadDLLs>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>_SCL_SECURE_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;WIN32;NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>./jni/include;C:\NoScan\Apps\Java\jdk1.6.0_31\include;C:\NoScan\Apps\Java\jdk1.6.0_31\include\win32;..\winpty\include;.;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<AdditionalDependencies>DelayImp.lib;winpty.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>$(SolutionDir)$(Platform)\$(Configuration)\</AdditionalLibraryDirectories>
|
||||
<DelayLoadDLLs>winpty.dll;%(DelayLoadDLLs)</DelayLoadDLLs>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="jni\include\PTY.h" />
|
||||
<ClInclude Include="jni\include\PTYInputStream.h" />
|
||||
<ClInclude Include="jni\include\PTYOutputStream.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="jni\src\dllmain.cpp" />
|
||||
<ClCompile Include="jni\src\pty.cpp" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{5589D515-1C56-4641-97CF-3C4561109258}</ProjectGuid>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<RootNamespace>pty</RootNamespace>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>Windows7.1SDK</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>Windows7.1SDK</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>Windows7.1SDK</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>Windows7.1SDK</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
<OutDir>$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
|
||||
<IntDir>$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
<IntDir>$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<OutDir>$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
|
||||
<IntDir>$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<IntDir>$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;_SCL_SECURE_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>./jni/include;C:\NoScan\Apps\Java\jdk1.6.0_31\include;C:\NoScan\Apps\Java\jdk1.6.0_31\include\win32;..\winpty\include;.;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<AdditionalDependencies>DelayImp.lib;winpty.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>$(SolutionDir)$(Platform)\$(Configuration)\</AdditionalLibraryDirectories>
|
||||
<DelayLoadDLLs>winpty.dll;%(DelayLoadDLLs)</DelayLoadDLLs>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>_SCL_SECURE_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;WIN32;_DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>./jni/include;C:\NoScan\Apps\Java\jdk1.6.0_31\include;C:\NoScan\Apps\Java\jdk1.6.0_31\include\win32;..\winpty\include;.;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<AdditionalDependencies>DelayImp.lib;winpty.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>$(SolutionDir)$(Platform)\$(Configuration)\</AdditionalLibraryDirectories>
|
||||
<DelayLoadDLLs>winpty.dll;%(DelayLoadDLLs)</DelayLoadDLLs>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;_SCL_SECURE_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>./jni/include;C:\NoScan\Apps\Java\jdk1.6.0_31\include;C:\NoScan\Apps\Java\jdk1.6.0_31\include\win32;..\winpty\include;.;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<AdditionalDependencies>DelayImp.lib;winpty.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>$(SolutionDir)$(Platform)\$(Configuration)\</AdditionalLibraryDirectories>
|
||||
<DelayLoadDLLs>winpty.dll;%(DelayLoadDLLs)</DelayLoadDLLs>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>_SCL_SECURE_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;WIN32;NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>./jni/include;C:\NoScan\Apps\Java\jdk1.6.0_31\include;C:\NoScan\Apps\Java\jdk1.6.0_31\include\win32;..\winpty\include;.;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<AdditionalDependencies>DelayImp.lib;winpty.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>$(SolutionDir)$(Platform)\$(Configuration)\</AdditionalLibraryDirectories>
|
||||
<DelayLoadDLLs>winpty.dll;%(DelayLoadDLLs)</DelayLoadDLLs>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="jni\include\PTY.h" />
|
||||
<ClInclude Include="jni\include\PTYInputStream.h" />
|
||||
<ClInclude Include="jni\include\PTYOutputStream.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="jni\src\dllmain.cpp" />
|
||||
<ClCompile Include="jni\src\pty.cpp" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
|
@ -1,30 +1,30 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="include">
|
||||
<UniqueIdentifier>{679c3039-d4a8-48db-9a3b-33f73f3b44c0}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="src">
|
||||
<UniqueIdentifier>{b7f98685-8f42-40d2-bd2b-65bcbac17645}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="jni\include\PTY.h">
|
||||
<Filter>include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="jni\include\PTYInputStream.h">
|
||||
<Filter>include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="jni\include\PTYOutputStream.h">
|
||||
<Filter>include</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="jni\src\pty.cpp">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="jni\src\dllmain.cpp">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="include">
|
||||
<UniqueIdentifier>{679c3039-d4a8-48db-9a3b-33f73f3b44c0}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="src">
|
||||
<UniqueIdentifier>{b7f98685-8f42-40d2-bd2b-65bcbac17645}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="jni\include\PTY.h">
|
||||
<Filter>include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="jni\include\PTYInputStream.h">
|
||||
<Filter>include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="jni\include\PTYOutputStream.h">
|
||||
<Filter>include</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="jni\src\pty.cpp">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="jni\src\dllmain.cpp">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
</Project>
|
|
@ -1,185 +1,185 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{E7A42398-12E7-4BC1-B72B-5D62B71E9816}</ProjectGuid>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<RootNamespace>winptyagent</RootNamespace>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>Windows7.1SDK</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>Windows7.1SDK</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>Windows7.1SDK</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>Windows7.1SDK</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
<OutDir>$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
|
||||
<IntDir>$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
<OutDir>$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
|
||||
<IntDir>$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<OutDir>$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
|
||||
<IntDir>$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<OutDir>$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
|
||||
<IntDir>$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>WIN32;_WINDOWS;NOMINMAX;_DEBUG;_CONSOLE;_SCL_SECURE_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>..\winpty\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>WIN32;_WINDOWS;NOMINMAX;_DEBUG;_CONSOLE;_SCL_SECURE_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>..\winpty\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>WIN32;_WINDOWS;NOMINMAX;NDEBUG;_CONSOLE;_SCL_SECURE_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>..\winpty\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<GenerateDebugInformation>false</GenerateDebugInformation>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>WIN32;_WINDOWS;NOMINMAX;NDEBUG;_CONSOLE;_SCL_SECURE_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>..\winpty\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<GenerateDebugInformation>false</GenerateDebugInformation>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\winpty\agent\Agent.h" />
|
||||
<ClInclude Include="..\winpty\agent\AgentAssert.h" />
|
||||
<ClInclude Include="..\winpty\agent\ConsoleInput.h" />
|
||||
<ClInclude Include="..\winpty\agent\Coord.h" />
|
||||
<ClInclude Include="..\winpty\agent\DsrSender.h" />
|
||||
<ClInclude Include="..\winpty\agent\EventLoop.h" />
|
||||
<ClInclude Include="..\winpty\agent\NamedPipe.h" />
|
||||
<ClInclude Include="..\winpty\agent\SmallRect.h" />
|
||||
<ClInclude Include="..\winpty\agent\Terminal.h" />
|
||||
<ClInclude Include="..\winpty\agent\Win32Console.h" />
|
||||
<ClInclude Include="..\winpty\shared\AgentMsg.h" />
|
||||
<ClInclude Include="..\winpty\shared\Buffer.h" />
|
||||
<ClInclude Include="..\winpty\shared\c99_snprintf.h" />
|
||||
<ClInclude Include="..\winpty\shared\DebugClient.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\winpty\agent\Agent.cc" />
|
||||
<ClCompile Include="..\winpty\agent\AgentAssert.cc" />
|
||||
<ClCompile Include="..\winpty\agent\ConsoleInput.cc" />
|
||||
<ClCompile Include="..\winpty\agent\Coord.cc" />
|
||||
<ClCompile Include="..\winpty\agent\EventLoop.cc" />
|
||||
<ClCompile Include="..\winpty\agent\main.cc" />
|
||||
<ClCompile Include="..\winpty\agent\NamedPipe.cc" />
|
||||
<ClCompile Include="..\winpty\agent\SmallRect.cc" />
|
||||
<ClCompile Include="..\winpty\agent\Terminal.cc" />
|
||||
<ClCompile Include="..\winpty\agent\Win32Console.cc" />
|
||||
<ClCompile Include="..\winpty\shared\DebugClient.cc" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{E7A42398-12E7-4BC1-B72B-5D62B71E9816}</ProjectGuid>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<RootNamespace>winptyagent</RootNamespace>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>Windows7.1SDK</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>Windows7.1SDK</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>Windows7.1SDK</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>Windows7.1SDK</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
<OutDir>$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
|
||||
<IntDir>$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
<OutDir>$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
|
||||
<IntDir>$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<OutDir>$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
|
||||
<IntDir>$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<OutDir>$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
|
||||
<IntDir>$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>WIN32;_WINDOWS;NOMINMAX;_DEBUG;_CONSOLE;_SCL_SECURE_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>..\winpty\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>WIN32;_WINDOWS;NOMINMAX;_DEBUG;_CONSOLE;_SCL_SECURE_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>..\winpty\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>WIN32;_WINDOWS;NOMINMAX;NDEBUG;_CONSOLE;_SCL_SECURE_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>..\winpty\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<GenerateDebugInformation>false</GenerateDebugInformation>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>WIN32;_WINDOWS;NOMINMAX;NDEBUG;_CONSOLE;_SCL_SECURE_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>..\winpty\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<GenerateDebugInformation>false</GenerateDebugInformation>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\winpty\agent\Agent.h" />
|
||||
<ClInclude Include="..\winpty\agent\AgentAssert.h" />
|
||||
<ClInclude Include="..\winpty\agent\ConsoleInput.h" />
|
||||
<ClInclude Include="..\winpty\agent\Coord.h" />
|
||||
<ClInclude Include="..\winpty\agent\DsrSender.h" />
|
||||
<ClInclude Include="..\winpty\agent\EventLoop.h" />
|
||||
<ClInclude Include="..\winpty\agent\NamedPipe.h" />
|
||||
<ClInclude Include="..\winpty\agent\SmallRect.h" />
|
||||
<ClInclude Include="..\winpty\agent\Terminal.h" />
|
||||
<ClInclude Include="..\winpty\agent\Win32Console.h" />
|
||||
<ClInclude Include="..\winpty\shared\AgentMsg.h" />
|
||||
<ClInclude Include="..\winpty\shared\Buffer.h" />
|
||||
<ClInclude Include="..\winpty\shared\c99_snprintf.h" />
|
||||
<ClInclude Include="..\winpty\shared\DebugClient.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\winpty\agent\Agent.cc" />
|
||||
<ClCompile Include="..\winpty\agent\AgentAssert.cc" />
|
||||
<ClCompile Include="..\winpty\agent\ConsoleInput.cc" />
|
||||
<ClCompile Include="..\winpty\agent\Coord.cc" />
|
||||
<ClCompile Include="..\winpty\agent\EventLoop.cc" />
|
||||
<ClCompile Include="..\winpty\agent\main.cc" />
|
||||
<ClCompile Include="..\winpty\agent\NamedPipe.cc" />
|
||||
<ClCompile Include="..\winpty\agent\SmallRect.cc" />
|
||||
<ClCompile Include="..\winpty\agent\Terminal.cc" />
|
||||
<ClCompile Include="..\winpty\agent\Win32Console.cc" />
|
||||
<ClCompile Include="..\winpty\shared\DebugClient.cc" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue