Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bundles/org.eclipse.equinox.p2.garbagecollector/.classpath7
-rw-r--r--bundles/org.eclipse.equinox.p2.garbagecollector/.options1
-rw-r--r--bundles/org.eclipse.equinox.p2.garbagecollector/.project28
-rw-r--r--bundles/org.eclipse.equinox.p2.garbagecollector/.settings/org.eclipse.jdt.core.prefs343
-rw-r--r--bundles/org.eclipse.equinox.p2.garbagecollector/.settings/org.eclipse.jdt.ui.prefs9
-rw-r--r--bundles/org.eclipse.equinox.p2.garbagecollector/META-INF/MANIFEST.MF23
-rw-r--r--bundles/org.eclipse.equinox.p2.garbagecollector/build.properties6
-rw-r--r--bundles/org.eclipse.equinox.p2.garbagecollector/plugin.xml20
-rw-r--r--bundles/org.eclipse.equinox.p2.garbagecollector/schema/GarbageCollector.exsd87
-rw-r--r--bundles/org.eclipse.equinox.p2.garbagecollector/src/org/eclipse/equinox/p2/garbagecollector/CoreGarbageCollector.java84
-rw-r--r--bundles/org.eclipse.equinox.p2.garbagecollector/src/org/eclipse/equinox/p2/garbagecollector/GCActivator.java95
-rw-r--r--bundles/org.eclipse.equinox.p2.garbagecollector/src/org/eclipse/equinox/p2/garbagecollector/GarbageCollector.java179
-rw-r--r--bundles/org.eclipse.equinox.p2.garbagecollector/src/org/eclipse/equinox/p2/garbagecollector/IMarkSetProvider.java40
-rw-r--r--bundles/org.eclipse.equinox.p2.garbagecollector/src/org/eclipse/equinox/p2/garbagecollector/IRootSetProvider.java40
-rw-r--r--bundles/org.eclipse.equinox.p2.garbagecollector/src/org/eclipse/equinox/p2/garbagecollector/MarkSet.java44
-rw-r--r--bundles/org.eclipse.equinox.p2.garbagecollector/src/org/eclipse/equinox/p2/garbagecollector/Messages.java21
-rw-r--r--bundles/org.eclipse.equinox.p2.garbagecollector/src/org/eclipse/equinox/p2/garbagecollector/RootSet.java44
-rw-r--r--bundles/org.eclipse.equinox.p2.garbagecollector/src/org/eclipse/equinox/p2/garbagecollector/messages.properties8
-rw-r--r--bundles/org.eclipse.equinox.p2.garbagecollector/src/org/eclipse/equinox/p2/garbagecollector/prefs/GCPreferenceConstants.java5
19 files changed, 1084 insertions, 0 deletions
diff --git a/bundles/org.eclipse.equinox.p2.garbagecollector/.classpath b/bundles/org.eclipse.equinox.p2.garbagecollector/.classpath
new file mode 100644
index 000000000..751c8f2e5
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.garbagecollector/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/bundles/org.eclipse.equinox.p2.garbagecollector/.options b/bundles/org.eclipse.equinox.p2.garbagecollector/.options
new file mode 100644
index 000000000..d94f57254
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.garbagecollector/.options
@@ -0,0 +1 @@
+org.eclipse.equinox.p2.garbagecollector/debug = false \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.garbagecollector/.project b/bundles/org.eclipse.equinox.p2.garbagecollector/.project
new file mode 100644
index 000000000..7c0e92fc9
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.garbagecollector/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.equinox.p2.garbagecollector</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/bundles/org.eclipse.equinox.p2.garbagecollector/.settings/org.eclipse.jdt.core.prefs b/bundles/org.eclipse.equinox.p2.garbagecollector/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..7f87008fc
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.garbagecollector/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,343 @@
+#Wed Nov 21 13:22:14 EST 2007
+eclipse.preferences.version=1
+instance/org.eclipse.core.net/org.eclipse.core.net.hasMigrated=true
+org.eclipse.jdt.core.builder.cleanOutputFolder=clean
+org.eclipse.jdt.core.builder.duplicateResourceTask=warning
+org.eclipse.jdt.core.builder.invalidClasspath=abort
+org.eclipse.jdt.core.builder.recreateModifiedClassFileInOutputFolder=ignore
+org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch
+org.eclipse.jdt.core.circularClasspath=warning
+org.eclipse.jdt.core.classpath.exclusionPatterns=enabled
+org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=disabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.4
+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.doc.comment.support=enabled
+org.eclipse.jdt.core.compiler.maxProblemPerUnit=1000
+org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning
+org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
+org.eclipse.jdt.core.compiler.problem.deprecation=warning
+org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
+org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
+org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
+org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
+org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
+org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
+org.eclipse.jdt.core.compiler.problem.finalParameterBound=ignore
+org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
+org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
+org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
+org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
+org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
+org.eclipse.jdt.core.compiler.problem.invalidJavadoc=error
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private
+org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning
+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
+org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=enabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
+org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
+org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
+org.eclipse.jdt.core.compiler.problem.nullReference=ignore
+org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
+org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
+org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
+org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
+org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
+org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
+org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
+org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=warning
+org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
+org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
+org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=warning
+org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning
+org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
+org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=enabled
+org.eclipse.jdt.core.compiler.problem.unusedImport=warning
+org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
+org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
+org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=enabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=enabled
+org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
+org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
+org.eclipse.jdt.core.compiler.source=1.3
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_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_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=false
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=false
+org.eclipse.jdt.core.formatter.comment.format_line_comments=false
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=false
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=false
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert
+org.eclipse.jdt.core.formatter.comment.line_length=80
+org.eclipse.jdt.core.formatter.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.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=true
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation=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=do not 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=do not 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=do not 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=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=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.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.lineSplit=800
+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=false
+org.eclipse.jdt.core.formatter.tabulation.char=tab
+org.eclipse.jdt.core.formatter.tabulation.size=4
+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.incompatibleJDKLevel=ignore
+org.eclipse.jdt.core.incompleteClasspath=error
diff --git a/bundles/org.eclipse.equinox.p2.garbagecollector/.settings/org.eclipse.jdt.ui.prefs b/bundles/org.eclipse.equinox.p2.garbagecollector/.settings/org.eclipse.jdt.ui.prefs
new file mode 100644
index 000000000..9cb408d78
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.garbagecollector/.settings/org.eclipse.jdt.ui.prefs
@@ -0,0 +1,9 @@
+#Tue Nov 27 21:29:47 EST 2007
+eclipse.preferences.version=1
+formatter_settings_version=11
+org.eclipse.jdt.ui.ignorelowercasenames=true
+org.eclipse.jdt.ui.importorder=
+org.eclipse.jdt.ui.javadoc=false
+org.eclipse.jdt.ui.ondemandthreshold=3
+org.eclipse.jdt.ui.staticondemandthreshold=3
+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\="false" 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 * Copyright (c) 2007 IBM Corporation and others.\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http\://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors\:\r\n * IBM Corporation - initial API and implementation\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\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\r\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated method stub\r\n${body_statement}</template><template autoinsert\="true" 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}\r\n// ${todo} Auto-generated constructor stub</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>
diff --git a/bundles/org.eclipse.equinox.p2.garbagecollector/META-INF/MANIFEST.MF b/bundles/org.eclipse.equinox.p2.garbagecollector/META-INF/MANIFEST.MF
new file mode 100644
index 000000000..edfe3d458
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.garbagecollector/META-INF/MANIFEST.MF
@@ -0,0 +1,23 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Garbagecollector Plug-in
+Bundle-SymbolicName: org.eclipse.equinox.p2.garbagecollector;singleton:=true
+Bundle-Version: 1.0.0
+Import-Package: org.eclipse.core.runtime,
+ org.eclipse.core.runtime.preferences,
+ org.eclipse.equinox.internal.p2.core.helpers,
+ org.eclipse.equinox.p2.artifact.repository,
+ org.eclipse.equinox.p2.core,
+ org.eclipse.equinox.p2.core.eventbus,
+ org.eclipse.equinox.p2.metadata,
+ org.eclipse.equinox.p2.metadata.repository,
+ org.eclipse.osgi.util;version="1.1.0",
+ org.osgi.framework;version="1.4.0",
+ org.osgi.util.tracker;version="1.3.3"
+Bundle-Activator: org.eclipse.equinox.p2.garbagecollector.GCActivator
+Export-Package: org.eclipse.equinox.p2.garbagecollector,
+ org.eclipse.equinox.p2.garbagecollector.prefs
+Eclipse-LazyStart: true
+Require-Bundle: org.eclipse.equinox.p2.engine
+Bundle-RequiredExecutionEnvironment: J2SE-1.4,
+ CDC-1.1/Foundation-1.1
diff --git a/bundles/org.eclipse.equinox.p2.garbagecollector/build.properties b/bundles/org.eclipse.equinox.p2.garbagecollector/build.properties
new file mode 100644
index 000000000..3595411e8
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.garbagecollector/build.properties
@@ -0,0 +1,6 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ plugin.xml,\
+ schema/
diff --git a/bundles/org.eclipse.equinox.p2.garbagecollector/plugin.xml b/bundles/org.eclipse.equinox.p2.garbagecollector/plugin.xml
new file mode 100644
index 000000000..ea8401c08
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.garbagecollector/plugin.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.2"?>
+<plugin>
+ <extension-point id="marksetproviders" name="Garbage Collector" schema="schema/GarbageCollector.exsd"/>
+
+ <!--<extension
+ point="org.eclipse.equinox.p2.rootsetproviders"
+ id="RootSetTest">
+ <run
+ class="org.eclipse.equinox.p2.garbagecollector.test.RootSetTest"/>
+ </extension>-->
+
+ <!--<extension
+ point="org.eclipse.equinox.p2.marksetproviders"
+ id="TestProvider">
+ <run
+ class="org.eclipse.equinox.p2.garbagecollector.test.MarkSetProviderTest"/>
+</extension>-->
+
+</plugin>
diff --git a/bundles/org.eclipse.equinox.p2.garbagecollector/schema/GarbageCollector.exsd b/bundles/org.eclipse.equinox.p2.garbagecollector/schema/GarbageCollector.exsd
new file mode 100644
index 000000000..20e0acda5
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.garbagecollector/schema/GarbageCollector.exsd
@@ -0,0 +1,87 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- Schema file written by PDE -->
+<schema targetNamespace="org.eclipse.equinox.p2.garbagecollector">
+<annotation>
+ <appInfo>
+ <meta.schema plugin="org.eclipse.equinox.p2.garbagecollector" id="GarbageCollector" name="Garbage Collector"/>
+ </appInfo>
+ <documentation>
+ [Enter description of this extension point.]
+ </documentation>
+ </annotation>
+
+ <element name="extension">
+ <complexType>
+ <attribute name="point" type="string" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="id" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="name" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ <appInfo>
+ <meta.attribute translatable="true"/>
+ </appInfo>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="since"/>
+ </appInfo>
+ <documentation>
+ [Enter the first release in which this extension point appears.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="examples"/>
+ </appInfo>
+ <documentation>
+ [Enter extension point usage example here.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="apiInfo"/>
+ </appInfo>
+ <documentation>
+ [Enter API information here.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="implementation"/>
+ </appInfo>
+ <documentation>
+ [Enter information about supplied implementation of this extension point.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="copyright"/>
+ </appInfo>
+ <documentation>
+
+ </documentation>
+ </annotation>
+
+</schema>
diff --git a/bundles/org.eclipse.equinox.p2.garbagecollector/src/org/eclipse/equinox/p2/garbagecollector/CoreGarbageCollector.java b/bundles/org.eclipse.equinox.p2.garbagecollector/src/org/eclipse/equinox/p2/garbagecollector/CoreGarbageCollector.java
new file mode 100644
index 000000000..6c0083b85
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.garbagecollector/src/org/eclipse/equinox/p2/garbagecollector/CoreGarbageCollector.java
@@ -0,0 +1,84 @@
+/*******************************************************************************
+ * Copyright (c) 2007 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.p2.garbagecollector;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.equinox.internal.p2.core.helpers.LogHelper;
+import org.eclipse.equinox.p2.artifact.repository.IArtifactRepository;
+import org.eclipse.equinox.p2.metadata.IArtifactKey;
+
+/**
+ * Given a MarkSet, the CoreGarbageCollector removes any IArtifactDescriptors which
+ * are not mapped to be an IArtifactKey in the MarkSet.
+ */
+public class CoreGarbageCollector {
+
+ /**
+ * When set to true, information will be logged every time an artifact is removed
+ */
+ private static boolean debugMode = false;
+
+ private CoreGarbageCollector() {
+ //empty constructor
+ }
+
+ /**
+ * Public API. Run the Garbage Collector on the given MarkSet
+ * @param inRootSet the MarkSet on which a garbage collection is to be run
+ */
+ public static void cleanRootSet(MarkSet inRootSet) {
+ new CoreGarbageCollector().clean(inRootSet.getKeys(), inRootSet.getRepo());
+ }
+
+ /**
+ * Given a list of IArtifactKeys and an IArtifactRepository, removes all artifacts
+ * in aRepository that are not mapped to by an IArtifactKey in rootSet
+ */
+ public synchronized void clean(IArtifactKey[] rootSet, IArtifactRepository aRepository) {
+ IArtifactKey[] repositoryKeys = aRepository.getArtifactKeys();
+ for (int j = 0; j < repositoryKeys.length; j++) {
+ boolean artifactIsActive = false;
+ for (int k = 0; k < rootSet.length; k++) {
+ if (repositoryKeys[j].equals(rootSet[k])) {
+ artifactIsActive = true;
+ break;
+ }
+ }
+ if (!artifactIsActive) {
+ aRepository.removeDescriptor(repositoryKeys[j]);
+ if (debugMode) {
+ LogHelper.log(new Status(IStatus.INFO, GCActivator.ID, Messages.CoreGarbageCollector_0 + repositoryKeys[j]));
+ }
+ }
+ }
+ }
+
+ /**
+ * Convenience method. Sets debugMode to true then calls clean()
+ */
+ public static void cleanRootSetWithInfo(MarkSet inRootSet) {
+ setDebugMode(true);
+ new CoreGarbageCollector().clean(inRootSet.getKeys(), inRootSet.getRepo());
+ }
+
+ /**
+ * If set to true, debug mode will log information about each artifact deleted by the CoreGarbageCollector
+ * @param inDebugMode
+ */
+ public static void setDebugMode(boolean inDebugMode) {
+ if (inDebugMode) {
+ LogHelper.log(new Status(Status.INFO, GCActivator.ID, Messages.CoreGarbageCollector_1));
+ }
+ debugMode = inDebugMode;
+ }
+
+}
diff --git a/bundles/org.eclipse.equinox.p2.garbagecollector/src/org/eclipse/equinox/p2/garbagecollector/GCActivator.java b/bundles/org.eclipse.equinox.p2.garbagecollector/src/org/eclipse/equinox/p2/garbagecollector/GCActivator.java
new file mode 100644
index 000000000..9b1605f83
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.garbagecollector/src/org/eclipse/equinox/p2/garbagecollector/GCActivator.java
@@ -0,0 +1,95 @@
+/*******************************************************************************
+ * Copyright (c) 2007 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.p2.garbagecollector;
+
+import java.util.EventObject;
+import org.eclipse.core.runtime.preferences.IPreferencesService;
+import org.eclipse.equinox.p2.core.eventbus.ProvisioningEventBus;
+import org.eclipse.equinox.p2.core.eventbus.SynchronousProvisioningListener;
+import org.eclipse.equinox.p2.engine.*;
+import org.eclipse.equinox.p2.garbagecollector.prefs.GCPreferenceConstants;
+import org.eclipse.osgi.service.debug.DebugOptions;
+import org.osgi.framework.*;
+
+public class GCActivator implements BundleActivator {
+ public static final String ID = "org.eclipse.equinox.p2.garbagecollector"; //$NON-NLS-1$
+ private static final String DEBUG_STRING = GCActivator.ID + "/debug"; //$NON-NLS-1$
+ private static final boolean DEFAULT_DEBUG = false;
+
+ static BundleContext context;
+
+ private SynchronousProvisioningListener busListener;
+
+ static Object getService(BundleContext ctx, String name) {
+ ServiceReference reference = ctx.getServiceReference(name);
+ if (reference == null)
+ return null;
+ Object result = ctx.getService(reference);
+ ctx.ungetService(reference);
+ return result;
+ }
+
+ public void start(BundleContext inContext) throws Exception {
+ GCActivator.context = inContext;
+ DebugOptions debug = (DebugOptions) getService(inContext, DebugOptions.class.getName());
+ if (debug != null) {
+ CoreGarbageCollector.setDebugMode(debug.getBooleanOption(DEBUG_STRING, DEFAULT_DEBUG));
+ }
+ registerGCTrigger();
+ }
+
+ // Register the listener used to trigger the GC.
+ private void registerGCTrigger() {
+ ProvisioningEventBus eventBus = (ProvisioningEventBus) getService(GCActivator.context, ProvisioningEventBus.class.getName());
+ if (eventBus == null) {
+ System.err.println(Messages.GCActivator_0); //TODO Clean up.
+ }
+ eventBus.addListener(busListener = new SynchronousProvisioningListener() {
+ //The GC is triggered when an uninstall event occured during a "transaction" and the transaction is committed.
+ private boolean uninstallEventOccurred = false;
+
+ public void notify(EventObject o) {
+ if (o instanceof InstallableUnitEvent) {
+ InstallableUnitEvent event = (InstallableUnitEvent) o;
+ if (event.isUninstall() && event.isPost()) {
+ uninstallEventOccurred = true;
+ }
+ } else if (o instanceof CommitOperationEvent) {
+ if (uninstallEventOccurred == true) {
+ CommitOperationEvent event = (CommitOperationEvent) o;
+ IPreferencesService prefService = (IPreferencesService) getService(context, IPreferencesService.class.getName());
+ if (!(prefService.getBoolean(ID, GCPreferenceConstants.DISABLE_GARBAGE_COLLECT, false, null))) {
+ new GarbageCollector().runGC(event.getProfile());
+ }
+ uninstallEventOccurred = false;
+ }
+ } else if (o instanceof RollbackOperationEvent) {
+ uninstallEventOccurred = false;
+ }
+ }
+ });
+ }
+
+ private void unregisterGCTrigger() {
+ ProvisioningEventBus eventBus = (ProvisioningEventBus) getService(GCActivator.context, ProvisioningEventBus.class.getName());
+ if (eventBus != null && busListener != null)
+ eventBus.removeListener(busListener);
+ }
+
+ public void stop(BundleContext inContext) throws Exception {
+ GCActivator.context = null;
+ unregisterGCTrigger();
+ }
+
+ public static BundleContext getContext() {
+ return context;
+ }
+}
diff --git a/bundles/org.eclipse.equinox.p2.garbagecollector/src/org/eclipse/equinox/p2/garbagecollector/GarbageCollector.java b/bundles/org.eclipse.equinox.p2.garbagecollector/src/org/eclipse/equinox/p2/garbagecollector/GarbageCollector.java
new file mode 100644
index 000000000..af69c042f
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.garbagecollector/src/org/eclipse/equinox/p2/garbagecollector/GarbageCollector.java
@@ -0,0 +1,179 @@
+/*******************************************************************************
+ * Copyright (c) 2007 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.p2.garbagecollector;
+
+import java.util.*;
+import org.eclipse.core.runtime.*;
+import org.eclipse.equinox.internal.p2.core.helpers.LogHelper;
+import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper;
+import org.eclipse.equinox.p2.artifact.repository.IArtifactRepository;
+import org.eclipse.equinox.p2.engine.IProfileRegistry;
+import org.eclipse.equinox.p2.engine.Profile;
+import org.eclipse.equinox.p2.metadata.IArtifactKey;
+
+/**
+ * The main control point for the p2 garbage collector. Takes a Profile and runs the CoreGarbageCollector with the
+ * appropriate MarkSets for the repositories used by that Profile.
+ *
+ * Takes the profile passed in and creates a set (rootSetMap) that maps the artifact repositories it uses to the
+ * artifact keys its IUs hold. This is done by getting MarkSets from all registered IMarkSetProviders.
+ *
+ * Then, the MarkSets are obtained for every other registered Profile in a similar fashion. Each MarkSet is
+ * checked to see if its artifact repository is already a key in rootSetMap. If so, that MarkSet's artifact keys
+ * are added to the list that is mapped to by the artifact repository.
+ */
+public class GarbageCollector {
+ private static final String ATTRIBUTE_CLASS = "class"; //$NON-NLS-1$
+ private static final String PT_MARKSET = GCActivator.ID + ".marksetproviders"; //$NON-NLS-1$
+
+ /**
+ * Maps IArtifactRepository objects to their respective "marked set" of IArtifactKeys
+ */
+ private Map markSet;
+
+ public void runGC(Profile profileToGC) {
+ markSet = new HashMap();
+ IExtensionRegistry registry = RegistryFactory.getRegistry();
+ IConfigurationElement[] configElts = registry.getConfigurationElementsFor(PT_MARKSET);
+
+ //First we collect all repos and keys for the profile being GC'ed
+ for (int i = 0; i < configElts.length; i++) {
+ if (!(configElts[i].getName().equals("run"))) { //$NON-NLS-1$
+ continue;
+ }
+ IConfigurationElement runAttribute = configElts[i];
+ if (runAttribute == null) {
+ continue;
+ }
+
+ try {
+ ParameterizedSafeRunnable providerExecutor = new ParameterizedSafeRunnable(runAttribute, profileToGC);
+ SafeRunner.run(providerExecutor);
+ MarkSet[] inProfileRootSets = providerExecutor.getResult();
+ if (inProfileRootSets[0] == null)
+ return;
+
+ for (int j = 0; j < inProfileRootSets.length; j++) {
+ if (inProfileRootSets[j] == null) {
+ continue;
+ }
+ ArrayList keysList = (ArrayList) markSet.get(inProfileRootSets[j].getRepo());
+ if (keysList == null) {
+ keysList = new ArrayList();
+ markSet.put(inProfileRootSets[j].getRepo(), keysList);
+ }
+ addKeys(keysList, inProfileRootSets[j].getKeys());
+ }
+
+ } catch (ClassCastException e) {
+ LogHelper.log(new Status(IStatus.ERROR, GCActivator.ID, Messages.CoreGarbageCollector_0, e));
+ continue;
+ }
+ }
+
+ //Complete each MarkSet with the MarkSets provided by all of the other registered Profiles
+ traverseRegisteredProfiles();
+
+ //Run the GC on each MarkSet
+ Iterator keyIterator = markSet.keySet().iterator();
+ while (keyIterator.hasNext()) {
+ IArtifactRepository nextRepo = (IArtifactRepository) keyIterator.next();
+ IArtifactKey[] keys = (IArtifactKey[]) ((ArrayList) markSet.get(nextRepo)).toArray(new IArtifactKey[0]);
+ MarkSet aRootSet = new MarkSet(keys, nextRepo);
+ CoreGarbageCollector.cleanRootSet(aRootSet);
+ }
+ }
+
+ private void traverseRegisteredProfiles() {
+ IExtensionRegistry registry = Platform.getExtensionRegistry();
+ IConfigurationElement[] configElts = registry.getConfigurationElementsFor(PT_MARKSET);
+ for (int i = 0; i < configElts.length; i++) {
+ if (!(configElts[i].getName().equals("run"))) { //$NON-NLS-1$
+ continue;
+ }
+ IConfigurationElement runAttribute = configElts[i];
+ if (runAttribute == null) {
+ continue;
+ }
+
+ IProfileRegistry profileRegistry = (IProfileRegistry) ServiceHelper.getService(GCActivator.getContext(), IProfileRegistry.class.getName());
+ if (profileRegistry == null)
+ return;
+ Profile[] registeredProfiles = profileRegistry.getProfiles();
+
+ for (int j = 0; j < registeredProfiles.length; j++) {
+ contributeRootSets(runAttribute, registeredProfiles[j]);
+ }
+ }
+ }
+
+ private class ParameterizedSafeRunnable implements ISafeRunnable {
+ IConfigurationElement cfg;
+ Profile aProfile;
+ MarkSet[] aProfileRootSets;
+
+ public ParameterizedSafeRunnable(IConfigurationElement runtAttribute, Profile profile) {
+ cfg = runtAttribute;
+ aProfile = profile;
+ }
+
+ public void handleException(Throwable exception) {
+ LogHelper.log(new Status(IStatus.ERROR, GCActivator.ID, Messages.GarbageCollector_3, exception));
+ }
+
+ public void run() throws Exception {
+ IMarkSetProvider aRootSetProvider = (IMarkSetProvider) cfg.createExecutableExtension(ATTRIBUTE_CLASS);
+ if (aRootSetProvider == null) {
+ aProfileRootSets = null;
+ return;
+ }
+ aProfileRootSets = aRootSetProvider.getRootSets(aProfile);
+ }
+
+ public MarkSet[] getResult() {
+ return aProfileRootSets;
+ }
+ }
+
+ private void contributeRootSets(IConfigurationElement runAttribute, Profile aProfile) {
+ try {
+ ParameterizedSafeRunnable providerExecutor = new ParameterizedSafeRunnable(runAttribute, aProfile);
+ SafeRunner.run(providerExecutor);
+ MarkSet[] aProfileRootSets = providerExecutor.getResult();
+
+ if (aProfileRootSets[0] == null)
+ return;
+ for (int j = 0; j < aProfileRootSets.length; j++) {
+ if (aProfileRootSets[j] == null) {
+ continue;
+ }
+
+ //contribute any keys that are relevant to the Profile being GC'ed
+ if (markSet.containsKey(aProfileRootSets[j].getRepo())) {
+ ArrayList keysList = (ArrayList) markSet.get(aProfileRootSets[j].getRepo());
+ addKeys(keysList, aProfileRootSets[j].getKeys());
+ markSet.put(aProfileRootSets[j].getRepo(), keysList);
+ }
+ }
+
+ } catch (ClassCastException e) {
+ LogHelper.log(new Status(IStatus.ERROR, GCActivator.ID, Messages.CoreGarbageCollector_0, e));
+ }
+ }
+
+ private void addKeys(ArrayList keyList, IArtifactKey[] keyArray) {
+ for (int i = 0; i < keyArray.length; i++) {
+ if (!(keyList.contains(keyArray[i]))) {
+ keyList.add(keyArray[i]);
+ }
+ }
+ }
+}
diff --git a/bundles/org.eclipse.equinox.p2.garbagecollector/src/org/eclipse/equinox/p2/garbagecollector/IMarkSetProvider.java b/bundles/org.eclipse.equinox.p2.garbagecollector/src/org/eclipse/equinox/p2/garbagecollector/IMarkSetProvider.java
new file mode 100644
index 000000000..387aabd24
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.garbagecollector/src/org/eclipse/equinox/p2/garbagecollector/IMarkSetProvider.java
@@ -0,0 +1,40 @@
+/*******************************************************************************
+ * Copyright (c) 2007 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.p2.garbagecollector;
+
+import org.eclipse.equinox.p2.artifact.repository.IArtifactRepository;
+import org.eclipse.equinox.p2.engine.Profile;
+
+/**
+ * Any class which declares itself as an extension to the org.eclipse.equinox.p2.garbagecollector.rootsetproviders
+ * extension point must implement this interface. Given a Profile, implementors will need to provide an array of
+ * MarkSet objects, each of which should contain an IArtifactRepository and the IArtifactKeys used by the given
+ * Profile.
+ */
+public interface IMarkSetProvider {
+
+ /**
+ * Returns a MarkSet for each bundle pool used by a Profile p. The MarkSet will contain
+ * all of the IArtifactKeys found in p, as well as the IArtifactRepository over which the
+ * root set of keys is being created.
+ * @param p A profile whose ArtifactRepositories require a garbage collection
+ * @return An array of MarkSet object(s) containing p's IArtifactRepository and its root set of IArtifactKeys
+ */
+ public MarkSet[] getRootSets(Profile p);
+
+ /**
+ * Returns the IArtifactRepository for which this IMarkSetProvider provides a MarkSet.
+ * @param p The Profile whose IArtifactRepository is required
+ * @return The IArtifactRepository for which this IMarkSetProvider provides a MarkSet.
+ */
+ public IArtifactRepository getRepository(Profile p);
+
+}
diff --git a/bundles/org.eclipse.equinox.p2.garbagecollector/src/org/eclipse/equinox/p2/garbagecollector/IRootSetProvider.java b/bundles/org.eclipse.equinox.p2.garbagecollector/src/org/eclipse/equinox/p2/garbagecollector/IRootSetProvider.java
new file mode 100644
index 000000000..51cd6a9b9
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.garbagecollector/src/org/eclipse/equinox/p2/garbagecollector/IRootSetProvider.java
@@ -0,0 +1,40 @@
+/*******************************************************************************
+ * Copyright (c) 2007 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.p2.garbagecollector;
+
+import org.eclipse.equinox.p2.artifact.repository.IArtifactRepository;
+import org.eclipse.equinox.p2.engine.Profile;
+
+/**
+ * Any class which declares itself as an extension to the org.eclipse.equinox.p2.garbagecollector.rootsetproviders
+ * extension point must implement this interface. Given a Profile, implementors will need to provide an array of
+ * RootSet objects, each of which should contain an IArtifactRepository and the IArtifactKeys used by the given
+ * Profile.
+ */
+public interface IRootSetProvider {
+
+ /**
+ * Returns a RootSet for each bundle pool used by a Profile p. The RootSet will contain
+ * all of the IArtifactKeys found in p, as well as the IArtifactRepository over which the
+ * root set of keys is being created.
+ * @param p A profile whose ArtifactRepositories require a garbage collection
+ * @return An array of RootSet object(s) containing p's IArtifactRepository and its root set of IArtifactKeys
+ */
+ public RootSet getRootSet(Profile p);
+
+ /**
+ * Returns the IArtifactRepository for which this IRootSetProvider provides a RootSet.
+ * @param p The Profile whose IArtifactRepository is required
+ * @return The IArtifactRepository for which this IRootSetProvider provides a RootSet.
+ */
+ public IArtifactRepository getRepository(Profile p);
+
+}
diff --git a/bundles/org.eclipse.equinox.p2.garbagecollector/src/org/eclipse/equinox/p2/garbagecollector/MarkSet.java b/bundles/org.eclipse.equinox.p2.garbagecollector/src/org/eclipse/equinox/p2/garbagecollector/MarkSet.java
new file mode 100644
index 000000000..74d9f89b7
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.garbagecollector/src/org/eclipse/equinox/p2/garbagecollector/MarkSet.java
@@ -0,0 +1,44 @@
+/*******************************************************************************
+ * Copyright (c) 2007 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.p2.garbagecollector;
+
+import org.eclipse.equinox.p2.artifact.repository.IArtifactRepository;
+import org.eclipse.equinox.p2.metadata.IArtifactKey;
+
+/**
+ * Wrapper class used to store an IArtifactRepository and its root set of IArtifactKeys.
+ */
+public class MarkSet {
+
+ /**
+ * The root set for repo. This is the set of keys that currently map to an artifact in repo.
+ */
+ private IArtifactKey[] keys;
+
+ /**
+ * The ArtifactRepository for which a root set is being stored.
+ */
+ private IArtifactRepository repo;
+
+ public MarkSet(IArtifactKey[] inKeys, IArtifactRepository inRepo) {
+ keys = inKeys;
+ repo = inRepo;
+ }
+
+ public IArtifactKey[] getKeys() {
+ return keys;
+ }
+
+ public IArtifactRepository getRepo() {
+ return repo;
+ }
+
+}
diff --git a/bundles/org.eclipse.equinox.p2.garbagecollector/src/org/eclipse/equinox/p2/garbagecollector/Messages.java b/bundles/org.eclipse.equinox.p2.garbagecollector/src/org/eclipse/equinox/p2/garbagecollector/Messages.java
new file mode 100644
index 000000000..9c5f8e867
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.garbagecollector/src/org/eclipse/equinox/p2/garbagecollector/Messages.java
@@ -0,0 +1,21 @@
+package org.eclipse.equinox.p2.garbagecollector;
+
+import org.eclipse.osgi.util.NLS;
+
+public class Messages extends NLS {
+ private static final String BUNDLE_NAME = "org.eclipse.equinox.p2.garbagecollector.messages"; //$NON-NLS-1$
+
+ public static String CoreGarbageCollector_0;
+ public static String CoreGarbageCollector_1;
+ public static String GarbageCollector_0;
+ public static String GarbageCollector_1;
+ public static String GarbageCollector_2;
+ public static String GarbageCollector_3;
+ public static String GarbageCollector_4;
+ public static String GCActivator_0;
+
+ static {
+ // load message values from bundle file
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+}
diff --git a/bundles/org.eclipse.equinox.p2.garbagecollector/src/org/eclipse/equinox/p2/garbagecollector/RootSet.java b/bundles/org.eclipse.equinox.p2.garbagecollector/src/org/eclipse/equinox/p2/garbagecollector/RootSet.java
new file mode 100644
index 000000000..43cb7ac67
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.garbagecollector/src/org/eclipse/equinox/p2/garbagecollector/RootSet.java
@@ -0,0 +1,44 @@
+/*******************************************************************************
+ * Copyright (c) 2007 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.p2.garbagecollector;
+
+import org.eclipse.equinox.p2.artifact.repository.IArtifactRepository;
+import org.eclipse.equinox.p2.metadata.IArtifactKey;
+
+/**
+ * Wrapper class used to store an IArtifactRepository and its root set of IArtifactKeys.
+ */
+public class RootSet {
+
+ /**
+ * The root set for repo. This is the set of keys that currently map to an artifact in repo.
+ */
+ private IArtifactKey[] keys;
+
+ /**
+ * The ArtifactRepository for which a root set is being stored.
+ */
+ private IArtifactRepository repo;
+
+ public RootSet(IArtifactKey[] inKeys, IArtifactRepository inRepo) {
+ keys = inKeys;
+ repo = inRepo;
+ }
+
+ public IArtifactKey[] getKeys() {
+ return keys;
+ }
+
+ public IArtifactRepository getRepo() {
+ return repo;
+ }
+
+}
diff --git a/bundles/org.eclipse.equinox.p2.garbagecollector/src/org/eclipse/equinox/p2/garbagecollector/messages.properties b/bundles/org.eclipse.equinox.p2.garbagecollector/src/org/eclipse/equinox/p2/garbagecollector/messages.properties
new file mode 100644
index 000000000..2e985e3c9
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.garbagecollector/src/org/eclipse/equinox/p2/garbagecollector/messages.properties
@@ -0,0 +1,8 @@
+CoreGarbageCollector_0=Removing ArtifactKey: ${0}.
+CoreGarbageCollector_1=CoreGarbageCollector now running in debug mode.
+GarbageCollector_0=Extension does not implement IRootSetProvider interface.
+GarbageCollector_1=Could not instantiate an instance of the provided extension.
+GarbageCollector_2=A failure occurred while getting the root set.
+GarbageCollector_3=Error occurred during call to an IRootSetProvider.
+GarbageCollector_4=Number of RootSets has exceeded GarbageCollector.NUMBER_OF_ROOTSETS.
+GCActivator_0=ProvisioningEventBus service could not be obtained, CoreGarbageCollector will not function properly.
diff --git a/bundles/org.eclipse.equinox.p2.garbagecollector/src/org/eclipse/equinox/p2/garbagecollector/prefs/GCPreferenceConstants.java b/bundles/org.eclipse.equinox.p2.garbagecollector/src/org/eclipse/equinox/p2/garbagecollector/prefs/GCPreferenceConstants.java
new file mode 100644
index 000000000..4c0f7f461
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.garbagecollector/src/org/eclipse/equinox/p2/garbagecollector/prefs/GCPreferenceConstants.java
@@ -0,0 +1,5 @@
+package org.eclipse.equinox.p2.garbagecollector.prefs;
+
+public class GCPreferenceConstants {
+ public static final String DISABLE_GARBAGE_COLLECT = "gc_disabled"; //$NON-NLS-1$
+}

Back to the top