mirror of
https://github.com/mirror/jdownloader.git
synced 2024-11-23 03:59:51 +00:00
git-svn-id: svn://svn.jdownloader.org/jdownloader/trunk@15115 ebf7c1c2-ba36-0410-9fe8-c592906822b4
This commit is contained in:
parent
f670b95fab
commit
b3770baa5b
46
.project
46
.project
@ -1,23 +1,23 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>JDownloader</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>net.sf.eclipsensis.installoptions.InstallOptionsBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
<nature>net.sf.eclipsensis.installoptions.InstallOptionsNature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>JDownloader</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>net.sf.eclipsensis.installoptions.InstallOptionsBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
<nature>net.sf.eclipsensis.installoptions.InstallOptionsNature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
||||
|
@ -1,280 +1,12 @@
|
||||
#Sat Sep 04 19:56:29 CEST 2010
|
||||
eclipse.preferences.version=1
|
||||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
|
||||
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
|
||||
org.eclipse.jdt.core.compiler.compliance=1.5
|
||||
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
|
||||
org.eclipse.jdt.core.compiler.debug.localVariable=generate
|
||||
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
|
||||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.source=1.5
|
||||
org.eclipse.jdt.core.formatter.align_type_members_on_columns=true
|
||||
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
|
||||
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_assignment=0
|
||||
org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
|
||||
org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
|
||||
org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
|
||||
org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
|
||||
org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
|
||||
org.eclipse.jdt.core.formatter.blank_lines_after_package=1
|
||||
org.eclipse.jdt.core.formatter.blank_lines_before_field=0
|
||||
org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
|
||||
org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
|
||||
org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
|
||||
org.eclipse.jdt.core.formatter.blank_lines_before_method=1
|
||||
org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
|
||||
org.eclipse.jdt.core.formatter.blank_lines_before_package=0
|
||||
org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
|
||||
org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
|
||||
org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
|
||||
org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
|
||||
org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
|
||||
org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
|
||||
org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
|
||||
org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
|
||||
org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
|
||||
org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
|
||||
org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
|
||||
org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
|
||||
org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
|
||||
org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
|
||||
org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
|
||||
org.eclipse.jdt.core.formatter.comment.format_block_comments=true
|
||||
org.eclipse.jdt.core.formatter.comment.format_header=false
|
||||
org.eclipse.jdt.core.formatter.comment.format_html=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.compact_else_if=true
|
||||
org.eclipse.jdt.core.formatter.continuation_indentation=2
|
||||
org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
|
||||
org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
|
||||
org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
|
||||
org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=true
|
||||
org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
|
||||
org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
|
||||
org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
|
||||
org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
|
||||
org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
|
||||
org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
|
||||
org.eclipse.jdt.core.formatter.indent_empty_lines=false
|
||||
org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
|
||||
org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
|
||||
org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
|
||||
org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
|
||||
org.eclipse.jdt.core.formatter.indentation.size=4
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_member=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_label=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
|
||||
org.eclipse.jdt.core.formatter.join_lines_in_comments=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=false
|
||||
org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=true
|
||||
org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
|
||||
org.eclipse.jdt.core.formatter.lineSplit=900
|
||||
org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
|
||||
org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
|
||||
org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
|
||||
org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
|
||||
org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
|
||||
org.eclipse.jdt.core.formatter.tabulation.char=space
|
||||
org.eclipse.jdt.core.formatter.tabulation.size=4
|
||||
org.eclipse.jdt.core.formatter.use_on_off_tags=false
|
||||
org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
|
||||
org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
|
||||
org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
|
||||
#Thu Mar 24 18:14:17 CET 2011
|
||||
eclipse.preferences.version=1
|
||||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
|
||||
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
|
||||
org.eclipse.jdt.core.compiler.compliance=1.5
|
||||
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
|
||||
org.eclipse.jdt.core.compiler.debug.localVariable=generate
|
||||
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
|
||||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.source=1.5
|
||||
|
@ -1,57 +1,58 @@
|
||||
#Tue Jan 18 10:33:08 CET 2011
|
||||
eclipse.preferences.version=1
|
||||
editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
|
||||
formatter_settings_version=11
|
||||
org.eclipse.jdt.ui.javadoc=false
|
||||
org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\r\n * @return the ${bare_field_name}\r\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\r\n * @param ${param} the ${bare_field_name} to set\r\n */</template><template autoinsert\="true" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\r\n * ${tags}\r\n */</template><template autoinsert\="true" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/**\r\n * \r\n */</template><template autoinsert\="true" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\r\n * @author ${user}\r\n *\r\n * ${tags}\r\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\r\n * \r\n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\r\n * ${tags}\r\n */</template><template autoinsert\="true" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/* (non-Javadoc)\r\n * ${see_to_overridden}\r\n */</template><template autoinsert\="true" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\r\n * ${tags}\r\n * ${see_to_target}\r\n */</template><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\r\n${package_declaration}\r\n\r\n${typecomment}\r\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\r\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\r\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\r\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\r\n</template><template autoinsert\="false" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">${exception_var}.printStackTrace();</template><template autoinsert\="false" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">${body_statement}</template><template autoinsert\="false" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates>
|
||||
sp_cleanup.add_default_serial_version_id=true
|
||||
sp_cleanup.add_generated_serial_version_id=false
|
||||
sp_cleanup.add_missing_annotations=true
|
||||
sp_cleanup.add_missing_deprecated_annotations=true
|
||||
sp_cleanup.add_missing_methods=false
|
||||
sp_cleanup.add_missing_nls_tags=false
|
||||
sp_cleanup.add_missing_override_annotations=true
|
||||
sp_cleanup.add_serial_version_id=false
|
||||
sp_cleanup.always_use_blocks=true
|
||||
sp_cleanup.always_use_parentheses_in_expressions=false
|
||||
sp_cleanup.always_use_this_for_non_static_field_access=false
|
||||
sp_cleanup.always_use_this_for_non_static_method_access=false
|
||||
sp_cleanup.convert_to_enhanced_for_loop=false
|
||||
sp_cleanup.correct_indentation=false
|
||||
sp_cleanup.format_source_code=true
|
||||
sp_cleanup.format_source_code_changes_only=false
|
||||
sp_cleanup.make_local_variable_final=false
|
||||
sp_cleanup.make_parameters_final=false
|
||||
sp_cleanup.make_private_fields_final=true
|
||||
sp_cleanup.make_type_abstract_if_missing_method=false
|
||||
sp_cleanup.make_variable_declarations_final=true
|
||||
sp_cleanup.never_use_blocks=false
|
||||
sp_cleanup.never_use_parentheses_in_expressions=true
|
||||
sp_cleanup.on_save_use_additional_actions=false
|
||||
sp_cleanup.organize_imports=true
|
||||
sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
|
||||
sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
|
||||
sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
|
||||
sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
|
||||
sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
|
||||
sp_cleanup.remove_private_constructors=true
|
||||
sp_cleanup.remove_trailing_whitespaces=false
|
||||
sp_cleanup.remove_trailing_whitespaces_all=true
|
||||
sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
|
||||
sp_cleanup.remove_unnecessary_casts=true
|
||||
sp_cleanup.remove_unnecessary_nls_tags=false
|
||||
sp_cleanup.remove_unused_imports=false
|
||||
sp_cleanup.remove_unused_local_variables=false
|
||||
sp_cleanup.remove_unused_private_fields=true
|
||||
sp_cleanup.remove_unused_private_members=false
|
||||
sp_cleanup.remove_unused_private_methods=true
|
||||
sp_cleanup.remove_unused_private_types=true
|
||||
sp_cleanup.sort_members=false
|
||||
sp_cleanup.sort_members_all=false
|
||||
sp_cleanup.use_blocks=false
|
||||
sp_cleanup.use_blocks_only_for_return_and_throw=false
|
||||
sp_cleanup.use_parentheses_in_expressions=false
|
||||
sp_cleanup.use_this_for_non_static_field_access=false
|
||||
sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
|
||||
sp_cleanup.use_this_for_non_static_method_access=false
|
||||
sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
|
||||
#Thu Mar 24 18:14:17 CET 2011
|
||||
cleanup_settings_version=2
|
||||
eclipse.preferences.version=1
|
||||
editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
|
||||
formatter_settings_version=11
|
||||
org.eclipse.jdt.ui.javadoc=false
|
||||
org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\n * @return the ${bare_field_name}\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${param} the ${bare_field_name} to set\n */</template><template autoinsert\="true" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * ${tags}\n */</template><template autoinsert\="true" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/**\n * \n */</template><template autoinsert\="true" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n * @author ${user}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n * \n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="true" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/* (non-Javadoc)\n * ${see_to_overridden}\n */</template><template autoinsert\="true" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${tags}\n * ${see_to_target}\n */</template><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\n</template><template autoinsert\="false" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">${exception_var}.printStackTrace();</template><template autoinsert\="false" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">${body_statement}</template><template autoinsert\="false" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates>
|
||||
sp_cleanup.add_default_serial_version_id=true
|
||||
sp_cleanup.add_generated_serial_version_id=false
|
||||
sp_cleanup.add_missing_annotations=true
|
||||
sp_cleanup.add_missing_deprecated_annotations=true
|
||||
sp_cleanup.add_missing_methods=false
|
||||
sp_cleanup.add_missing_nls_tags=false
|
||||
sp_cleanup.add_missing_override_annotations=true
|
||||
sp_cleanup.add_serial_version_id=false
|
||||
sp_cleanup.always_use_blocks=true
|
||||
sp_cleanup.always_use_parentheses_in_expressions=false
|
||||
sp_cleanup.always_use_this_for_non_static_field_access=false
|
||||
sp_cleanup.always_use_this_for_non_static_method_access=false
|
||||
sp_cleanup.convert_to_enhanced_for_loop=false
|
||||
sp_cleanup.correct_indentation=false
|
||||
sp_cleanup.format_source_code=true
|
||||
sp_cleanup.format_source_code_changes_only=false
|
||||
sp_cleanup.make_local_variable_final=false
|
||||
sp_cleanup.make_parameters_final=false
|
||||
sp_cleanup.make_private_fields_final=true
|
||||
sp_cleanup.make_type_abstract_if_missing_method=false
|
||||
sp_cleanup.make_variable_declarations_final=true
|
||||
sp_cleanup.never_use_blocks=false
|
||||
sp_cleanup.never_use_parentheses_in_expressions=true
|
||||
sp_cleanup.on_save_use_additional_actions=false
|
||||
sp_cleanup.organize_imports=true
|
||||
sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
|
||||
sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
|
||||
sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
|
||||
sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
|
||||
sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
|
||||
sp_cleanup.remove_private_constructors=true
|
||||
sp_cleanup.remove_trailing_whitespaces=false
|
||||
sp_cleanup.remove_trailing_whitespaces_all=true
|
||||
sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
|
||||
sp_cleanup.remove_unnecessary_casts=true
|
||||
sp_cleanup.remove_unnecessary_nls_tags=false
|
||||
sp_cleanup.remove_unused_imports=false
|
||||
sp_cleanup.remove_unused_local_variables=false
|
||||
sp_cleanup.remove_unused_private_fields=true
|
||||
sp_cleanup.remove_unused_private_members=false
|
||||
sp_cleanup.remove_unused_private_methods=true
|
||||
sp_cleanup.remove_unused_private_types=true
|
||||
sp_cleanup.sort_members=false
|
||||
sp_cleanup.sort_members_all=false
|
||||
sp_cleanup.use_blocks=false
|
||||
sp_cleanup.use_blocks_only_for_return_and_throw=false
|
||||
sp_cleanup.use_parentheses_in_expressions=false
|
||||
sp_cleanup.use_this_for_non_static_field_access=false
|
||||
sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
|
||||
sp_cleanup.use_this_for_non_static_method_access=false
|
||||
sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
|
||||
|
@ -60,8 +60,6 @@ import org.appwork.utils.singleapp.SingleAppInstance;
|
||||
import org.jdownloader.gui.uiserio.JDSwingUserIO;
|
||||
import org.jdownloader.gui.uiserio.NewUIO;
|
||||
import org.jdownloader.images.NewTheme;
|
||||
import org.jdownloader.plugins.controller.crawler.CrawlerPluginController;
|
||||
import org.jdownloader.plugins.controller.host.HostPluginController;
|
||||
import org.jdownloader.translate._JDT;
|
||||
import org.jdownloader.update.JDUpdater;
|
||||
|
||||
@ -444,8 +442,6 @@ public class Main {
|
||||
return null;
|
||||
}
|
||||
}.waitForEDT();
|
||||
CrawlerPluginController.getInstance().init();
|
||||
HostPluginController.getInstance().init();
|
||||
|
||||
init.initPlugins();
|
||||
|
||||
|
@ -33,6 +33,8 @@ import jd.nutils.JDFlags;
|
||||
import jd.plugins.Plugin;
|
||||
import jd.utils.JDUtilities;
|
||||
|
||||
import org.jdownloader.plugins.controller.LazyPlugin;
|
||||
|
||||
/**
|
||||
* A Container for {@link Plugin Plugins}. Plugins usually do not get
|
||||
* instantiated after program start. {@link JDInit#initPlugins()} reads all
|
||||
@ -73,17 +75,17 @@ public abstract class PluginWrapper implements Comparable<PluginWrapper> {
|
||||
* The Regular expression pattern. This pattern defines which urls can be
|
||||
* handeled by this plugin
|
||||
*/
|
||||
private final Pattern pattern;
|
||||
private Pattern pattern;
|
||||
|
||||
/**
|
||||
* The domain of this plugin, which is the plugin's name, too
|
||||
*/
|
||||
private final String host;
|
||||
private String host;
|
||||
|
||||
/**
|
||||
* Full qualified classname
|
||||
*/
|
||||
private final String className;
|
||||
private String className;
|
||||
|
||||
/**
|
||||
* internal logger instance
|
||||
@ -105,9 +107,11 @@ public abstract class PluginWrapper implements Comparable<PluginWrapper> {
|
||||
* {@link PluginWrapper#DEBUG_ONLY} <br> {@link PluginWrapper#LOAD_ON_INIT} <br>
|
||||
* {@link PluginWrapper#PATTERN_ACCEPTS_INVALID_URI}
|
||||
*/
|
||||
private final int flags;
|
||||
private int flags;
|
||||
|
||||
private final long revision;
|
||||
private long revision;
|
||||
|
||||
private transient LazyPlugin lazy;
|
||||
|
||||
/**
|
||||
* Static classloader. gets created when the first plugin should be
|
||||
@ -141,6 +145,14 @@ public abstract class PluginWrapper implements Comparable<PluginWrapper> {
|
||||
* @param revision
|
||||
* String that contains the revision of the plugin
|
||||
*/
|
||||
public PluginWrapper(final LazyPlugin<?> lazy) {
|
||||
this.lazy = lazy;
|
||||
}
|
||||
|
||||
public LazyPlugin getLazy() {
|
||||
return lazy;
|
||||
}
|
||||
|
||||
public PluginWrapper(final String host, final String classNamePrefix, final String className, final String pattern, final int flags, final String revision) {
|
||||
this.pattern = (pattern != null) ? Pattern.compile(pattern, Pattern.CASE_INSENSITIVE) : null;
|
||||
this.host = host.toLowerCase(Locale.ENGLISH);
|
||||
@ -168,6 +180,9 @@ public abstract class PluginWrapper implements Comparable<PluginWrapper> {
|
||||
}
|
||||
}
|
||||
|
||||
public PluginWrapper() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Should always return lifetime id. This means that this id never changes!
|
||||
* It is used as config key to save settings
|
||||
|
@ -1,64 +1,140 @@
|
||||
package jd;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStreamReader;
|
||||
import java.io.OutputStreamWriter;
|
||||
import java.net.URL;
|
||||
import java.net.URLConnection;
|
||||
|
||||
import jd.http.Browser;
|
||||
import jd.nutils.encoding.Encoding;
|
||||
|
||||
public class Tester {
|
||||
|
||||
public static void main(String[] args) throws Throwable {
|
||||
Browser br = new Browser();
|
||||
br.setDebug(true);
|
||||
System.out.println(Encoding.htmlDecode("14300921004cb82f694cbed%0D%0A"));
|
||||
}
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
private static String runCommand(final String serviceType, final String controlUrl, final String command) throws IOException {
|
||||
String data = "<?xml version='1.0' encoding='utf-8'?> <s:Envelope s:encodingStyle='http://schemas.xmlsoap.org/soap/encoding/' xmlns:s='http://schemas.xmlsoap.org/soap/envelope/'> <s:Body> <u:" + command + " xmlns:u='" + serviceType + "' /> </s:Body> </s:Envelope>";
|
||||
// this works for fritz box.
|
||||
// old code did NOT work:
|
||||
|
||||
// data =
|
||||
// "<?xml version=\"1.0\"?>\n<s:Envelope xmlns:s=\"http://schemas.xmlsoap.org/soap/envelope/\" s:encodingStyle=\"http://schemas.xmlsoap.org/soap/encoding/\">\n <s:Body>\n<m:"
|
||||
// + command + " xmlns:m=\"" + serviceType + "\"></m:" + command + ">\n"
|
||||
// + " </s:Body>\n" + "</s:Envelope>";
|
||||
|
||||
final URL url = new URL(controlUrl);
|
||||
final URLConnection conn = url.openConnection();
|
||||
conn.setDoOutput(true);
|
||||
conn.addRequestProperty("Content-Type", "text/xml; charset=\"utf-8\"");
|
||||
conn.addRequestProperty("SOAPAction", serviceType + "#" + command);
|
||||
// conn.addRequestProperty("SOAPAction", serviceType + "#" + command +
|
||||
// "\"");
|
||||
OutputStreamWriter wr = null;
|
||||
BufferedReader rd = null;
|
||||
try {
|
||||
wr = new OutputStreamWriter(conn.getOutputStream());
|
||||
wr.write(data);
|
||||
wr.flush();
|
||||
rd = new BufferedReader(new InputStreamReader(conn.getInputStream()));
|
||||
String xmlstr = "";
|
||||
String nextln;
|
||||
while ((nextln = rd.readLine()) != null) {
|
||||
xmlstr += nextln.trim();
|
||||
}
|
||||
return xmlstr;
|
||||
|
||||
} finally {
|
||||
if (wr != null) {
|
||||
wr.close();
|
||||
}
|
||||
if (rd != null) {
|
||||
rd.close();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
package jd;
|
||||
|
||||
/*
|
||||
* Copyright (c) 1995, 2008, Oracle and/or its affiliates. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* - Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
*
|
||||
* - Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* - Neither the name of Oracle or the names of its
|
||||
* contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
|
||||
* IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
||||
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.security.InvalidKeyException;
|
||||
import java.security.NoSuchAlgorithmException;
|
||||
import java.util.ArrayList;
|
||||
|
||||
import javax.crypto.BadPaddingException;
|
||||
import javax.crypto.Cipher;
|
||||
import javax.crypto.IllegalBlockSizeException;
|
||||
import javax.crypto.NoSuchPaddingException;
|
||||
import javax.crypto.spec.SecretKeySpec;
|
||||
import javax.swing.JPanel;
|
||||
|
||||
import jd.http.Browser;
|
||||
import jd.nutils.encoding.Base64;
|
||||
import jd.nutils.encoding.Encoding;
|
||||
import jd.parser.Regex;
|
||||
|
||||
public class Tester extends JPanel {
|
||||
|
||||
public static String loginAPI(Browser br) throws IOException, InvalidKeyException, IllegalBlockSizeException, BadPaddingException, NoSuchAlgorithmException, NoSuchPaddingException {
|
||||
if (br == null) br = new Browser();
|
||||
try {
|
||||
br.getHeaders().put("User-Agent", "Mozilla/4.0 (compatible; MSIE 6.0; MS Web Services Client Protocol 2.0.50727.4952)");
|
||||
br.getHeaders().put("SOAPAction", "\"urn:FileserveAPIWebServiceAction\"");
|
||||
br.postPage("http://api.fileserve.com/api/fileserveAPIServer.php", "<?xml version=\"1.0\" encoding=\"utf-8\"?><soap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:soapenc=\"http://schemas.xmlsoap.org/soap/encoding/\" xmlns:tns=\"urn:FileserveAPI\" xmlns:types=\"urn:FileserveAPI/encodedTypes\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\"><soap:Body soap:encodingStyle=\"http://schemas.xmlsoap.org/soap/encoding/\"><tns:login><username xsi:type=\"xsd:string\">JDAffiliate</username><password xsi:type=\"xsd:string\">2xDKKb6585</password></tns:login></soap:Body></soap:Envelope>");
|
||||
} finally {
|
||||
br.getHeaders().remove("SOAPAction");
|
||||
}
|
||||
String loginResp = br.getRegex("<loginReturn.*?>(.*?)</loginReturn").getMatch(0);
|
||||
loginResp = decrypt(loginResp);
|
||||
String cookie = new Regex(loginResp, "cookie_str=.*?cookie=(.+)(;| |$)").getMatch(0);
|
||||
br.setCookie("http://fileserve.com", "cookie", cookie);
|
||||
return loginResp;
|
||||
}
|
||||
|
||||
public static String decrypt(String string) throws UnsupportedEncodingException, IllegalBlockSizeException, BadPaddingException, NoSuchAlgorithmException, NoSuchPaddingException, InvalidKeyException {
|
||||
if (string == null) return null;
|
||||
byte[] decoded = Base64.decode(string);
|
||||
final byte[] key = Encoding.Base64Decode("L3hpTDJGaFNPVVlnc2FUdg==").getBytes();
|
||||
SecretKeySpec skeySpec = new SecretKeySpec(key, "AES");
|
||||
Cipher c = Cipher.getInstance("AES/ECB/NoPadding");
|
||||
c.init(Cipher.DECRYPT_MODE, skeySpec);
|
||||
return new String(c.doFinal(decoded));
|
||||
}
|
||||
|
||||
public static void main(String[] args) throws IOException, InterruptedException, NoSuchAlgorithmException, NoSuchPaddingException, InvalidKeyException, IllegalBlockSizeException, BadPaddingException {
|
||||
Object test1[] = new Object[2000000];
|
||||
ArrayList<Object> test2 = new ArrayList<Object>();
|
||||
for (int i = 0; i < 2000000; i++) {
|
||||
test2.add(null);
|
||||
}
|
||||
|
||||
long a = System.currentTimeMillis();
|
||||
for (int o = 0; o < 100000; o++) {
|
||||
for (int i = 0; i < 2000000; i++) {
|
||||
Object kk = test1[i];
|
||||
}
|
||||
}
|
||||
System.out.println(System.currentTimeMillis() - a);
|
||||
|
||||
a = System.currentTimeMillis();
|
||||
for (int o = 0; o < 100000; o++) {
|
||||
for (int i = 0; i < 2000000; i++) {
|
||||
Object kk = test2.get(i);
|
||||
}
|
||||
}
|
||||
System.out.println(System.currentTimeMillis() - a);
|
||||
System.out.println(new Browser().getPage("https://www.1fichier.com/en/login.pl"));
|
||||
// String login = loginAPI(br);
|
||||
// String jj =
|
||||
// decrypt("0J5fKHNZ2NV5dULQ4BQwAnr7SiYmQDaRYYMK7CXKXGReo9G4NrVoAf6oi0s2DUd7DLif4sGAu+5HdAfVF82mUWrKnVzTsd0q/yJwRPxNVZzBGzAmEPc2eQwzpg2iQAsdn94OZa6oOZiZ16BIJ6X7x5yGwvMsS5iJzG3md0LcfDTOE999xVY7X4UQCaiQelrVDVXIrRxbveVnDwdJ68qO++5gIrSV/J+QNXmAzitc17/7GIJsaIMa+uV9nPoIe0NWJfGL/0dkrDj/YxLaCBm5ODqSjKQwVKjIw1ecBOETPdlGZFczVW6sa3buo7AC6FnyzGT7Sh+EY5afFCad/KSDam/90A17imMJLv4SzftoBwik3yIWtYev3OVYOdyrTKGfrf9C8DCqvs/x6rYxfRqbpg==");
|
||||
// ArrayList<JACMethod> dd = JACMethod.parseJACInfo(new
|
||||
// File("/home/daniel/test"));
|
||||
// int oo = 2;
|
||||
// Browser br = new Browser();
|
||||
// Logger log = Logger.getLogger("bla");
|
||||
// log.setLevel(Level.ALL);
|
||||
// ConsoleHandler c;
|
||||
// log.addHandler(c = new ConsoleHandler());
|
||||
// c.setLevel(Level.ALL);
|
||||
// br.setVerbose(true);
|
||||
// br.setLogger(log);
|
||||
// br.getPage("http://update3.jdownloader.org/advert/getLanguage.php?r=bla");
|
||||
// br.getPage("http://update3.jdownloader.org/advert/getLanguage.php?r=bla");
|
||||
|
||||
}
|
||||
|
||||
public static String[][] getGrid(String data, String deliminator) {
|
||||
String[] lines = getLines(data);
|
||||
String[][] ret = new String[lines.length][];
|
||||
for (int i = 0; i < ret.length; i++) {
|
||||
ret[i] = lines[i].split(deliminator, -1);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* Splits multiple rows to a String array. Row Deliminator is "\r\n"
|
||||
*
|
||||
* @param data
|
||||
* @return
|
||||
*/
|
||||
public static String[] getLines(String data) {
|
||||
return data.split("[\r\n]+");
|
||||
}
|
||||
}
|
||||
|
@ -21,13 +21,10 @@ import java.util.ArrayList;
|
||||
import jd.CPluginWrapper;
|
||||
import jd.controlling.linkcrawler.CrawledLink;
|
||||
import jd.controlling.linkcrawler.LinkCrawler;
|
||||
import jd.nutils.encoding.Encoding;
|
||||
import jd.parser.html.HTMLParser;
|
||||
import jd.plugins.DownloadLink;
|
||||
|
||||
import org.appwork.utils.Regex;
|
||||
import org.jdownloader.plugins.controller.crawler.CrawlerPluginController;
|
||||
import org.jdownloader.plugins.controller.host.HostPluginController;
|
||||
|
||||
/**
|
||||
* Diese Klasse läuft in einem Thread und verteilt den Inhalt der Zwischenablage
|
||||
@ -80,24 +77,7 @@ public class DistributeData extends Thread {
|
||||
|
||||
@Deprecated
|
||||
public static boolean hasPluginFor(final String tmp, final boolean filterNormalHTTP) {
|
||||
|
||||
String data = tmp;
|
||||
data = data.replaceAll("jd://", "http://");
|
||||
|
||||
if (CrawlerPluginController.getInstance().canHandle(data)) return true;
|
||||
|
||||
if (HostPluginController.getInstance().canHandle(data)) return true;
|
||||
data = Encoding.urlDecode(data, true);
|
||||
if (CrawlerPluginController.getInstance().canHandle(data)) return true;
|
||||
if (HostPluginController.getInstance().canHandle(data)) return true;
|
||||
if (!filterNormalHTTP) {
|
||||
data = data.replaceAll("http://", "httpviajd://");
|
||||
data = data.replaceAll("https://", "httpsviajd://");
|
||||
if (CrawlerPluginController.getInstance().canHandle(data)) return true;
|
||||
if (HostPluginController.getInstance().canHandle(data)) return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
|
@ -33,6 +33,7 @@ import jd.plugins.PluginForHost;
|
||||
|
||||
import org.appwork.utils.event.Eventsender;
|
||||
import org.jdownloader.plugins.controller.host.HostPluginController;
|
||||
import org.jdownloader.plugins.controller.host.LazyHostPlugin;
|
||||
import org.jdownloader.translate._JDT;
|
||||
|
||||
class LinkCheckBroadcaster extends Eventsender<LinkCheckListener, LinkCheckEvent> {
|
||||
@ -142,7 +143,8 @@ public class LinkCheck implements ActionListener, ProgressControllerListener {
|
||||
private void checkHosterList(ArrayList<DownloadLink> hosterList) {
|
||||
if (hosterList.size() != 0) {
|
||||
DownloadLink link = hosterList.get(0);
|
||||
PluginForHost plg = HostPluginController.getInstance().newInstance(link.getDefaultPlugin().getClass());
|
||||
LazyHostPlugin lazyp = HostPluginController.getInstance().get(link.getHost());
|
||||
PluginForHost plg = lazyp.newInstance();
|
||||
plg.setBrowser(new Browser());
|
||||
plg.init();
|
||||
try {
|
||||
|
@ -52,6 +52,7 @@ import org.appwork.utils.Regex;
|
||||
import org.appwork.utils.net.httpconnection.HTTPProxy;
|
||||
import org.jdownloader.images.NewTheme;
|
||||
import org.jdownloader.plugins.controller.host.HostPluginController;
|
||||
import org.jdownloader.plugins.controller.host.LazyHostPlugin;
|
||||
import org.jdownloader.settings.GeneralSettings;
|
||||
import org.jdownloader.settings.IfFileExistsAction;
|
||||
import org.jdownloader.translate._JDT;
|
||||
@ -687,7 +688,8 @@ public class SingleDownloadController extends BrowserSettingsThread implements S
|
||||
* we are going to download this link, create new liveplugin
|
||||
* instance here
|
||||
*/
|
||||
downloadLink.setLivePlugin(HostPluginController.getInstance().newInstance(downloadLink.getDefaultPlugin().getClass()));
|
||||
LazyHostPlugin lazyp = HostPluginController.getInstance().get(downloadLink.getDefaultPlugin().getHost());
|
||||
downloadLink.setLivePlugin(lazyp.newInstance());
|
||||
currentPlugin = downloadLink.getLivePlugin();
|
||||
currentPlugin.setIOPermission(ioP);
|
||||
currentPlugin.setLogger(logger = new JDPluginLogger(downloadLink.getHost() + ":" + downloadLink.getName()));
|
||||
|
@ -20,6 +20,7 @@ import jd.plugins.PluginForHost;
|
||||
import org.appwork.storage.config.JsonConfig;
|
||||
import org.appwork.utils.logging.Log;
|
||||
import org.jdownloader.plugins.controller.host.HostPluginController;
|
||||
import org.jdownloader.plugins.controller.host.LazyHostPlugin;
|
||||
|
||||
public class LinkChecker<E extends CheckableLink> {
|
||||
|
||||
@ -231,7 +232,8 @@ public class LinkChecker<E extends CheckableLink> {
|
||||
/* now we check the links */
|
||||
if (plg == null) {
|
||||
/* create plugin if not done yet */
|
||||
plg = HostPluginController.getInstance().newInstance(linksList[0].getDefaultPlugin().getClass());
|
||||
LazyHostPlugin lazyp = HostPluginController.getInstance().get(linksList[0].getDefaultPlugin().getHost());
|
||||
plg = lazyp.newInstance();
|
||||
plg.setBrowser(br);
|
||||
plg.init();
|
||||
}
|
||||
|
@ -537,7 +537,8 @@ public class LinkCrawler implements IOPermission {
|
||||
}
|
||||
if (cryptedLink == null || cryptedLink.getdPlugin() == null || cryptedLink.getCryptedLink() == null) return;
|
||||
/* we have to create new plugin instance here */
|
||||
PluginForDecrypt plg = CrawlerPluginController.getInstance().newInstance(cryptedLink.getdPlugin().getClass());
|
||||
LazyCrawlerPlugin lazyC = CrawlerPluginController.getInstance().get(cryptedLink.getdPlugin().getHost());
|
||||
PluginForDecrypt plg = lazyC.newInstance();
|
||||
plg.setIOPermission(this);
|
||||
plg.setBrowser(new Browser());
|
||||
/* now we run the plugin and let it find some links */
|
||||
|
@ -37,7 +37,6 @@ import jd.gui.UserIO;
|
||||
import jd.gui.swing.jdgui.views.settings.panels.accountmanager.BuyAction;
|
||||
import jd.plugins.Account;
|
||||
import jd.plugins.PluginForHost;
|
||||
import jd.plugins.hoster.FileSonicCom;
|
||||
import net.miginfocom.swing.MigLayout;
|
||||
|
||||
import org.appwork.swing.components.searchcombo.SearchComboBox;
|
||||
@ -184,7 +183,7 @@ public class AddAccountDialog extends AbstractDialog<Integer> {
|
||||
|
||||
@Override
|
||||
public JComponent layoutDialogContent() {
|
||||
final ArrayList<LazyHostPlugin> plugins = HostPluginController.getInstance().list();
|
||||
final ArrayList<LazyHostPlugin> plugins = new ArrayList<LazyHostPlugin>(HostPluginController.getInstance().list());
|
||||
Collections.sort(plugins, new Comparator<LazyHostPlugin>() {
|
||||
public int compare(final LazyHostPlugin a, final LazyHostPlugin b) {
|
||||
return a.getDisplayName().compareToIgnoreCase(b.getDisplayName());
|
||||
@ -210,11 +209,12 @@ public class AddAccountDialog extends AbstractDialog<Integer> {
|
||||
|
||||
if (this.plugin != null) {
|
||||
try {
|
||||
this.hoster.setSelectedItem(HostPluginController.getInstance().newInstance(plugin.getClass()));
|
||||
LazyHostPlugin lazyp = HostPluginController.getInstance().get(plugin.getHost());
|
||||
if (lazyp != null) this.hoster.setSelectedItem(lazyp);
|
||||
} catch (final Exception e) {
|
||||
}
|
||||
} else {
|
||||
LazyHostPlugin plg = HostPluginController.getInstance().get(FileSonicCom.class);
|
||||
LazyHostPlugin plg = HostPluginController.getInstance().get("filesonic.com");
|
||||
if (plg != null) {
|
||||
try {
|
||||
hoster.setSelectedItem(plg);
|
||||
|
@ -13,7 +13,6 @@ import javax.swing.JComboBox;
|
||||
|
||||
import jd.controlling.IOEQ;
|
||||
import jd.plugins.Account;
|
||||
import jd.plugins.hoster.FileSonicCom;
|
||||
|
||||
import org.appwork.swing.components.searchcombo.SearchComboBox;
|
||||
import org.appwork.utils.os.CrossSystem;
|
||||
@ -54,7 +53,7 @@ public class BuyAction extends AbstractAction {
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
IOEQ.add(new Runnable() {
|
||||
public void run() {
|
||||
final ArrayList<LazyHostPlugin> plugins = HostPluginController.getInstance().list();
|
||||
final ArrayList<LazyHostPlugin> plugins = new ArrayList<LazyHostPlugin>(HostPluginController.getInstance().list());
|
||||
Collections.sort(plugins, new Comparator<LazyHostPlugin>() {
|
||||
public int compare(final LazyHostPlugin a, final LazyHostPlugin b) {
|
||||
return a.getDisplayName().compareToIgnoreCase(b.getDisplayName());
|
||||
@ -76,7 +75,7 @@ public class BuyAction extends AbstractAction {
|
||||
}
|
||||
}
|
||||
if (plg == null) {
|
||||
plg = HostPluginController.getInstance().get(FileSonicCom.class);
|
||||
plg = HostPluginController.getInstance().get("filesonic.com");
|
||||
}
|
||||
final LazyHostPlugin defaultSelection = plg;
|
||||
try {
|
||||
|
@ -2,6 +2,7 @@ package jd.gui.swing.jdgui.views.settings.panels.accountmanager;
|
||||
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import javax.swing.AbstractAction;
|
||||
|
||||
@ -40,7 +41,7 @@ public class RefreshAction extends AbstractAction {
|
||||
public void run() {
|
||||
if (selection == null) {
|
||||
selection = new ArrayList<Account>();
|
||||
final ArrayList<LazyHostPlugin> plugins = HostPluginController.getInstance().list();
|
||||
final List<LazyHostPlugin> plugins = HostPluginController.getInstance().list();
|
||||
for (LazyHostPlugin plugin : plugins) {
|
||||
ArrayList<Account> accs = AccountController.getInstance().getAllAccounts(plugin.getDisplayName());
|
||||
if (accs != null) {
|
||||
|
@ -51,6 +51,7 @@ import org.appwork.utils.os.CrossSystem;
|
||||
import org.jdownloader.DomainInfo;
|
||||
import org.jdownloader.images.NewTheme;
|
||||
import org.jdownloader.plugins.controller.host.HostPluginController;
|
||||
import org.jdownloader.plugins.controller.host.LazyHostPlugin;
|
||||
import org.jdownloader.settings.GeneralSettings;
|
||||
|
||||
/**
|
||||
@ -62,7 +63,10 @@ import org.jdownloader.settings.GeneralSettings;
|
||||
public class DownloadLink extends Property implements Serializable, Comparable<DownloadLink>, AbstractPackageChildrenNode<FilePackage>, CheckableLink {
|
||||
|
||||
public static enum AvailableStatus {
|
||||
UNCHECKED, FALSE, UNCHECKABLE, TRUE;
|
||||
UNCHECKED,
|
||||
FALSE,
|
||||
UNCHECKABLE,
|
||||
TRUE;
|
||||
}
|
||||
|
||||
public static final int LINKTYPE_CONTAINER = 1;
|
||||
@ -588,7 +592,8 @@ public class DownloadLink extends Property implements Serializable, Comparable<D
|
||||
PluginForHost plg = plgToUse;
|
||||
/* we need extra plugin instance and browser instance too here */
|
||||
if (plg == null) {
|
||||
plg = HostPluginController.getInstance().newInstance(getDefaultPlugin().getClass());
|
||||
LazyHostPlugin lazyp = HostPluginController.getInstance().get(getHost());
|
||||
plg = lazyp.newInstance();
|
||||
}
|
||||
if (plg.getBrowser() == null) {
|
||||
plg.setBrowser(new Browser());
|
||||
@ -671,7 +676,8 @@ public class DownloadLink extends Property implements Serializable, Comparable<D
|
||||
finalFileName = null;
|
||||
PluginForHost plg = liveplugin;
|
||||
if (plg == null) {
|
||||
plg = HostPluginController.getInstance().newInstance(defaultplugin.getClass());
|
||||
LazyHostPlugin lazyp = HostPluginController.getInstance().get(getHost());
|
||||
plg = lazyp.newInstance();
|
||||
}
|
||||
if (plg.getBrowser() == null) {
|
||||
plg.setBrowser(new Browser());
|
||||
|
@ -142,8 +142,6 @@ public abstract class Plugin implements ActionListener {
|
||||
|
||||
protected ConfigContainer config;
|
||||
|
||||
protected PluginWrapper wrapper;
|
||||
|
||||
protected Browser br = null;
|
||||
/**
|
||||
* returns the init time of this plugin. this can be used, for example to
|
||||
@ -169,39 +167,14 @@ public abstract class Plugin implements ActionListener {
|
||||
}
|
||||
|
||||
public Plugin() {
|
||||
this.wrapper = null;
|
||||
initTime = System.currentTimeMillis();
|
||||
|
||||
this.config = new ConfigContainer(this.getHost()) {
|
||||
private static final long serialVersionUID = -30947319320765343L;
|
||||
|
||||
/**
|
||||
* we dont have to catch icon until it is really needed
|
||||
*/
|
||||
@Override
|
||||
public ImageIcon getIcon() {
|
||||
return NewTheme.I().getIcon("warning", 16);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public Plugin(final PluginWrapper wrapper) {
|
||||
this.wrapper = wrapper;
|
||||
initTime = System.currentTimeMillis();
|
||||
|
||||
this.config = new ConfigContainer(this.getHost()) {
|
||||
private static final long serialVersionUID = -30947319320765343L;
|
||||
|
||||
/**
|
||||
* we dont have to catch icon until it is really needed
|
||||
*/
|
||||
@Override
|
||||
public ImageIcon getIcon() {
|
||||
return NewTheme.I().getIcon("warning", 16);
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
public void actionPerformed(final ActionEvent e) {
|
||||
@ -269,7 +242,27 @@ public abstract class Plugin implements ActionListener {
|
||||
* @return gibt die aktuelle Configuration Instanz zurück
|
||||
*/
|
||||
public ConfigContainer getConfig() {
|
||||
return this.config;
|
||||
if (this.config != null) return config;
|
||||
synchronized (this) {
|
||||
if (this.config != null) return config;
|
||||
this.config = new ConfigContainer(null) {
|
||||
private static final long serialVersionUID = -30947319320765343L;
|
||||
|
||||
/**
|
||||
* we dont have to catch icon until it is really needed
|
||||
*/
|
||||
@Override
|
||||
public ImageIcon getIcon() {
|
||||
return NewTheme.I().getIcon("warning", 16);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTitle() {
|
||||
return getHost();
|
||||
}
|
||||
};
|
||||
}
|
||||
return config;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -277,9 +270,7 @@ public abstract class Plugin implements ActionListener {
|
||||
*
|
||||
* @return Der unterstützte Anbieter
|
||||
*/
|
||||
public String getHost() {
|
||||
return this.wrapper.getHost();
|
||||
}
|
||||
public abstract String getHost();
|
||||
|
||||
protected File getLocalCaptchaFile() {
|
||||
return this.getLocalCaptchaFile(".jpg");
|
||||
@ -310,18 +301,7 @@ public abstract class Plugin implements ActionListener {
|
||||
*
|
||||
* @return internes property objekt
|
||||
*/
|
||||
public SubConfiguration getPluginConfig() {
|
||||
return SubConfiguration.getConfig(this.wrapper.getConfigName());
|
||||
}
|
||||
|
||||
/**
|
||||
* Liefert eine einmalige ID des Plugins zurück
|
||||
*
|
||||
* @return Plugin ID
|
||||
*/
|
||||
public String getPluginID() {
|
||||
return this.getHost() + "-" + this.getVersion();
|
||||
}
|
||||
public abstract SubConfiguration getPluginConfig();
|
||||
|
||||
/**
|
||||
* Ein regulärer Ausdruck, der anzeigt, welche Links von diesem Plugin
|
||||
@ -330,9 +310,7 @@ public abstract class Plugin implements ActionListener {
|
||||
* @return Ein regulärer Ausdruck
|
||||
* @see Pattern
|
||||
*/
|
||||
public Pattern getSupportedLinks() {
|
||||
return this.wrapper.getPattern();
|
||||
}
|
||||
public abstract Pattern getSupportedLinks();
|
||||
|
||||
/**
|
||||
* Liefert die Versionsbezeichnung dieses Plugins zurück
|
||||
@ -345,10 +323,6 @@ public abstract class Plugin implements ActionListener {
|
||||
return Formatter.getRevision(revision);
|
||||
}
|
||||
|
||||
public PluginWrapper getWrapper() {
|
||||
return this.wrapper;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initialisiert das Plugin vor dem ersten Gebrauch
|
||||
*/
|
||||
|
@ -23,9 +23,9 @@ import java.util.ArrayList;
|
||||
import java.util.logging.Level;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import jd.DecryptPluginWrapper;
|
||||
import jd.PluginWrapper;
|
||||
import jd.captcha.easy.load.LoadImage;
|
||||
import jd.config.SubConfiguration;
|
||||
import jd.controlling.IOPermission;
|
||||
import jd.controlling.JDLogger;
|
||||
import jd.controlling.JDPluginLogger;
|
||||
@ -38,9 +38,8 @@ import jd.http.Browser;
|
||||
import jd.nutils.Formatter;
|
||||
import jd.nutils.encoding.Encoding;
|
||||
|
||||
import org.appwork.exceptions.WTFException;
|
||||
import org.appwork.utils.Regex;
|
||||
import org.jdownloader.plugins.controller.crawler.CrawlerPluginController;
|
||||
import org.jdownloader.plugins.controller.crawler.LazyCrawlerPlugin;
|
||||
import org.jdownloader.translate._JDT;
|
||||
|
||||
/**
|
||||
@ -52,9 +51,8 @@ public abstract class PluginForDecrypt extends Plugin {
|
||||
|
||||
private IOPermission ioPermission = null;
|
||||
private LinkCrawlerDistributer distributer = null;
|
||||
private long revision;
|
||||
private String host;
|
||||
private Pattern pattern;
|
||||
|
||||
private LazyCrawlerPlugin lazyC = null;
|
||||
|
||||
/**
|
||||
* @return the distributer
|
||||
@ -63,6 +61,11 @@ public abstract class PluginForDecrypt extends Plugin {
|
||||
return distributer;
|
||||
}
|
||||
|
||||
@Override
|
||||
public SubConfiguration getPluginConfig() {
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param distributer
|
||||
* the distributer to set
|
||||
@ -87,47 +90,29 @@ public abstract class PluginForDecrypt extends Plugin {
|
||||
}
|
||||
|
||||
public PluginForDecrypt() {
|
||||
super();
|
||||
|
||||
initD();
|
||||
|
||||
}
|
||||
|
||||
private void initD() {
|
||||
logger = new JDPluginLogger(getClass().getSimpleName() + System.currentTimeMillis());
|
||||
revision = Formatter.getRevision(getClass().getAnnotation(DecrypterPlugin.class).revision());
|
||||
host = CrawlerPluginController.getInstance().get(getClass()).getDisplayName();
|
||||
pattern = CrawlerPluginController.getInstance().get(getClass()).getPattern();
|
||||
}
|
||||
|
||||
public Pattern getSupportedLinks() {
|
||||
return pattern;
|
||||
return lazyC.getPattern();
|
||||
}
|
||||
|
||||
public String getHost() {
|
||||
return host;
|
||||
return lazyC.getDisplayName();
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public PluginForDecrypt(PluginWrapper wrapper) {
|
||||
super(wrapper);
|
||||
initD();
|
||||
|
||||
this.lazyC = (LazyCrawlerPlugin) wrapper.getLazy();
|
||||
}
|
||||
|
||||
public void setBrowser(Browser br) {
|
||||
this.br = br;
|
||||
}
|
||||
|
||||
@Override
|
||||
public DecryptPluginWrapper getWrapper() {
|
||||
throw new WTFException();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getVersion() {
|
||||
return revision;
|
||||
return 0;
|
||||
}
|
||||
|
||||
public void sleep(long i, CryptedLink link) throws InterruptedException {
|
||||
@ -395,4 +380,19 @@ public abstract class PluginForDecrypt extends Plugin {
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param lazyC
|
||||
* the lazyC to set
|
||||
*/
|
||||
public void setLazyC(LazyCrawlerPlugin lazyC) {
|
||||
this.lazyC = lazyC;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the lazyC
|
||||
*/
|
||||
public LazyCrawlerPlugin getLazyC() {
|
||||
return lazyC;
|
||||
}
|
||||
|
||||
}
|
@ -28,7 +28,6 @@ import java.util.regex.Pattern;
|
||||
import javax.imageio.ImageIO;
|
||||
import javax.swing.ImageIcon;
|
||||
|
||||
import jd.HostPluginWrapper;
|
||||
import jd.PluginWrapper;
|
||||
import jd.config.SubConfiguration;
|
||||
import jd.controlling.AccountController;
|
||||
@ -48,13 +47,12 @@ import jd.nutils.encoding.Encoding;
|
||||
import jd.plugins.DownloadLink.AvailableStatus;
|
||||
import jd.plugins.download.DownloadInterface;
|
||||
|
||||
import org.appwork.exceptions.WTFException;
|
||||
import org.appwork.storage.config.JsonConfig;
|
||||
import org.appwork.utils.Regex;
|
||||
import org.appwork.utils.os.CrossSystem;
|
||||
import org.jdownloader.DomainInfo;
|
||||
import org.jdownloader.gui.translate._GUI;
|
||||
import org.jdownloader.plugins.controller.host.HostPluginController;
|
||||
import org.jdownloader.plugins.controller.host.LazyHostPlugin;
|
||||
import org.jdownloader.settings.GeneralSettings;
|
||||
import org.jdownloader.translate._JDT;
|
||||
|
||||
@ -66,13 +64,17 @@ import org.jdownloader.translate._JDT;
|
||||
*/
|
||||
public abstract class PluginForHost extends Plugin {
|
||||
|
||||
private IOPermission ioPermission = null;
|
||||
private IOPermission ioPermission = null;
|
||||
|
||||
private String host;
|
||||
private LazyHostPlugin lazyP = null;
|
||||
|
||||
private Pattern pattern;
|
||||
public LazyHostPlugin getLazyP() {
|
||||
return lazyP;
|
||||
}
|
||||
|
||||
private long revision;
|
||||
public void setLazyP(LazyHostPlugin lazyP) {
|
||||
this.lazyP = lazyP;
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public PluginForHost(final PluginWrapper wrapper) {
|
||||
@ -81,17 +83,8 @@ public abstract class PluginForHost extends Plugin {
|
||||
br = null;
|
||||
dl = null;
|
||||
/* defaultPlugins do not have any working logger */
|
||||
setLogger(JDPluginLogger.Trash);
|
||||
|
||||
initD();
|
||||
|
||||
}
|
||||
|
||||
private void initD() {
|
||||
|
||||
revision = Formatter.getRevision(getClass().getAnnotation(HostPlugin.class).revision());
|
||||
host = HostPluginController.getInstance().get(getClass()).getDisplayName();
|
||||
pattern = HostPluginController.getInstance().get(getClass()).getPattern();
|
||||
/* workaround for all the lazy init issues */
|
||||
this.lazyP = (LazyHostPlugin) wrapper.getLazy();
|
||||
}
|
||||
|
||||
public void setLogger(JDPluginLogger logger) {
|
||||
@ -113,7 +106,12 @@ public abstract class PluginForHost extends Plugin {
|
||||
|
||||
@Override
|
||||
public long getVersion() {
|
||||
return revision;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Pattern getSupportedLinks() {
|
||||
return lazyP.getPattern();
|
||||
}
|
||||
|
||||
protected String getCaptchaCode(final String method, final String captchaAddress, final DownloadLink downloadLink) throws IOException, PluginException {
|
||||
@ -185,16 +183,13 @@ public abstract class PluginForHost extends Plugin {
|
||||
}
|
||||
|
||||
@Override
|
||||
public HostPluginWrapper getWrapper() {
|
||||
throw new WTFException();
|
||||
}
|
||||
|
||||
public String getHost() {
|
||||
return host;
|
||||
return lazyP.getDisplayName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public SubConfiguration getPluginConfig() {
|
||||
return null;
|
||||
return SubConfiguration.getConfig(lazyP.getHost());
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -218,7 +213,7 @@ public abstract class PluginForHost extends Plugin {
|
||||
public void actionPerformed(final ActionEvent e) {
|
||||
final int eID = e.getID();
|
||||
if (eID == 1) {
|
||||
UserIF.getInstance().requestPanel(UserIF.Panels.CONFIGPANEL, config);
|
||||
UserIF.getInstance().requestPanel(UserIF.Panels.CONFIGPANEL, getConfig());
|
||||
return;
|
||||
}
|
||||
if (eID == 2) {
|
||||
@ -266,7 +261,7 @@ public abstract class PluginForHost extends Plugin {
|
||||
MenuAction account;
|
||||
MenuAction m;
|
||||
|
||||
if (config != null && config.getEntries().size() > 0) {
|
||||
if (getConfig() != null && getConfig().getEntries().size() > 0) {
|
||||
m = new MenuAction(_GUI._.action_plugin_config(), "plugins.configs", 1) {
|
||||
|
||||
private static final long serialVersionUID = -5376242428242330373L;
|
||||
|
@ -22,6 +22,7 @@ import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
|
||||
import jd.PluginWrapper;
|
||||
import jd.config.SubConfiguration;
|
||||
import jd.controlling.DistributeData;
|
||||
import jd.controlling.JDLogger;
|
||||
import jd.controlling.JDPluginLogger;
|
||||
@ -36,6 +37,7 @@ import jd.nutils.io.JDIO;
|
||||
import jd.utils.JDUtilities;
|
||||
import jd.utils.WebUpdate;
|
||||
|
||||
import org.appwork.exceptions.WTFException;
|
||||
import org.appwork.utils.Regex;
|
||||
import org.jdownloader.plugins.controller.host.HostPluginController;
|
||||
import org.jdownloader.plugins.controller.host.LazyHostPlugin;
|
||||
@ -87,6 +89,11 @@ public abstract class PluginsC extends Plugin {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public SubConfiguration getPluginConfig() {
|
||||
throw new WTFException("WW");
|
||||
}
|
||||
|
||||
// @Override
|
||||
public ArrayList<MenuAction> createMenuitems() {
|
||||
return null;
|
||||
|
@ -4,6 +4,7 @@ import java.io.File;
|
||||
import java.security.spec.AlgorithmParameterSpec;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import javax.crypto.Cipher;
|
||||
import javax.crypto.SecretKey;
|
||||
@ -95,4 +96,14 @@ public class AMZ extends PluginsC {
|
||||
return 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getHost() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Pattern getSupportedLinks() {
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -28,6 +28,7 @@ import java.util.Collections;
|
||||
import java.util.Comparator;
|
||||
import java.util.Iterator;
|
||||
import java.util.Vector;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import jd.PluginWrapper;
|
||||
import jd.controlling.JDLogger;
|
||||
@ -193,4 +194,14 @@ public class C extends PluginsC {
|
||||
callDecryption(new File(filename));
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getHost() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Pattern getSupportedLinks() {
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
@ -15,6 +15,7 @@ import java.util.Comparator;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.Map;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import javax.crypto.Cipher;
|
||||
import javax.crypto.spec.IvParameterSpec;
|
||||
@ -1069,4 +1070,14 @@ public class D extends PluginsC {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getHost() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Pattern getSupportedLinks() {
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
@ -20,6 +20,7 @@ import java.io.ByteArrayInputStream;
|
||||
import java.io.File;
|
||||
import java.io.ObjectInputStream;
|
||||
import java.util.ArrayList;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import jd.PluginWrapper;
|
||||
import jd.config.SubConfiguration;
|
||||
@ -147,7 +148,7 @@ public class J extends PluginsC {
|
||||
// logger.info("pHost: "+pHost);
|
||||
if (pHost != null) {
|
||||
|
||||
DownloadLink dl = new DownloadLink((PluginForHost) pHost.getWrapper().getPlugin(), l.getName(), l.getHost(), l.getDownloadURL(), l.isEnabled());
|
||||
DownloadLink dl = new DownloadLink(pHost, l.getName(), l.getHost(), l.getDownloadURL(), l.isEnabled());
|
||||
|
||||
dl.setDownloadSize(l.getDownloadSize());
|
||||
dl.setBrowserUrl(l.getBrowserUrl());
|
||||
@ -198,4 +199,14 @@ public class J extends PluginsC {
|
||||
return 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getHost() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Pattern getSupportedLinks() {
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
@ -18,6 +18,7 @@ package jd.plugins.a;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import jd.PluginWrapper;
|
||||
import jd.nutils.io.JDIO;
|
||||
@ -73,4 +74,14 @@ public class MetaLink extends PluginsC {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getHost() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Pattern getSupportedLinks() {
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
@ -21,6 +21,7 @@ import java.io.File;
|
||||
import java.io.FileReader;
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import jd.PluginWrapper;
|
||||
import jd.controlling.JDLogger;
|
||||
@ -87,7 +88,7 @@ public class R extends PluginsC {
|
||||
// logger.info("pHost: "+pHost);
|
||||
if (pHost != null) {
|
||||
|
||||
newLink = new DownloadLink((PluginForHost) pHost.getWrapper().getPlugin(), element.substring(element.lastIndexOf("/") + 1), pHost.getHost(), null, true);
|
||||
newLink = new DownloadLink(pHost, element.substring(element.lastIndexOf("/") + 1), pHost.getHost(), null, true);
|
||||
newLink.setLoadedPluginForContainer(this);
|
||||
newLink.setContainerFile(lc.getAbsolutePath());
|
||||
newLink.setContainerIndex(c);
|
||||
@ -316,4 +317,14 @@ public class R extends PluginsC {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getHost() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Pattern getSupportedLinks() {
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
@ -86,8 +86,8 @@ public class MndCm extends PluginForDecrypt {
|
||||
* TODO: Umbauen!
|
||||
*/
|
||||
private void setConfigElements() {
|
||||
config.addEntry(new ConfigEntry(ConfigContainer.TYPE_CHECKBOX, getPluginConfig(), ENABLE_SUBFOLDERS, JDL.L("plugins.decrypt.jamendo", "Create a subfolder for each album")).setDefaultValue(false));
|
||||
config.addEntry(new ConfigEntry(ConfigContainer.TYPE_CHECKBOX, getPluginConfig(), PREFER_WHOLEALBUM, JDL.L("plugins.decrypt.jamendoalbum", "Prefer whole Album as Zip")).setDefaultValue(true));
|
||||
getConfig().addEntry(new ConfigEntry(ConfigContainer.TYPE_CHECKBOX, getPluginConfig(), ENABLE_SUBFOLDERS, JDL.L("plugins.decrypt.jamendo", "Create a subfolder for each album")).setDefaultValue(false));
|
||||
getConfig().addEntry(new ConfigEntry(ConfigContainer.TYPE_CHECKBOX, getPluginConfig(), PREFER_WHOLEALBUM, JDL.L("plugins.decrypt.jamendoalbum", "Prefer whole Album as Zip")).setDefaultValue(true));
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -44,17 +44,17 @@ public class CreaFileCom extends PluginForHost {
|
||||
setConfigElements();
|
||||
}
|
||||
|
||||
private static final String WAIT1 = "WAIT1";
|
||||
private static final String WAIT2 = "WAIT2";
|
||||
private static final String WAIT1 = "WAIT1";
|
||||
private static final String WAIT2 = "WAIT2";
|
||||
private static final String CHUNKS = "CHUNKS2";
|
||||
|
||||
private void setConfigElements() {
|
||||
ConfigEntry cond = new ConfigEntry(ConfigContainer.TYPE_CHECKBOX, getPluginConfig(), WAIT1, "Activate waittime1").setDefaultValue(false);
|
||||
ConfigEntry cond1 = new ConfigEntry(ConfigContainer.TYPE_CHECKBOX, getPluginConfig(), WAIT2, "Activate waittime2").setDefaultValue(false);
|
||||
ConfigEntry cond2 = new ConfigEntry(ConfigContainer.TYPE_CHECKBOX, getPluginConfig(), CHUNKS, "Activate unlimited Max.Con. (speeds up the downloads but may causes errors)").setDefaultValue(false);
|
||||
config.addEntry(cond);
|
||||
config.addEntry(cond1);
|
||||
config.addEntry(cond2);
|
||||
getConfig().addEntry(cond);
|
||||
getConfig().addEntry(cond1);
|
||||
getConfig().addEntry(cond2);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -690,10 +690,10 @@ public class DirectHTTP extends PluginForHost {
|
||||
|
||||
private void setConfigElements() {
|
||||
if (oldStyle()) {
|
||||
this.config.addEntry(new ConfigEntry(ConfigContainer.TYPE_LISTCONTROLLED, HTACCESSController.getInstance(), JDL.L("plugins.http.htaccess", "List of all HTAccess passwords. Each line one password.")));
|
||||
getConfig().addEntry(new ConfigEntry(ConfigContainer.TYPE_LISTCONTROLLED, HTACCESSController.getInstance(), JDL.L("plugins.http.htaccess", "List of all HTAccess passwords. Each line one password.")));
|
||||
} else {
|
||||
ConfigEntry ce;
|
||||
this.config.addEntry(ce = new ConfigEntry(ConfigContainer.TYPE_CHECKBOX, getPluginConfig(), LASTMODIFIED, JDL.L("plugins.http.lastmodified", "Set file time to last modified time(server).")));
|
||||
getConfig().addEntry(ce = new ConfigEntry(ConfigContainer.TYPE_CHECKBOX, getPluginConfig(), LASTMODIFIED, JDL.L("plugins.http.lastmodified", "Set file time to last modified time(server).")));
|
||||
ce.setDefaultValue(true);
|
||||
}
|
||||
}
|
||||
|
@ -40,25 +40,25 @@ import org.appwork.utils.formatter.SizeFormatter;
|
||||
@HostPlugin(revision = "$Revision$", interfaceVersion = 2, names = { "fileshack.com" }, urls = { "http://[\\w\\.]*?fileshack\\.com/(file|file_download)\\.x/[0-9]+" }, flags = { 2 })
|
||||
public class FilesHackCom extends PluginForHost {
|
||||
|
||||
private static final String fileshackservers = "fileshackservers";
|
||||
private static final String fileshackservers = "fileshackservers";
|
||||
|
||||
/** The list of servers displayed in the plugin configuration pane */
|
||||
private static final String[] FILESHACK_SERVERS = new String[] { "Public Central USA", "Public Eastern USA", "Public Europe", "Public Western USA" };
|
||||
private static final String[] FILESHACK_SERVERS = new String[] { "Public Central USA", "Public Eastern USA", "Public Europe", "Public Western USA" };
|
||||
|
||||
/**
|
||||
* The number of the default server [used if no server is configured or if
|
||||
* the configured server was not found in the list of obtained servers]
|
||||
*/
|
||||
private static final int DEFAULT_SERVER_NUMBER = 2;
|
||||
private static final int DEFAULT_SERVER_NUMBER = 2;
|
||||
|
||||
/**
|
||||
* The name of the default server [used if no server is configured or if the
|
||||
* configured server was not found in the list of obtained servers]
|
||||
*/
|
||||
private static final String DEFAULT_SERVER_NAME = FILESHACK_SERVERS[DEFAULT_SERVER_NUMBER];
|
||||
private static final String DEFAULT_SERVER_NAME = FILESHACK_SERVERS[DEFAULT_SERVER_NUMBER];
|
||||
|
||||
/** The {@link Pattern} used to get the server strings from the HTML page */
|
||||
private static final Pattern SERVERS_STRINGS_PATTERN = Pattern.compile("'(/popup\\..*?(central|east|europe|west)\\.public.*?pay=0)'");
|
||||
private static final Pattern SERVERS_STRINGS_PATTERN = Pattern.compile("'(/popup\\..*?(central|east|europe|west)\\.public.*?pay=0)'");
|
||||
|
||||
public FilesHackCom(PluginWrapper wrapper) {
|
||||
super(wrapper);
|
||||
@ -76,7 +76,7 @@ public class FilesHackCom extends PluginForHost {
|
||||
}
|
||||
|
||||
private void setConfigElements() {
|
||||
config.addEntry(new ConfigEntry(ConfigContainer.TYPE_COMBOBOX_INDEX, getPluginConfig(), fileshackservers, FILESHACK_SERVERS, JDL.L("plugins.host.FilesHackCom.servers", "Use this server:")).setDefaultValue(0));
|
||||
getConfig().addEntry(new ConfigEntry(ConfigContainer.TYPE_COMBOBOX_INDEX, getPluginConfig(), fileshackservers, FILESHACK_SERVERS, JDL.L("plugins.host.FilesHackCom.servers", "Use this server:")).setDefaultValue(0));
|
||||
}
|
||||
|
||||
// thx to jiaz & bogdan.solga for the help ;)
|
||||
|
@ -28,11 +28,11 @@ import jd.parser.Regex;
|
||||
import jd.plugins.Account;
|
||||
import jd.plugins.AccountInfo;
|
||||
import jd.plugins.DownloadLink;
|
||||
import jd.plugins.DownloadLink.AvailableStatus;
|
||||
import jd.plugins.HostPlugin;
|
||||
import jd.plugins.LinkStatus;
|
||||
import jd.plugins.PluginException;
|
||||
import jd.plugins.PluginForHost;
|
||||
import jd.plugins.DownloadLink.AvailableStatus;
|
||||
import jd.utils.JDUtilities;
|
||||
import jd.utils.locale.JDL;
|
||||
|
||||
@ -57,7 +57,7 @@ public class FilesMonsterCom extends PluginForHost {
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
private void setConfigElements() {
|
||||
config.addEntry(new ConfigEntry(ConfigContainer.TYPE_SPINNER, getPluginConfig(), PROPERTY_NO_SLOT_WAIT_TIME, JDL.L("plugins.hoster.filesmonstercom.noslotwaittime", "No slot wait time (seconds)"), 30, 86400).setDefaultValue(60).setStep(30));
|
||||
getConfig().addEntry(new ConfigEntry(ConfigContainer.TYPE_SPINNER, getPluginConfig(), PROPERTY_NO_SLOT_WAIT_TIME, JDL.L("plugins.hoster.filesmonstercom.noslotwaittime", "No slot wait time (seconds)"), 30, 86400).setDefaultValue(60).setStep(30));
|
||||
}
|
||||
|
||||
public void correctDownloadLink(DownloadLink link) {
|
||||
|
@ -30,11 +30,11 @@ import jd.parser.html.Form;
|
||||
import jd.plugins.Account;
|
||||
import jd.plugins.AccountInfo;
|
||||
import jd.plugins.DownloadLink;
|
||||
import jd.plugins.DownloadLink.AvailableStatus;
|
||||
import jd.plugins.HostPlugin;
|
||||
import jd.plugins.LinkStatus;
|
||||
import jd.plugins.PluginException;
|
||||
import jd.plugins.PluginForHost;
|
||||
import jd.plugins.DownloadLink.AvailableStatus;
|
||||
import jd.utils.JDUtilities;
|
||||
import jd.utils.locale.JDL;
|
||||
|
||||
@ -325,6 +325,6 @@ public class Freaksharenet extends PluginForHost {
|
||||
|
||||
private void setConfigElements() {
|
||||
final ConfigEntry cond = new ConfigEntry(ConfigContainer.TYPE_CHECKBOX, getPluginConfig(), WAIT1, JDL.L("plugins.hoster.Freaksharenet.waitInsteadOfReconnect", "Wait 10 minutes instead of reconnecting")).setDefaultValue(true);
|
||||
config.addEntry(cond);
|
||||
getConfig().addEntry(cond);
|
||||
}
|
||||
}
|
||||
|
@ -601,11 +601,11 @@ public class HotFileCom extends PluginForHost {
|
||||
@SuppressWarnings("deprecation")
|
||||
private void setConfigElements() {
|
||||
ConfigEntry cond = new ConfigEntry(ConfigContainer.TYPE_CHECKBOX, getPluginConfig(), HotFileCom.TRY_IWL_BYPASS, JDL.L("plugins.hoster.HotFileCom.TRYIWLBYPASS", "Try IWL-Filter list bypass?")).setDefaultValue(false);
|
||||
config.addEntry(cond);
|
||||
config.addEntry(new ConfigEntry(ConfigContainer.TYPE_SPINNER, getPluginConfig(), HotFileCom.CAPTCHARETRIES, JDL.L("plugins.hoster.HotFileCom.captcharetries", "Captcha retries"), 1, 86400).setDefaultValue(60).setStep(20));
|
||||
getConfig().addEntry(cond);
|
||||
getConfig().addEntry(new ConfigEntry(ConfigContainer.TYPE_SPINNER, getPluginConfig(), HotFileCom.CAPTCHARETRIES, JDL.L("plugins.hoster.HotFileCom.captcharetries", "Captcha retries"), 1, 86400).setDefaultValue(60).setStep(20));
|
||||
|
||||
cond = new ConfigEntry(ConfigContainer.TYPE_CHECKBOX, getPluginConfig(), HotFileCom.UNLIMITEDMAXCON, JDL.L("plugins.hoster.HotFileCom.SetUnlimitedConnectionsForPremium", "Allow more than 5 connections per file for premium (default maximum = 5). Enabling this can cause errors!!")).setDefaultValue(false);
|
||||
config.addEntry(cond);
|
||||
getConfig().addEntry(cond);
|
||||
}
|
||||
|
||||
private void submit(final Browser br, final Form form) throws Exception {
|
||||
|
@ -174,7 +174,7 @@ public class JamendoCom extends PluginForHost {
|
||||
}
|
||||
|
||||
private void setConfigElements() {
|
||||
config.addEntry(new ConfigEntry(ConfigContainer.TYPE_CHECKBOX, getPluginConfig(), PREFER_HIGHQUALITY, JDL.L("plugins.hoster.jamendo", "Prefer High Quality Download")).setDefaultValue(true));
|
||||
getConfig().addEntry(new ConfigEntry(ConfigContainer.TYPE_CHECKBOX, getPluginConfig(), PREFER_HIGHQUALITY, JDL.L("plugins.hoster.jamendo", "Prefer High Quality Download")).setDefaultValue(true));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -23,11 +23,11 @@ import jd.nutils.encoding.Encoding;
|
||||
import jd.parser.Regex;
|
||||
import jd.plugins.BrowserAdapter;
|
||||
import jd.plugins.DownloadLink;
|
||||
import jd.plugins.DownloadLink.AvailableStatus;
|
||||
import jd.plugins.HostPlugin;
|
||||
import jd.plugins.LinkStatus;
|
||||
import jd.plugins.PluginException;
|
||||
import jd.plugins.PluginForHost;
|
||||
import jd.plugins.DownloadLink.AvailableStatus;
|
||||
import jd.utils.locale.JDL;
|
||||
|
||||
import org.appwork.utils.formatter.SizeFormatter;
|
||||
@ -59,7 +59,7 @@ public class L4dMapsCom extends PluginForHost {
|
||||
}
|
||||
|
||||
private void setConfigElements() {
|
||||
config.addEntry(new ConfigEntry(ConfigContainer.TYPE_COMBOBOX_INDEX, getPluginConfig(), l4dservers, servers, JDL.L("plugins.host.L4dMapsCom.servers", "Use this server:")).setDefaultValue(0));
|
||||
getConfig().addEntry(new ConfigEntry(ConfigContainer.TYPE_COMBOBOX_INDEX, getPluginConfig(), l4dservers, servers, JDL.L("plugins.host.L4dMapsCom.servers", "Use this server:")).setDefaultValue(0));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -56,16 +56,19 @@ import org.appwork.utils.formatter.SizeFormatter;
|
||||
public class MegaPornCom extends PluginForHost {
|
||||
|
||||
private static enum STATUS {
|
||||
ONLINE, OFFLINE, API, BLOCKED
|
||||
ONLINE,
|
||||
OFFLINE,
|
||||
API,
|
||||
BLOCKED
|
||||
}
|
||||
|
||||
private static final String MU_PARAM_PORT = "MU_PARAM_PORT_NEW1";
|
||||
private final static String[] ports = new String[] { "80", "800", "1723" };
|
||||
private static String wwwWorkaround = null;
|
||||
private static final Object LOCK = new Object();
|
||||
private static final String MU_PARAM_PORT = "MU_PARAM_PORT_NEW1";
|
||||
private final static String[] ports = new String[] { "80", "800", "1723" };
|
||||
private static String wwwWorkaround = null;
|
||||
private static final Object LOCK = new Object();
|
||||
|
||||
private static final Object LOGINLOCK = new Object();
|
||||
private static int simultanpremium = 1;
|
||||
private static final Object LOGINLOCK = new Object();
|
||||
private static int simultanpremium = 1;
|
||||
|
||||
@Override
|
||||
public void correctDownloadLink(DownloadLink link) {
|
||||
@ -114,11 +117,11 @@ public class MegaPornCom extends PluginForHost {
|
||||
}
|
||||
}
|
||||
|
||||
private boolean onlyapi = false;
|
||||
private boolean onlyapi = false;
|
||||
|
||||
private String wait = null;
|
||||
private String wait = null;
|
||||
|
||||
private static String agent = RandomUserAgent.generate();
|
||||
private static String agent = RandomUserAgent.generate();
|
||||
|
||||
/*
|
||||
* every jd session starts with 1=default, because no waittime does not work
|
||||
@ -127,9 +130,9 @@ public class MegaPornCom extends PluginForHost {
|
||||
* try to workaround the waittime, 0=no waittime, 1 = default, other = 60
|
||||
* secs
|
||||
*/
|
||||
private static int WaittimeWorkaround = 1;
|
||||
private static int WaittimeWorkaround = 1;
|
||||
|
||||
private static final Object PREMLOCK = new Object();
|
||||
private static final Object PREMLOCK = new Object();
|
||||
|
||||
public MegaPornCom(final PluginWrapper wrapper) {
|
||||
super(wrapper);
|
||||
@ -952,7 +955,7 @@ public class MegaPornCom extends PluginForHost {
|
||||
}
|
||||
|
||||
private void setConfigElements() {
|
||||
this.config.addEntry(new ConfigEntry(ConfigContainer.TYPE_COMBOBOX_INDEX, this.getPluginConfig(), MU_PARAM_PORT, ports, JDL.L("plugins.host.megaporn.ports", "Use this port:")).setDefaultValue(0));
|
||||
getConfig().addEntry(new ConfigEntry(ConfigContainer.TYPE_COMBOBOX_INDEX, this.getPluginConfig(), MU_PARAM_PORT, ports, JDL.L("plugins.host.megaporn.ports", "Use this port:")).setDefaultValue(0));
|
||||
}
|
||||
|
||||
public int usePort(final DownloadLink link) {
|
||||
|
@ -1009,7 +1009,7 @@ public class Megauploadcom extends PluginForHost {
|
||||
}
|
||||
|
||||
private void setConfigElements() {
|
||||
this.config.addEntry(new ConfigEntry(ConfigContainer.TYPE_COMBOBOX_INDEX, this.getPluginConfig(), Megauploadcom.MU_PARAM_PORT, Megauploadcom.ports, JDL.L("plugins.host.megaupload.ports", "Use this port:")).setDefaultValue(0));
|
||||
getConfig().addEntry(new ConfigEntry(ConfigContainer.TYPE_COMBOBOX_INDEX, this.getPluginConfig(), Megauploadcom.MU_PARAM_PORT, Megauploadcom.ports, JDL.L("plugins.host.megaupload.ports", "Use this port:")).setDefaultValue(0));
|
||||
}
|
||||
|
||||
public int usePort(final DownloadLink link) {
|
||||
|
@ -39,7 +39,7 @@ public class ModDbCom extends PluginForHost {
|
||||
setConfigElements();
|
||||
}
|
||||
|
||||
private static final String moddbservers = "moddbservers";
|
||||
private static final String moddbservers = "moddbservers";
|
||||
|
||||
/** The list of server values displayed to the user */
|
||||
private static final String[] servers;
|
||||
@ -49,7 +49,7 @@ public class ModDbCom extends PluginForHost {
|
||||
}
|
||||
|
||||
private void setConfigElements() {
|
||||
config.addEntry(new ConfigEntry(ConfigContainer.TYPE_COMBOBOX_INDEX, getPluginConfig(), moddbservers, servers, JDL.L("plugins.host.L4dMapsCom.servers", "Use this server:")).setDefaultValue(0));
|
||||
getConfig().addEntry(new ConfigEntry(ConfigContainer.TYPE_COMBOBOX_INDEX, getPluginConfig(), moddbservers, servers, JDL.L("plugins.host.L4dMapsCom.servers", "Use this server:")).setDefaultValue(0));
|
||||
}
|
||||
|
||||
private int getConfiguredServer() {
|
||||
@ -99,12 +99,12 @@ public class ModDbCom extends PluginForHost {
|
||||
return AvailableStatus.TRUE;
|
||||
}
|
||||
|
||||
private String FDCCDNREGEX1 = "Mirror provided by FDCCDN.*?<a href=\"(.*?)\"";
|
||||
private String FDCCDNREGEX2 = "http://www\\.fdcservers\\.net.*?<a href=\"(.*?)\"";
|
||||
private String SERVER4REGEX = "Mirror provided by Mod DB #4.*?<a href=\"(.*?)\"";
|
||||
private String SERVER5REGEX = "Mirror provided by Mod DB #5.*?<a href=\"(.*?)\"";
|
||||
private String SERVER6REGEX = "Mirror provided by Mod DB #6.*?<a href=\"(.*?)\"";
|
||||
private String SERVER8REGEX = "Mirror provided by Mod DB #8.*?<a href=\"(.*?)\"";
|
||||
private String FDCCDNREGEX1 = "Mirror provided by FDCCDN.*?<a href=\"(.*?)\"";
|
||||
private String FDCCDNREGEX2 = "http://www\\.fdcservers\\.net.*?<a href=\"(.*?)\"";
|
||||
private String SERVER4REGEX = "Mirror provided by Mod DB #4.*?<a href=\"(.*?)\"";
|
||||
private String SERVER5REGEX = "Mirror provided by Mod DB #5.*?<a href=\"(.*?)\"";
|
||||
private String SERVER6REGEX = "Mirror provided by Mod DB #6.*?<a href=\"(.*?)\"";
|
||||
private String SERVER8REGEX = "Mirror provided by Mod DB #8.*?<a href=\"(.*?)\"";
|
||||
private String SERVER10REGEX = "Mirror provided by Mod DB #10.*?<a href=\"(.*?)\"";
|
||||
private String SERVER11REGEX = "Mirror provided by Mod DB #11.*?<a href=\"(.*?)\"";
|
||||
private String SERVER13REGEX = "Mirror provided by Mod DB #13.*?<a href=\"(.*?)\"";
|
||||
|
@ -777,16 +777,16 @@ public class Rapidshare extends PluginForHost {
|
||||
*/
|
||||
private void setConfigElements() {
|
||||
|
||||
this.config.addEntry(new ConfigEntry(ConfigContainer.TYPE_CHECKBOX, this.getPluginConfig(), Rapidshare.SSL_CONNECTION, JDL.L("plugins.hoster.rapidshare.com.ssl2", "Use Secure Communication over SSL")).setDefaultValue(true));
|
||||
this.config.addEntry(new ConfigEntry(ConfigContainer.TYPE_CHECKBOX, this.getPluginConfig(), Rapidshare.HTTPS_WORKAROUND, JDL.L("plugins.hoster.rapidshare.com.https", "Use HTTPS workaround for ISP Block")).setDefaultValue(false));
|
||||
getConfig().addEntry(new ConfigEntry(ConfigContainer.TYPE_CHECKBOX, this.getPluginConfig(), Rapidshare.SSL_CONNECTION, JDL.L("plugins.hoster.rapidshare.com.ssl2", "Use Secure Communication over SSL")).setDefaultValue(true));
|
||||
getConfig().addEntry(new ConfigEntry(ConfigContainer.TYPE_CHECKBOX, this.getPluginConfig(), Rapidshare.HTTPS_WORKAROUND, JDL.L("plugins.hoster.rapidshare.com.https", "Use HTTPS workaround for ISP Block")).setDefaultValue(false));
|
||||
/* caused issues lately because it seems some ip's are sharedhosting */
|
||||
// this.config.addEntry(new ConfigEntry(ConfigContainer.TYPE_CHECKBOX,
|
||||
// this.getPluginConfig(), Rapidshare.PRE_RESOLVE,
|
||||
// JDL.L("plugins.hoster.rapidshare.com.resolve",
|
||||
// "Use IP instead of hostname")).setDefaultValue(false));
|
||||
|
||||
this.config.addEntry(new ConfigEntry(ConfigContainer.TYPE_SEPARATOR));
|
||||
this.config.addEntry(new ConfigEntry(ConfigContainer.TYPE_CHECKBOX, this.getPluginConfig(), Rapidshare.WAIT_HOSTERFULL, JDL.L("plugins.hoster.rapidshare.com.waithosterfull", "Wait if all FreeUser Slots are full")).setDefaultValue(true));
|
||||
getConfig().addEntry(new ConfigEntry(ConfigContainer.TYPE_SEPARATOR));
|
||||
getConfig().addEntry(new ConfigEntry(ConfigContainer.TYPE_CHECKBOX, this.getPluginConfig(), Rapidshare.WAIT_HOSTERFULL, JDL.L("plugins.hoster.rapidshare.com.waithosterfull", "Wait if all FreeUser Slots are full")).setDefaultValue(true));
|
||||
|
||||
}
|
||||
|
||||
|
@ -27,11 +27,11 @@ import jd.parser.Regex;
|
||||
import jd.plugins.Account;
|
||||
import jd.plugins.AccountInfo;
|
||||
import jd.plugins.DownloadLink;
|
||||
import jd.plugins.DownloadLink.AvailableStatus;
|
||||
import jd.plugins.HostPlugin;
|
||||
import jd.plugins.LinkStatus;
|
||||
import jd.plugins.PluginException;
|
||||
import jd.plugins.PluginForHost;
|
||||
import jd.plugins.DownloadLink.AvailableStatus;
|
||||
import jd.utils.locale.JDL;
|
||||
|
||||
@HostPlugin(revision = "$Revision$", interfaceVersion = 2, names = { "scribd.com" }, urls = { "http://(www\\.)?scribd\\.com/doc/\\d+" }, flags = { 2 })
|
||||
@ -53,7 +53,7 @@ public class ScribdCom extends PluginForHost {
|
||||
}
|
||||
|
||||
private void setConfigElements() {
|
||||
config.addEntry(new ConfigEntry(ConfigContainer.TYPE_COMBOBOX_INDEX, getPluginConfig(), formats, allFormats, JDL.L("plugins.host.ScribdCom.formats", "Download files in this format:")).setDefaultValue(0));
|
||||
getConfig().addEntry(new ConfigEntry(ConfigContainer.TYPE_COMBOBOX_INDEX, getPluginConfig(), formats, allFormats, JDL.L("plugins.host.ScribdCom.formats", "Download files in this format:")).setDefaultValue(0));
|
||||
}
|
||||
|
||||
private String getConfiguredServer() {
|
||||
|
@ -49,7 +49,7 @@ public class Tube8Com extends PluginForHost {
|
||||
|
||||
private void setConfigElements() {
|
||||
ConfigEntry cond = new ConfigEntry(ConfigContainer.TYPE_CHECKBOX, getPluginConfig(), mobile, JDL.L("plugins.hoster.Tube8Com.setting.preferVideosForMobilePhones", "Prefer videos for mobile phones (3gp format)")).setDefaultValue(false);
|
||||
config.addEntry(cond);
|
||||
getConfig().addEntry(cond);
|
||||
}
|
||||
|
||||
public String dllink = null;
|
||||
|
@ -68,14 +68,14 @@ public class Youtube extends PluginForHost {
|
||||
}
|
||||
|
||||
private void setConfigElements() {
|
||||
config.addEntry(new ConfigEntry(ConfigContainer.TYPE_CHECKBOX, getPluginConfig(), FAST_CHECK, JDL.L("plugins.hoster.youtube.fast", "Fast LinkCheck?")).setDefaultValue(false));
|
||||
config.addEntry(new ConfigEntry(ConfigContainer.TYPE_CHECKBOX, getPluginConfig(), IDASFILENAME, JDL.L("plugins.hoster.youtube.idasfilename", "Use Video-ID as filename?")).setDefaultValue(false));
|
||||
config.addEntry(new ConfigEntry(ConfigContainer.TYPE_SEPARATOR));
|
||||
config.addEntry(new ConfigEntry(ConfigContainer.TYPE_CHECKBOX, getPluginConfig(), ALLOW_WEBM, JDL.L("plugins.hoster.youtube.checkwebm", "Grab WEBM?")).setDefaultValue(true));
|
||||
config.addEntry(new ConfigEntry(ConfigContainer.TYPE_CHECKBOX, getPluginConfig(), ALLOW_MP4, JDL.L("plugins.hoster.youtube.checkmp4", "Grab MP4?")).setDefaultValue(true));
|
||||
config.addEntry(new ConfigEntry(ConfigContainer.TYPE_CHECKBOX, getPluginConfig(), ALLOW_MP3, JDL.L("plugins.hoster.youtube.checkmp3", "Grab MP3?")).setDefaultValue(true));
|
||||
config.addEntry(new ConfigEntry(ConfigContainer.TYPE_CHECKBOX, getPluginConfig(), ALLOW_FLV, JDL.L("plugins.hoster.youtube.checkflv", "Grab FLV?")).setDefaultValue(true));
|
||||
config.addEntry(new ConfigEntry(ConfigContainer.TYPE_CHECKBOX, getPluginConfig(), ALLOW_3GP, JDL.L("plugins.hoster.youtube.check3gp", "Grab 3GP?")).setDefaultValue(true));
|
||||
getConfig().addEntry(new ConfigEntry(ConfigContainer.TYPE_CHECKBOX, getPluginConfig(), FAST_CHECK, JDL.L("plugins.hoster.youtube.fast", "Fast LinkCheck?")).setDefaultValue(false));
|
||||
getConfig().addEntry(new ConfigEntry(ConfigContainer.TYPE_CHECKBOX, getPluginConfig(), IDASFILENAME, JDL.L("plugins.hoster.youtube.idasfilename", "Use Video-ID as filename?")).setDefaultValue(false));
|
||||
getConfig().addEntry(new ConfigEntry(ConfigContainer.TYPE_SEPARATOR));
|
||||
getConfig().addEntry(new ConfigEntry(ConfigContainer.TYPE_CHECKBOX, getPluginConfig(), ALLOW_WEBM, JDL.L("plugins.hoster.youtube.checkwebm", "Grab WEBM?")).setDefaultValue(true));
|
||||
getConfig().addEntry(new ConfigEntry(ConfigContainer.TYPE_CHECKBOX, getPluginConfig(), ALLOW_MP4, JDL.L("plugins.hoster.youtube.checkmp4", "Grab MP4?")).setDefaultValue(true));
|
||||
getConfig().addEntry(new ConfigEntry(ConfigContainer.TYPE_CHECKBOX, getPluginConfig(), ALLOW_MP3, JDL.L("plugins.hoster.youtube.checkmp3", "Grab MP3?")).setDefaultValue(true));
|
||||
getConfig().addEntry(new ConfigEntry(ConfigContainer.TYPE_CHECKBOX, getPluginConfig(), ALLOW_FLV, JDL.L("plugins.hoster.youtube.checkflv", "Grab FLV?")).setDefaultValue(true));
|
||||
getConfig().addEntry(new ConfigEntry(ConfigContainer.TYPE_CHECKBOX, getPluginConfig(), ALLOW_3GP, JDL.L("plugins.hoster.youtube.check3gp", "Grab 3GP?")).setDefaultValue(true));
|
||||
|
||||
}
|
||||
|
||||
|
@ -314,12 +314,10 @@ public class JDUtilities {
|
||||
}
|
||||
|
||||
public static PluginForHost getPluginForHost(final String host) {
|
||||
|
||||
for (final LazyHostPlugin pHost : HostPluginController.getInstance().list()) {
|
||||
if (pHost.getHost().equalsIgnoreCase(host)) { return pHost.getPrototype(); }
|
||||
}
|
||||
|
||||
LazyHostPlugin lplugin = HostPluginController.getInstance().get(host);
|
||||
if (lplugin != null) return lplugin.getPrototype();
|
||||
return null;
|
||||
|
||||
}
|
||||
|
||||
// public static PluginForHost replacePluginForHost(final DownloadLink link)
|
||||
@ -334,9 +332,8 @@ public class JDUtilities {
|
||||
// }
|
||||
|
||||
public static PluginForHost getNewPluginForHostInstance(final String host) {
|
||||
|
||||
PluginForHost plugin = getPluginForHost(host);
|
||||
if (plugin != null) return HostPluginController.getInstance().newInstance(plugin.getClass());
|
||||
LazyHostPlugin lplugin = HostPluginController.getInstance().get(host);
|
||||
if (lplugin != null) return lplugin.newInstance();
|
||||
return null;
|
||||
}
|
||||
|
||||
|
@ -55,6 +55,7 @@ import org.jdownloader.extensions.StartException;
|
||||
import org.jdownloader.extensions.StopException;
|
||||
import org.jdownloader.extensions.interfaces.translate.T;
|
||||
import org.jdownloader.plugins.controller.host.HostPluginController;
|
||||
import org.jdownloader.plugins.controller.host.LazyHostPlugin;
|
||||
import org.jdownloader.update.JDUpdater;
|
||||
import org.mozilla.javascript.ClassShutter;
|
||||
import org.mozilla.javascript.Context;
|
||||
@ -353,12 +354,6 @@ public class ExternInterfaceExtension extends AbstractExtension<ExternInterfaceC
|
||||
|
||||
response.addContent(addJSONPCallback("failed " + e.getMessage(), request.getParameters().get("callback")));
|
||||
}
|
||||
} else if (splitPath[1].equalsIgnoreCase("checkSupportForUrl")) {
|
||||
|
||||
// TODO: Bugtracker Issue #1729
|
||||
String url = Encoding.htmlDecode(request.getParameters().get("url"));
|
||||
String urlSupported = Boolean.valueOf(DistributeData.hasPluginFor(url, true)).toString();
|
||||
response.addContent(addJSONPCallback(urlSupported, request.getParameters().get("callback")));
|
||||
} else {
|
||||
response.addContent(addJSONPCallback("unknowncommand", request.getParameters().get("callback")));
|
||||
}
|
||||
@ -432,8 +427,8 @@ public class ExternInterfaceExtension extends AbstractExtension<ExternInterfaceC
|
||||
links.addAll(foundlinks);
|
||||
} else {
|
||||
/* directlinks here */
|
||||
PluginForHost defaultplg = JDUtilities.getPluginForHost("DirectHTTP");
|
||||
PluginForHost liveplg = HostPluginController.getInstance().newInstance(defaultplg.getClass());
|
||||
LazyHostPlugin lazyp = HostPluginController.getInstance().get("DirectHTTP");
|
||||
PluginForHost defaultplg = lazyp.getPrototype();
|
||||
String name = Plugin.getFileNameFromURL(new URL(url));
|
||||
DownloadLink direct = new DownloadLink(defaultplg, name, "DirectHTTP", url, true);
|
||||
direct.setBrowserUrl(referer);
|
||||
@ -442,7 +437,7 @@ public class ExternInterfaceExtension extends AbstractExtension<ExternInterfaceC
|
||||
direct.setProperty("post", post);
|
||||
direct.setProperty("referer", referer);
|
||||
direct.setProperty("fixName", fnames[i]);
|
||||
liveplg.correctDownloadLink(direct);
|
||||
defaultplg.correctDownloadLink(direct);
|
||||
links.add(direct);
|
||||
}
|
||||
}
|
||||
|
@ -50,7 +50,7 @@ public class HosterColumn extends JDTableColumn {
|
||||
jlr.setBorder(null);
|
||||
|
||||
if (labels == null) {
|
||||
ArrayList<LazyHostPlugin> plugins = HostPluginController.getInstance().list();
|
||||
ArrayList<LazyHostPlugin> plugins = new ArrayList<LazyHostPlugin>(HostPluginController.getInstance().list());
|
||||
Collections.sort(plugins, new Comparator<LazyHostPlugin>() {
|
||||
public int compare(LazyHostPlugin a, LazyHostPlugin b) {
|
||||
return a.getHost().compareToIgnoreCase(b.getHost());
|
||||
|
@ -62,7 +62,9 @@ public class PremiumCompoundExtension extends AbstractExtension<PremiumCompoundC
|
||||
PluginForHost old = JDUtilities.getPluginForHost(host);
|
||||
if (old != null) {
|
||||
logger.info("Replacing " + host + " Plugin with JDPremium: " + with);
|
||||
new PremShareHost(old.getHost(), with, old.getWrapper().getPattern().toString(), old.getWrapper().getFlags() + PluginWrapper.ALLOW_DUPLICATE);
|
||||
// new PremShareHost(old.getHost(), with,
|
||||
// old.getWrapper().getPattern().toString(),
|
||||
// old.getWrapper().getFlags() + PluginWrapper.ALLOW_DUPLICATE);
|
||||
}
|
||||
}
|
||||
|
||||
@ -143,28 +145,33 @@ public class PremiumCompoundExtension extends AbstractExtension<PremiumCompoundC
|
||||
}
|
||||
if (!replaced) {
|
||||
/* get all current PremiumPlugins */
|
||||
ArrayList<HostPluginWrapper> all = JDUtilities.getPremiumPluginsForHost();
|
||||
for (String key : premShareHosts.keySet()) {
|
||||
if (AccountController.getInstance().hasAccounts(key)) {
|
||||
for (HostPluginWrapper plugin : all) {
|
||||
/* we do not replace youtube */
|
||||
if (plugin.getHost().contains("youtube")) continue;
|
||||
/* and no DIRECTHTTP */
|
||||
if (plugin.getHost().contains("DIRECTHTTP") || plugin.getHost().contains("http links")) continue;
|
||||
/* and no ftp */
|
||||
if (plugin.getHost().contains("ftp")) continue;
|
||||
/* do not replace the premshare plugins ;) */
|
||||
if (premShareHosts.containsKey(plugin.getHost()) && plugin.getPattern().pattern().startsWith("NEVERUSETHISREGEX" + plugin.getHost())) {
|
||||
continue;
|
||||
}
|
||||
replaceHosterPlugin(plugin.getHost(), premShareHosts.get(key));
|
||||
}
|
||||
PluginForHost ret = JDUtilities.getPluginForHost(key);
|
||||
if (ret != null && ret instanceof JDPremInterface) {
|
||||
((JDPremInterface) ret).enablePlugin();
|
||||
}
|
||||
}
|
||||
}
|
||||
// ArrayList<HostPluginWrapper> all =
|
||||
// JDUtilities.getPremiumPluginsForHost();
|
||||
// for (String key : premShareHosts.keySet()) {
|
||||
// if (AccountController.getInstance().hasAccounts(key)) {
|
||||
// for (HostPluginWrapper plugin : all) {
|
||||
// /* we do not replace youtube */
|
||||
// if (plugin.getHost().contains("youtube")) continue;
|
||||
// /* and no DIRECTHTTP */
|
||||
// if (plugin.getHost().contains("DIRECTHTTP") ||
|
||||
// plugin.getHost().contains("http links")) continue;
|
||||
// /* and no ftp */
|
||||
// if (plugin.getHost().contains("ftp")) continue;
|
||||
// /* do not replace the premshare plugins ;) */
|
||||
// if (premShareHosts.containsKey(plugin.getHost()) &&
|
||||
// plugin.getPattern().pattern().startsWith("NEVERUSETHISREGEX"
|
||||
// + plugin.getHost())) {
|
||||
// continue;
|
||||
// }
|
||||
// replaceHosterPlugin(plugin.getHost(),
|
||||
// premShareHosts.get(key));
|
||||
// }
|
||||
// PluginForHost ret = JDUtilities.getPluginForHost(key);
|
||||
// if (ret != null && ret instanceof JDPremInterface) {
|
||||
// ((JDPremInterface) ret).enablePlugin();
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
replaced = true;
|
||||
}
|
||||
if (replaced) {
|
||||
@ -253,12 +260,15 @@ public class PremiumCompoundExtension extends AbstractExtension<PremiumCompoundC
|
||||
|
||||
public PremShareHost(String host, String className, String patternSupported, int flags) {
|
||||
super(host, "org.jdownloader.extensions.jdpremclient.", className, patternSupported, flags, "$Revision$");
|
||||
for (HostPluginWrapper wrapper : HostPluginController.getInstance()) {
|
||||
if (wrapper.getPattern().toString().equalsIgnoreCase(patternSupported) && wrapper != this) replacedone = wrapper;
|
||||
}
|
||||
if (replacedone != null) {
|
||||
HostPluginController.getInstance().remove(replacedone);
|
||||
}
|
||||
// for (HostPluginWrapper wrapper :
|
||||
// HostPluginController.getInstance()) {
|
||||
// if
|
||||
// (wrapper.getPattern().toString().equalsIgnoreCase(patternSupported)
|
||||
// && wrapper != this) replacedone = wrapper;
|
||||
// }
|
||||
// if (replacedone != null) {
|
||||
// HostPluginController.getInstance().remove(replacedone);
|
||||
// }
|
||||
}
|
||||
|
||||
public HostPluginWrapper getReplacedPlugin() {
|
||||
|
@ -16,12 +16,10 @@ import jd.plugins.DownloadLink;
|
||||
import jd.plugins.FilePackage;
|
||||
import jd.plugins.OptionalPlugin;
|
||||
|
||||
import org.appwork.utils.Regex;
|
||||
import org.jdownloader.extensions.AbstractExtension;
|
||||
import org.jdownloader.extensions.ExtensionConfigPanel;
|
||||
import org.jdownloader.extensions.StartException;
|
||||
import org.jdownloader.extensions.StopException;
|
||||
import org.jdownloader.plugins.controller.host.HostPluginController;
|
||||
import org.jdownloader.plugins.controller.host.LazyHostPlugin;
|
||||
import org.jdownloader.settings.GeneralSettings;
|
||||
|
||||
@ -122,16 +120,18 @@ public class LecturnityDownloaderExtension extends AbstractExtension<LecturnityD
|
||||
* time! We know the filename and the filesize and so it is
|
||||
* currently available.
|
||||
*/
|
||||
dLink = new DownloadLink(hpw.getPlugin(), link, hpw.getHost(), source + link, true);
|
||||
dLink.setFinalFileName(link);
|
||||
dLink.setDownloadSize(getSize(new Regex(page, link + "</a>[ ]+.*?[ ].*?[ ]+(\\d+\\.?\\d?[K|M|G]?)").getMatch(0)));
|
||||
dLink.setBrowserUrl(source);
|
||||
dLink.setAvailable(true);
|
||||
dLink.setProperty(PROPERTY_DOWNLOADDIR, downloadDir);
|
||||
|
||||
fp.add(dLink);
|
||||
|
||||
result.add(dLink);
|
||||
// dLink = new DownloadLink(hpw.getPlugin(), link,
|
||||
// hpw.getHost(), source + link, true);
|
||||
// dLink.setFinalFileName(link);
|
||||
// dLink.setDownloadSize(getSize(new Regex(page, link +
|
||||
// "</a>[ ]+.*?[ ].*?[ ]+(\\d+\\.?\\d?[K|M|G]?)").getMatch(0)));
|
||||
// dLink.setBrowserUrl(source);
|
||||
// dLink.setAvailable(true);
|
||||
// dLink.setProperty(PROPERTY_DOWNLOADDIR, downloadDir);
|
||||
//
|
||||
// fp.add(dLink);
|
||||
//
|
||||
// result.add(dLink);
|
||||
}
|
||||
}
|
||||
|
||||
@ -159,16 +159,18 @@ public class LecturnityDownloaderExtension extends AbstractExtension<LecturnityD
|
||||
|
||||
@Override
|
||||
protected void stop() throws StopException {
|
||||
LazyHostPlugin.writeLock.lock();
|
||||
HostPluginController.getInstance().remove(hpw);
|
||||
LazyHostPlugin.writeLock.unlock();
|
||||
hpw = null;
|
||||
logger.finest("Lecturnity: Unloaded Host-Plugin!");
|
||||
// LazyHostPlugin.writeLock.lock();
|
||||
// HostPluginController.getInstance().remove(hpw);
|
||||
// LazyHostPlugin.writeLock.unlock();
|
||||
// hpw = null;
|
||||
// logger.finest("Lecturnity: Unloaded Host-Plugin!");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void start() throws StartException {
|
||||
hpw = new LazyHostPlugin("lecturnity-loader", "jd.plugins.optional.lecturnity.", "LecturnityLoader", "HIDE_ME", 0, "$Revision$");
|
||||
// hpw = new LazyHostPlugin("lecturnity-loader",
|
||||
// "jd.plugins.optional.lecturnity.", "LecturnityLoader", "HIDE_ME", 0,
|
||||
// "$Revision$");
|
||||
logger.finest("Lecturnity: Loaded Host-Plugin!");
|
||||
|
||||
inputAction = new MenuAction("Lecturnity", "lecturnity", 0) {
|
||||
|
@ -1,7 +1,6 @@
|
||||
package org.jdownloader.plugins.controller;
|
||||
|
||||
import java.lang.reflect.Constructor;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
@ -60,17 +59,10 @@ public abstract class LazyPlugin<T extends Plugin> {
|
||||
}
|
||||
|
||||
public T newInstance() {
|
||||
|
||||
try {
|
||||
getConstructor();
|
||||
return constructor.newInstance(constructorParameters);
|
||||
} catch (InstantiationException e) {
|
||||
throw new WTFException(e);
|
||||
} catch (IllegalAccessException e) {
|
||||
throw new WTFException(e);
|
||||
} catch (IllegalArgumentException e) {
|
||||
throw new WTFException(e);
|
||||
} catch (InvocationTargetException e) {
|
||||
} catch (final Throwable e) {
|
||||
throw new WTFException(e);
|
||||
}
|
||||
|
||||
@ -83,17 +75,15 @@ public abstract class LazyPlugin<T extends Plugin> {
|
||||
try {
|
||||
constructor = getPluginClass().getConstructor(new Class[] {});
|
||||
constructorParameters = EMPTY;
|
||||
} catch (NoSuchMethodException e) {
|
||||
} catch (Throwable e) {
|
||||
try {
|
||||
constructor = getPluginClass().getConstructor(new Class[] { PluginWrapper.class });
|
||||
constructorParameters = OLD;
|
||||
} catch (NoSuchMethodException e1) {
|
||||
throw new WTFException(e1);
|
||||
} catch (SecurityException e1) {
|
||||
throw new WTFException(e1);
|
||||
constructorParameters = new Object[] { new PluginWrapper(this) {
|
||||
|
||||
} };
|
||||
} catch (final Throwable e2) {
|
||||
throw new WTFException(e2);
|
||||
}
|
||||
} catch (SecurityException e) {
|
||||
throw new WTFException(e);
|
||||
}
|
||||
return constructor;
|
||||
}
|
||||
@ -103,13 +93,10 @@ public abstract class LazyPlugin<T extends Plugin> {
|
||||
protected Class<T> getPluginClass() {
|
||||
if (pluginClass != null) return pluginClass;
|
||||
synchronized (this) {
|
||||
// try again synched
|
||||
if (pluginClass != null) return pluginClass;
|
||||
try {
|
||||
System.out.println("Load Plugin:" + classname);
|
||||
|
||||
pluginClass = (Class<T>) PluginClassLoader.getInstance().loadClass(classname);
|
||||
} catch (ClassNotFoundException e) {
|
||||
} catch (Throwable e) {
|
||||
throw new WTFException(e);
|
||||
}
|
||||
return pluginClass;
|
||||
|
@ -2,8 +2,11 @@ package org.jdownloader.plugins.controller.crawler;
|
||||
|
||||
import java.net.MalformedURLException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
import jd.DecryptPluginWrapper;
|
||||
import jd.JDInitFlags;
|
||||
import jd.PluginWrapper;
|
||||
import jd.plugins.DecrypterPlugin;
|
||||
@ -32,140 +35,142 @@ public class CrawlerPluginController extends PluginController<PluginForDecrypt>
|
||||
return CrawlerPluginController.INSTANCE;
|
||||
}
|
||||
|
||||
private HashMap<String, LazyCrawlerPlugin> classNameMap;
|
||||
private ArrayList<LazyCrawlerPlugin> list;
|
||||
private HashMap<String, LazyCrawlerPlugin> crawlerPluginMap;
|
||||
private List<LazyCrawlerPlugin> list;
|
||||
|
||||
/**
|
||||
* Create a new instance of HostPluginController. This is a singleton class.
|
||||
* Access the only existing instance by using {@link #getInstance()}.
|
||||
*/
|
||||
private CrawlerPluginController() {
|
||||
this.classNameMap = new HashMap<String, LazyCrawlerPlugin>();
|
||||
this.list = new ArrayList<LazyCrawlerPlugin>();
|
||||
crawlerPluginMap = new HashMap<String, LazyCrawlerPlugin>();
|
||||
list = null;
|
||||
}
|
||||
|
||||
public void init() {
|
||||
|
||||
if (JDInitFlags.REFRESH_CACHE || JDInitFlags.SWITCH_RETURNED_FROM_UPDATE) {
|
||||
long t = System.currentTimeMillis();
|
||||
try {
|
||||
update();
|
||||
} catch (MalformedURLException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
System.out.println("Crawler Plugin Scanner Loader: " + (System.currentTimeMillis() - t));
|
||||
} else {
|
||||
// from cache
|
||||
long t = System.currentTimeMillis();
|
||||
loadFromCache();
|
||||
System.out.println("Crawler Plugin Cached Loader: " + (System.currentTimeMillis() - t));
|
||||
if (list.size() == 0) {
|
||||
// cache empty or damaged?
|
||||
t = System.currentTimeMillis();
|
||||
List<LazyCrawlerPlugin> plugins = new ArrayList<LazyCrawlerPlugin>();
|
||||
final long t = System.currentTimeMillis();
|
||||
try {
|
||||
if (JDInitFlags.REFRESH_CACHE || JDInitFlags.SWITCH_RETURNED_FROM_UPDATE) {
|
||||
try {
|
||||
update();
|
||||
} catch (MalformedURLException e) {
|
||||
e.printStackTrace();
|
||||
/* do a fresh scan */
|
||||
plugins = update();
|
||||
} catch (Throwable e) {
|
||||
Log.L.severe("@CrawlerPluginController: update failed!");
|
||||
Log.exception(e);
|
||||
}
|
||||
} else {
|
||||
/* try to load from cache */
|
||||
try {
|
||||
plugins = loadFromCache();
|
||||
} catch (Throwable e) {
|
||||
Log.L.severe("@CrawlerPluginController: cache failed!");
|
||||
Log.exception(e);
|
||||
}
|
||||
if (plugins.size() == 0) {
|
||||
try {
|
||||
/* do a fresh scan */
|
||||
plugins = update();
|
||||
} catch (Throwable e) {
|
||||
Log.L.severe("@CrawlerPluginController: update failed!");
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
System.out.println("Crawler Plugin Scanner Loader: " + (System.currentTimeMillis() - t));
|
||||
}
|
||||
} finally {
|
||||
System.out.println("@CrawlerPluginController: init " + (System.currentTimeMillis() - t));
|
||||
}
|
||||
|
||||
if (plugins.size() == 0) {
|
||||
Log.L.severe("@CrawlerPluginController: WTF, no plugins!");
|
||||
}
|
||||
list = Collections.unmodifiableList(plugins);
|
||||
for (LazyCrawlerPlugin l : list) {
|
||||
classNameMap.put(l.getClassname(), l);
|
||||
crawlerPluginMap.put(l.getDisplayName(), l);
|
||||
}
|
||||
System.out.println(list);
|
||||
|
||||
}
|
||||
|
||||
private void loadFromCache() {
|
||||
|
||||
private List<LazyCrawlerPlugin> loadFromCache() {
|
||||
List<LazyCrawlerPlugin> ret = new ArrayList<LazyCrawlerPlugin>();
|
||||
for (AbstractCrawlerPlugin ap : JSonStorage.restoreFrom(Application.getResource(CACHE_PATH), false, KEY, new TypeRef<ArrayList<AbstractCrawlerPlugin>>() {
|
||||
}, new ArrayList<AbstractCrawlerPlugin>())) {
|
||||
LazyCrawlerPlugin l = new LazyCrawlerPlugin(ap);
|
||||
list.add(l);
|
||||
ret.add(l);
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static public byte[] KEY = new byte[] { 0x01, 0x03, 0x11, 0x01, 0x01, 0x54, 0x01, 0x01, 0x01, 0x01, 0x12, 0x01, 0x01, 0x01, 0x22, 0x01 };
|
||||
|
||||
private void update() throws MalformedURLException {
|
||||
private List<LazyCrawlerPlugin> update() throws MalformedURLException {
|
||||
List<LazyCrawlerPlugin> ret = new ArrayList<LazyCrawlerPlugin>();
|
||||
ArrayList<AbstractCrawlerPlugin> save = new ArrayList<AbstractCrawlerPlugin>();
|
||||
for (PluginInfo<PluginForDecrypt> c : scan(PLUGIN_FOLDER_PATH)) {
|
||||
|
||||
DecrypterPlugin a = c.getClazz().getAnnotation(DecrypterPlugin.class);
|
||||
if (a != null) {
|
||||
String[] names = a.names();
|
||||
String[] patterns = a.urls();
|
||||
if (names.length == 0) {
|
||||
try {
|
||||
try {
|
||||
String[] names = a.names();
|
||||
String[] patterns = a.urls();
|
||||
if (names.length == 0) {
|
||||
/* create multiple crawler plugins from one source */
|
||||
patterns = (String[]) c.getClazz().getDeclaredMethod("getAnnotationUrls", new Class[] {}).invoke(null, new Object[] {});
|
||||
names = (String[]) c.getClazz().getDeclaredMethod("getAnnotationNames", new Class[] {}).invoke(null, new Object[] {});
|
||||
|
||||
} catch (Throwable e) {
|
||||
Log.exception(e);
|
||||
}
|
||||
}
|
||||
|
||||
if (names.length > 0) { throw new WTFException(); }
|
||||
for (int i = 0; i < names.length; i++) {
|
||||
try {
|
||||
AbstractCrawlerPlugin ap = new AbstractCrawlerPlugin(c.getClazz().getSimpleName());
|
||||
ap.setDisplayName(names[i]);
|
||||
ap.setPattern(patterns[i]);
|
||||
PluginForDecrypt plg;
|
||||
if (patterns.length != names.length) throw new WTFException("names.length != patterns.length");
|
||||
if (names.length == 0) { throw new WTFException("names.length=0"); }
|
||||
for (int i = 0; i < names.length; i++) {
|
||||
try {
|
||||
plg = (PluginForDecrypt) c.getClazz().newInstance();
|
||||
} catch (java.lang.InstantiationException e) {
|
||||
plg = (PluginForDecrypt) c.getClazz().getConstructor(new Class[] { PluginWrapper.class }).newInstance(new Object[] { null });
|
||||
AbstractCrawlerPlugin ap = new AbstractCrawlerPlugin(c.getClazz().getSimpleName());
|
||||
ap.setDisplayName(names[i]);
|
||||
ap.setPattern(patterns[i]);
|
||||
PluginForDecrypt plg = null;
|
||||
try {
|
||||
plg = (PluginForDecrypt) c.getClazz().newInstance();
|
||||
} catch (java.lang.InstantiationException e) {
|
||||
plg = (PluginForDecrypt) c.getClazz().getConstructor(new Class[] { PluginWrapper.class }).newInstance(new DecryptPluginWrapper(names[i], c.getClazz().getSimpleName(), patterns[i], 0, a.revision()));
|
||||
}
|
||||
LazyCrawlerPlugin l = new LazyCrawlerPlugin(ap, c.getClazz(), plg);
|
||||
ret.add(l);
|
||||
save.add(ap);
|
||||
Log.L.severe("@CrawlerPlugin ok:" + c);
|
||||
} catch (Throwable e) {
|
||||
Log.L.severe("@CrawlerPlugin failed:" + c + ":" + names[i]);
|
||||
Log.exception(e);
|
||||
}
|
||||
|
||||
LazyCrawlerPlugin l = new LazyCrawlerPlugin(ap, c.getClazz(), plg);
|
||||
list.add(l);
|
||||
save.add(ap);
|
||||
|
||||
} catch (Throwable e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
} catch (final Throwable e) {
|
||||
Log.L.severe("@CrawlerPlugin failed:" + c);
|
||||
Log.exception(e);
|
||||
}
|
||||
System.out.println(c);
|
||||
|
||||
} else {
|
||||
Log.L.severe("@HostPlugin missing for " + c);
|
||||
Log.L.severe("@CrawlerPlugin missing:" + c);
|
||||
}
|
||||
}
|
||||
save(save);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
private void save(ArrayList<AbstractCrawlerPlugin> save) {
|
||||
private void save(List<AbstractCrawlerPlugin> save) {
|
||||
JSonStorage.saveTo(Application.getResource(CACHE_PATH), false, KEY, JSonStorage.serializeToJson(save));
|
||||
}
|
||||
|
||||
private static final String PLUGIN_FOLDER_PATH = "jd/plugins/decrypter";
|
||||
|
||||
public ArrayList<LazyCrawlerPlugin> list() {
|
||||
public List<LazyCrawlerPlugin> list() {
|
||||
lazyInit();
|
||||
return list;
|
||||
}
|
||||
|
||||
public LazyCrawlerPlugin get(Class<? extends PluginForDecrypt> class1) {
|
||||
return classNameMap.get(class1.getName());
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public <T extends PluginForDecrypt> T newInstance(Class<T> class1) {
|
||||
|
||||
return (T) get(class1).newInstance();
|
||||
}
|
||||
|
||||
public boolean canHandle(String data) {
|
||||
ArrayList<LazyCrawlerPlugin> list = this.list;
|
||||
for (LazyCrawlerPlugin l : list) {
|
||||
if (l.canHandle(data)) return true;
|
||||
private void lazyInit() {
|
||||
if (list != null) return;
|
||||
synchronized (this) {
|
||||
if (list != null) return;
|
||||
init();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public LazyCrawlerPlugin get(String displayName) {
|
||||
lazyInit();
|
||||
return crawlerPluginMap.get(displayName);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -20,4 +20,10 @@ public class LazyCrawlerPlugin extends LazyPlugin<PluginForDecrypt> {
|
||||
super(ap.getPattern(), JD_PLUGINS_DECRYPTER + ap.getClassname(), ap.getDisplayName());
|
||||
}
|
||||
|
||||
@Override
|
||||
public PluginForDecrypt newInstance() {
|
||||
PluginForDecrypt ret = super.newInstance();
|
||||
ret.setLazyC(this);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
@ -2,15 +2,17 @@ package org.jdownloader.plugins.controller.host;
|
||||
|
||||
import java.net.MalformedURLException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
import jd.JDInitFlags;
|
||||
import jd.PluginWrapper;
|
||||
import jd.nutils.encoding.Encoding;
|
||||
import jd.plugins.HostPlugin;
|
||||
import jd.plugins.PluginForHost;
|
||||
import jd.plugins.PluginForHost;
|
||||
|
||||
import org.appwork.exceptions.WTFException;
|
||||
import org.appwork.storage.JSonStorage;
|
||||
import org.appwork.storage.TypeRef;
|
||||
import org.appwork.utils.Application;
|
||||
@ -33,140 +35,144 @@ public class HostPluginController extends PluginController<PluginForHost> {
|
||||
return HostPluginController.INSTANCE;
|
||||
}
|
||||
|
||||
private HashMap<String, LazyHostPlugin> classNameMap;
|
||||
private ArrayList<LazyHostPlugin> list;
|
||||
private HashMap<String, LazyHostPlugin> hosterPluginMap;
|
||||
private List<LazyHostPlugin> list;
|
||||
|
||||
/**
|
||||
* Create a new instance of HostPluginController. This is a singleton class.
|
||||
* Access the only existing instance by using {@link #getInstance()}.
|
||||
*/
|
||||
private HostPluginController() {
|
||||
this.classNameMap = new HashMap<String, LazyHostPlugin>();
|
||||
this.list = new ArrayList<LazyHostPlugin>();
|
||||
this.hosterPluginMap = new HashMap<String, LazyHostPlugin>();
|
||||
this.list = null;
|
||||
}
|
||||
|
||||
public void init() {
|
||||
|
||||
if (JDInitFlags.REFRESH_CACHE || JDInitFlags.SWITCH_RETURNED_FROM_UPDATE) {
|
||||
long t = System.currentTimeMillis();
|
||||
try {
|
||||
update();
|
||||
} catch (MalformedURLException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
System.out.println("Plugin Scanner Loader: " + (System.currentTimeMillis() - t));
|
||||
} else {
|
||||
// from cache
|
||||
long t = System.currentTimeMillis();
|
||||
loadFromCache();
|
||||
System.out.println("Plugin Cached Loader: " + (System.currentTimeMillis() - t));
|
||||
if (list.size() == 0) {
|
||||
// cache empty or damaged?
|
||||
t = System.currentTimeMillis();
|
||||
List<LazyHostPlugin> plugins = new ArrayList<LazyHostPlugin>();
|
||||
final long t = System.currentTimeMillis();
|
||||
try {
|
||||
if (JDInitFlags.REFRESH_CACHE || JDInitFlags.SWITCH_RETURNED_FROM_UPDATE) {
|
||||
try {
|
||||
update();
|
||||
} catch (MalformedURLException e) {
|
||||
e.printStackTrace();
|
||||
/* do a fresh scan */
|
||||
plugins = update();
|
||||
} catch (Throwable e) {
|
||||
Log.L.severe("@HostPluginController: update failed!");
|
||||
Log.exception(e);
|
||||
}
|
||||
} else {
|
||||
/* try to load from cache */
|
||||
try {
|
||||
plugins = loadFromCache();
|
||||
} catch (Throwable e) {
|
||||
Log.L.severe("@HostPluginController: cache failed!");
|
||||
Log.exception(e);
|
||||
}
|
||||
if (plugins.size() == 0) {
|
||||
try {
|
||||
/* do a fresh scan */
|
||||
plugins = update();
|
||||
} catch (Throwable e) {
|
||||
Log.L.severe("@HostPluginController: update failed!");
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
System.out.println("Plugin Scanner Loader: " + (System.currentTimeMillis() - t));
|
||||
}
|
||||
} finally {
|
||||
System.out.println("@HostPluginController: init " + (System.currentTimeMillis() - t));
|
||||
}
|
||||
|
||||
if (plugins.size() == 0) {
|
||||
Log.L.severe("@HostPluginController: WTF, no plugins!");
|
||||
}
|
||||
list = Collections.unmodifiableList(plugins);
|
||||
for (LazyHostPlugin l : list) {
|
||||
classNameMap.put(l.getClassname(), l);
|
||||
hosterPluginMap.put(l.getDisplayName(), l);
|
||||
}
|
||||
System.out.println(list);
|
||||
|
||||
}
|
||||
|
||||
private void loadFromCache() {
|
||||
|
||||
private List<LazyHostPlugin> loadFromCache() {
|
||||
List<LazyHostPlugin> ret = new ArrayList<LazyHostPlugin>();
|
||||
for (AbstractHostPlugin ap : JSonStorage.restoreFrom(Application.getResource(TMP_HOSTS_JSON), true, null, new TypeRef<ArrayList<AbstractHostPlugin>>() {
|
||||
}, new ArrayList<AbstractHostPlugin>())) {
|
||||
LazyHostPlugin l = new LazyHostPlugin(ap);
|
||||
list.add(l);
|
||||
ret.add(l);
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
private void update() throws MalformedURLException {
|
||||
private List<LazyHostPlugin> update() throws MalformedURLException {
|
||||
List<LazyHostPlugin> ret = new ArrayList<LazyHostPlugin>();
|
||||
ArrayList<AbstractHostPlugin> save = new ArrayList<AbstractHostPlugin>();
|
||||
for (PluginInfo<PluginForHost> c : scan(HOSTERPATH)) {
|
||||
|
||||
HostPlugin a = c.getClazz().getAnnotation(HostPlugin.class);
|
||||
if (a != null) {
|
||||
String[] names = a.names();
|
||||
String[] patterns = a.urls();
|
||||
if (names.length == 0) {
|
||||
try {
|
||||
try {
|
||||
String[] names = a.names();
|
||||
String[] patterns = a.urls();
|
||||
if (names.length == 0) {
|
||||
/* create multiple hoster plugins from one source */
|
||||
patterns = (String[]) c.getClazz().getDeclaredMethod("getAnnotationUrls", new Class[] {}).invoke(null, new Object[] {});
|
||||
names = (String[]) c.getClazz().getDeclaredMethod("getAnnotationNames", new Class[] {}).invoke(null, new Object[] {});
|
||||
|
||||
} catch (Throwable e) {
|
||||
Log.exception(e);
|
||||
}
|
||||
}
|
||||
|
||||
for (int i = 0; i < names.length; i++) {
|
||||
try {
|
||||
AbstractHostPlugin ap = new AbstractHostPlugin(c.getClazz().getSimpleName());
|
||||
ap.setDisplayName(names[i]);
|
||||
ap.setPattern(patterns[i]);
|
||||
PluginForHost plg;
|
||||
if (patterns.length != names.length) throw new WTFException("names.length != patterns.length");
|
||||
if (names.length == 0) { throw new WTFException("names.length=0"); }
|
||||
for (int i = 0; i < names.length; i++) {
|
||||
try {
|
||||
plg = (PluginForHost) c.getClazz().newInstance();
|
||||
} catch (java.lang.InstantiationException e) {
|
||||
plg = (PluginForHost) c.getClazz().getConstructor(new Class[] { PluginWrapper.class }).newInstance(null);
|
||||
AbstractHostPlugin ap = new AbstractHostPlugin(c.getClazz().getSimpleName());
|
||||
ap.setDisplayName(names[i]);
|
||||
ap.setPattern(patterns[i]);
|
||||
PluginForHost plg;
|
||||
try {
|
||||
plg = (PluginForHost) c.getClazz().newInstance();
|
||||
} catch (java.lang.InstantiationException e) {
|
||||
plg = (PluginForHost) c.getClazz().getConstructor(new Class[] { PluginWrapper.class }).newInstance(null);
|
||||
}
|
||||
ap.setPremium(plg.isPremiumEnabled());
|
||||
String purl = plg.getBuyPremiumUrl();
|
||||
if (purl != null && purl.startsWith(HTTP_JDOWNLOADER_ORG_R_PHP_U)) {
|
||||
purl = Encoding.urlDecode(purl.substring(HTTP_JDOWNLOADER_ORG_R_PHP_U.length()), false);
|
||||
}
|
||||
ap.setPremiumUrl(purl);
|
||||
LazyHostPlugin l = new LazyHostPlugin(ap, c.getClazz(), plg);
|
||||
list.add(l);
|
||||
save.add(ap);
|
||||
Log.L.severe("@HostPlugin ok:" + c);
|
||||
} catch (Throwable e) {
|
||||
Log.L.severe("@HostPlugin failed:" + c + ":" + names[i]);
|
||||
Log.exception(e);
|
||||
}
|
||||
ap.setPremium(plg.isPremiumEnabled());
|
||||
String purl = plg.getBuyPremiumUrl();
|
||||
if (purl != null && purl.startsWith(HTTP_JDOWNLOADER_ORG_R_PHP_U)) {
|
||||
purl = Encoding.urlDecode(purl.substring(HTTP_JDOWNLOADER_ORG_R_PHP_U.length()), false);
|
||||
}
|
||||
ap.setPremiumUrl(purl);
|
||||
LazyHostPlugin l = new LazyHostPlugin(ap, c.getClazz(), plg);
|
||||
list.add(l);
|
||||
save.add(ap);
|
||||
|
||||
} catch (Throwable e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
} catch (final Throwable e) {
|
||||
Log.L.severe("@HostPlugin failed:" + c);
|
||||
Log.exception(e);
|
||||
}
|
||||
System.out.println(c);
|
||||
|
||||
} else {
|
||||
Log.L.severe("@HostPlugin missing for " + c);
|
||||
Log.L.severe("@HostPlugin missing:" + c);
|
||||
}
|
||||
}
|
||||
save(save);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
private void save(ArrayList<AbstractHostPlugin> save) {
|
||||
private void save(List<AbstractHostPlugin> save) {
|
||||
JSonStorage.saveTo(Application.getResource(TMP_HOSTS_JSON), save);
|
||||
}
|
||||
|
||||
public ArrayList<LazyHostPlugin> list() {
|
||||
public List<LazyHostPlugin> list() {
|
||||
lazyInit();
|
||||
return list;
|
||||
}
|
||||
|
||||
public LazyHostPlugin get(Class<? extends PluginForHost> class1) {
|
||||
return classNameMap.get(class1.getName());
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public <T extends PluginForHost> T newInstance(Class<T> class1) {
|
||||
|
||||
return (T) get(class1).newInstance();
|
||||
}
|
||||
|
||||
public boolean canHandle(String data) {
|
||||
ArrayList<LazyHostPlugin> list = this.list;
|
||||
for (LazyHostPlugin l : list) {
|
||||
if (l.canHandle(data)) return true;
|
||||
private void lazyInit() {
|
||||
if (list != null) return;
|
||||
synchronized (this) {
|
||||
if (list != null) return;
|
||||
init();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public LazyHostPlugin get(String displayName) {
|
||||
lazyInit();
|
||||
return hosterPluginMap.get(displayName);
|
||||
}
|
||||
|
||||
private static final String HOSTERPATH = "jd/plugins/hoster";
|
||||
|
@ -57,4 +57,11 @@ public class LazyHostPlugin extends LazyPlugin<PluginForHost> {
|
||||
return DomainInfo.getInstance(getDisplayName()).getFavIcon();
|
||||
}
|
||||
|
||||
@Override
|
||||
public PluginForHost newInstance() {
|
||||
PluginForHost ret = super.newInstance();
|
||||
ret.setLazyP(this);
|
||||
return ret;
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user