diff --git a/admin/pom-config.xml b/admin/pom-config.xml index 4daa6993aee..bcab7875d51 100644 --- a/admin/pom-config.xml +++ b/admin/pom-config.xml @@ -37,8 +37,8 @@ - 0.22.0 - 0.22.0 + 1.0.0 + 1.0.0 2.7 1.8 1.5 diff --git a/features/org.eclipse.tm.terminal.connector.cdtserial.feature/.project b/features/org.eclipse.tm.terminal.connector.cdtserial.feature/.project new file mode 100644 index 00000000000..ea0d993407f --- /dev/null +++ b/features/org.eclipse.tm.terminal.connector.cdtserial.feature/.project @@ -0,0 +1,17 @@ + + + org.eclipse.tm.terminal.connector.cdtserial.feature + + + + + + org.eclipse.pde.FeatureBuilder + + + + + + org.eclipse.pde.FeatureNature + + diff --git a/features/org.eclipse.tm.terminal.connector.cdtserial.feature/build.properties b/features/org.eclipse.tm.terminal.connector.cdtserial.feature/build.properties new file mode 100644 index 00000000000..400f7fd68ee --- /dev/null +++ b/features/org.eclipse.tm.terminal.connector.cdtserial.feature/build.properties @@ -0,0 +1,13 @@ +################################################################################ +# Copyright (c) 2006, 2015 Wind River Systems, Inc. and others. +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Eclipse Public License v1.0 +# which accompanies this distribution, and is available at +# http://www.eclipse.org/legal/epl-v10.html +# +# Contributors: +# Michael Scharf (Wind River) - initial API and implementation +# Uwe Stieber (Wind River) - Bug 434937 - Releng: The Terminal Features have an incorrect license +################################################################################ +bin.includes = feature.xml,\ + feature.properties diff --git a/features/org.eclipse.tm.terminal.connector.cdtserial.feature/feature.properties b/features/org.eclipse.tm.terminal.connector.cdtserial.feature/feature.properties new file mode 100644 index 00000000000..84c64e1b8ac --- /dev/null +++ b/features/org.eclipse.tm.terminal.connector.cdtserial.feature/feature.properties @@ -0,0 +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 +# +# Contributors: +# QNX Software Systems - Initial API and implementation +############################################################################### +# feature.properties +# contains externalized strings for feature.xml +# "%foo" in feature.xml corresponds to the key "foo" in this file +# java.io.Properties file (ISO 8859-1 with "\" escapes) +# This file should be translated. + +# "featureName" property - name of the feature +featureName=TM Terminal Serial Connector Extensions + +# "providerName" property - name of the company that provides the feature +providerName=Eclipse.org - Target Management + +# "updateSiteName" property - label for the update site +updateSiteName=TM Terminal 4.2 Updates + +# "description" property - description of the feature +description=A serial line connector for the Terminal + +# "copyright" property - text of the "Feature Update Copyright" +copyright=\ +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 +################ end of copyright property #################################### diff --git a/features/org.eclipse.tm.terminal.connector.cdtserial.feature/feature.xml b/features/org.eclipse.tm.terminal.connector.cdtserial.feature/feature.xml new file mode 100644 index 00000000000..b0e44c309fd --- /dev/null +++ b/features/org.eclipse.tm.terminal.connector.cdtserial.feature/feature.xml @@ -0,0 +1,44 @@ + + + + + + %description + + + + %copyright + + + + %license + + + + + + + + + diff --git a/features/org.eclipse.tm.terminal.connector.cdtserial.feature/pom.xml b/features/org.eclipse.tm.terminal.connector.cdtserial.feature/pom.xml new file mode 100644 index 00000000000..387e636939b --- /dev/null +++ b/features/org.eclipse.tm.terminal.connector.cdtserial.feature/pom.xml @@ -0,0 +1,36 @@ + + + 4.0.0 + + + org.eclipse.tm.terminal + org.eclipse.tm.terminal.maven-build + 4.2.0-SNAPSHOT + ../../admin/pom-build.xml + + + 4.3.0-SNAPSHOT + org.eclipse.tm.terminal.connector.cdtserial.feature + eclipse-feature + + + true + + + + + + + org.eclipse.tycho + tycho-packaging-plugin + ${tycho-version} + + default + + + + + + diff --git a/features/org.eclipse.tm.terminal.connector.cdtserial.sdk.feature/.project b/features/org.eclipse.tm.terminal.connector.cdtserial.sdk.feature/.project new file mode 100644 index 00000000000..b870ea2d162 --- /dev/null +++ b/features/org.eclipse.tm.terminal.connector.cdtserial.sdk.feature/.project @@ -0,0 +1,17 @@ + + + org.eclipse.tm.terminal.connector.cdtserial.sdk.feature + + + + + + org.eclipse.pde.FeatureBuilder + + + + + + org.eclipse.pde.FeatureNature + + diff --git a/features/org.eclipse.tm.terminal.connector.cdtserial.sdk.feature/build.properties b/features/org.eclipse.tm.terminal.connector.cdtserial.sdk.feature/build.properties new file mode 100644 index 00000000000..400f7fd68ee --- /dev/null +++ b/features/org.eclipse.tm.terminal.connector.cdtserial.sdk.feature/build.properties @@ -0,0 +1,13 @@ +################################################################################ +# Copyright (c) 2006, 2015 Wind River Systems, Inc. and others. +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Eclipse Public License v1.0 +# which accompanies this distribution, and is available at +# http://www.eclipse.org/legal/epl-v10.html +# +# Contributors: +# Michael Scharf (Wind River) - initial API and implementation +# Uwe Stieber (Wind River) - Bug 434937 - Releng: The Terminal Features have an incorrect license +################################################################################ +bin.includes = feature.xml,\ + feature.properties diff --git a/features/org.eclipse.tm.terminal.connector.cdtserial.sdk.feature/feature.properties b/features/org.eclipse.tm.terminal.connector.cdtserial.sdk.feature/feature.properties new file mode 100644 index 00000000000..229855c57b5 --- /dev/null +++ b/features/org.eclipse.tm.terminal.connector.cdtserial.sdk.feature/feature.properties @@ -0,0 +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 +# +# Contributors: +# QNX Software Systems - Initial API and implementation +############################################################################### +# feature.properties +# contains externalized strings for feature.xml +# "%foo" in feature.xml corresponds to the key "foo" in this file +# java.io.Properties file (ISO 8859-1 with "\" escapes) +# This file should be translated. + +# "featureName" property - name of the feature +featureName=TM Terminal Serial Connector Extensions, SDK + +# "providerName" property - name of the company that provides the feature +providerName=Eclipse.org - Target Management + +# "updateSiteName" property - label for the update site +updateSiteName=TM Terminal 4.2 Updates + +# "description" property - description of the feature +description=A serial line connector for the Terminal + +# "copyright" property - text of the "Feature Update Copyright" +copyright=\ +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 +################ end of copyright property #################################### diff --git a/features/org.eclipse.tm.terminal.connector.cdtserial.sdk.feature/feature.xml b/features/org.eclipse.tm.terminal.connector.cdtserial.sdk.feature/feature.xml new file mode 100644 index 00000000000..ad40eb35802 --- /dev/null +++ b/features/org.eclipse.tm.terminal.connector.cdtserial.sdk.feature/feature.xml @@ -0,0 +1,52 @@ + + + + + + %description + + + + %copyright + + + + %license + + + + + + + + + + + + + + + diff --git a/features/org.eclipse.tm.terminal.connector.cdtserial.sdk.feature/pom.xml b/features/org.eclipse.tm.terminal.connector.cdtserial.sdk.feature/pom.xml new file mode 100644 index 00000000000..fad1521ad74 --- /dev/null +++ b/features/org.eclipse.tm.terminal.connector.cdtserial.sdk.feature/pom.xml @@ -0,0 +1,36 @@ + + + 4.0.0 + + + org.eclipse.tm.terminal + org.eclipse.tm.terminal.maven-build + 4.2.0-SNAPSHOT + ../../admin/pom-build.xml + + + 4.3.0-SNAPSHOT + org.eclipse.tm.terminal.connector.cdtserial.sdk.feature + eclipse-feature + + + true + + + + + + + org.eclipse.tycho + tycho-packaging-plugin + ${tycho-version} + + default + + + + + + diff --git a/features/org.eclipse.tm.terminal.connector.serial.feature/feature.properties b/features/org.eclipse.tm.terminal.connector.serial.feature/feature.properties index 3256dc73660..f805b3d5241 100644 --- a/features/org.eclipse.tm.terminal.connector.serial.feature/feature.properties +++ b/features/org.eclipse.tm.terminal.connector.serial.feature/feature.properties @@ -15,7 +15,7 @@ # This file should be translated. # "featureName" property - name of the feature -featureName=TM Terminal Serial Connector Extensions +featureName=TM Terminal RXTX Serial Connector Extensions # "providerName" property - name of the company that provides the feature providerName=Eclipse.org - Target Management diff --git a/features/org.eclipse.tm.terminal.connector.serial.feature/feature.xml b/features/org.eclipse.tm.terminal.connector.serial.feature/feature.xml index b1789aaa63d..4697e18cc34 100644 --- a/features/org.eclipse.tm.terminal.connector.serial.feature/feature.xml +++ b/features/org.eclipse.tm.terminal.connector.serial.feature/feature.xml @@ -13,7 +13,7 @@ diff --git a/features/org.eclipse.tm.terminal.connector.serial.feature/pom.xml b/features/org.eclipse.tm.terminal.connector.serial.feature/pom.xml index 3e34387899a..128be504a98 100644 --- a/features/org.eclipse.tm.terminal.connector.serial.feature/pom.xml +++ b/features/org.eclipse.tm.terminal.connector.serial.feature/pom.xml @@ -11,7 +11,7 @@ ../../admin/pom-build.xml - 4.2.0-SNAPSHOT + 4.2.1-SNAPSHOT org.eclipse.tm.terminal.connector.serial.feature eclipse-feature diff --git a/features/org.eclipse.tm.terminal.connector.serial.sdk.feature/feature.properties b/features/org.eclipse.tm.terminal.connector.serial.sdk.feature/feature.properties index 97e0b036259..22b2cb1c2b0 100644 --- a/features/org.eclipse.tm.terminal.connector.serial.sdk.feature/feature.properties +++ b/features/org.eclipse.tm.terminal.connector.serial.sdk.feature/feature.properties @@ -15,7 +15,7 @@ # This file should be translated. # "featureName" property - name of the feature -featureName=TM Terminal Serial Connector Extensions, SDK +featureName=TM Terminal RXTX Serial Connector Extensions, SDK # "providerName" property - name of the company that provides the feature providerName=Eclipse.org - Target Management diff --git a/features/org.eclipse.tm.terminal.connector.serial.sdk.feature/feature.xml b/features/org.eclipse.tm.terminal.connector.serial.sdk.feature/feature.xml index 87e312f7307..ac70fa4fbc7 100644 --- a/features/org.eclipse.tm.terminal.connector.serial.sdk.feature/feature.xml +++ b/features/org.eclipse.tm.terminal.connector.serial.sdk.feature/feature.xml @@ -13,7 +13,7 @@ diff --git a/features/org.eclipse.tm.terminal.connector.serial.sdk.feature/pom.xml b/features/org.eclipse.tm.terminal.connector.serial.sdk.feature/pom.xml index 77ba6a531f5..71f97c46af2 100644 --- a/features/org.eclipse.tm.terminal.connector.serial.sdk.feature/pom.xml +++ b/features/org.eclipse.tm.terminal.connector.serial.sdk.feature/pom.xml @@ -11,7 +11,7 @@ ../../admin/pom-build.xml - 4.2.0-SNAPSHOT + 4.2.1-SNAPSHOT org.eclipse.tm.terminal.connector.serial.sdk.feature eclipse-feature diff --git a/features/org.eclipse.tm.terminal.feature/feature.xml b/features/org.eclipse.tm.terminal.feature/feature.xml index 3d55432c30c..59d7e5989ee 100644 --- a/features/org.eclipse.tm.terminal.feature/feature.xml +++ b/features/org.eclipse.tm.terminal.feature/feature.xml @@ -26,7 +26,6 @@ - diff --git a/features/org.eclipse.tm.terminal.sdk.feature/feature.xml b/features/org.eclipse.tm.terminal.sdk.feature/feature.xml index 38b20a91ca1..f57c229e4b8 100644 --- a/features/org.eclipse.tm.terminal.sdk.feature/feature.xml +++ b/features/org.eclipse.tm.terminal.sdk.feature/feature.xml @@ -29,7 +29,6 @@ - diff --git a/plugins/org.eclipse.tm.terminal.connector.cdtserial/.classpath b/plugins/org.eclipse.tm.terminal.connector.cdtserial/.classpath new file mode 100644 index 00000000000..eca7bdba8f0 --- /dev/null +++ b/plugins/org.eclipse.tm.terminal.connector.cdtserial/.classpath @@ -0,0 +1,7 @@ + + + + + + + diff --git a/plugins/org.eclipse.tm.terminal.connector.cdtserial/.gitignore b/plugins/org.eclipse.tm.terminal.connector.cdtserial/.gitignore new file mode 100644 index 00000000000..ae3c1726048 --- /dev/null +++ b/plugins/org.eclipse.tm.terminal.connector.cdtserial/.gitignore @@ -0,0 +1 @@ +/bin/ diff --git a/plugins/org.eclipse.tm.terminal.connector.cdtserial/.options b/plugins/org.eclipse.tm.terminal.connector.cdtserial/.options new file mode 100644 index 00000000000..7a6120d0244 --- /dev/null +++ b/plugins/org.eclipse.tm.terminal.connector.cdtserial/.options @@ -0,0 +1,2 @@ +org.eclipse.tm.terminal.connector.serial/debugmode = 0 +org.eclipse.tm.terminal.connector.serial/trace/serialLinePanel = false diff --git a/plugins/org.eclipse.tm.terminal.connector.cdtserial/.project b/plugins/org.eclipse.tm.terminal.connector.cdtserial/.project new file mode 100644 index 00000000000..4a564b77c17 --- /dev/null +++ b/plugins/org.eclipse.tm.terminal.connector.cdtserial/.project @@ -0,0 +1,34 @@ + + + org.eclipse.tm.terminal.connector.cdtserial + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + org.eclipse.pde.api.tools.apiAnalysisBuilder + + + + + + org.eclipse.pde.PluginNature + org.eclipse.jdt.core.javanature + org.eclipse.pde.api.tools.apiAnalysisNature + + diff --git a/plugins/org.eclipse.tm.terminal.connector.cdtserial/.settings/org.eclipse.jdt.core.prefs b/plugins/org.eclipse.tm.terminal.connector.cdtserial/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 00000000000..6f5171a972b --- /dev/null +++ b/plugins/org.eclipse.tm.terminal.connector.cdtserial/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,361 @@ +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=warning +org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning +org.eclipse.jdt.core.compiler.problem.deadCode=warning +org.eclipse.jdt.core.compiler.problem.deprecation=warning +org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=enabled +org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled +org.eclipse.jdt.core.compiler.problem.discouragedReference=warning +org.eclipse.jdt.core.compiler.problem.emptyStatement=warning +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.problem.fallthroughCase=warning +org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled +org.eclipse.jdt.core.compiler.problem.fieldHiding=warning +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=enabled +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=error +org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=warning +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=warning +org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning +org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning +org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning +org.eclipse.jdt.core.compiler.problem.nullReference=warning +org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=error +org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore +org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning +org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore +org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning +org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning +org.eclipse.jdt.core.compiler.problem.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.syntheticAccessEmulation=warning +org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning +org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=disabled +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=enabled +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=warning +org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore +org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled +org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=enabled +org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=enabled +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=0 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=0 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=0 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=0 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=0 +org.eclipse.jdt.core.formatter.alignment_for_assignment=0 +org.eclipse.jdt.core.formatter.alignment_for_binary_expression=0 +org.eclipse.jdt.core.formatter.alignment_for_compact_if=0 +org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=0 +org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0 +org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=0 +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=0 +org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=0 +org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80 +org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16 +org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=0 +org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=0 +org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=0 +org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=0 +org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=0 +org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=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=1 +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=true +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=true +org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true +org.eclipse.jdt.core.formatter.comment.format_line_comments=true +org.eclipse.jdt.core.formatter.comment.format_source_code=true +org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true +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=100 +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.comment.preserve_white_space_between_code_and_line_comments=false +org.eclipse.jdt.core.formatter.compact_else_if=true +org.eclipse.jdt.core.formatter.continuation_indentation=4 +org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=4 +org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off +org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on +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=false +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=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=insert +org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=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_try=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_semicolon_in_try_resources=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_try=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_try=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_semicolon_in_try_resources=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=true +org.eclipse.jdt.core.formatter.join_wrapped_lines=true +org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=true +org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false +org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=true +org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=true +org.eclipse.jdt.core.formatter.lineSplit=100 +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=1 +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=true +org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true +org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true +org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true diff --git a/plugins/org.eclipse.tm.terminal.connector.cdtserial/.settings/org.eclipse.jdt.ui.prefs b/plugins/org.eclipse.tm.terminal.connector.cdtserial/.settings/org.eclipse.jdt.ui.prefs new file mode 100644 index 00000000000..0d732269684 --- /dev/null +++ b/plugins/org.eclipse.tm.terminal.connector.cdtserial/.settings/org.eclipse.jdt.ui.prefs @@ -0,0 +1,62 @@ +eclipse.preferences.version=1 +editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true +formatter_profile=_Target Explorer Java STD +formatter_settings_version=12 +sp_cleanup.add_default_serial_version_id=true +sp_cleanup.add_generated_serial_version_id=false +sp_cleanup.add_missing_annotations=true +sp_cleanup.add_missing_deprecated_annotations=true +sp_cleanup.add_missing_methods=false +sp_cleanup.add_missing_nls_tags=false +sp_cleanup.add_missing_override_annotations=true +sp_cleanup.add_missing_override_annotations_interface_methods=true +sp_cleanup.add_serial_version_id=false +sp_cleanup.always_use_blocks=true +sp_cleanup.always_use_parentheses_in_expressions=false +sp_cleanup.always_use_this_for_non_static_field_access=false +sp_cleanup.always_use_this_for_non_static_method_access=false +sp_cleanup.convert_functional_interfaces=false +sp_cleanup.convert_to_enhanced_for_loop=false +sp_cleanup.correct_indentation=false +sp_cleanup.format_source_code=false +sp_cleanup.format_source_code_changes_only=false +sp_cleanup.insert_inferred_type_arguments=false +sp_cleanup.make_local_variable_final=false +sp_cleanup.make_parameters_final=false +sp_cleanup.make_private_fields_final=true +sp_cleanup.make_type_abstract_if_missing_method=false +sp_cleanup.make_variable_declarations_final=false +sp_cleanup.never_use_blocks=false +sp_cleanup.never_use_parentheses_in_expressions=true +sp_cleanup.on_save_use_additional_actions=true +sp_cleanup.organize_imports=true +sp_cleanup.qualify_static_field_accesses_with_declaring_class=false +sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true +sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true +sp_cleanup.qualify_static_member_accesses_with_declaring_class=false +sp_cleanup.qualify_static_method_accesses_with_declaring_class=false +sp_cleanup.remove_private_constructors=true +sp_cleanup.remove_redundant_type_arguments=false +sp_cleanup.remove_trailing_whitespaces=true +sp_cleanup.remove_trailing_whitespaces_all=true +sp_cleanup.remove_trailing_whitespaces_ignore_empty=false +sp_cleanup.remove_unnecessary_casts=false +sp_cleanup.remove_unnecessary_nls_tags=true +sp_cleanup.remove_unused_imports=true +sp_cleanup.remove_unused_local_variables=false +sp_cleanup.remove_unused_private_fields=true +sp_cleanup.remove_unused_private_members=false +sp_cleanup.remove_unused_private_methods=true +sp_cleanup.remove_unused_private_types=true +sp_cleanup.sort_members=false +sp_cleanup.sort_members_all=false +sp_cleanup.use_anonymous_class_creation=false +sp_cleanup.use_blocks=false +sp_cleanup.use_blocks_only_for_return_and_throw=false +sp_cleanup.use_lambda=false +sp_cleanup.use_parentheses_in_expressions=false +sp_cleanup.use_this_for_non_static_field_access=false +sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true +sp_cleanup.use_this_for_non_static_method_access=false +sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true +sp_cleanup.use_type_arguments=false diff --git a/plugins/org.eclipse.tm.terminal.connector.cdtserial/.settings/org.eclipse.pde.prefs b/plugins/org.eclipse.tm.terminal.connector.cdtserial/.settings/org.eclipse.pde.prefs new file mode 100644 index 00000000000..cf80c8bc5b8 --- /dev/null +++ b/plugins/org.eclipse.tm.terminal.connector.cdtserial/.settings/org.eclipse.pde.prefs @@ -0,0 +1,32 @@ +compilers.f.unresolved-features=1 +compilers.f.unresolved-plugins=1 +compilers.incompatible-environment=1 +compilers.p.build=1 +compilers.p.build.bin.includes=1 +compilers.p.build.encodings=2 +compilers.p.build.java.compiler=2 +compilers.p.build.java.compliance=1 +compilers.p.build.missing.output=2 +compilers.p.build.output.library=1 +compilers.p.build.source.library=1 +compilers.p.build.src.includes=1 +compilers.p.deprecated=1 +compilers.p.discouraged-class=1 +compilers.p.internal=1 +compilers.p.missing-packages=1 +compilers.p.missing-version-export-package=2 +compilers.p.missing-version-import-package=1 +compilers.p.missing-version-require-bundle=1 +compilers.p.no-required-att=0 +compilers.p.not-externalized-att=2 +compilers.p.unknown-attribute=1 +compilers.p.unknown-class=1 +compilers.p.unknown-element=1 +compilers.p.unknown-identifier=1 +compilers.p.unknown-resource=1 +compilers.p.unresolved-ex-points=0 +compilers.p.unresolved-import=0 +compilers.s.create-docs=false +compilers.s.doc-folder=doc +compilers.s.open-tags=1 +eclipse.preferences.version=1 diff --git a/plugins/org.eclipse.tm.terminal.connector.cdtserial/META-INF/MANIFEST.MF b/plugins/org.eclipse.tm.terminal.connector.cdtserial/META-INF/MANIFEST.MF new file mode 100644 index 00000000000..37e6fdd9f81 --- /dev/null +++ b/plugins/org.eclipse.tm.terminal.connector.cdtserial/META-INF/MANIFEST.MF @@ -0,0 +1,23 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: %pluginName +Bundle-SymbolicName: org.eclipse.tm.terminal.connector.cdtserial;singleton:=true +Bundle-Version: 4.3.0.qualifier +Bundle-Activator: org.eclipse.tm.terminal.connector.cdtserial.activator.Activator +Bundle-Vendor: %providerName +Require-Bundle: org.eclipse.core.expressions;bundle-version="3.4.400", + org.eclipse.core.runtime;bundle-version="3.8.0", + org.eclipse.equinox.security;bundle-version="1.1.100", + org.eclipse.tm.terminal.view.core;bundle-version="4.0.0";resolution:=optional, + org.eclipse.tm.terminal.view.ui;bundle-version="4.1.0";resolution:=optional, + org.eclipse.tm.terminal.control;bundle-version="4.0.0", + org.eclipse.ui;bundle-version="3.8.0", + org.eclipse.cdt.native.serial;bundle-version="1.0.0" +Bundle-RequiredExecutionEnvironment: JavaSE-1.8 +Bundle-ActivationPolicy: lazy +Bundle-Localization: plugin +Export-Package: org.eclipse.tm.terminal.connector.cdtserial.activator;x-internal:=true, + org.eclipse.tm.terminal.connector.cdtserial.connector, + org.eclipse.tm.terminal.connector.cdtserial.controls, + org.eclipse.tm.terminal.connector.cdtserial.launcher, + org.eclipse.tm.terminal.connector.cdtserial.nls;x-internal:=true diff --git a/plugins/org.eclipse.tm.terminal.connector.cdtserial/about.html b/plugins/org.eclipse.tm.terminal.connector.cdtserial/about.html new file mode 100644 index 00000000000..0f07cf034df --- /dev/null +++ b/plugins/org.eclipse.tm.terminal.connector.cdtserial/about.html @@ -0,0 +1,28 @@ + + + + +About + + +

About This Content

+ +

May 24, 2012

+

License

+ +

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 http://www.eclipse.org/legal/epl-v10.html. +For purposes of the EPL, "Program" will mean the Content.

+ +

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 http://www.eclipse.org.

+ + + \ No newline at end of file diff --git a/plugins/org.eclipse.tm.terminal.connector.cdtserial/build.properties b/plugins/org.eclipse.tm.terminal.connector.cdtserial/build.properties new file mode 100644 index 00000000000..333354053ba --- /dev/null +++ b/plugins/org.eclipse.tm.terminal.connector.cdtserial/build.properties @@ -0,0 +1,16 @@ +############################################################################### +# Copyright (c) 2012, 2015 Wind River Systems, Inc. and others. All rights reserved. +# This program and the accompanying materials are made available under the terms +# of the Eclipse Public License v1.0 which accompanies this distribution, and is +# available at http://www.eclipse.org/legal/epl-v10.html +# +# Contributors: +# Wind River Systems - initial API and implementation +############################################################################### +source.. = src/ +output.. = bin/ +bin.includes = META-INF/,\ + .,\ + plugin.properties,\ + plugin.xml,\ + about.html diff --git a/plugins/org.eclipse.tm.terminal.connector.cdtserial/plugin.properties b/plugins/org.eclipse.tm.terminal.connector.cdtserial/plugin.properties new file mode 100644 index 00000000000..17f52a5df6f --- /dev/null +++ b/plugins/org.eclipse.tm.terminal.connector.cdtserial/plugin.properties @@ -0,0 +1,20 @@ +################################################################################## +# Copyright (c) 2011, 2015 Wind River Systems, Inc. and others. All rights reserved. +# This program and the accompanying materials are made available under the terms +# of the Eclipse Public License v1.0 which accompanies this distribution, and is +# available at http://www.eclipse.org/legal/epl-v10.html +# +# Contributors: +# Wind River Systems - initial API and implementation +################################################################################## + +pluginName = Terminal Serial Connector +providerName = Eclipse.org - Target Management + +# ----- Terminal Launcher Delegates ----- + +SerialLauncherDelegate.label=Serial Terminal + +# ----- Terminal Connectors ----- + +SerialConnector.label = Serial diff --git a/plugins/org.eclipse.tm.terminal.connector.cdtserial/plugin.xml b/plugins/org.eclipse.tm.terminal.connector.cdtserial/plugin.xml new file mode 100644 index 00000000000..4628094c3bc --- /dev/null +++ b/plugins/org.eclipse.tm.terminal.connector.cdtserial/plugin.xml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + diff --git a/plugins/org.eclipse.tm.terminal.connector.cdtserial/pom.xml b/plugins/org.eclipse.tm.terminal.connector.cdtserial/pom.xml new file mode 100644 index 00000000000..1f50fba8c79 --- /dev/null +++ b/plugins/org.eclipse.tm.terminal.connector.cdtserial/pom.xml @@ -0,0 +1,17 @@ + + + 4.0.0 + + + org.eclipse.tm.terminal + org.eclipse.tm.terminal.maven-build + 4.2.0-SNAPSHOT + ../../admin/pom-build.xml + + + 4.3.0-SNAPSHOT + org.eclipse.tm.terminal.connector.cdtserial + eclipse-plugin + diff --git a/plugins/org.eclipse.tm.terminal.connector.cdtserial/src/org/eclipse/tm/terminal/connector/cdtserial/activator/Activator.java b/plugins/org.eclipse.tm.terminal.connector.cdtserial/src/org/eclipse/tm/terminal/connector/cdtserial/activator/Activator.java new file mode 100644 index 00000000000..d2e1789d3c5 --- /dev/null +++ b/plugins/org.eclipse.tm.terminal.connector.cdtserial/src/org/eclipse/tm/terminal/connector/cdtserial/activator/Activator.java @@ -0,0 +1,119 @@ +/******************************************************************************* + * 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 + * + * Contributors: + * QNX Software Systems - Initial API and implementation + *******************************************************************************/ +package org.eclipse.tm.terminal.connector.cdtserial.activator; + +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.IStatus; +import org.eclipse.core.runtime.Status; +import org.eclipse.jface.resource.ImageDescriptor; +import org.eclipse.jface.resource.ImageRegistry; +import org.eclipse.swt.graphics.Image; +import org.eclipse.tm.terminal.view.core.tracing.TraceHandler; +import org.eclipse.ui.plugin.AbstractUIPlugin; +import org.osgi.framework.BundleContext; + +/** + * The activator class controls the plug-in life cycle + */ +public class Activator extends AbstractUIPlugin { + // The shared instance + private static Activator plugin; + // The trace handler instance + private static volatile TraceHandler traceHandler; + + /** + * The constructor + */ + public Activator() { + } + + /** + * Returns the shared instance + * + * @return the shared instance + */ + public static Activator getDefault() { + return plugin; + } + + /** + * Convenience method which returns the unique identifier of this plugin. + */ + public static String getUniqueIdentifier() { + if (getDefault() != null && getDefault().getBundle() != null) { + return getDefault().getBundle().getSymbolicName(); + } + return "org.eclipse.tm.terminal.connector.serial"; //$NON-NLS-1$ + } + + /** + * Returns the bundles trace handler. + * + * @return The bundles trace handler. + */ + public static TraceHandler getTraceHandler() { + if (traceHandler == null) { + traceHandler = new TraceHandler(getUniqueIdentifier()); + } + return traceHandler; + } + + @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); + } + + @Override + protected void initializeImageRegistry(ImageRegistry registry) { + } + + /** + * Loads the image registered under the specified key from the image + * registry and returns the Image object instance. + * + * @param key The key the image is registered with. + * @return The Image object instance or null. + */ + public static Image getImage(String key) { + return getDefault().getImageRegistry().get(key); + } + + /** + * Loads the image registered under the specified key from the image + * registry and returns the ImageDescriptor object instance. + * + * @param key The key the image is registered with. + * @return The ImageDescriptor object instance or null. + */ + public static ImageDescriptor getImageDescriptor(String key) { + return getDefault().getImageRegistry().getDescriptor(key); + } + + public static void log(IStatus status) { + plugin.getLog().log(status); + } + + public static void log(Exception exception) { + if (exception instanceof CoreException) { + log(((CoreException) exception).getStatus()); + } else { + log(new Status(IStatus.ERROR, plugin.getBundle().getSymbolicName(), exception.getLocalizedMessage(), exception)); + } + } + +} diff --git a/plugins/org.eclipse.tm.terminal.connector.cdtserial/src/org/eclipse/tm/terminal/connector/cdtserial/connector/SerialConnector.java b/plugins/org.eclipse.tm.terminal.connector.cdtserial/src/org/eclipse/tm/terminal/connector/cdtserial/connector/SerialConnector.java new file mode 100644 index 00000000000..6716a4739d3 --- /dev/null +++ b/plugins/org.eclipse.tm.terminal.connector.cdtserial/src/org/eclipse/tm/terminal/connector/cdtserial/connector/SerialConnector.java @@ -0,0 +1,119 @@ +/******************************************************************************* + * 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 + * + * Contributors: + * QNX Software Systems - Initial API and implementation + *******************************************************************************/ +package org.eclipse.tm.terminal.connector.cdtserial.connector; + +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; +import java.util.HashSet; +import java.util.Set; + +import org.eclipse.cdt.serial.SerialPort; +import org.eclipse.tm.internal.terminal.provisional.api.ISettingsStore; +import org.eclipse.tm.internal.terminal.provisional.api.ITerminalControl; +import org.eclipse.tm.internal.terminal.provisional.api.TerminalState; +import org.eclipse.tm.internal.terminal.provisional.api.provider.TerminalConnectorImpl; +import org.eclipse.tm.terminal.connector.cdtserial.activator.Activator; + +public class SerialConnector extends TerminalConnectorImpl { + + private SerialSettings settings = new SerialSettings(); + SerialPort serialPort; + + private static Set openPorts = new HashSet<>(); + + public static boolean isOpen(String portName) { + return openPorts.contains(portName); + } + + @Override + public OutputStream getTerminalToRemoteStream() { + return serialPort.getOutputStream(); + } + + public SerialSettings getSettings() { + return settings; + } + + public SerialPort getSerialPort() { + return serialPort; + } + + @Override + public String getSettingsSummary() { + return settings.getSummary(); + } + + @Override + public void load(ISettingsStore store) { + settings.load(store); + } + + @Override + public void save(ISettingsStore store) { + settings.save(store); + } + + @Override + public void connect(ITerminalControl control) { + super.connect(control); + control.setState(TerminalState.CONNECTING); + + serialPort = new SerialPort(settings.getPortName()); + try { + serialPort.setBaudRate(settings.getBaudRate()); + serialPort.setByteSize(settings.getByteSize()); + serialPort.setParity(settings.getParity()); + serialPort.setStopBits(settings.getStopBits()); + serialPort.open(); + } catch (IOException e) { + Activator.log(e); + control.setState(TerminalState.CLOSED); + return; + } + + openPorts.add(serialPort.getPortName()); + + new Thread() { + @Override + public void run() { + InputStream targetIn = serialPort.getInputStream(); + byte[] buff = new byte[256]; + int n; + try { + while ((n = targetIn.read(buff, 0, buff.length)) >= 0) { + if (n != 0) { + control.getRemoteToTerminalOutputStream().write(buff, 0, n); + } + } + disconnect(); + } catch (IOException e) { + Activator.log(e); + } + } + }.start(); + control.setState(TerminalState.CONNECTED); + } + + @Override + protected void doDisconnect() { + if (serialPort != null && serialPort.isOpen()) { + openPorts.remove(serialPort.getPortName()); + try { + serialPort.close(); + } catch (IOException e) { + Activator.log(e); + } + } + serialPort = null; + } + +} diff --git a/plugins/org.eclipse.tm.terminal.connector.cdtserial/src/org/eclipse/tm/terminal/connector/cdtserial/connector/SerialSettings.java b/plugins/org.eclipse.tm.terminal.connector.cdtserial/src/org/eclipse/tm/terminal/connector/cdtserial/connector/SerialSettings.java new file mode 100644 index 00000000000..25864793a59 --- /dev/null +++ b/plugins/org.eclipse.tm.terminal.connector.cdtserial/src/org/eclipse/tm/terminal/connector/cdtserial/connector/SerialSettings.java @@ -0,0 +1,147 @@ +/******************************************************************************* + * 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 + * + * Contributors: + * QNX Software Systems - Initial API and implementation + *******************************************************************************/ +package org.eclipse.tm.terminal.connector.cdtserial.connector; + +import org.eclipse.cdt.serial.BaudRate; +import org.eclipse.cdt.serial.ByteSize; +import org.eclipse.cdt.serial.Parity; +import org.eclipse.cdt.serial.StopBits; +import org.eclipse.tm.internal.terminal.provisional.api.ISettingsStore; + +public class SerialSettings { + + public static final String PORT_NAME_ATTR = "cdtserial.portName"; //$NON-NLS-1$ + public static final String BAUD_RATE_ATTR = "cdtserial.baudRate"; //$NON-NLS-1$ + public static final String BYTE_SIZE_ATTR = "cdtserial.byteSize"; //$NON-NLS-1$ + public static final String PARITY_ATTR = "cdtserial.parity"; //$NON-NLS-1$ + public static final String STOP_BITS_ATTR = "cdtserial.stopBits"; //$NON-NLS-1$ + + private String portName; + private BaudRate baudRate; + private ByteSize byteSize; + private Parity parity; + private StopBits stopBits; + + /** + * Load information into the RemoteSettings object. + */ + public void load(ISettingsStore store) { + portName = store.get(PORT_NAME_ATTR, ""); //$NON-NLS-1$ + + String baudRateStr = store.get(BAUD_RATE_ATTR, ""); //$NON-NLS-1$ + if (baudRateStr.isEmpty()) { + baudRate = BaudRate.getDefault(); + } else { + String[] rates = BaudRate.getStrings(); + for (int i = 0; i < rates.length; ++i) { + if (baudRateStr.equals(rates[i])) { + baudRate = BaudRate.fromStringIndex(i); + break; + } + } + } + + String byteSizeStr = store.get(BYTE_SIZE_ATTR, ""); //$NON-NLS-1$ + if (byteSizeStr.isEmpty()) { + byteSize = ByteSize.getDefault(); + } else { + String[] sizes = ByteSize.getStrings(); + for (int i = 0; i < sizes.length; ++i) { + if (byteSizeStr.equals(sizes[i])) { + byteSize = ByteSize.fromStringIndex(i); + break; + } + } + } + + String parityStr = store.get(PARITY_ATTR, ""); //$NON-NLS-1$ + if (parityStr.isEmpty()) { + parity = Parity.getDefault(); + } else { + String[] parities = Parity.getStrings(); + for (int i = 0; i < parities.length; ++i) { + if (parityStr.equals(parities[i])) { + parity = Parity.fromStringIndex(i); + break; + } + } + } + + String stopBitsStr = store.get(STOP_BITS_ATTR, ""); //$NON-NLS-1$ + if (stopBitsStr.isEmpty()) { + stopBits = StopBits.getDefault(); + } else { + String[] bits = StopBits.getStrings(); + for (int i = 0; i < bits.length; ++i) { + if (stopBitsStr.equals(bits[i])) { + stopBits = StopBits.fromStringIndex(i); + break; + } + } + } + } + + /** + * Extract information from the RemoteSettings object. + */ + public void save(ISettingsStore store) { + store.put(PORT_NAME_ATTR, portName); + store.put(BAUD_RATE_ATTR, BaudRate.getStrings()[BaudRate.getStringIndex(baudRate)]); + store.put(BYTE_SIZE_ATTR, ByteSize.getStrings()[ByteSize.getStringIndex(byteSize)]); + store.put(PARITY_ATTR, Parity.getStrings()[Parity.getStringIndex(parity)]); + store.put(STOP_BITS_ATTR, StopBits.getStrings()[StopBits.getStringIndex(stopBits)]); + } + + public String getPortName() { + return portName; + } + + public void setPortName(String portName) { + this.portName = portName; + } + + public BaudRate getBaudRate() { + return baudRate; + } + + public void setBaudRate(BaudRate baudRate) { + this.baudRate = baudRate; + } + + public ByteSize getByteSize() { + return byteSize; + } + + public void setByteSize(ByteSize byteSize) { + this.byteSize = byteSize; + } + + public Parity getParity() { + return parity; + } + + public void setParity(Parity parity) { + this.parity = parity; + } + + public StopBits getStopBits() { + return stopBits; + } + + public void setStopBits(StopBits stopBits) { + this.stopBits = stopBits; + } + + public String getSummary() { + return portName; + } + +} diff --git a/plugins/org.eclipse.tm.terminal.connector.cdtserial/src/org/eclipse/tm/terminal/connector/cdtserial/controls/SerialConfigPanel.java b/plugins/org.eclipse.tm.terminal.connector.cdtserial/src/org/eclipse/tm/terminal/connector/cdtserial/controls/SerialConfigPanel.java new file mode 100644 index 00000000000..2291d2fb118 --- /dev/null +++ b/plugins/org.eclipse.tm.terminal.connector.cdtserial/src/org/eclipse/tm/terminal/connector/cdtserial/controls/SerialConfigPanel.java @@ -0,0 +1,108 @@ +/******************************************************************************* + * 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 + * + * Contributors: + * QNX Software Systems - Initial API and implementation + *******************************************************************************/ +package org.eclipse.tm.terminal.connector.cdtserial.controls; + +import java.util.Map; + +import org.eclipse.cdt.serial.BaudRate; +import org.eclipse.cdt.serial.ByteSize; +import org.eclipse.cdt.serial.Parity; +import org.eclipse.cdt.serial.StopBits; +import org.eclipse.swt.SWT; +import org.eclipse.swt.layout.GridData; +import org.eclipse.swt.layout.GridLayout; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.tm.terminal.connector.cdtserial.connector.SerialConnector; +import org.eclipse.tm.terminal.connector.cdtserial.connector.SerialSettings; +import org.eclipse.tm.terminal.view.core.interfaces.constants.ITerminalsConnectorConstants; +import org.eclipse.tm.terminal.view.ui.interfaces.IConfigurationPanelContainer; +import org.eclipse.tm.terminal.view.ui.panels.AbstractExtendedConfigurationPanel; + +public class SerialConfigPanel extends AbstractExtendedConfigurationPanel { + + private SerialSettings settings; + private SerialSettingsPage page; + + public SerialConfigPanel(IConfigurationPanelContainer container) { + super(container); + } + + @Override + public void setupPanel(Composite parent) { + Composite panel = new Composite(parent, SWT.NONE); + panel.setLayout(new GridLayout()); + GridData data = new GridData(SWT.FILL, SWT.FILL, true, true); + panel.setLayoutData(data); + + SerialConnector connector = new SerialConnector(); + settings = connector.getSettings(); + page = new SerialSettingsPage(settings, this); + page.createControl(panel); + + createEncodingUI(panel, true); + + setControl(panel); + } + + @Override + public void extractData(Map data) { + if (data == null) { + return; + } + + page.saveSettings(); + data.put(SerialSettings.PORT_NAME_ATTR, settings.getPortName()); + data.put(SerialSettings.BAUD_RATE_ATTR, settings.getBaudRate()); + data.put(SerialSettings.BYTE_SIZE_ATTR, settings.getByteSize()); + data.put(SerialSettings.PARITY_ATTR, settings.getParity()); + data.put(SerialSettings.STOP_BITS_ATTR, settings.getStopBits()); + + if (getEncoding() != null) { + data.put(ITerminalsConnectorConstants.PROP_ENCODING, getEncoding()); + } + } + + @Override + public void setupData(Map data) { + if (data == null) { + return; + } + + settings.setPortName((String) data.get(SerialSettings.PORT_NAME_ATTR)); + settings.setBaudRate((BaudRate) data.get(SerialSettings.BAUD_RATE_ATTR)); + settings.setByteSize((ByteSize) data.get(SerialSettings.BYTE_SIZE_ATTR)); + settings.setParity((Parity) data.get(SerialSettings.PARITY_ATTR)); + settings.setStopBits((StopBits) data.get(SerialSettings.STOP_BITS_ATTR)); + + String encoding = (String) data.get(ITerminalsConnectorConstants.PROP_ENCODING); + if (encoding != null) { + setEncoding(encoding); + } + } + + @Override + protected void saveSettingsForHost(boolean add) { + } + + @Override + protected void fillSettingsForHost(String host) { + } + + @Override + protected String getHostFromSettings() { + if (page != null) { + page.saveSettings(); + return settings.getPortName(); + } + return null; + } + +} diff --git a/plugins/org.eclipse.tm.terminal.connector.cdtserial/src/org/eclipse/tm/terminal/connector/cdtserial/controls/SerialSettingsPage.java b/plugins/org.eclipse.tm.terminal.connector.cdtserial/src/org/eclipse/tm/terminal/connector/cdtserial/controls/SerialSettingsPage.java new file mode 100644 index 00000000000..e5a7b2010bd --- /dev/null +++ b/plugins/org.eclipse.tm.terminal.connector.cdtserial/src/org/eclipse/tm/terminal/connector/cdtserial/controls/SerialSettingsPage.java @@ -0,0 +1,264 @@ +/******************************************************************************* + * 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 + * + * Contributors: + * QNX Software Systems - Initial API and implementation + *******************************************************************************/ +package org.eclipse.tm.terminal.connector.cdtserial.controls; + +import java.io.IOException; + +import org.eclipse.cdt.serial.BaudRate; +import org.eclipse.cdt.serial.ByteSize; +import org.eclipse.cdt.serial.Parity; +import org.eclipse.cdt.serial.SerialPort; +import org.eclipse.cdt.serial.StopBits; +import org.eclipse.jface.dialogs.DialogSettings; +import org.eclipse.jface.dialogs.IDialogSettings; +import org.eclipse.swt.SWT; +import org.eclipse.swt.events.SelectionAdapter; +import org.eclipse.swt.events.SelectionEvent; +import org.eclipse.swt.layout.GridData; +import org.eclipse.swt.layout.GridLayout; +import org.eclipse.swt.widgets.Combo; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Label; +import org.eclipse.tm.internal.terminal.provisional.api.AbstractSettingsPage; +import org.eclipse.tm.terminal.connector.cdtserial.activator.Activator; +import org.eclipse.tm.terminal.connector.cdtserial.connector.SerialConnector; +import org.eclipse.tm.terminal.connector.cdtserial.connector.SerialSettings; +import org.eclipse.tm.terminal.connector.cdtserial.nls.Messages; +import org.eclipse.tm.terminal.view.ui.interfaces.IConfigurationPanel; +import org.eclipse.tm.terminal.view.ui.interfaces.IConfigurationPanelContainer; + +public class SerialSettingsPage extends AbstractSettingsPage { + + private final SerialSettings settings; + private final IConfigurationPanel panel; + private final IDialogSettings dialogSettings; + + private Combo portCombo; + private Combo baudRateCombo; + private Combo byteSizeCombo; + private Combo parityCombo; + private Combo stopBitsCombo; + + private String portName; + private BaudRate baudRate; + private ByteSize byteSize; + private Parity parity; + private StopBits stopBits; + + public SerialSettingsPage(SerialSettings settings, IConfigurationPanel panel) { + this.settings = settings; + this.panel = panel; + setHasControlDecoration(true); + + dialogSettings = DialogSettings.getOrCreateSection(Activator.getDefault().getDialogSettings(), + this.getClass().getSimpleName()); + portName = dialogSettings.get(SerialSettings.PORT_NAME_ATTR); + + String baudRateStr = dialogSettings.get(SerialSettings.BAUD_RATE_ATTR); + if (baudRateStr == null || baudRateStr.isEmpty()) { + baudRate = BaudRate.getDefault(); + } else { + String[] rates = BaudRate.getStrings(); + for (int i = 0; i < rates.length; ++i) { + if (baudRateStr.equals(rates[i])) { + baudRate = BaudRate.fromStringIndex(i); + break; + } + } + } + + String byteSizeStr = dialogSettings.get(SerialSettings.BYTE_SIZE_ATTR); + if (byteSizeStr == null || byteSizeStr.isEmpty()) { + byteSize = ByteSize.getDefault(); + } else { + String[] sizes = ByteSize.getStrings(); + for (int i = 0; i < sizes.length; ++i) { + if (byteSizeStr.equals(sizes[i])) { + byteSize = ByteSize.fromStringIndex(i); + break; + } + } + } + + String parityStr = dialogSettings.get(SerialSettings.PARITY_ATTR); + if (parityStr == null || parityStr.isEmpty()) { + parity = Parity.getDefault(); + } else { + String[] parities = Parity.getStrings(); + for (int i = 0; i < parities.length; ++i) { + if (parityStr.equals(parities[i])) { + parity = Parity.fromStringIndex(i); + break; + } + } + } + + String stopBitsStr = dialogSettings.get(SerialSettings.STOP_BITS_ATTR); + if (stopBitsStr == null || stopBitsStr.isEmpty()) { + stopBits = StopBits.getDefault(); + } else { + String[] bits = StopBits.getStrings(); + for (int i = 0; i < bits.length; ++i) { + if (stopBitsStr.equals(bits[i])) { + stopBits = StopBits.fromStringIndex(i); + break; + } + } + } + } + + @Override + public void createControl(Composite parent) { + Composite comp = new Composite(parent, SWT.NONE); + GridLayout gridLayout = new GridLayout(2, false); + gridLayout.marginWidth = gridLayout.marginHeight = 0; + GridData gridData = new GridData(GridData.FILL_HORIZONTAL); + comp.setLayout(gridLayout); + comp.setLayoutData(gridData); + + Label portLabel = new Label(comp, SWT.NONE); + portLabel.setText(Messages.SerialTerminalSettingsPage_SerialPort); + + portCombo = new Combo(comp, SWT.READ_ONLY); + portCombo.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); + String[] portNames = new String[0]; + try { + portNames = SerialPort.list(); + } catch (IOException e) { + Activator.log(e); + } + for (String portName : portNames) { + if (!SerialConnector.isOpen(portName)) { + portCombo.add(portName); + } + } + portCombo.addSelectionListener(new SelectionAdapter() { + @Override + public void widgetSelected(SelectionEvent e) { + validate(); + } + }); + + Label baudRateLabel = new Label(comp, SWT.NONE); + baudRateLabel.setText(Messages.SerialTerminalSettingsPage_BaudRate); + + baudRateCombo = new Combo(comp, SWT.READ_ONLY); + baudRateCombo.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); + for (String baudRateStr : BaudRate.getStrings()) { + baudRateCombo.add(baudRateStr); + } + + Label byteSizeLabel = new Label(comp, SWT.NONE); + byteSizeLabel.setText(Messages.SerialTerminalSettingsPage_DataSize); + + byteSizeCombo = new Combo(comp, SWT.READ_ONLY); + byteSizeCombo.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); + for (String byteSizeStr : ByteSize.getStrings()) { + byteSizeCombo.add(byteSizeStr); + } + + Label parityLabel = new Label(comp, SWT.NONE); + parityLabel.setText(Messages.SerialTerminalSettingsPage_Parity); + + parityCombo = new Combo(comp, SWT.READ_ONLY); + parityCombo.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); + for (String parityStr : Parity.getStrings()) { + parityCombo.add(parityStr); + } + + Label stopBitsLabel = new Label(comp, SWT.NONE); + stopBitsLabel.setText(Messages.SerialTerminalSettingsPage_StopBits); + + stopBitsCombo = new Combo(comp, SWT.READ_ONLY); + stopBitsCombo.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); + for (String stopBitsStr : StopBits.getStrings()) { + stopBitsCombo.add(stopBitsStr); + } + + loadSettings(); + } + + void validate() { + IConfigurationPanelContainer container = panel.getContainer(); + container.validate(); + } + + @Override + public void loadSettings() { + String portName = settings.getPortName(); + if (portName == null || portName.isEmpty()) { + portName = this.portName; + } + if (portName != null && !portName.isEmpty() && !SerialConnector.isOpen(portName)) { + int i = 0; + for (String name : portCombo.getItems()) { + if (portName.equals(name)) { + portCombo.select(i); + break; + } + i++; + } + } else if (portCombo.getItemCount() > 0) { + portCombo.select(0); + } + + BaudRate baudRate = settings.getBaudRate(); + if (baudRate == null) { + baudRate = this.baudRate; + } + baudRateCombo.select(BaudRate.getStringIndex(baudRate)); + + ByteSize byteSize = settings.getByteSize(); + if (byteSize == null) { + byteSize = this.byteSize; + } + byteSizeCombo.select(ByteSize.getStringIndex(byteSize)); + + Parity parity = settings.getParity(); + if (parity == null) { + parity = this.parity; + } + parityCombo.select(Parity.getStringIndex(parity)); + + StopBits stopBits = settings.getStopBits(); + if (stopBits == null) { + stopBits = this.stopBits; + } + stopBitsCombo.select(StopBits.getStringIndex(stopBits)); + } + + @Override + public void saveSettings() { + settings.setPortName(portCombo.getText()); + settings.setBaudRate(BaudRate.fromStringIndex(baudRateCombo.getSelectionIndex())); + settings.setByteSize(ByteSize.fromStringIndex(byteSizeCombo.getSelectionIndex())); + settings.setParity(Parity.fromStringIndex(parityCombo.getSelectionIndex())); + settings.setStopBits(StopBits.fromStringIndex(stopBitsCombo.getSelectionIndex())); + + dialogSettings.put(SerialSettings.PORT_NAME_ATTR, portCombo.getText()); + dialogSettings.put(SerialSettings.BAUD_RATE_ATTR, + BaudRate.getStrings()[baudRateCombo.getSelectionIndex()]); + dialogSettings.put(SerialSettings.BYTE_SIZE_ATTR, + ByteSize.getStrings()[byteSizeCombo.getSelectionIndex()]); + dialogSettings.put(SerialSettings.PARITY_ATTR, Parity.getStrings()[parityCombo.getSelectionIndex()]); + dialogSettings.put(SerialSettings.STOP_BITS_ATTR, + StopBits.getStrings()[stopBitsCombo.getSelectionIndex()]); + } + + @Override + public boolean validateSettings() { + if (portCombo.getSelectionIndex() < 0 && portCombo.getText().isEmpty()) { + return false; + } + return true; + } + +} diff --git a/plugins/org.eclipse.tm.terminal.connector.cdtserial/src/org/eclipse/tm/terminal/connector/cdtserial/launcher/SerialLauncherDelegate.java b/plugins/org.eclipse.tm.terminal.connector.cdtserial/src/org/eclipse/tm/terminal/connector/cdtserial/launcher/SerialLauncherDelegate.java new file mode 100644 index 00000000000..3af53a9b2b2 --- /dev/null +++ b/plugins/org.eclipse.tm.terminal.connector.cdtserial/src/org/eclipse/tm/terminal/connector/cdtserial/launcher/SerialLauncherDelegate.java @@ -0,0 +1,102 @@ +/******************************************************************************* + * 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 + * + * Contributors: + * QNX Software Systems - Initial API and implementation + *******************************************************************************/ +package org.eclipse.tm.terminal.connector.cdtserial.launcher; + +import java.util.Map; + +import org.eclipse.cdt.serial.BaudRate; +import org.eclipse.cdt.serial.ByteSize; +import org.eclipse.cdt.serial.Parity; +import org.eclipse.cdt.serial.StopBits; +import org.eclipse.core.runtime.Assert; +import org.eclipse.tm.internal.terminal.provisional.api.ISettingsStore; +import org.eclipse.tm.internal.terminal.provisional.api.ITerminalConnector; +import org.eclipse.tm.internal.terminal.provisional.api.TerminalConnectorExtension; +import org.eclipse.tm.terminal.connector.cdtserial.connector.SerialSettings; +import org.eclipse.tm.terminal.connector.cdtserial.controls.SerialConfigPanel; +import org.eclipse.tm.terminal.view.core.TerminalServiceFactory; +import org.eclipse.tm.terminal.view.core.interfaces.ITerminalService; +import org.eclipse.tm.terminal.view.core.interfaces.ITerminalService.Done; +import org.eclipse.tm.terminal.view.core.interfaces.constants.ITerminalsConnectorConstants; +import org.eclipse.tm.terminal.view.ui.interfaces.IConfigurationPanel; +import org.eclipse.tm.terminal.view.ui.interfaces.IConfigurationPanelContainer; +import org.eclipse.tm.terminal.view.ui.internal.SettingsStore; +import org.eclipse.tm.terminal.view.ui.launcher.AbstractLauncherDelegate; + +public class SerialLauncherDelegate extends AbstractLauncherDelegate { + + @Override + public boolean needsUserConfiguration() { + return true; + } + + @Override + public IConfigurationPanel getPanel(IConfigurationPanelContainer container) { + return new SerialConfigPanel(container); + } + + @Override + public ITerminalConnector createTerminalConnector(Map properties) { + Assert.isNotNull(properties); + + // Check for the terminal connector id + String connectorId = (String) properties.get(ITerminalsConnectorConstants.PROP_TERMINAL_CONNECTOR_ID); + if (connectorId == null) { + connectorId = "org.eclipse.tm.terminal.connector.cdtserial.SerialConnector"; //$NON-NLS-1$ + } + + // Extract the properties + SerialSettings settings = new SerialSettings(); + settings.setPortName((String) properties.get(SerialSettings.PORT_NAME_ATTR)); + settings.setBaudRate((BaudRate) properties.get(SerialSettings.BAUD_RATE_ATTR)); + settings.setByteSize((ByteSize) properties.get(SerialSettings.BYTE_SIZE_ATTR)); + settings.setParity((Parity) properties.get(SerialSettings.PARITY_ATTR)); + settings.setStopBits((StopBits) properties.get(SerialSettings.STOP_BITS_ATTR)); + + // Construct the terminal settings store + ISettingsStore store = new SettingsStore(); + settings.save(store); + + // Construct the terminal connector instance + ITerminalConnector connector = TerminalConnectorExtension.makeTerminalConnector(connectorId); + if (connector != null) { + // Apply default settings + connector.setDefaultSettings(); + // And load the real settings + connector.load(store); + } + + return connector; + } + + @Override + public void execute(Map properties, Done done) { + Assert.isNotNull(properties); + + // Set the terminal tab title + String name = (String) properties.get(SerialSettings.PORT_NAME_ATTR); + properties.put(ITerminalsConnectorConstants.PROP_TITLE, name); + + // Force a new terminal tab each time it is launched, if not set otherwise from outside + // TODO need a command shell service routing to get this + if (!properties.containsKey(ITerminalsConnectorConstants.PROP_FORCE_NEW)) { + properties.put(ITerminalsConnectorConstants.PROP_FORCE_NEW, Boolean.TRUE); + } + + // Get the terminal service + ITerminalService terminal = TerminalServiceFactory.getService(); + // If not available, we cannot fulfill this request + if (terminal != null) { + terminal.openConsole(properties, done); + } + } + +} diff --git a/plugins/org.eclipse.tm.terminal.connector.cdtserial/src/org/eclipse/tm/terminal/connector/cdtserial/nls/Messages.java b/plugins/org.eclipse.tm.terminal.connector.cdtserial/src/org/eclipse/tm/terminal/connector/cdtserial/nls/Messages.java new file mode 100644 index 00000000000..0f5a584969f --- /dev/null +++ b/plugins/org.eclipse.tm.terminal.connector.cdtserial/src/org/eclipse/tm/terminal/connector/cdtserial/nls/Messages.java @@ -0,0 +1,39 @@ +/******************************************************************************* + * 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 + * + * Contributors: + * QNX Software Systems - Initial API and implementation + *******************************************************************************/ +package org.eclipse.tm.terminal.connector.cdtserial.nls; + +import org.eclipse.osgi.util.NLS; + +/** + * Externalized strings management. + */ +public class Messages extends NLS { + + // The plug-in resource bundle name + private static final String BUNDLE_NAME = "org.eclipse.tm.terminal.connector.cdtserial.nls.Messages"; //$NON-NLS-1$ + + /** + * Static constructor. + */ + static { + // Load message values from bundle file + NLS.initializeMessages(BUNDLE_NAME, Messages.class); + } + + // **** Declare externalized string id's down here ***** + + public static String SerialTerminalSettingsPage_BaudRate; + public static String SerialTerminalSettingsPage_DataSize; + public static String SerialTerminalSettingsPage_Parity; + public static String SerialTerminalSettingsPage_SerialPort; + public static String SerialTerminalSettingsPage_StopBits; + +} diff --git a/plugins/org.eclipse.tm.terminal.connector.cdtserial/src/org/eclipse/tm/terminal/connector/cdtserial/nls/Messages.properties b/plugins/org.eclipse.tm.terminal.connector.cdtserial/src/org/eclipse/tm/terminal/connector/cdtserial/nls/Messages.properties new file mode 100644 index 00000000000..55fea856059 --- /dev/null +++ b/plugins/org.eclipse.tm.terminal.connector.cdtserial/src/org/eclipse/tm/terminal/connector/cdtserial/nls/Messages.properties @@ -0,0 +1,16 @@ +############################################################################### +# 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 +# +# Contributors: +# QNX Software Systems - Initial API and implementation +############################################################################### + +SerialTerminalSettingsPage_BaudRate=Baud rate: +SerialTerminalSettingsPage_DataSize=Data size: +SerialTerminalSettingsPage_Parity=Parity: +SerialTerminalSettingsPage_SerialPort=Serial port: +SerialTerminalSettingsPage_StopBits=Stop bits: diff --git a/pom.xml b/pom.xml index ba4bc05a8b0..486313dde53 100644 --- a/pom.xml +++ b/pom.xml @@ -28,6 +28,7 @@ plugins/org.eclipse.tm.terminal.connector.local plugins/org.eclipse.tm.terminal.connector.process plugins/org.eclipse.tm.terminal.connector.remote + plugins/org.eclipse.tm.terminal.connector.cdtserial plugins/org.eclipse.tm.terminal.connector.serial plugins/org.eclipse.tm.terminal.connector.ssh plugins/org.eclipse.tm.terminal.connector.telnet @@ -36,6 +37,8 @@ features/org.eclipse.tm.terminal.connector.local.sdk.feature features/org.eclipse.tm.terminal.connector.remote.feature features/org.eclipse.tm.terminal.connector.remote.sdk.feature + features/org.eclipse.tm.terminal.connector.cdtserial.feature + features/org.eclipse.tm.terminal.connector.cdtserial.sdk.feature features/org.eclipse.tm.terminal.connector.serial.feature features/org.eclipse.tm.terminal.connector.serial.sdk.feature features/org.eclipse.tm.terminal.connector.ssh.feature diff --git a/repos/org.eclipse.tm.terminal.repo/category.xml b/repos/org.eclipse.tm.terminal.repo/category.xml index 83ea3ee44f7..994bf831d9d 100644 --- a/repos/org.eclipse.tm.terminal.repo/category.xml +++ b/repos/org.eclipse.tm.terminal.repo/category.xml @@ -15,6 +15,12 @@ + + + + + +