From: gmungoc Date: Tue, 16 Jul 2019 07:14:32 +0000 (+0100) Subject: JAL-3210 Merge branch 'develop' into trialMerge X-Git-Tag: Release_2_11_4_0~45^2~18^2~127 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=17e4ea278bc9a5fb280db1252ce78b7a295215f5;p=jalview.git JAL-3210 Merge branch 'develop' into trialMerge Conflicts: .classpath .project .settings/org.eclipse.jdt.core.prefs .settings/org.eclipse.jdt.ui.prefs build.xml resources/lang/Messages_es.properties src/MCview/AppletPDBCanvas.java src/MCview/Atom.java src/MCview/PDBCanvas.java src/jalview/analysis/AAFrequency.java src/jalview/appletgui/EmbmenuFrame.java src/jalview/appletgui/OverviewPanel.java src/jalview/appletgui/SeqPanel.java src/jalview/bin/Cache.java src/jalview/bin/Jalview.java src/jalview/datamodel/DBRefEntry.java src/jalview/datamodel/Sequence.java src/jalview/ext/ensembl/EnsemblMap.java src/jalview/ext/paradise/Annotate3D.java src/jalview/fts/service/pdb/PDBFTSRestClient.java src/jalview/gui/Desktop.java src/jalview/gui/FeatureRenderer.java src/jalview/gui/FeatureTypeSettings.java src/jalview/gui/WebserviceInfo.java src/jalview/io/BackupFiles.java src/jalview/io/FileLoader.java src/jalview/jbgui/GDesktop.java src/jalview/jbgui/GPreferences.java src/jalview/project/Jalview2XML.java src/jalview/util/ImageMaker.java src/jalview/util/Platform.java src/jalview/ws/SequenceFetcher.java --- 17e4ea278bc9a5fb280db1252ce78b7a295215f5 diff --cc .classpath index 004d432,0000000..0a7e4b3 mode 100644,000000..100644 --- a/.classpath +++ b/.classpath @@@ -1,74 -1,0 +1,206 @@@ + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ + diff --cc .project index 6c40472,0000000..d4d0c20 mode 100644,000000..100644 --- a/.project +++ b/.project @@@ -1,37 -1,0 +1,23 @@@ + + - Jalview Release 2.7-old ++ Jalview with gradle build + - - ++ ++ ++ org.eclipse.jdt.core.javanature ++ org.eclipse.jdt.groovy.core.groovyNature ++ org.eclipse.buildship.core.gradleprojectnature ++ + + + org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.wst.common.project.facet.core.builder - - ++ + + - org.eclipse.ui.externaltools.ExternalToolBuilder - full,incremental, - - - LaunchConfigHandle - <project>/.externalToolBuilders/Jalview Release indices [Builder].launch - - ++ org.eclipse.buildship.core.gradleprojectbuilder ++ + + - - org.eclipse.jdt.groovy.core.groovyNature - org.eclipse.jem.workbench.JavaEMFNature - org.eclipse.jdt.core.javanature - org.eclipse.wst.common.project.facet.core.nature - de.tud.st.ispace.builder.ISpaceNature - org.eclipse.jem.beaninfo.BeanInfoNature - ++ ++ + diff --cc .settings/org.eclipse.jdt.core.prefs index 32ad05c,0000000..11ddce1 mode 100644,000000..100644 --- a/.settings/org.eclipse.jdt.core.prefs +++ b/.settings/org.eclipse.jdt.core.prefs @@@ -1,421 -1,0 +1,299 @@@ - 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.nonnull.secondary= - org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault - org.eclipse.jdt.core.compiler.annotation.nonnullbydefault.secondary= - org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable - org.eclipse.jdt.core.compiler.annotation.nullable.secondary= - 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=ignore - org.eclipse.jdt.core.compiler.problem.enumIdentifier=error - org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=ignore - 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=warning - 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=ignore - 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=ignore - org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=disabled - org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore - 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=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.nonnullTypeVariableFromLegacyInvocation=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.pessimisticNullAnalysisForFreeTypeVariables=warning - 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=ignore - org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore - 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=warning - 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=ignore - org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore - org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore - org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled - org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled - org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled - org.eclipse.jdt.core.compiler.problem.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=ignore - org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled - org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled - org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled - org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning - org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore - org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning - org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning - org.eclipse.jdt.core.compiler.release=disabled - org.eclipse.jdt.core.compiler.source=1.8 - org.eclipse.jdt.core.formatter.align_assignment_statements_on_columns=false - org.eclipse.jdt.core.formatter.align_fields_grouping_blank_lines=2147483647 - org.eclipse.jdt.core.formatter.align_type_members_on_columns=false - org.eclipse.jdt.core.formatter.align_variable_declarations_on_columns=false - org.eclipse.jdt.core.formatter.align_with_spaces=false - org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16 - org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=52 - 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_compact_loops=16 - org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80 - org.eclipse.jdt.core.formatter.alignment_for_enum_constants=16 - org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16 - org.eclipse.jdt.core.formatter.alignment_for_expressions_in_for_loop_header=0 - org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0 - org.eclipse.jdt.core.formatter.alignment_for_module_statements=16 - org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16 - org.eclipse.jdt.core.formatter.alignment_for_parameterized_type_references=0 - 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_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=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.alignment_for_type_arguments=0 - org.eclipse.jdt.core.formatter.alignment_for_type_parameters=0 - org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16 ++# ++#Tue Jul 16 08:09:58 BST 2019 ++org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert ++org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert ++org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert ++org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert ++org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert ++org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true ++org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert ++org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert ++org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert ++org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert +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=1 - org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0 ++org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=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.comment.insert_new_line_before_root_tags=insert ++org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert ++org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true ++org.eclipse.jdt.core.formatter.indentation.size=8 ++org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert ++org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert ++org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert ++org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert ++org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert ++org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert ++org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off ++org.eclipse.jdt.core.formatter.continuation_indentation=4 +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.alignment_for_enum_constants=16 ++org.eclipse.jdt.core.formatter.blank_lines_after_package=1 ++org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert ++org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert ++org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16 ++org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert ++org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true ++org.eclipse.jdt.core.formatter.comment.indent_root_tags=true ++org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on ++org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert ++org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert ++org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16 ++org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert ++org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false ++org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert ++org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert ++org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert ++org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=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_brace_in_array_initializer=insert +org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1 - org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=next_line ++org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=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_new_line_after_annotation_on_method=insert ++org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert ++org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert ++org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert ++org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false ++org.eclipse.jdt.core.compiler.problem.enumIdentifier=error ++org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert ++org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert ++org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true +org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=next_line - org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=next_line_on_wrap ++org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=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_comma_in_method_invocation_arguments=do not insert ++org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert ++org.eclipse.jdt.core.formatter.comment.line_length=80 ++org.eclipse.jdt.core.formatter.use_on_off_tags=true ++org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert ++org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert ++org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert ++org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert ++org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert ++org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert ++org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false ++org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert ++org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=next_line ++org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert ++org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16 ++org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert ++org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0 ++org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert ++org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false ++org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16 ++org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert ++org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert ++org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert ++org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert ++org.eclipse.jdt.core.compiler.debug.localVariable=generate ++org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve ++org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16 ++org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true ++org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert ++org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert ++org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert +org.eclipse.jdt.core.formatter.brace_position_for_block=next_line - org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=next_line +org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=next_line - org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=next_line - org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=next_line +org.eclipse.jdt.core.formatter.brace_position_for_lambda_body=end_of_line - org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=next_line - org.eclipse.jdt.core.formatter.brace_position_for_switch=next_line - org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=next_line - org.eclipse.jdt.core.formatter.comment.align_tags_descriptions_grouped=false - org.eclipse.jdt.core.formatter.comment.align_tags_names_descriptions=false ++org.eclipse.jdt.core.formatter.compact_else_if=true ++org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=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_method_invocation=do not insert ++org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true ++org.eclipse.jdt.core.compiler.debug.lineNumber=generate ++org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16 ++org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert ++org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16 ++org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16 ++org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false ++org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert ++org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert ++org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert +org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false - org.eclipse.jdt.core.formatter.comment.count_line_length_from_starting_position=false - org.eclipse.jdt.core.formatter.comment.format_block_comments=false - 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=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.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=2 - 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.insert_space_after_comma_in_array_initializer=insert ++org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert ++org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert ++org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16 +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=2 - org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_enum_constant=insert - 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_after_type_annotation=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=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.number_of_empty_lines_to_preserve=1 +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_before_ellipsis=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_after_colon_in_assert=insert ++org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=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_and_in_type_parameter=insert ++org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert ++org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert ++org.eclipse.jdt.core.formatter.comment.format_line_comments=true +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_lambda_arrow=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.align_type_members_on_columns=false ++org.eclipse.jdt.core.formatter.alignment_for_assignment=0 ++org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert ++org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true ++org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_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.alignment_for_superinterfaces_in_type_declaration=16 ++org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0 ++org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80 ++org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false ++org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_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_opening_paren_in_if=insert ++org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert ++org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert ++org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=next_line ++org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=next_line ++org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert ++org.eclipse.jdt.core.formatter.comment.format_header=false ++org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16 +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_before_opening_paren_in_while=insert ++org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled ++org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert ++org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0 ++org.eclipse.jdt.core.formatter.join_wrapped_lines=true ++org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert ++org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true ++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_paren_in_synchronized=do not insert ++org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true ++org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=next_line ++org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert ++org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80 ++org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false ++org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16 ++org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false ++org.eclipse.jdt.core.compiler.source=11 +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_comma_in_constructor_declaration_throws=insert ++org.eclipse.jdt.core.formatter.tabulation.size=2 ++org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert ++org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=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_colon_in_conditional=insert ++org.eclipse.jdt.core.formatter.comment.format_source_code=true ++org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert ++org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert ++org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate +org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert ++org.eclipse.jdt.core.formatter.blank_lines_before_field=1 ++org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert ++org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2 ++org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert ++org.eclipse.jdt.core.formatter.blank_lines_before_method=1 ++org.eclipse.jdt.core.compiler.debug.sourceFile=generate ++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.insert_space_before_parenthesized_expression_in_throw=insert ++org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert ++org.eclipse.jdt.core.compiler.codegen.targetPlatform=11 ++org.eclipse.jdt.core.formatter.brace_position_for_switch=next_line ++org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert ++org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert ++org.eclipse.jdt.core.formatter.insert_new_line_after_type_annotation=do not insert ++org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert ++org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert ++org.eclipse.jdt.core.formatter.comment.format_html=true ++org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert ++org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert ++org.eclipse.jdt.core.formatter.alignment_for_compact_if=16 ++org.eclipse.jdt.core.formatter.indent_empty_lines=false ++eclipse.preferences.version=1 ++org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not 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_opening_paren_in_enum_constant=do not insert ++org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=52 ++org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert ++org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=true ++org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false ++org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=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_opening_paren_in_constructor_declaration=do not insert ++org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1 ++org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert ++org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true ++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_paren_in_constructor_declaration=do not insert ++org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=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_comma_in_method_declaration_parameters=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_lambda_arrow=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_new_line_before_while_in_do_statement=do not insert ++org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1 ++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_closing_angle_bracket_in_parameterized_type_reference=do not insert ++org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16 ++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_in_empty_enum_declaration=insert ++org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true ++org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=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_before_semicolon=do not insert ++org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=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_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_after_opening_paren_in_cast=do not insert ++org.eclipse.jdt.core.formatter.comment.format_block_comments=false ++org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow=insert ++org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert ++org.eclipse.jdt.core.compiler.problem.discouragedReference=warning ++org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false +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.alignment_for_parameters_in_method_declaration=16 ++org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=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_semicolon_in_for=do not insert ++org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert ++org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true ++org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16 ++org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert ++org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert ++org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=next_line_on_wrap ++org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true ++org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert ++org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert ++org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert ++org.eclipse.jdt.core.compiler.compliance=11 ++org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert ++org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert ++org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=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_before_colon_in_case=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_opening_brace_in_annotation_type_declaration=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.wrap_outer_expressions_when_nested=true ++org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert ++org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=next_line ++org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=next_line ++org.eclipse.jdt.core.formatter.blank_lines_before_package=0 ++org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=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.insert_space_before_comma_in_for_increments=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_after_opening_paren_in_while=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_comma_in_explicitconstructorcall_arguments=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_after_opening_angle_bracket_in_type_parameters=do not insert ++org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true ++org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow=insert ++org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert ++org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=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=false - org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=true - org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false - org.eclipse.jdt.core.formatter.keep_simple_do_while_body_on_same_line=false - org.eclipse.jdt.core.formatter.keep_simple_for_body_on_same_line=false - org.eclipse.jdt.core.formatter.keep_simple_while_body_on_same_line=false - org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false - org.eclipse.jdt.core.formatter.lineSplit=76 - 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.parentheses_positions_in_annotation=common_lines - org.eclipse.jdt.core.formatter.parentheses_positions_in_catch_clause=common_lines - org.eclipse.jdt.core.formatter.parentheses_positions_in_enum_constant_declaration=common_lines - org.eclipse.jdt.core.formatter.parentheses_positions_in_for_statment=common_lines - org.eclipse.jdt.core.formatter.parentheses_positions_in_if_while_statement=common_lines - org.eclipse.jdt.core.formatter.parentheses_positions_in_lambda_declaration=common_lines - org.eclipse.jdt.core.formatter.parentheses_positions_in_method_delcaration=common_lines - org.eclipse.jdt.core.formatter.parentheses_positions_in_method_invocation=common_lines - org.eclipse.jdt.core.formatter.parentheses_positions_in_switch_statement=common_lines - org.eclipse.jdt.core.formatter.parentheses_positions_in_try_clause=common_lines - org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true ++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_question_in_conditional=insert ++org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true ++org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert +org.eclipse.jdt.core.formatter.tabulation.char=space - org.eclipse.jdt.core.formatter.tabulation.size=2 - org.eclipse.jdt.core.formatter.use_on_off_tags=true - org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false - org.eclipse.jdt.core.formatter.wrap_before_assignment_operator=false - org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true - org.eclipse.jdt.core.formatter.wrap_before_conditional_operator=true - org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true - org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true - org.eclipse.jdt.core.javaFormatter=org.eclipse.jdt.core.defaultJavaFormatter ++org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert ++org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1 ++org.eclipse.jdt.core.formatter.lineSplit=76 ++org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert ++org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert diff --cc src/jalview/appletgui/EmbmenuFrame.java index b6b81fa,7b489ea..8b2b279 --- a/src/jalview/appletgui/EmbmenuFrame.java +++ b/src/jalview/appletgui/EmbmenuFrame.java @@@ -270,6 -274,7 +276,5 @@@ public class EmbmenuFrame extends Fram destroyMenus(); embeddedPopup = null; embeddedMenu = null; - super.finalize(); - // no close for Frame - // super.finalize(); } } diff --cc src/jalview/appletgui/OverviewPanel.java index 4e69399,8f72260..9cbdd36 --- a/src/jalview/appletgui/OverviewPanel.java +++ b/src/jalview/appletgui/OverviewPanel.java @@@ -142,10 -140,10 +142,10 @@@ public class OverviewPanel extends Pane @Override public void mousePressed(MouseEvent evt) { - if ((evt.getModifiers() - & InputEvent.BUTTON3_MASK) == InputEvent.BUTTON3_MASK) + if ((evt.getModifiersEx() + & InputEvent.BUTTON3_DOWN_MASK) == InputEvent.BUTTON3_DOWN_MASK) { - if (!Platform.isAMac()) + if (!Platform.isMac()) // BH was excluding JavaScript { showPopupMenu(evt); } diff --cc src/jalview/appletgui/SeqPanel.java index 32f0abb,fee68c8..5becbc1 --- a/src/jalview/appletgui/SeqPanel.java +++ b/src/jalview/appletgui/SeqPanel.java @@@ -500,8 -499,9 +500,7 @@@ public class SeqPanel extends Panel imp // For now, ignore the mouseWheel font resizing on Macs // As the Button2_mask always seems to be true - - if ((evt.getModifiersEx() - & InputEvent.BUTTON2_DOWN_MASK) == InputEvent.BUTTON2_DOWN_MASK - && !av.MAC) + if (Platform.isWinMiddleButton(evt)) { mouseWheelPressed = true; return; diff --cc src/jalview/bin/Cache.java index 362fca8,8418d68..9e28f5d --- a/src/jalview/bin/Cache.java +++ b/src/jalview/bin/Cache.java @@@ -410,53 -400,12 +410,16 @@@ public class Cach } catch (Exception ex) { System.out.println("Error reading author details: " + ex); - applicationProperties.remove("AUTHORS"); - applicationProperties.remove("AUTHORFNAMES"); - applicationProperties.remove("YEAR"); + authorDetails = null; + } + if (authorDetails == null) + { + applicationProperties.remove("AUTHORS"); + applicationProperties.remove("AUTHORFNAMES"); + applicationProperties.remove("YEAR"); } - // FIND THE VERSION NUMBER AND BUILD DATE FROM jalview.jar - // MUST FOLLOW READING OF LOCAL PROPERTIES FILE AS THE - // VERSION MAY HAVE CHANGED SINCE LAST USING JALVIEW - String buildDetails = resolveResourceURLFor("/.build_properties"); - - if (buildDetails != null) - { - try - { - java.net.URL localJarFileURL = new java.net.URL(buildDetails); - InputStream in = localJarFileURL.openStream(); - applicationProperties.load(in); - in.close(); - } catch (Exception ex) - { - System.out.println("Error reading build details: " + ex); - buildDetails = null; - } - } - if (buildDetails == null) - { - applicationProperties.remove("VERSION"); - } - String jnlpVersion = System.getProperty("jalview.version"); - String codeVersion = getProperty("VERSION"); - String codeInstallation = getProperty("INSTALLATION"); - if (codeVersion == null) - { - // THIS SHOULD ONLY BE THE CASE WHEN TESTING!! - codeVersion = "Test"; - jnlpVersion = "Test"; - codeInstallation = ""; - } - else - { - codeInstallation = " (" + codeInstallation + ")"; - } - new BuildDetails(codeVersion, null, codeInstallation); + loadBuildProperties(false); SiftsSettings .setMapWithSifts(Cache.getDefault("MAP_WITH_SIFTS", false)); @@@ -492,8 -443,8 +457,7 @@@ && (System.getProperty("java.awt.headless") == null || System .getProperty("java.awt.headless").equals("false"))) { -- -- class VersionChecker extends Thread ++ new Thread() { @Override public void run() @@@ -541,10 -492,10 +505,7 @@@ setProperty("LATEST_VERSION", remoteVersion); } -- } -- -- VersionChecker vc = new VersionChecker(); -- vc.start(); ++ }.start(); } else { @@@ -558,44 -509,57 +519,84 @@@ } } - setProperty("VERSION", codeVersion); - // LOAD USERDEFINED COLOURS -- jalview.bin.Cache -- .initUserColourSchemes(getProperty("USER_DEFINED_COLOURS")); ++ Cache.initUserColourSchemes(getProperty("USER_DEFINED_COLOURS")); jalview.io.PIRFile.useModellerOutput = Cache.getDefault("PIR_MODELLER", false); } - + /** + * construct a resource URL for the given absolute resource pathname + * + * @param resourcePath + * @return + */ + private static String resolveResourceURLFor(String resourcePath) + { + String url = null; + if (Platform.isJS() || !Cache.class.getProtectionDomain() + .getCodeSource().getLocation().toString().endsWith(".jar")) + { + try + { + url = Cache.class.getResource(resourcePath).toString(); + } catch (Exception ex) + { + + } + } + else + { + url = "jar:".concat(Cache.class.getProtectionDomain().getCodeSource() + .getLocation().toString().concat("!" + resourcePath)); + } + return url; + } + + public static void loadBuildProperties(boolean reportVersion) + { + String codeInstallation = getProperty("INSTALLATION"); + boolean printV = codeInstallation == null; + + // FIND THE VERSION NUMBER AND BUILD DATE FROM jalview.jar + try + { + String buildDetails = "jar:".concat(Cache.class.getProtectionDomain() + .getCodeSource().getLocation().toString() + .concat("!/.build_properties")); + + java.net.URL localJarFileURL = new java.net.URL(buildDetails); + + InputStream in = localJarFileURL.openStream(); + applicationProperties.load(in); + in.close(); + } catch (Exception ex) + { + System.out.println("Error reading build details: " + ex); + applicationProperties.remove("VERSION"); + } + String codeVersion = getProperty("VERSION"); + codeInstallation = getProperty("INSTALLATION"); + + if (codeVersion == null) + { + // THIS SHOULD ONLY BE THE CASE WHEN TESTING!! + codeVersion = "Test"; + codeInstallation = ""; + } + else + { + codeInstallation = " (" + codeInstallation + ")"; + } + setProperty("VERSION", codeVersion); + new BuildDetails(codeVersion, null, codeInstallation); + if (printV && reportVersion) + { + System.out + .println("Jalview Version: " + codeVersion + codeInstallation); + } + } + private static void deleteBuildProperties() { applicationProperties.remove("LATEST_VERSION"); diff --cc src/jalview/bin/Jalview.java index 694fe00,ca2a584..521b674 --- a/src/jalview/bin/Jalview.java +++ b/src/jalview/bin/Jalview.java @@@ -406,30 -338,44 +411,44 @@@ public class Jalvie if (!headless) { - desktop = new Desktop(); + desktop = new Desktop() +// { +// // BH testing +// @Override +// protected void processEvent(AWTEvent e) { +// System.out.println("Jalview.java " + e); +// super.processEvent(e); +// } +// } + ; desktop.setInBatchMode(true); // indicate we are starting up + + try + { + JalviewTaskbar.setTaskbar(this); + } catch (Exception e) + { + System.out.println("Cannot set Taskbar"); + // e.printStackTrace(); + } catch (Throwable t) + { + System.out.println("Cannot set Taskbar"); + // t.printStackTrace(); + } + desktop.setVisible(true); - desktop.startServiceDiscovery(); - if (!aparser.contains("nousagestats")) - { - startUsageStats(desktop); - } - else - { - System.err.println("CMD [-nousagestats] executed successfully!"); - } - if (!aparser.contains("noquestionnaire")) + if (!Platform.isJS()) + /** + * Java only + * + * @j2sIgnore + */ { - String url = aparser.getValue("questionnaire"); - if (url != null) + desktop.startServiceDiscovery(); + if (!aparser.contains("nousagestats")) { - // Start the desktop questionnaire prompter with the specified - // questionnaire - Cache.log.debug("Starting questionnaire url at " + url); - desktop.checkForQuestionnaire(url); - System.out.println( - "CMD questionnaire[-" + url + "] executed successfully!"); + startUsageStats(desktop); } else { @@@ -443,42 -383,48 +462,61 @@@ { // Start the desktop questionnaire prompter with the specified // questionnaire - // String defurl = - // "http://anaplog.compbio.dundee.ac.uk/cgi-bin/questionnaire.pl"; - // // - String defurl = "http://www.jalview.org/cgi-bin/questionnaire.pl"; - Cache.log.debug( - "Starting questionnaire with default url: " + defurl); - desktop.checkForQuestionnaire(defurl); + Cache.log.debug("Starting questionnaire url at " + url); + desktop.checkForQuestionnaire(url); + System.out.println("CMD questionnaire[-" + url + + "] executed successfully!"); + } + else + { + if (Cache.getProperty("NOQUESTIONNAIRES") == null) + { + // Start the desktop questionnaire prompter with the specified + // questionnaire + // String defurl = + // "http://anaplog.compbio.dundee.ac.uk/cgi-bin/questionnaire.pl"; + // // + String defurl = "http://www.jalview.org/cgi-bin/questionnaire.pl"; + Cache.log.debug( + "Starting questionnaire with default url: " + defurl); + desktop.checkForQuestionnaire(defurl); + } } } - } - else - { - System.err.println("CMD [-noquestionnaire] executed successfully!"); - } + else + { + System.err + .println("CMD [-noquestionnaire] executed successfully!"); + } - if (!aparser.contains("nonews")) - { - desktop.checkForNews(); - } + if (!aparser.contains("nonews")) + { + desktop.checkForNews(); + } - BioJsHTMLOutput.updateBioJS(); + BioJsHTMLOutput.updateBioJS(); + } } + // Move any new getdown-launcher-new.jar into place over old + // getdown-launcher.jar + String appdirString = System.getProperty("getdownappdir"); + if (appdirString != null && appdirString.length() > 0) + { + final File appdir = new File(appdirString); + new Thread() + { + @Override + public void run() + { + LaunchUtil.upgradeGetdown( + new File(appdir, "getdown-launcher-old.jar"), + new File(appdir, "getdown-launcher.jar"), + new File(appdir, "getdown-launcher-new.jar")); + } + }.start(); + } + String file = null, data = null; FileFormatI format = null; DataSourceType protocol = null; @@@ -826,17 -676,11 +778,16 @@@ // And the user // //////////////////// - if (!headless && file == null - && jalview.bin.Cache.getDefault("SHOW_STARTUP_FILE", true)) + if (!Platform.isJS() && !headless && file == null - && vamsasImport == null - && jalview.bin.Cache.getDefault("SHOW_STARTUP_FILE", true)) ++ && Cache.getDefault("SHOW_STARTUP_FILE", true)) + /** + * Java only + * + * @j2sIgnore + */ { -- file = jalview.bin.Cache.getDefault("STARTUP_FILE", -- jalview.bin.Cache.getDefault("www.jalview.org", ++ file = Cache.getDefault("STARTUP_FILE", ++ Cache.getDefault("www.jalview.org", "http://www.jalview.org") + "/examples/exampleFile_2_7.jar"); if (file.equals( @@@ -845,7 -689,7 +796,7 @@@ // hardwire upgrade of the startup file file.replace("_2_3.jar", "_2_7.jar"); // and remove the stale setting -- jalview.bin.Cache.removeProperty("STARTUP_FILE"); ++ Cache.removeProperty("STARTUP_FILE"); } protocol = DataSourceType.FILE; diff --cc src/jalview/datamodel/DBRefEntry.java index 54e8379,bc8d0cf..f557ff8 --- a/src/jalview/datamodel/DBRefEntry.java +++ b/src/jalview/datamodel/DBRefEntry.java @@@ -21,37 -21,19 +21,26 @@@ package jalview.datamodel; import jalview.api.DBRefEntryI; - import jalview.io.vamsas.Dbref; +import jalview.util.DBRefUtils; +import jalview.util.MapList; -import java.util.Arrays; import java.util.List; public class DBRefEntry implements DBRefEntryI { - /* - * the mapping to chromosome (genome) is held as an instance with - * source = speciesId - * version = assemblyId - * accessionId = "chromosome:" + chromosomeId - * map = mapping from sequence to reference assembly - */ - public static final String CHROMOSOME = "chromosome"; - - private String source = ""; + String source = ""; - String version = ""; + private String version = ""; + + private String ucversion; - String accessionId = ""; + private String accessionId = ""; + + int sourceKey = Integer.MIN_VALUE; - /** + String canonicalSourceName; + - - /** ++ /* * maps from associated sequence to the database sequence's coordinate system */ Mapping map = null; @@@ -60,12 -42,7 +49,16 @@@ { } - /** - * - * @param source may not be null - * @param version may be null - * @param accessionId may be null - */ + ++ /** ++ * ++ * @param source ++ * may not be null ++ * @param version ++ * may be null ++ * @param accessionId ++ * may be null ++ */ public DBRefEntry(String source, String version, String accessionId) { this(source, version, accessionId, null); @@@ -375,31 -319,20 +368,19 @@@ // no version string implies the reference has not been verified at all. return false; } - // tricky - this test really needs to search the sequence's set of dbrefs to - // see if there is a primary reference that derived this reference. - String ucv = version.toUpperCase(); - for (String primsrc : Arrays.asList(DBRefSource.allSources())) - { - if (ucv.startsWith(primsrc.toUpperCase())) - { - // by convention, many secondary references inherit the primary - // reference's - // source string as a prefix for any version information from the - // secondary reference. - return false; - } - } - return true; + + return DBRefSource.isPrimaryCandidate(ucversion); + } + + /** - * Mappings to chromosome are held with accessionId as "chromosome:id" - * - * @return - */ - public boolean isChromosome() - { - return accessionId != null && accessionId.startsWith(CHROMOSOME + ":"); - } - - /** + * stores the upper-case canonical name of the source for use in + * Sequence.getPrimaryDBRefs(). + * + * @author Bob Hanson + * + * @return + */ + public String getCanonicalSourceName() { + return (canonicalSourceName == null ? (canonicalSourceName = DBRefUtils.getCanonicalName(this.source)) : canonicalSourceName); } - - } diff --cc src/jalview/datamodel/Sequence.java index ca2b6d4,6f5c18a..950ee05 --- a/src/jalview/datamodel/Sequence.java +++ b/src/jalview/datamodel/Sequence.java @@@ -1612,7 -1553,7 +1580,7 @@@ public class Sequence extends ASequenc _isNa = Comparison.isNucleotide(this); } return !_isNa; -- }; ++ } /* * (non-Javadoc) diff --cc src/jalview/ext/ensembl/EnsemblFeatures.java index 2dd6ebb,99ebc69..e28cc7f --- a/src/jalview/ext/ensembl/EnsemblFeatures.java +++ b/src/jalview/ext/ensembl/EnsemblFeatures.java @@@ -129,11 -130,12 +129,12 @@@ class EnsemblFeatures extends EnsemblRe int end = Integer.parseInt(obj.get("end").toString()); String source = obj.get("source").toString(); String strand = obj.get("strand").toString(); + Object phase = obj.get("phase"); String alleles = JSONUtils - .arrayToList((JSONArray) obj.get("alleles")); + .arrayToStringList((List) obj.get("alleles")); String clinSig = JSONUtils - .arrayToList( - (JSONArray) obj.get("clinical_significance")); + .arrayToStringList( + (List) obj.get("clinical_significance")); /* * convert 'variation' to 'sequence_variant', and 'cds' to 'CDS' diff --cc src/jalview/ext/ensembl/EnsemblLookup.java index fc37b8a,b412849..9b56d6b --- a/src/jalview/ext/ensembl/EnsemblLookup.java +++ b/src/jalview/ext/ensembl/EnsemblLookup.java @@@ -23,8 -23,11 +23,10 @@@ package jalview.ext.ensembl import jalview.bin.Cache; import jalview.datamodel.AlignmentI; import jalview.datamodel.GeneLociI; + import jalview.datamodel.GeneLocus; + import jalview.datamodel.Mapping; import jalview.util.MapList; -import java.io.BufferedReader; import java.io.IOException; import java.net.MalformedURLException; import java.net.URL; diff --cc src/jalview/ext/ensembl/EnsemblMap.java index add71b3,c688a6f..e9cc9e1 --- a/src/jalview/ext/ensembl/EnsemblMap.java +++ b/src/jalview/ext/ensembl/EnsemblMap.java @@@ -3,10 -3,11 +3,10 @@@ package jalview.ext.ensembl import jalview.datamodel.AlignmentI; import jalview.datamodel.DBRefSource; import jalview.datamodel.GeneLociI; - import jalview.util.JSONUtils; + import jalview.datamodel.GeneLocus; + import jalview.datamodel.Mapping; import jalview.util.MapList; --import java.io.BufferedReader; import java.io.IOException; import java.net.MalformedURLException; import java.net.URL; @@@ -14,10 -15,24 +14,22 @@@ import java.util.ArrayList import java.util.Collections; import java.util.Iterator; import java.util.List; +import java.util.Map; -import org.json.simple.JSONArray; -import org.json.simple.JSONObject; -import org.json.simple.parser.JSONParser; import org.json.simple.parser.ParseException; + /** + * A client for the Ensembl REST service /map endpoint, to convert from + * coordinates of one genome assembly to another. + *

+ * Note that species and assembly identifiers passed to this class must be valid + * in Ensembl. They are not case sensitive. + * + * @author gmcarstairs + * @see https://rest.ensembl.org/documentation/info/assembly_map + * @see https://rest.ensembl.org/info/assembly/human?content-type=text/xml + * @see https://rest.ensembl.org/info/species?content-type=text/xml + */ public class EnsemblMap extends EnsemblRestClient { private static final String MAPPED = "mapped"; @@@ -152,9 -181,11 +164,11 @@@ try { - JSONObject parsed = (JSONObject) jp.parse(br); - JSONArray mappings = (JSONArray) parsed.get(MAPPINGS); - - Iterator rvals = mappings.iterator(); + Iterator rvals = (Iterator) getJSON(url, null, -1, MODE_ITERATOR, MAPPINGS); + if (rvals == null) - return null; ++ { ++ return null; ++ } while (rvals.hasNext()) { // todo check for "mapped" @@@ -284,9 -332,11 +298,11 @@@ GeneLociI parseIdMappingResponse(URL ur try { - JSONObject parsed = (JSONObject) jp.parse(br); - JSONArray mappings = (JSONArray) parsed.get(MAPPINGS); - - Iterator rvals = mappings.iterator(); + Iterator rvals = (Iterator) getJSON(url, null, -1, MODE_ITERATOR, MAPPINGS); + if (rvals == null) - return null; ++ { ++ return null; ++ } String assembly = null; String chromosome = null; int fromEnd = 0; diff --cc src/jalview/ext/paradise/Annotate3D.java index 3b7044b,b8ba847..caff3bb --- a/src/jalview/ext/paradise/Annotate3D.java +++ b/src/jalview/ext/paradise/Annotate3D.java @@@ -159,84 -154,19 +159,82 @@@ public class Annotate3 public static Iterator processJsonResponseFor(Reader respons) throws Exception { - org.json.simple.parser.JSONParser jp = new org.json.simple.parser.JSONParser(); + // BH 2019 never called? try { - final JSONArray responses = (JSONArray) jp.parse(respons); - final RvalsIterator rvals = new RvalsIterator(responses); - return rvals; + @SuppressWarnings("unchecked") + final Iterator rvals = ((List) JSONUtils.parse(respons)).iterator(); - return new Iterator() ++ return new Iterator<>() + { + @Override + public boolean hasNext() + { + return rvals.hasNext(); + } + + @SuppressWarnings("unchecked") + @Override + public Reader next() + { + Map val = (Map) rvals.next(); + + Object sval = null; + try + { + sval = val.get("2D"); + } catch (Exception x) + { + x.printStackTrace(); + } - ; + if (sval == null) + { + System.err.println( + "DEVELOPER WARNING: Annotate3d didn't return a '2D' tag in its response. Consider checking output of server. Response was :" + + val.toString()); + + sval = ""; + } + return new StringReader(sval.toString()); + + } + + @Override + public void remove() + { + throw new Error( + MessageManager.getString("error.not_implemented_remove")); + + } + + @Override + protected Object clone() throws CloneNotSupportedException + { + throw new CloneNotSupportedException( + MessageManager.getString("error.not_implemented_clone")); + } + + @Override + public boolean equals(Object obj) + { + return super.equals(obj); + } + + @Override + protected void finalize() throws Throwable + { + while (rvals.hasNext()) + { + rvals.next(); + } + super.finalize(); + } + }; } catch (Exception foo) { throw new Exception(MessageManager.getString( "exception.couldnt_parse_responde_from_annotated3d_server"), foo); } -- } public static Iterator getRNAMLForPDBId(String pdbid) diff --cc src/jalview/fts/service/pdb/PDBFTSRestClient.java index cd3e5c9,5293c32..c52da40 --- a/src/jalview/fts/service/pdb/PDBFTSRestClient.java +++ b/src/jalview/fts/service/pdb/PDBFTSRestClient.java @@@ -162,46 -143,39 +162,45 @@@ public class PDBFTSRestClient extends F .queryParam("start", String.valueOf(offSet)) .queryParam("q", query).queryParam("sort", sortParam); } + + URI uri = webResource.getURI(); + + System.out.println(uri); + // Execute the REST request ClientResponse clientResponse = webResource - .accept(MediaType.APPLICATION_JSON).get(ClientResponse.class); + .accept(MediaType.APPLICATION_JSON).get(clientResponseClass ); + - int status = clientResponse.getStatus(); - + // Get the JSON string from the response object or directly from the + // client (JavaScript) - Map jsonObj = (Platform.isJS() && status == 200 - ? clientResponse.getEntity(Map.class) - : null); - String responseString = (jsonObj == null - ? clientResponse.getEntity(String.class) - : null); ++ Map jsonObj = null; ++ String responseString = null; // System.out.println("query >>>>>>> " + pdbRestRequest.toString()); // Check the response status and report exception if one occurs - switch (status) + int responseStatus = clientResponse.getStatus(); - if (responseStatus != 200) ++ switch (responseStatus) { - String errorMessage = ""; - if (responseStatus == 400) + case 200: ++ if (Platform.isJS()) + { - errorMessage = parseJsonExceptionString(responseString); - throw new Exception(errorMessage); ++ jsonObj = clientResponse.getEntity(Map.class); + } + else + { - errorMessage = getMessageByHTTPStatusCode( - responseStatus, "PDB"); - throw new Exception(errorMessage); ++ responseString = clientResponse.getEntity(String.class); + } + break; + case 400: + throw new Exception(parseJsonExceptionString(responseString)); + default: - throw new Exception(getMessageByHTTPStatusCode(status, "PDB")); ++ throw new Exception( ++ getMessageByHTTPStatusCode(responseStatus, "PDB")); } -- // Make redundant objects eligible for garbage collection to conserve -- // memory -- clientResponse = null; -- client = null; -- // Process the response and return the result to the caller. - return parsePDBJsonResponse(responseString, pdbRestRequest); + return parsePDBJsonResponse(responseString, jsonObj, pdbRestRequest); } catch (Exception e) { String exceptionMsg = e.getMessage(); diff --cc src/jalview/gui/APQHandlers.java index 0000000,05f5e08..c5a1b66 mode 000000,100644..100644 --- a/src/jalview/gui/APQHandlers.java +++ b/src/jalview/gui/APQHandlers.java @@@ -1,0 -1,151 +1,151 @@@ + package jalview.gui; + + import jalview.util.MessageManager; + import jalview.util.Platform; + + import java.awt.Desktop; + import java.awt.desktop.AboutEvent; + import java.awt.desktop.AboutHandler; + import java.awt.desktop.PreferencesEvent; + import java.awt.desktop.PreferencesHandler; + import java.awt.desktop.QuitEvent; + import java.awt.desktop.QuitHandler; + import java.awt.desktop.QuitResponse; + import java.awt.desktop.QuitStrategy; + + import javax.swing.JOptionPane; + + public class APQHandlers + { + private static boolean setAPQHandlers = false; + + public APQHandlers() { + } + + protected static boolean setAPQHandlers(jalview.gui.Desktop jalviewDesktop) + { + // flagging this test to avoid unnecessary reflection + if (!setAPQHandlers) + { + // see if the Quit, About and Preferences handlers are available + Class desktopClass = Desktop.class; + Desktop hdesktop = Desktop.getDesktop(); + + try + { + Float specversion = Float.parseFloat( + System.getProperty("java.specification.version")); + + if (specversion >= 9) + { - if (Platform.isAMac()) ++ if (Platform.isAMacAndNotJS()) + { + if (desktopClass.getDeclaredMethod("setAboutHandler", + new Class[] + { AboutHandler.class }) != null) + { + + hdesktop.setAboutHandler(new AboutHandler() + { + @Override + public void handleAbout(AboutEvent e) + { + jalviewDesktop.aboutMenuItem_actionPerformed(null); + } + }); + + } + + if (desktopClass.getDeclaredMethod("setPreferencesHandler", + new Class[] + { PreferencesHandler.class }) != null) + { + + hdesktop.setPreferencesHandler( + new PreferencesHandler() + { + @Override + public void handlePreferences( + PreferencesEvent e) + { + jalviewDesktop.preferences_actionPerformed(null); + } + }); + + } + + if (desktopClass.getDeclaredMethod("setQuitHandler", + new Class[] + { QuitHandler.class }) != null) + { + + hdesktop.setQuitHandler(new QuitHandler() + { + @Override + public void handleQuitRequestWith( + QuitEvent e, QuitResponse r) + { + boolean confirmQuit = jalview.bin.Cache + .getDefault( + jalview.gui.Desktop.CONFIRM_KEYBOARD_QUIT, + true); + int n; + if (confirmQuit) + { + n = JOptionPane.showConfirmDialog(null, + MessageManager.getString("label.quit_jalview"), + MessageManager.getString("action.quit"), + JOptionPane.OK_CANCEL_OPTION, + JOptionPane.PLAIN_MESSAGE, null); + } + else + { + n = JOptionPane.OK_OPTION; + } + if (n == JOptionPane.OK_OPTION) + { + System.out.println("Shortcut Quit confirmed by user"); + jalviewDesktop.quit(); + r.performQuit(); // probably won't reach this line, but just + // in + // case + } + else + { + r.cancelQuit(); + System.out.println("Shortcut Quit cancelled by user"); + } + } + }); + hdesktop.setQuitStrategy( + QuitStrategy.CLOSE_ALL_WINDOWS); + + } + } + setAPQHandlers = true; + } + else + { + System.out.println( + "Not going to try setting APQ Handlers as java.spec.version is " + + specversion); + } + + } catch (Exception e) + { + System.out.println( + "Exception when looking for About, Preferences, Quit Handlers"); + // e.printStackTrace(); + } catch (Throwable t) + { + System.out.println( + "Throwable when looking for About, Preferences, Quit Handlers"); + // t.printStackTrace(); + } + + } + + return setAPQHandlers; + } + + } diff --cc src/jalview/gui/Desktop.java index cd8330a,1ec6939..5800a47 --- a/src/jalview/gui/Desktop.java +++ b/src/jalview/gui/Desktop.java @@@ -43,10 -40,9 +41,11 @@@ import jalview.jbgui.GStructureViewer import jalview.project.Jalview2XML; import jalview.structure.StructureSelectionManager; import jalview.urls.IdOrgSettings; -import jalview.util.ImageMaker; +import jalview.util.BrowserLauncher; +import jalview.util.ImageMaker.TYPE; import jalview.util.MessageManager; import jalview.util.Platform; ++import jalview.util.ShortcutKeyMaskExWrapper; import jalview.util.UrlConstants; import jalview.viewmodel.AlignmentViewport; import jalview.ws.params.ParamManager; @@@ -353,22 -342,53 +353,54 @@@ public class Desktop extends jalview.jb * constructor. */ instance = this; - if (!Platform.isJS()) + + doConfigureStructurePrefs(); - setTitle("Jalview " + jalview.bin.Cache.getProperty("VERSION")); ++ setTitle("Jalview " + Cache.getProperty("VERSION")); + /* + if (!Platform.isAMac()) { - doVamsasClientCheck(); + // this.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE); } + else + { + this.setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE); + } + */ - doConfigureStructurePrefs(); - setTitle("Jalview " + jalview.bin.Cache.getProperty("VERSION")); - setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); - boolean selmemusage = jalview.bin.Cache.getDefault("SHOW_MEMUSAGE", + try + { + APQHandlers.setAPQHandlers(this); + } catch (Exception e) + { + System.out.println("Cannot set APQHandlers"); + // e.printStackTrace(); + } catch (Throwable t) + { + System.out.println("Cannot set APQHandlers"); + // t.printStackTrace(); + } + + + addWindowListener(new WindowAdapter() + { + + @Override + public void windowClosing(WindowEvent ev) + { + quit(); + } + }); + - boolean selmemusage = jalview.bin.Cache.getDefault("SHOW_MEMUSAGE", ++ boolean selmemusage = Cache.getDefault("SHOW_MEMUSAGE", false); - boolean showjconsole = jalview.bin.Cache.getDefault("SHOW_JAVA_CONSOLE", + - boolean showjconsole = jalview.bin.Cache.getDefault("SHOW_JAVA_CONSOLE", ++ boolean showjconsole = Cache.getDefault("SHOW_JAVA_CONSOLE", false); desktop = new MyDesktopPane(selmemusage); + showMemusage.setSelected(selmemusage); desktop.setBackground(Color.white); + getContentPane().setLayout(new BorderLayout()); // alternate config - have scrollbars - see notes in JAL-153 // JScrollPane sp = new JScrollPane(); @@@ -401,86 -414,22 +433,84 @@@ else { Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); - setBounds((screenSize.width - 900) / 2, (screenSize.height - 650) / 2, - 900, 650); + int xPos = Math.max(5, (screenSize.width - 900) / 2); + int yPos = Math.max(5, (screenSize.height - 650) / 2); + setBounds(xPos, yPos, 900, 650); } - jconsole = new Console(this, showjconsole); - // add essential build information - jconsole.setHeader(jalview.bin.Cache.getVersionDetailsForConsole()); - showConsole(showjconsole); + if (!Platform.isJS()) + /** + * Java only + * + * @j2sIgnore + */ + { + + jconsole = new Console(this, showjconsole); + // add essential build information + jconsole.setHeader("Jalview Version: " - + jalview.bin.Cache.getProperty("VERSION") + "\n" ++ + Cache.getProperty("VERSION") + "\n" + + "Jalview Installation: " - + jalview.bin.Cache.getDefault("INSTALLATION", "unknown") ++ + Cache.getDefault("INSTALLATION", "unknown") + + "\n" + "Build Date: " - + jalview.bin.Cache.getDefault("BUILD_DATE", "unknown") + "\n" ++ + Cache.getDefault("BUILD_DATE", "unknown") + "\n" + + "Java version: " + System.getProperty("java.version") + "\n" + + System.getProperty("os.arch") + " " + + System.getProperty("os.name") + " " + + System.getProperty("os.version")); - showNews.setVisible(false); + showConsole(showjconsole); - experimentalFeatures.setSelected(showExperimental()); + showNews.setVisible(false); - getIdentifiersOrgData(); + experimentalFeatures.setSelected(showExperimental()); - checkURLLinks(); + getIdentifiersOrgData(); + + checkURLLinks(); + + // Spawn a thread that shows the splashscreen + + SwingUtilities.invokeLater(new Runnable() + { + @Override + public void run() + { + new SplashScreen(); + } + }); + + // Thread off a new instance of the file chooser - this reduces the time + // it + // takes to open it later on. + new Thread(new Runnable() + { + @Override + public void run() + { + Cache.log.debug("Filechooser init thread started."); + String fileFormat = Cache.getProperty("DEFAULT_FILE_FORMAT"); + JalviewFileChooser.forRead(Cache.getProperty("LAST_DIRECTORY"), + fileFormat); + Cache.log.debug("Filechooser init thread finished."); + } + }).start(); + // Add the service change listener + changeSupport.addJalviewPropertyChangeListener("services", + new PropertyChangeListener() + { + + @Override + public void propertyChange(PropertyChangeEvent evt) + { + Cache.log.debug("Firing service changed event for " + + evt.getNewValue()); + JalviewServicesChanged(evt); + } - + }); - + } + + this.setDropTarget(new java.awt.dnd.DropTarget(desktop, this)); this.addWindowListener(new WindowAdapter() { @@@ -534,14 -522,14 +564,14 @@@ // configure services StructureSelectionManager ssm = StructureSelectionManager .getStructureSelectionManager(this); -- if (jalview.bin.Cache.getDefault(Preferences.ADD_SS_ANN, true)) ++ if (Cache.getDefault(Preferences.ADD_SS_ANN, true)) { -- ssm.setAddTempFacAnnot(jalview.bin.Cache ++ ssm.setAddTempFacAnnot(Cache .getDefault(Preferences.ADD_TEMPFACT_ANN, true)); -- ssm.setProcessSecondaryStructure(jalview.bin.Cache ++ ssm.setProcessSecondaryStructure(Cache .getDefault(Preferences.STRUCT_FROM_PDB, true)); ssm.setSecStructServices( -- jalview.bin.Cache.getDefault(Preferences.USE_RNAVIEW, true)); ++ Cache.getDefault(Preferences.USE_RNAVIEW, true)); } else { @@@ -577,10 -566,10 +607,9 @@@ public void run() { Cache.log.debug("Downloading data from identifiers.org"); -- UrlDownloadClient client = new UrlDownloadClient(); try { -- client.download(IdOrgSettings.getUrl(), ++ UrlDownloadClient.download(IdOrgSettings.getUrl(), IdOrgSettings.getDownloadLocation()); } catch (IOException e) { @@@ -589,7 -578,7 +618,7 @@@ } } }).start(); -- ; ++ } @Override @@@ -632,25 -624,25 +661,25 @@@ { // TODO: lock aspect ratio for scaling desktop Bug #0058199 Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); -- String x = jalview.bin.Cache.getProperty(windowName + "SCREEN_X"); -- String y = jalview.bin.Cache.getProperty(windowName + "SCREEN_Y"); -- String width = jalview.bin.Cache ++ String x = Cache.getProperty(windowName + "SCREEN_X"); ++ String y = Cache.getProperty(windowName + "SCREEN_Y"); ++ String width = Cache .getProperty(windowName + "SCREEN_WIDTH"); -- String height = jalview.bin.Cache ++ String height = Cache .getProperty(windowName + "SCREEN_HEIGHT"); if ((x != null) && (y != null) && (width != null) && (height != null)) { int ix = Integer.parseInt(x), iy = Integer.parseInt(y), iw = Integer.parseInt(width), ih = Integer.parseInt(height); -- if (jalview.bin.Cache.getProperty("SCREENGEOMETRY_WIDTH") != null) ++ if (Cache.getProperty("SCREENGEOMETRY_WIDTH") != null) { // attempt #1 - try to cope with change in screen geometry - this // version doesn't preserve original jv aspect ratio. // take ratio of current screen size vs original screen size. double sw = ((1f * screenSize.width) / (1f * Integer.parseInt( -- jalview.bin.Cache.getProperty("SCREENGEOMETRY_WIDTH")))); ++ Cache.getProperty("SCREENGEOMETRY_WIDTH")))); double sh = ((1f * screenSize.height) / (1f * Integer.parseInt( -- jalview.bin.Cache.getProperty("SCREENGEOMETRY_HEIGHT")))); ++ Cache.getProperty("SCREENGEOMETRY_HEIGHT")))); // rescale the bounds depending upon the current screen geometry. ix = (int) (ix * sw); iw = (int) (iw * sw); @@@ -658,17 -650,17 +687,17 @@@ ih = (int) (ih * sh); while (ix >= screenSize.width) { -- jalview.bin.Cache.log.debug( ++ Cache.log.debug( "Window geometry location recall error: shifting horizontal to within screenbounds."); ix -= screenSize.width; } while (iy >= screenSize.height) { -- jalview.bin.Cache.log.debug( ++ Cache.log.debug( "Window geometry location recall error: shifting vertical to within screenbounds."); iy -= screenSize.height; } -- jalview.bin.Cache.log.debug( ++ Cache.log.debug( "Got last known dimensions for " + windowName + ": x:" + ix + " y:" + iy + " width:" + iw + " height:" + ih); } @@@ -940,7 -892,7 +929,7 @@@ menuItem.removeActionListener(menuItem.getActionListeners()[0]); } windowMenu.remove(menuItem); -- }; ++ } }); menuItem.addActionListener(new ActionListener() @@@ -1004,7 -956,7 +993,7 @@@ KeyStroke ctrlWKey = KeyStroke.getKeyStroke(KeyEvent.VK_W, InputEvent.CTRL_DOWN_MASK); KeyStroke cmdWKey = KeyStroke.getKeyStroke(KeyEvent.VK_W, - Toolkit.getDefaultToolkit().getMenuShortcutKeyMask()); - jalview.util.ShortcutKeyMaskExWrapper.getMenuShortcutKeyMaskEx()); ++ ShortcutKeyMaskExWrapper.getMenuShortcutKeyMaskEx()); InputMap inputMap = frame .getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW); @@@ -1309,9 -1236,9 +1298,9 @@@ public void quit() { Dimension screen = Toolkit.getDefaultToolkit().getScreenSize(); -- jalview.bin.Cache.setProperty("SCREENGEOMETRY_WIDTH", ++ Cache.setProperty("SCREENGEOMETRY_WIDTH", screen.width + ""); -- jalview.bin.Cache.setProperty("SCREENGEOMETRY_HEIGHT", ++ Cache.setProperty("SCREENGEOMETRY_HEIGHT", screen.height + ""); storeLastKnownDimensions("", new Rectangle(getBounds().x, getBounds().y, getWidth(), getHeight())); @@@ -1343,14 -1270,14 +1332,14 @@@ private void storeLastKnownDimensions(String string, Rectangle jc) { -- jalview.bin.Cache.log.debug("Storing last known dimensions for " ++ Cache.log.debug("Storing last known dimensions for " + string + ": x:" + jc.x + " y:" + jc.y + " width:" + jc.width + " height:" + jc.height); -- jalview.bin.Cache.setProperty(string + "SCREEN_X", jc.x + ""); -- jalview.bin.Cache.setProperty(string + "SCREEN_Y", jc.y + ""); -- jalview.bin.Cache.setProperty(string + "SCREEN_WIDTH", jc.width + ""); -- jalview.bin.Cache.setProperty(string + "SCREEN_HEIGHT", jc.height + ""); ++ Cache.setProperty(string + "SCREEN_X", jc.x + ""); ++ Cache.setProperty(string + "SCREEN_Y", jc.y + ""); ++ Cache.setProperty(string + "SCREEN_WIDTH", jc.width + ""); ++ Cache.setProperty(string + "SCREEN_HEIGHT", jc.height + ""); } /** @@@ -1383,32 -1310,34 +1372,34 @@@ if (shortv) { message.append("

Version: " -- + jalview.bin.Cache.getProperty("VERSION") ++ + Cache.getProperty("VERSION") + "

"); - message.append("Last Updated: " - + jalview.bin.Cache.getDefault("BUILD_DATE", "unknown") - + ""); + message.append("Built: " - + jalview.bin.Cache.getDefault("BUILD_DATE", "unknown") - + " from " + jalview.bin.Cache.getBuildDetailsForSplash() ++ + Cache.getDefault("BUILD_DATE", "unknown") + " from " ++ + Cache.getBuildDetailsForSplash() + + ""); } else { message.append("Version " -- + jalview.bin.Cache.getProperty("VERSION") ++ + Cache.getProperty("VERSION") + "; last updated: " -- + jalview.bin.Cache.getDefault("BUILD_DATE", "unknown")); ++ + Cache.getDefault("BUILD_DATE", "unknown")); } -- if (jalview.bin.Cache.getDefault("LATEST_VERSION", "Checking") ++ if (Cache.getDefault("LATEST_VERSION", "Checking") .equals("Checking")) { - message.append("
...Checking latest version...
"); + // JBP removed this message for 2.11: May be reinstated in future version + // message.append("
...Checking latest version...
"); } -- else if (!jalview.bin.Cache.getDefault("LATEST_VERSION", "Checking") -- .equals(jalview.bin.Cache.getProperty("VERSION"))) ++ else if (!Cache.getDefault("LATEST_VERSION", "Checking") ++ .equals(Cache.getProperty("VERSION"))) { boolean red = false; -- if (jalview.bin.Cache.getProperty("VERSION").toLowerCase() ++ if (Cache.getProperty("VERSION").toLowerCase() .indexOf("automated build") == -1) { red = true; @@@ -1418,10 -1347,10 +1409,10 @@@ } message.append("
!! Version " -- + jalview.bin.Cache.getDefault("LATEST_VERSION", ++ + Cache.getDefault("LATEST_VERSION", "..Checking..") + " is available for download from " -- + jalview.bin.Cache.getDefault("www.jalview.org", ++ + Cache.getDefault("www.jalview.org", "http://www.jalview.org") + " !!"); if (red) @@@ -1429,7 -1358,7 +1420,7 @@@ message.append(""); } } -- message.append("
Authors: " + jalview.bin.Cache.getDefault( ++ message.append("
Authors: " + Cache.getDefault( "AUTHORFNAMES", "The Jalview Authors (See AUTHORS file for current list)") + "

Development managed by The Barton Group, University of Dundee, Scotland, UK.
" @@@ -1529,9 -1444,9 +1516,9 @@@ protected void garbageCollect_actionPerformed(ActionEvent e) { // We simply collect the garbage -- jalview.bin.Cache.log.debug("Collecting garbage..."); ++ Cache.log.debug("Collecting garbage..."); System.gc(); -- jalview.bin.Cache.log.debug("Finished garbage collection."); ++ Cache.log.debug("Finished garbage collection."); } /* @@@ -1721,7 -1633,7 +1708,7 @@@ setProgressBar(MessageManager.formatMessage( "label.saving_jalview_project", new Object[] { chosenFile.getName() }), chosenFile.hashCode()); -- jalview.bin.Cache.setProperty("LAST_DIRECTORY", ++ Cache.setProperty("LAST_DIRECTORY", chosenFile.getParent()); // TODO catch and handle errors for savestate // TODO prevent user from messing with the Desktop whilst we're saving @@@ -2081,369 -1990,7 +2068,6 @@@ } } } -- - } - - jalview.gui.VamsasApplication v_client = null; - - @Override - public void vamsasImport_actionPerformed(ActionEvent e) - { - // TODO: JAL-3048 not needed for Jalview-JS - - if (v_client == null) - { - // Load and try to start a session. - JalviewFileChooser chooser = new JalviewFileChooser( - jalview.bin.Cache.getProperty("LAST_DIRECTORY")); - - chooser.setFileView(new JalviewFileView()); - chooser.setDialogTitle( - MessageManager.getString("label.open_saved_vamsas_session")); - chooser.setToolTipText(MessageManager.getString( - "label.select_vamsas_session_opened_as_new_vamsas_session")); - - int value = chooser.showOpenDialog(this); - - if (value == JalviewFileChooser.APPROVE_OPTION) - { - String fle = chooser.getSelectedFile().toString(); - if (!vamsasImport(chooser.getSelectedFile())) - { - JvOptionPane.showInternalMessageDialog(Desktop.desktop, - MessageManager.formatMessage( - "label.couldnt_import_as_vamsas_session", - new Object[] - { fle }), - MessageManager - .getString("label.vamsas_document_import_failed"), - JvOptionPane.ERROR_MESSAGE); - } - } - } - else - { - jalview.bin.Cache.log.error( - "Implementation error - load session from a running session is not supported."); - } - } - - /** - * import file into a new vamsas session (uses jalview.gui.VamsasApplication) - * - * @param file - * @return true if import was a success and a session was started. - */ - public boolean vamsasImport(URL url) - { - // TODO: create progress bar - if (v_client != null) - { - - jalview.bin.Cache.log.error( - "Implementation error - load session from a running session is not supported."); - return false; - } - - try - { - // copy the URL content to a temporary local file - // TODO: be a bit cleverer here with nio (?!) - File file = File.createTempFile("vdocfromurl", ".vdj"); - FileOutputStream fos = new FileOutputStream(file); - BufferedInputStream bis = new BufferedInputStream(url.openStream()); - byte[] buffer = new byte[2048]; - int ln; - while ((ln = bis.read(buffer)) > -1) - { - fos.write(buffer, 0, ln); - } - bis.close(); - fos.close(); - v_client = new jalview.gui.VamsasApplication(this, file, - url.toExternalForm()); - } catch (Exception ex) - { - jalview.bin.Cache.log.error( - "Failed to create new vamsas session from contents of URL " - + url, - ex); - return false; - } - setupVamsasConnectedGui(); - v_client.initial_update(); // TODO: thread ? - return v_client.inSession(); - } - - /** - * import file into a new vamsas session (uses jalview.gui.VamsasApplication) - * - * @param file - * @return true if import was a success and a session was started. - */ - public boolean vamsasImport(File file) - { - if (v_client != null) - { - - jalview.bin.Cache.log.error( - "Implementation error - load session from a running session is not supported."); - return false; - } - - setProgressBar(MessageManager.formatMessage( - "status.importing_vamsas_session_from", new Object[] - { file.getName() }), file.hashCode()); - try - { - v_client = new jalview.gui.VamsasApplication(this, file, null); - } catch (Exception ex) - { - setProgressBar(MessageManager.formatMessage( - "status.importing_vamsas_session_from", new Object[] - { file.getName() }), file.hashCode()); - jalview.bin.Cache.log.error( - "New vamsas session from existing session file failed:", ex); - return false; - } - setupVamsasConnectedGui(); - v_client.initial_update(); // TODO: thread ? - setProgressBar(MessageManager.formatMessage( - "status.importing_vamsas_session_from", new Object[] - { file.getName() }), file.hashCode()); - return v_client.inSession(); - } - - public boolean joinVamsasSession(String mysesid) - { - if (v_client != null) - { - throw new Error(MessageManager - .getString("error.try_join_vamsas_session_another")); - } - if (mysesid == null) - { - throw new Error( - MessageManager.getString("error.invalid_vamsas_session_id")); - } - v_client = new VamsasApplication(this, mysesid); - setupVamsasConnectedGui(); - v_client.initial_update(); - return (v_client.inSession()); - } - - @Override - public void vamsasStart_actionPerformed(ActionEvent e) - { - if (v_client == null) - { - // Start a session. - // we just start a default session for moment. - /* - * JalviewFileChooser chooser = new JalviewFileChooser(jalview.bin.Cache. - * getProperty("LAST_DIRECTORY")); - * - * chooser.setFileView(new JalviewFileView()); - * chooser.setDialogTitle("Load Vamsas file"); - * chooser.setToolTipText("Import"); - * - * int value = chooser.showOpenDialog(this); - * - * if (value == JalviewFileChooser.APPROVE_OPTION) { v_client = new - * jalview.gui.VamsasApplication(this, chooser.getSelectedFile()); - */ - v_client = new VamsasApplication(this); - setupVamsasConnectedGui(); - v_client.initial_update(); // TODO: thread ? - } - else - { - // store current data in session. - v_client.push_update(); // TODO: thread - } - } - - protected void setupVamsasConnectedGui() - { - vamsasStart.setText(MessageManager.getString("label.session_update")); - vamsasSave.setVisible(true); - vamsasStop.setVisible(true); - vamsasImport.setVisible(false); // Document import to existing session is - // not possible for vamsas-client-1.0. - } - - protected void setupVamsasDisconnectedGui() - { - vamsasSave.setVisible(false); - vamsasStop.setVisible(false); - vamsasImport.setVisible(true); - vamsasStart - .setText(MessageManager.getString("label.new_vamsas_session")); - } - - @Override - public void vamsasStop_actionPerformed(ActionEvent e) - { - if (v_client != null) - { - v_client.end_session(); - v_client = null; - setupVamsasDisconnectedGui(); - } - } - - protected void buildVamsasStMenu() - { - if (v_client == null) - { - String[] sess = null; - try - { - sess = VamsasApplication.getSessionList(); - } catch (Exception e) - { - jalview.bin.Cache.log.warn("Problem getting current sessions list.", - e); - sess = null; - } - if (sess != null) - { - jalview.bin.Cache.log.debug( - "Got current sessions list: " + sess.length + " entries."); - VamsasStMenu.removeAll(); - for (int i = 0; i < sess.length; i++) - { - JMenuItem sessit = new JMenuItem(); - sessit.setText(sess[i]); - sessit.setToolTipText(MessageManager - .formatMessage("label.connect_to_session", new Object[] - { sess[i] })); - final Desktop dsktp = this; - final String mysesid = sess[i]; - sessit.addActionListener(new ActionListener() - { - - @Override - public void actionPerformed(ActionEvent e) - { - if (dsktp.v_client == null) - { - Thread rthr = new Thread(new Runnable() - { - - @Override - public void run() - { - dsktp.v_client = new VamsasApplication(dsktp, mysesid); - dsktp.setupVamsasConnectedGui(); - dsktp.v_client.initial_update(); - } - - }); - rthr.start(); - } - }; - }); - VamsasStMenu.add(sessit); - } - // don't show an empty menu. - VamsasStMenu.setVisible(sess.length > 0); - - } - else - { - jalview.bin.Cache.log.debug("No current vamsas sessions."); - VamsasStMenu.removeAll(); - VamsasStMenu.setVisible(false); - } - } - else - { - // Not interested in the content. Just hide ourselves. - VamsasStMenu.setVisible(false); - } - } - - @Override - public void vamsasSave_actionPerformed(ActionEvent e) - { - // TODO: JAL-3048 not needed for Jalview-JS - - if (v_client != null) - { - // TODO: VAMSAS DOCUMENT EXTENSION is VDJ - JalviewFileChooser chooser = new JalviewFileChooser("vdj", - "Vamsas Document"); - - chooser.setFileView(new JalviewFileView()); - chooser.setDialogTitle(MessageManager - .getString("label.save_vamsas_document_archive")); - - int value = chooser.showSaveDialog(this); - - if (value == JalviewFileChooser.APPROVE_OPTION) - { - java.io.File choice = chooser.getSelectedFile(); - JPanel progpanel = addProgressPanel(MessageManager - .formatMessage("label.saving_vamsas_doc", new Object[] - { choice.getName() })); - Cache.setProperty("LAST_DIRECTORY", choice.getParent()); - String warnmsg = null; - String warnttl = null; - try - { - v_client.vclient.storeDocument(choice); - } catch (Error ex) - { - warnttl = "Serious Problem saving Vamsas Document"; - warnmsg = ex.toString(); - jalview.bin.Cache.log - .error("Error Whilst saving document to " + choice, ex); - - } catch (Exception ex) - { - warnttl = "Problem saving Vamsas Document."; - warnmsg = ex.toString(); - jalview.bin.Cache.log.warn( - "Exception Whilst saving document to " + choice, ex); - - } - removeProgressPanel(progpanel); - if (warnmsg != null) - { - JvOptionPane.showInternalMessageDialog(Desktop.desktop, - - warnmsg, warnttl, JvOptionPane.ERROR_MESSAGE); - } - } - } - } - - JPanel vamUpdate = null; - - /** - * hide vamsas user gui bits when a vamsas document event is being handled. - * - * @param b - * true to hide gui, false to reveal gui - */ - public void setVamsasUpdate(boolean b) - { - Cache.log.debug("Setting gui for Vamsas update " - + (b ? "in progress" : "finished")); - - if (vamUpdate != null) - { - this.removeProgressPanel(vamUpdate); - } - if (b) - { - vamUpdate = this.addProgressPanel( - MessageManager.getString("label.updating_vamsas_session")); - } - vamsasStart.setVisible(!b); - vamsasStop.setVisible(!b); - vamsasSave.setVisible(!b); } public JInternalFrame[] getAllFrames() @@@ -2733,7 -2281,7 +2357,7 @@@ openGroovyConsole(); } catch (Exception ex) { -- jalview.bin.Cache.log.error("Groovy Shell Creation failed.", ex); ++ Cache.log.error("Groovy Shell Creation failed.", ex); JvOptionPane.showInternalMessageDialog(Desktop.desktop, MessageManager.getString("label.couldnt_create_groovy_shell"), @@@ -3239,7 -2787,7 +2864,6 @@@ } catch (InterruptedException x) { } -- ; } if (instance == null) { @@@ -3527,7 -3044,7 +3151,6 @@@ System.err.println( "Please ignore plist error - occurs due to problem with java 8 on OSX"); } -- ; } } catch (Throwable ex) { diff --cc src/jalview/gui/FeatureRenderer.java index 0553fef,e22f506..83badd0 --- a/src/jalview/gui/FeatureRenderer.java +++ b/src/jalview/gui/FeatureRenderer.java @@@ -20,19 -20,63 +20,12 @@@ */ package jalview.gui; - import java.awt.Color; - -import jalview.api.FeatureColourI; -import jalview.datamodel.SearchResults; -import jalview.datamodel.SearchResultsI; -import jalview.datamodel.SequenceFeature; -import jalview.datamodel.SequenceI; -import jalview.io.FeaturesFile; -import jalview.schemes.FeatureColour; -import jalview.util.ColorUtils; -import jalview.util.MessageManager; - -import java.awt.BorderLayout; -import java.awt.Color; -import java.awt.Dimension; -import java.awt.Font; -import java.awt.GridLayout; -import java.awt.event.ActionEvent; -import java.awt.event.ActionListener; -import java.awt.event.ItemEvent; -import java.awt.event.ItemListener; -import java.awt.event.MouseAdapter; -import java.awt.event.MouseEvent; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Comparator; -import java.util.List; - -import javax.swing.JColorChooser; -import javax.swing.JComboBox; -import javax.swing.JLabel; -import javax.swing.JPanel; -import javax.swing.JScrollPane; -import javax.swing.JSpinner; -import javax.swing.JTextArea; -import javax.swing.JTextField; -import javax.swing.SwingConstants; -import javax.swing.event.DocumentEvent; -import javax.swing.event.DocumentListener; - /** -- * DOCUMENT ME! -- * -- * @author $author$ -- * @version $Revision$ ++ * A class that manages drawing of sequence features for the Swing gui */ public class FeatureRenderer extends jalview.renderer.seqfeatures.FeatureRenderer { - Color resBoxColour; - - /* - * defaults for creating a new feature are the last created - * feature type and group - */ - static String lastFeatureAdded = "feature_1"; - - static String lastFeatureGroupAdded = "Jalview"; - - Color resBoxColour; - AlignmentPanel ap; /** diff --cc src/jalview/gui/FeatureTypeSettings.java index 735e514,7456e18..bac9d9b --- a/src/jalview/gui/FeatureTypeSettings.java +++ b/src/jalview/gui/FeatureTypeSettings.java @@@ -160,15 -162,15 +161,15 @@@ public class FeatureTypeSettings extend JPanel singleColour = new JPanel(); - private JPanel minColour = new JPanel(); + JPanel minColour = new JPanel(); - private JPanel maxColour = new JPanel(); + JPanel maxColour = new JPanel(); - private JComboBox threshold = new JComboBox<>(); + private JComboBox threshold = new JComboBox<>(); - private JSlider slider = new JSlider(); + JSlider slider = new JSlider(); - private JTextField thresholdValue = new JTextField(20); + JTextField thresholdValue = new JTextField(20); private JCheckBox thresholdIsMin = new JCheckBox(); @@@ -1442,12 -1421,10 +1445,13 @@@ if (!patternField.isEnabled() || (pattern != null && pattern.trim().length() > 0)) { -- JButton removeCondition = new JButton("\u2717"); // Dingbats cursive x ++ JButton removeCondition = new JButton("\u2717"); ++ // Dingbats cursive x + removeCondition.setBorder(new EmptyBorder(0, 0, 0, 0)); + removeCondition.setBackground(Color.WHITE); + removeCondition.setPreferredSize(new Dimension(23, 17)); - removeCondition - .setToolTipText(MessageManager.getString("label.delete_row")); + removeCondition.setToolTipText( + MessageManager.getString("label.delete_condition")); - removeCondition.setBorder(new EmptyBorder(0, 0, 0, 0)); removeCondition.addActionListener(new ActionListener() { @Override diff --cc src/jalview/gui/WebserviceInfo.java index c6137cc,8158718..25ade21 --- a/src/jalview/gui/WebserviceInfo.java +++ b/src/jalview/gui/WebserviceInfo.java @@@ -45,6 -46,6 +46,8 @@@ import javax.swing.JTabbedPane import javax.swing.JTextArea; import javax.swing.event.HyperlinkEvent; import javax.swing.event.HyperlinkListener; ++import javax.swing.event.InternalFrameAdapter; ++import javax.swing.event.InternalFrameEvent; import javax.swing.text.html.HTMLEditorKit; import javax.swing.text.html.StyleSheet; @@@ -98,7 -99,7 +101,7 @@@ public class WebserviceInfo extends GWe { super.setVisible(aFlag); frame.setVisible(aFlag); -- }; ++ } JTabbedPane subjobs = null; @@@ -348,11 -352,11 +354,10 @@@ thread.start(); final WebserviceInfo thisinfo = this; frame.addInternalFrameListener( -- new javax.swing.event.InternalFrameAdapter() ++ new InternalFrameAdapter() { @Override - public void internalFrameClosed( - javax.swing.event.InternalFrameEvent evt) - public void internalFrameClosed( - javax.swing.event.InternalFrameEvent evt) ++ public void internalFrameClosed(InternalFrameEvent evt) { // System.out.println("Shutting down webservice client"); WSClientI service = thisinfo.getthisService(); @@@ -360,7 -364,7 +365,7 @@@ { service.cancelJob(); } -- }; ++ } }); frame.validate(); diff --cc src/jalview/io/BackupFiles.java index dae1c02,7bb5d31..06c2fc9 --- a/src/jalview/io/BackupFiles.java +++ b/src/jalview/io/BackupFiles.java @@@ -145,8 -121,10 +122,10 @@@ public class BackupFile public static void classInit() { - setEnabled(Cache.getDefault(ENABLED, true)); + setEnabled(Cache.getDefault(ENABLED, !Platform.isJS())); - setConfirmDelete(Cache.getDefault(CONFIRM_DELETE_OLD, true)); + BackupFilesPresetEntry bfpe = BackupFilesPresetEntry + .getSavedBackupEntry(); + setConfirmDelete(bfpe.confirmDelete); } public static void setEnabled(boolean flag) diff --cc src/jalview/io/FileLoader.java index 95f85e6,3afbaad..1d5be1b --- a/src/jalview/io/FileLoader.java +++ b/src/jalview/io/FileLoader.java @@@ -213,7 -183,22 +213,8 @@@ public class FileLoader implements Runn */ protected AlignFrame _LoadFileWaitTillLoaded() { - Thread loader = new Thread(this); - loader.start(); - - while (loader.isAlive()) - { - try - { - Thread.sleep(500); - } catch (Exception ex) - { - System.out.println( - "Exception caught while waiting for FileLoader thread"); - ex.printStackTrace(); - } - } + this.run(); + return alignFrame; } diff --cc src/jalview/jbgui/GDesktop.java index 2ea3774,0ef3f46..b6f3f8c --- a/src/jalview/jbgui/GDesktop.java +++ b/src/jalview/jbgui/GDesktop.java @@@ -129,13 -113,10 +116,12 @@@ public class GDesktop extends JFram e.printStackTrace(); } - if (!Platform.isAMac()) + if (Platform.allowMnemonics()) { + //BH was !Platform.isAMacAndNotJS()) i.e. "JS or not Mac" + // but here we want just not a Mac, period, right? FileMenu.setMnemonic('F'); inputLocalFileMenuItem.setMnemonic('L'); - VamsasMenu.setMnemonic('V'); inputURLMenuItem.setMnemonic('U'); inputTextboxMenuItem.setMnemonic('C'); quit.setMnemonic('Q'); @@@ -153,15 -134,9 +139,9 @@@ */ private void jbInit() throws Exception { - + setName("jalview-desktop"); FileMenu.setText(MessageManager.getString("action.file")); HelpMenu.setText(MessageManager.getString("action.help")); - VamsasMenu.setText("Vamsas"); - VamsasMenu.setToolTipText(MessageManager - .getString("label.share_data_vamsas_applications")); - VamsasStMenu.setText(MessageManager.getString("label.connect_to")); - VamsasStMenu.setToolTipText( - MessageManager.getString("label.join_existing_vamsas_session")); inputLocalFileMenuItem .setText(MessageManager.getString("label.load_tree_from_file")); inputLocalFileMenuItem.setAccelerator( @@@ -446,24 -377,15 +382,18 @@@ FileMenu.add(quit); HelpMenu.add(aboutMenuItem); HelpMenu.add(documentationMenuItem); - VamsasMenu.add(VamsasStMenu); - VamsasStMenu.setVisible(false); - VamsasMenu.add(vamsasStart); - VamsasMenu.add(vamsasImport); - VamsasMenu.add(vamsasSave); - VamsasMenu.add(vamsasStop); - toolsMenu.add(preferences); - if (!Platform.isJS()) - if (!Platform.isAMac() || specversion < 11) ++ if (!Platform.isAMacAndNotJS() || specversion < 11) { - toolsMenu.add(showMemusage); - toolsMenu.add(showConsole); + toolsMenu.add(preferences); } - toolsMenu.add(showMemusage); - toolsMenu.add(showConsole); - toolsMenu.add(showNews); - toolsMenu.add(garbageCollect); - toolsMenu.add(groovyShell); + if (!Platform.isJS()) + { ++ toolsMenu.add(showMemusage); ++ toolsMenu.add(showConsole); + toolsMenu.add(showNews); + toolsMenu.add(garbageCollect); + toolsMenu.add(groovyShell); + } toolsMenu.add(experimentalFeatures); // toolsMenu.add(snapShotWindow); inputMenu.add(inputLocalFileMenuItem); diff --cc src/jalview/jbgui/GPreferences.java index 3c35e4e,9f98ffa..64c0323 --- a/src/jalview/jbgui/GPreferences.java +++ b/src/jalview/jbgui/GPreferences.java @@@ -31,8 -31,9 +31,10 @@@ import jalview.gui.JvSwingUtils import jalview.gui.StructureViewer.ViewerType; import jalview.io.BackupFilenameParts; import jalview.io.BackupFiles; + import jalview.io.BackupFilesPresetEntry; + import jalview.io.IntKeyStringValueEntry; import jalview.util.MessageManager; +import jalview.util.Platform; import java.awt.BorderLayout; import java.awt.Color; @@@ -1751,22 -1704,28 +1760,28 @@@ public class GPreferences extends JPane protected void loadLastSavedBackupsOptions() { + BackupFilesPresetEntry savedPreset = BackupFilesPresetEntry + .getSavedBackupEntry(); enableBackupFiles - .setSelected(Cache.getDefault(BackupFiles.ENABLED, true)); + .setSelected(Cache.getDefault(BackupFiles.ENABLED, !Platform.isJS())); + + BackupFilesPresetEntry backupfilesCustomEntry = BackupFilesPresetEntry + .createBackupFilesPresetEntry(Cache + .getDefault(BackupFilesPresetEntry.CUSTOMCONFIG, null)); + if (backupfilesCustomEntry == null) + { + backupfilesCustomEntry = BackupFilesPresetEntry.backupfilesPresetEntriesValues + .get(BackupFilesPresetEntry.BACKUPFILESSCHEMEDEFAULT); + } + BackupFilesPresetEntry.backupfilesPresetEntriesValues.put( + BackupFilesPresetEntry.BACKUPFILESSCHEMECUSTOM, + backupfilesCustomEntry); + setComboIntStringKey(backupfilesPresetsCombo, - Cache.getDefault(BackupFiles.NS + "_PRESET", 1)); - suffixTemplate.setText(Cache.getDefault(BackupFiles.SUFFIX, - ".bak" + BackupFiles.NUM_PLACEHOLDER)); - suffixDigitsSpinner - .setValue(Cache.getDefault(BackupFiles.SUFFIX_DIGITS, 3)); - suffixReverse.setSelected( - Cache.getDefault(BackupFiles.REVERSE_ORDER, false)); - backupfilesKeepAll - .setSelected(Cache.getDefault(BackupFiles.NO_MAX, false)); - backupfilesRollMaxSpinner - .setValue(Cache.getDefault(BackupFiles.ROLL_MAX, 3)); - backupfilesConfirmDelete.setSelected( - Cache.getDefault(BackupFiles.CONFIRM_DELETE_OLD, true)); + Cache.getDefault(BackupFiles.NS + "_PRESET", + BackupFilesPresetEntry.BACKUPFILESSCHEMEDEFAULT)); + + backupsSetOptions(savedPreset); backupsOptionsSetEnabled(); updateBackupFilesExampleLabel(); diff --cc src/jalview/project/Jalview2XML.java index 4d772a1,0e17779..8f9338d --- a/src/jalview/project/Jalview2XML.java +++ b/src/jalview/project/Jalview2XML.java @@@ -2520,18 -2507,26 +2521,26 @@@ public class Jalview2XM parentseq = jds; } } + + /* + * save any dbrefs; special subclass GeneLocus is flagged as 'locus' + */ if (dbrefs != null) { - for (int d = 0; d < dbrefs.length; d++) + for (int d = 0, nd = dbrefs.size(); d < nd; d++) { DBRef dbref = new DBRef(); - DBRefEntry dbRefEntry = dbrefs[d]; - dbref.setSource(dbRefEntry.getSource()); - dbref.setVersion(dbRefEntry.getVersion()); - dbref.setAccessionId(dbRefEntry.getAccessionId()); - if (dbRefEntry instanceof GeneLocus) + DBRefEntry ref = dbrefs.get(d); + dbref.setSource(ref.getSource()); + dbref.setVersion(ref.getVersion()); + dbref.setAccessionId(ref.getAccessionId()); ++ if (ref instanceof GeneLocus) + { + dbref.setLocus(true); + } - if (dbRefEntry.hasMap()) + if (ref.hasMap()) { - Mapping mp = createVamsasMapping(dbRefEntry.getMap(), parentseq, + Mapping mp = createVamsasMapping(ref.getMap(), parentseq, jds, recurse); dbref.setMapping(mp); } diff --cc src/jalview/util/ImageMaker.java index 162e79f,7232042..e89596b --- a/src/jalview/util/ImageMaker.java +++ b/src/jalview/util/ImageMaker.java @@@ -101,35 -117,66 +101,36 @@@ public class ImageMake } - public ImageMaker(Component parent, TYPE type, String title, int width, - int height, File file, String fileTitle, - IProgressIndicator pIndicator, long pSessionId, boolean headless) + /** + * Constructor configures the graphics context ready for writing to + * + * @param imageType + * @param width + * @param height + * @param file + * @param fileTitle + * @param useLineart + * @throws IOException + */ + public ImageMaker(TYPE imageType, int width, int height, + File file, String fileTitle, boolean useLineart) + throws IOException { - this.pIndicator = pIndicator; - this.type = type; - this.pSessionId = pSessionId; - this.headless = headless; - if (file == null) - { - setProgressMessage(MessageManager.formatMessage( - "status.waiting_for_user_to_select_output_file", type.name)); - JalviewFileChooser chooser; - chooser = type.getFileChooser(); - chooser.setFileView(new jalview.io.JalviewFileView()); - chooser.setDialogTitle(title); - chooser.setToolTipText(MessageManager.getString("action.save")); - int value = chooser.showSaveDialog(parent); - - if (value == jalview.io.JalviewFileChooser.APPROVE_OPTION) - { - jalview.bin.Cache.setProperty("LAST_DIRECTORY", - chooser.getSelectedFile().getParent()); - file = chooser.getSelectedFile(); - } - else - { - setProgressMessage(MessageManager.formatMessage( - "status.cancelled_image_export_operation", type.name)); - } - } - - if (file != null) - { - try - { - out = new FileOutputStream(file); - setProgressMessage(null); - setProgressMessage(MessageManager.formatMessage( - "status.exporting_alignment_as_x_file", type.getName())); - if (type == TYPE.SVG) - { - setupSVG(width, height, fileTitle); - } - else if (type == TYPE.EPS) - { - setupEPS(width, height, fileTitle); - } - else if (type == TYPE.PNG) - { - setupPNG(width, height); - } - - } catch (Exception ex) - { - System.out.println("Error creating " + type.getName() + " file."); - - setProgressMessage(MessageManager - .formatMessage("info.error_creating_file", type.getName())); - } + this.type = imageType; + + out = new FileOutputStream(file); - if (imageType == TYPE.SVG) ++ switch (imageType) + { ++ case SVG: + setupSVG(width, height, useLineart); - } - else if (imageType == TYPE.EPS) - { ++ break; ++ case EPS: + setupEPS(width, height, fileTitle, useLineart); - } - else if (imageType == TYPE.PNG) - { ++ break; ++ case PNG: + setupPNG(width, height); ++ break; ++ default: } } diff --cc src/jalview/util/Platform.java index f9eb2a6,e8558fa..ade9d87 --- a/src/jalview/util/Platform.java +++ b/src/jalview/util/Platform.java @@@ -177,438 -122,42 +169,474 @@@ public class Platfor */ protected static boolean isControlDown(MouseEvent e, boolean aMac) { - if (aMac) + if (!aMac) { - /* - * answer false for right mouse button - */ - if (e.isPopupTrigger()) + return e.isControlDown(); ++ ++ // Jalview 2.11 code below: above is as amended for JalviewJS ++ // /* ++ // * answer false for right mouse button ++ // */ ++ // if (e.isPopupTrigger()) ++ // { ++ // return false; ++ // } ++ // return ++ // (jalview.util.ShortcutKeyMaskExWrapper.getMenuShortcutKeyMaskEx() // ++ // .getMenuShortcutKeyMaskEx() ++ // & jalview.util.ShortcutKeyMaskExWrapper ++ // .getModifiersEx(e)) != 0; // getModifiers()) != 0; + } + // answer false for right mouse button + // shortcut key will be META for a Mac + return !e.isPopupTrigger() + && (Toolkit.getDefaultToolkit().getMenuShortcutKeyMask() + & e.getModifiers()) != 0; + // could we use e.isMetaDown() here? + } + + // BH: I don't know about that previous method. Here is what SwingJS uses. + // Notice the distinction in mouse events. (BUTTON3_MASK == META) + // + // private static boolean isPopupTrigger(int id, int mods, boolean isWin) { + // boolean rt = ((mods & InputEvent.BUTTON3_MASK) != 0); + // if (isWin) { + // if (id != MouseEvent.MOUSE_RELEASED) + // return false; + //// + //// // Oddly, Windows returns InputEvent.META_DOWN_MASK on release, though + //// // BUTTON3_DOWN_MASK for pressed. So here we just accept both. + //// + //// actually, we can use XXX_MASK, not XXX_DOWN_MASK and avoid this issue, + // because + //// J2S adds the appropriate extended (0x3FC0) and simple (0x3F) modifiers. + //// + // return rt; + // } else { + // // mac, linux, unix + // if (id != MouseEvent.MOUSE_PRESSED) + // return false; + // boolean lt = ((mods & InputEvent.BUTTON1_MASK) != 0); + // boolean ctrl = ((mods & InputEvent.CTRL_MASK) != 0); + // return rt || (ctrl && lt); + // } + // } + // + + /** + * Windows (not Mac, Linux, or Unix) and right button to test for the + * right-mouse pressed event in Windows that would have opened a menu or a + * Mac. + * + * @param e + * @return + */ + public static boolean isWinRightButton(MouseEvent e) + { + // was !isAMac(), but that is true also for Linux and Unix and JS, + + return isWin() && SwingUtilities.isRightMouseButton(e); + } + + /** + * Windows (not Mac, Linux, or Unix) and middle button -- for mouse wheeling + * without pressing the button. + * + * @param e + * @return + */ + public static boolean isWinMiddleButton(MouseEvent e) + { + // was !isAMac(), but that is true also for Linux and Unix and JS + return isWin() && SwingUtilities.isMiddleMouseButton(e); + } + + public static boolean allowMnemonics() + { + return !isMac(); + } + + public final static int TIME_RESET = 0; + + public final static int TIME_MARK = 1; + + public static final int TIME_SET = 2; + + public static final int TIME_GET = 3; + + public static long time, mark, set, duration; + + public static void timeCheck(String msg, int mode) + { + long t = System.currentTimeMillis(); + switch (mode) + { + case TIME_RESET: + time = mark = t; + if (msg != null) + { + System.err.println("Platform: timer reset\t\t\t" + msg); + } + break; + case TIME_MARK: + if (set > 0) + { + duration += (t - set); + } + else { - return false; + if (time == 0) + { + time = mark = t; + } + if (msg != null) + { + System.err.println("Platform: timer mark\t" + ((t - time) / 1000f) + + "\t" + ((t - mark) / 1000f) + "\t" + msg); + } + mark = t; } - return (jalview.util.ShortcutKeyMaskExWrapper.getMenuShortcutKeyMaskEx() // .getMenuShortcutKeyMaskEx() - & jalview.util.ShortcutKeyMaskExWrapper - .getModifiersEx(e)) != 0; // getModifiers()) != 0; + break; + case TIME_SET: + set = t; + break; + case TIME_GET: + if (msg != null) + { + System.err.println("Platform: timer dur\t" + ((t - time) / 1000f) + + "\t" + ((duration) / 1000f) + "\t" + msg); + } + set = 0; + break; + } + } + + public static void cacheFileData(String path, Object data) + { + if (!isJS() || data == null) + { + return; + } + /** + * @j2sNative + * + * swingjs.JSUtil.cacheFileData$S$O(path, data); + * + */ + } + + public static void cacheFileData(File file) + { + byte[] data; + if (!isJS() || (data = Platform.getFileBytes(file)) == null) + { + return; + } + cacheFileData(file.toString(), data); + } + + public static byte[] getFileBytes(File f) + { + return /** @j2sNative f && f._bytes || */ + null; + } + + public static byte[] getFileAsBytes(String fileStr) + { + byte[] bytes = null; + // BH 2018 hack for no support for access-origin + /** + * @j2sNative bytes = swingjs.JSUtil.getFileAsBytes$O(fileStr) + */ + cacheFileData(fileStr, bytes); + return bytes; + } + + @SuppressWarnings("unused") + public static String getFileAsString(String url) + { + String ret = null; + /** + * @j2sNative + * + * ret = swingjs.JSUtil.getFileAsString$S(url); + * + * + */ + cacheFileData(url, ret); + return ret; + } + + public static boolean setFileBytes(File f, String urlstring) + { + if (!isJS()) + { + return false; } - return e.isControlDown(); + @SuppressWarnings("unused") + byte[] bytes = getFileAsBytes(urlstring); + /** + * @j2sNative f._bytes = bytes; + */ + return true; + } + + public static void addJ2SBinaryType(String ext) + { + /** + * @j2sNative + * + * J2S._binaryTypes.push("." + ext + "?"); + * + */ + } + + /** + * Encode the URI using JavaScript encodeURIComponent + * + * @param value + * @return encoded value + */ + public static String encodeURI(String value) + { + /** + * @j2sNative value = encodeURIComponent(value); + */ + return value; + } + + /** + * Open the URL using a simple window call if this is JavaScript + * + * @param url + * @return true if window has been opened + */ + public static boolean openURL(String url) + { + if (!isJS()) + { + return false; + } + /** + * @j2sNative + * + * + * window.open(url); + */ + return true; + } + + public static String getUniqueAppletID() + { + @SuppressWarnings("unused") + ThreadGroup g = Thread.currentThread().getThreadGroup(); + /** + * @j2sNative return g.html5Applet._uniqueId; + * + */ + return null; + + } + + /** + * Read the Info block for this applet. + * + * @param prefix + * "jalview_" + * @param p + * @return unique id for this applet + */ + public static void readInfoProperties(String prefix, Properties p) + { + if (!isJS()) + { + return; + } + @SuppressWarnings("unused") + ThreadGroup g = Thread.currentThread().getThreadGroup(); + String id = getUniqueAppletID(); + String key = "", value = ""; + /** + * @j2sNative var info = g.html5Applet.__Info || {}; for (var key in info) { + * if (key.indexOf(prefix) == 0) { value = "" + info[key]; + */ + + System.out.println( + "Platform id=" + id + " reading Info." + key + " = " + value); + p.put(id + "_" + key, value); + + /** + * @j2sNative + * + * + * } } + */ + } + + public static void setAjaxJSON(URL url) + { + if (isJS()) + { + JSON.setAjax(url); + } + } + + public static Object parseJSON(InputStream response) + throws IOException, ParseException + { + if (isJS()) + { + return JSON.parse(response); + } + + BufferedReader br = null; + try + { + br = new BufferedReader(new InputStreamReader(response, "UTF-8")); + return new JSONParser().parse(br); + } finally + { + if (br != null) + { + try + { + br.close(); + } catch (IOException e) + { + // ignore + } + } + } + } + + public static Object parseJSON(String json) throws ParseException + { + return (isJS() ? JSON.parse(json) + : new JSONParser().parse(json)); + } + + public static Object parseJSON(Reader r) + throws IOException, ParseException + { + if (r == null) + { + return null; + } + + if (!isJS()) + { + return new JSONParser().parse(r); + } + // Using a file reader is not currently supported in SwingJS JavaScript + + if (r instanceof FileReader) + { + throw new IOException( + "StringJS does not support FileReader parsing for JSON -- but it could..."); + } + return JSON.parse(r); + + } + + /** + * Dump the input stream to an output file. + * + * @param is + * @param outFile + * @throws IOException + * if the file cannot be created or there is a problem reading the + * input stream. + */ + public static void streamToFile(InputStream is, File outFile) + throws IOException + { + FileOutputStream fio = new FileOutputStream(outFile); + try + { + if (isJS() + && /** + * @j2sNative outFile.setBytes$O && outFile.setBytes$O(is) && + */ + true) + { + return; + } + byte[] bb = new byte[32 * 1024]; + int l; + while ((l = is.read(bb)) > 0) + { + fio.write(bb, 0, l); + } + } finally + { + fio.close(); + } + } + + /** + * Add a known domain that implements access-control-allow-origin:* + * + * These should be reviewed periodically. + * + * @param domain + * for a service that is not allowing ajax + * + * @author hansonr@stolaf.edu + * + */ + public static void addJ2SDirectDatabaseCall(String domain) + { + + if (isJS()) + { + System.out.println( + "Platform adding known access-control-allow-origin * for domain " + + domain); + /** + * @j2sNative + * + * J2S.addDirectDatabaseCall(domain); + */ + } + + } + + public static void getURLCommandArguments() + { + + /** + * Retrieve the first query field as command arguments to Jalview. Include + * only if prior to "?j2s" or "&j2s" or "#". Assign the applet's __Info.args + * element to this value. + * + * @j2sNative var a = + * decodeURI((document.location.href.replace("&","?").split("?j2s")[0] + * + "?").split("?")[1].split("#")[0]); a && + * (J2S.thisApplet.__Info.args = a.split(" ")); + */ + } + /** + * A (case sensitive) file path comparator that ignores the difference between / + * and \ + * + * @param path1 + * @param path2 + * @return + */ + public static boolean pathEquals(String path1, String path2) + { + if (path1 == null) + { + return path2 == null; + } + if (path2 == null) + { + return false; + } + String p1 = path1.replace('\\', '/'); + String p2 = path2.replace('\\', '/'); + return p1.equals(p2); + } } diff --cc src/jalview/ws/SequenceFetcher.java index 18e25cc,d3aeead..a480176 --- a/src/jalview/ws/SequenceFetcher.java +++ b/src/jalview/ws/SequenceFetcher.java @@@ -86,7 -86,19 +86,8 @@@ public class SequenceFetcher extends AS src.add(srcs[i]); } } - String[] tosort = src.toArray(new String[0]), - sorted = src.toArray(new String[0]); - for (int j = 0, jSize = sorted.length; j < jSize; j++) - { - tosort[j] = tosort[j].toLowerCase(); - } - jalview.util.QuickSort.sort(tosort, sorted); - // construct array with all sources listed - int i = 0; - for (int j = sorted.length - 1; j >= 0; j--, i++) - { - tosort[i] = sorted[j]; - } - return tosort; ++ + Collections.sort(src, String.CASE_INSENSITIVE_ORDER); + return src.toArray(new String[src.size()]); } } diff --cc src/org/jibble/epsgraphics/EpsGraphics2D.java index 313ec1c,fe6d962..fe6d962 mode 100644,100755..100644 --- a/src/org/jibble/epsgraphics/EpsGraphics2D.java +++ b/src/org/jibble/epsgraphics/EpsGraphics2D.java