Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 200803 | Differences between
and this patch

Collapse All | Expand All

(-).settings/org.eclipse.jdt.core.prefs (-1 / +325 lines)
Lines 1-7 Link Here
1
#Fri Apr 20 14:30:58 GMT-08:00 2007
1
#Thu Aug 16 11:00:59 EDT 2007
2
eclipse.preferences.version=1
2
eclipse.preferences.version=1
3
org.eclipse.jdt.core.builder.cleanOutputFolder=clean
4
org.eclipse.jdt.core.builder.duplicateResourceTask=warning
5
org.eclipse.jdt.core.builder.invalidClasspath=abort
6
org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch
7
org.eclipse.jdt.core.circularClasspath=error
8
org.eclipse.jdt.core.classpath.exclusionPatterns=enabled
9
org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled
10
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=disabled
3
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.1
11
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.1
12
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
4
org.eclipse.jdt.core.compiler.compliance=1.3
13
org.eclipse.jdt.core.compiler.compliance=1.3
14
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
15
org.eclipse.jdt.core.compiler.debug.localVariable=generate
16
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
17
org.eclipse.jdt.core.compiler.doc.comment.support=enabled
18
org.eclipse.jdt.core.compiler.maxProblemPerUnit=1000
19
org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
5
org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning
20
org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning
21
org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
22
org.eclipse.jdt.core.compiler.problem.deprecation=warning
23
org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
24
org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
25
org.eclipse.jdt.core.compiler.problem.discouragedReference=error
26
org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
6
org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
27
org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
28
org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
29
org.eclipse.jdt.core.compiler.problem.finalParameterBound=ignore
30
org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
31
org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
32
org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
33
org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
34
org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
35
org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
36
org.eclipse.jdt.core.compiler.problem.invalidJavadoc=error
37
org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private
38
org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning
39
org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
40
org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
41
org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
42
org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
43
org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
44
org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
45
org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=enabled
46
org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
47
org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
48
org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
49
org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
50
org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
51
org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
52
org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
53
org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
54
org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
55
org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
56
org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
57
org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=warning
58
org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
59
org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
60
org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=warning
61
org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
62
org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning
63
org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
64
org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
65
org.eclipse.jdt.core.compiler.problem.unsafeTypeOperation=warning
66
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
67
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=enabled
68
org.eclipse.jdt.core.compiler.problem.unusedImport=error
69
org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
70
org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
71
org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=enabled
72
org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=enabled
73
org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
74
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
7
org.eclipse.jdt.core.compiler.source=1.3
75
org.eclipse.jdt.core.compiler.source=1.3
76
org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
77
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
78
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
79
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
80
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
81
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
82
org.eclipse.jdt.core.formatter.alignment_for_assignment=0
83
org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
84
org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
85
org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
86
org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
87
org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
88
org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
89
org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
90
org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
91
org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
92
org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
93
org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
94
org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
95
org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
96
org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
97
org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
98
org.eclipse.jdt.core.formatter.blank_lines_after_package=1
99
org.eclipse.jdt.core.formatter.blank_lines_before_field=0
100
org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
101
org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
102
org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
103
org.eclipse.jdt.core.formatter.blank_lines_before_method=1
104
org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
105
org.eclipse.jdt.core.formatter.blank_lines_before_package=0
106
org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
107
org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
108
org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
109
org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
110
org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
111
org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
112
org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
113
org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
114
org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
115
org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
116
org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
117
org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
118
org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
119
org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
120
org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
121
org.eclipse.jdt.core.formatter.comment.format_block_comments=false
122
org.eclipse.jdt.core.formatter.comment.format_header=false
123
org.eclipse.jdt.core.formatter.comment.format_html=true
124
org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=false
125
org.eclipse.jdt.core.formatter.comment.format_line_comments=false
126
org.eclipse.jdt.core.formatter.comment.format_source_code=true
127
org.eclipse.jdt.core.formatter.comment.indent_parameter_description=false
128
org.eclipse.jdt.core.formatter.comment.indent_root_tags=false
129
org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
130
org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert
131
org.eclipse.jdt.core.formatter.comment.line_length=80
132
org.eclipse.jdt.core.formatter.compact_else_if=true
133
org.eclipse.jdt.core.formatter.continuation_indentation=2
134
org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
135
org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
136
org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
137
org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
138
org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
139
org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
140
org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
141
org.eclipse.jdt.core.formatter.indent_empty_lines=false
142
org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
143
org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
144
org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
145
org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=true
146
org.eclipse.jdt.core.formatter.indentation.size=4
147
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation=insert
148
org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
149
org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
150
org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
151
org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
152
org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
153
org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
154
org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
155
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
156
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=do not insert
157
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
158
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
159
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
160
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
161
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
162
org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
163
org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
164
org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
165
org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
166
org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
167
org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
168
org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
169
org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
170
org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
171
org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
172
org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
173
org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
174
org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
175
org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
176
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
177
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
178
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
179
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
180
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
181
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
182
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
183
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
184
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
185
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
186
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
187
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
188
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
189
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
190
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
191
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
192
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
193
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
194
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
195
org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
196
org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
197
org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
198
org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
199
org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=do not insert
200
org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
201
org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
202
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
203
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
204
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
205
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
206
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
207
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
208
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
209
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
210
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
211
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
212
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
213
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
214
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
215
org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
216
org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
217
org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
218
org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
219
org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
220
org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
221
org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
222
org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
223
org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
224
org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
225
org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
226
org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
227
org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
228
org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=do not insert
229
org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
230
org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
231
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
232
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
233
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
234
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
235
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
236
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
237
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
238
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
239
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
240
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
241
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
242
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
243
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
244
org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
245
org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=insert
246
org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
247
org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=insert
248
org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
249
org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
250
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
251
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
252
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
253
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
254
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
255
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
256
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
257
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
258
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
259
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
260
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
261
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
262
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
263
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
264
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
265
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
266
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
267
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
268
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
269
org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
270
org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
271
org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
272
org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
273
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
274
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
275
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
276
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
277
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
278
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
279
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
280
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
281
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
282
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
283
org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
284
org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
285
org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
286
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
287
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
288
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
289
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
290
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
291
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
292
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
293
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
294
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
295
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
296
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
297
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
298
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
299
org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
300
org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
301
org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
302
org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
303
org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
304
org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
305
org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
306
org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
307
org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
308
org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
309
org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
310
org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
311
org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
312
org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
313
org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
314
org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
315
org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
316
org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
317
org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
318
org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
319
org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
320
org.eclipse.jdt.core.formatter.lineSplit=800
321
org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
322
org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
323
org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
324
org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
325
org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=false
326
org.eclipse.jdt.core.formatter.tabulation.char=tab
327
org.eclipse.jdt.core.formatter.tabulation.size=4
328
org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
329
org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
330
org.eclipse.jdt.core.incompatibleJDKLevel=ignore
331
org.eclipse.jdt.core.incompleteClasspath=error
(-)META-INF/MANIFEST.MF (-1 / +2 lines)
Lines 15-18 Link Here
15
 J2SE-1.3
15
 J2SE-1.3
16
Require-Bundle: org.eclipse.equinox.common,
16
Require-Bundle: org.eclipse.equinox.common,
17
 org.eclipse.ecf
17
 org.eclipse.ecf
18
Import-Package: org.osgi.framework;version="1.3.0"
18
Import-Package: org.eclipse.osgi.util;version="1.1.0",
19
 org.osgi.framework;version="1.3.0"
(-)plugin.xml (+9 lines)
Lines 1-5 Link Here
1
<?xml version="1.0" encoding="UTF-8"?>
1
<?xml version="1.0" encoding="UTF-8"?>
2
<?eclipse version="3.2"?>
2
<?eclipse version="3.2"?>
3
<plugin>
3
<plugin>
4
   <extension
5
         point="org.eclipse.ecf.containerFactory">
6
      <containerFactory
7
            class="org.eclipse.ecf.internal.discovery.CompositeDiscoveryContainerInstantiator"
8
            description="Composite Discovery Container"
9
            name="ecf.discovery.*"
10
            server="true">
11
       </containerFactory>
12
   </extension>
4
13
5
</plugin>
14
</plugin>
(-)src/org/eclipse/ecf/internal/discovery/messages.properties (+3 lines)
Added Link Here
1
CompositeDiscoveryContainerInstantiator_2=Exception making Composite container
2
CompositeDiscoveryContainerInstantiator_3=Exception making Composite container
3
CompositeDiscoveryContainer_DEPRECATED=deprecated API isn't supported by CompositeContainer
(-).settings/org.eclipse.jdt.ui.prefs (+58 lines)
Added Link Here
1
#Tue Aug 21 11:27:48 CDT 2007
2
eclipse.preferences.version=1
3
editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
4
formatter_profile=_core
5
formatter_settings_version=11
6
internal.default.compliance=user
7
org.eclipse.jdt.ui.ignorelowercasenames=true
8
org.eclipse.jdt.ui.importorder=;
9
org.eclipse.jdt.ui.ondemandthreshold=3
10
org.eclipse.jdt.ui.staticondemandthreshold=99
11
sp_cleanup.add_default_serial_version_id=true
12
sp_cleanup.add_generated_serial_version_id=false
13
sp_cleanup.add_missing_annotations=true
14
sp_cleanup.add_missing_deprecated_annotations=true
15
sp_cleanup.add_missing_nls_tags=false
16
sp_cleanup.add_missing_override_annotations=true
17
sp_cleanup.add_serial_version_id=false
18
sp_cleanup.always_use_blocks=true
19
sp_cleanup.always_use_parentheses_in_expressions=false
20
sp_cleanup.always_use_this_for_non_static_field_access=false
21
sp_cleanup.always_use_this_for_non_static_method_access=false
22
sp_cleanup.convert_to_enhanced_for_loop=false
23
sp_cleanup.correct_indentation=false
24
sp_cleanup.format_source_code=true
25
sp_cleanup.make_local_variable_final=false
26
sp_cleanup.make_parameters_final=false
27
sp_cleanup.make_private_fields_final=true
28
sp_cleanup.make_variable_declarations_final=true
29
sp_cleanup.never_use_blocks=false
30
sp_cleanup.never_use_parentheses_in_expressions=true
31
sp_cleanup.on_save_use_additional_actions=false
32
sp_cleanup.organize_imports=true
33
sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
34
sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
35
sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
36
sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
37
sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
38
sp_cleanup.remove_private_constructors=true
39
sp_cleanup.remove_trailing_whitespaces=false
40
sp_cleanup.remove_trailing_whitespaces_all=true
41
sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
42
sp_cleanup.remove_unnecessary_casts=true
43
sp_cleanup.remove_unnecessary_nls_tags=false
44
sp_cleanup.remove_unused_imports=false
45
sp_cleanup.remove_unused_local_variables=false
46
sp_cleanup.remove_unused_private_fields=true
47
sp_cleanup.remove_unused_private_members=false
48
sp_cleanup.remove_unused_private_methods=true
49
sp_cleanup.remove_unused_private_types=true
50
sp_cleanup.sort_members=false
51
sp_cleanup.sort_members_all=false
52
sp_cleanup.use_blocks=false
53
sp_cleanup.use_blocks_only_for_return_and_throw=false
54
sp_cleanup.use_parentheses_in_expressions=false
55
sp_cleanup.use_this_for_non_static_field_access=false
56
sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
57
sp_cleanup.use_this_for_non_static_method_access=false
58
sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
(-)src/org/eclipse/ecf/internal/discovery/Messages.java (+17 lines)
Added Link Here
1
package org.eclipse.ecf.internal.discovery;
2
3
import org.eclipse.osgi.util.NLS;
4
5
public class Messages extends NLS {
6
	private static final String BUNDLE_NAME = "org.eclipse.ecf.internal.discovery.messages"; //$NON-NLS-1$
7
	public static String CompositeDiscoveryContainer_DEPRECATED;
8
	public static String CompositeDiscoveryContainerInstantiator_2;
9
	public static String CompositeDiscoveryContainerInstantiator_3;
10
	static {
11
		// initialize resource bundle
12
		NLS.initializeMessages(BUNDLE_NAME, Messages.class);
13
	}
14
15
	private Messages() {
16
	}
17
}
(-)src/org/eclipse/ecf/internal/discovery/CompositeDiscoveryContainer.java (+382 lines)
Added Link Here
1
/*******************************************************************************
2
 * Copyright (c) 2007 Versant Corp.
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
6
 * http://www.eclipse.org/legal/epl-v10.html
7
 *
8
 * Contributors:
9
 *     Markus Kuppe (mkuppe <at> versant <dot> com) - initial API and implementation
10
 ******************************************************************************/
11
package org.eclipse.ecf.internal.discovery;
12
13
import java.util.*;
14
import org.eclipse.ecf.core.*;
15
import org.eclipse.ecf.core.events.ContainerDisconnectedEvent;
16
import org.eclipse.ecf.core.events.ContainerDisconnectingEvent;
17
import org.eclipse.ecf.core.identity.*;
18
import org.eclipse.ecf.core.security.IConnectContext;
19
import org.eclipse.ecf.core.util.ECFException;
20
import org.eclipse.ecf.discovery.*;
21
import org.eclipse.ecf.discovery.identity.IServiceID;
22
import org.eclipse.ecf.discovery.identity.IServiceTypeID;
23
import org.eclipse.ecf.discovery.service.IDiscoveryService;
24
25
public class CompositeDiscoveryContainer extends AbstractContainer implements IContainer, IDiscoveryService {
26
	private class CompositeContainerServiceListener implements IServiceListener {
27
28
		/*
29
		 * (non-Javadoc)
30
		 * 
31
		 * @see org.eclipse.ecf.discovery.IServiceListener#serviceAdded(org.eclipse.ecf.discovery.IServiceEvent)
32
		 */
33
		public void serviceAdded(IServiceEvent event) {
34
			synchronized (serviceListeners) {
35
				List l = (List) serviceListeners.get(event.getServiceInfo().getServiceID().getServiceTypeID());
36
				synchronized (l) {
37
					for (Iterator itr = l.iterator(); itr.hasNext();) {
38
						IServiceListener isl = (IServiceListener) itr.next();
39
						isl.serviceAdded(event);
40
					}
41
				}
42
			}
43
		}
44
45
		/*
46
		 * (non-Javadoc)
47
		 * 
48
		 * @see org.eclipse.ecf.discovery.IServiceListener#serviceRemoved(org.eclipse.ecf.discovery.IServiceEvent)
49
		 */
50
		public void serviceRemoved(IServiceEvent event) {
51
			synchronized (serviceListeners) {
52
				List l = (List) serviceListeners.get(event.getServiceInfo().getServiceID().getServiceTypeID());
53
				synchronized (l) {
54
					for (Iterator itr = l.iterator(); itr.hasNext();) {
55
						IServiceListener isl = (IServiceListener) itr.next();
56
						isl.serviceRemoved(event);
57
					}
58
				}
59
			}
60
		}
61
62
		/*
63
		 * (non-Javadoc)
64
		 * 
65
		 * @see org.eclipse.ecf.discovery.IServiceListener#serviceResolved(org.eclipse.ecf.discovery.IServiceEvent)
66
		 */
67
		public void serviceResolved(IServiceEvent event) {
68
			synchronized (serviceListeners) {
69
				List l = (List) serviceListeners.get(event.getServiceInfo().getServiceID().getServiceTypeID());
70
				synchronized (l) {
71
					for (Iterator itr = l.iterator(); itr.hasNext();) {
72
						IServiceListener isl = (IServiceListener) itr.next();
73
						isl.serviceResolved(event);
74
					}
75
				}
76
			}
77
		}
78
	}
79
80
	private class CompositeContainerServiceTypeListener implements IServiceTypeListener {
81
82
		/*
83
		 * (non-Javadoc)
84
		 * 
85
		 * @see org.eclipse.ecf.discovery.IServiceTypeListener#serviceTypeAdded(org.eclipse.ecf.discovery.IServiceEvent)
86
		 */
87
		public void serviceTypeAdded(IServiceEvent event) {
88
			// notify our listeners
89
			synchronized (serviceTypeListeners) {
90
				for (Iterator itr = serviceTypeListeners.iterator(); itr.hasNext();) {
91
					IServiceTypeListener listener = (IServiceTypeListener) itr.next();
92
					listener.serviceTypeAdded(event);
93
				}
94
			}
95
			// add ourself as a listener to the underlying providers
96
			IServiceTypeID istid = event.getServiceInfo().getServiceID().getServiceTypeID();
97
			synchronized (containers) {
98
				for (Iterator itr = containers.iterator(); itr.hasNext();) {
99
					//TODO ccstl doesn't have to be a listener for a non matching (namespace) container, but it doesn't hurt either
100
					IDiscoveryContainerAdapter idca = (IDiscoveryContainerAdapter) itr.next();
101
					idca.addServiceListener(istid, ccsl);
102
				}
103
			}
104
		}
105
	}
106
107
	protected CompositeContainerServiceListener ccsl = new CompositeContainerServiceListener();
108
	protected CompositeContainerServiceTypeListener ccstl = new CompositeContainerServiceTypeListener();
109
110
	protected List containers = new ArrayList();
111
112
	private ID id;
113
114
	protected Map serviceListeners = new HashMap();
115
116
	protected List serviceTypeListeners = new ArrayList();
117
118
	public CompositeDiscoveryContainer(List containers) throws IDCreateException {
119
		this.containers = containers;
120
		this.id = IDFactory.getDefault().createStringID(CompositeDiscoveryContainer.class.getName());
121
	}
122
123
	/*
124
	 * (non-Javadoc)
125
	 * 
126
	 * @see org.eclipse.ecf.discovery.IDiscoveryContainerAdapter#addServiceListener(org.eclipse.ecf.discovery.identity.IServiceTypeID,
127
	 *      org.eclipse.ecf.discovery.IServiceListener)
128
	 */
129
	public void addServiceListener(IServiceTypeID type, IServiceListener listener) {
130
		synchronized (serviceListeners) {
131
			List l = (List) serviceListeners.get(type);
132
			if (l == null) {
133
				l = new ArrayList();
134
				serviceListeners.put(type, l);
135
			}
136
			l.add(listener);
137
		}
138
	}
139
140
	/**
141
	 * @deprecated
142
	 * @see org.eclipse.ecf.discovery.IDiscoveryContainerAdapter#addServiceListener(java.lang.String,
143
	 *      org.eclipse.ecf.discovery.IServiceListener)
144
	 */
145
	public void addServiceListener(String type, IServiceListener listener) {
146
		throw new UnsupportedOperationException(Messages.CompositeDiscoveryContainer_DEPRECATED);
147
	}
148
149
	/*
150
	 * (non-Javadoc)
151
	 * 
152
	 * @see org.eclipse.ecf.discovery.IDiscoveryContainerAdapter#addServiceTypeListener(org.eclipse.ecf.discovery.IServiceTypeListener)
153
	 */
154
	public void addServiceTypeListener(IServiceTypeListener listener) {
155
		synchronized (serviceTypeListeners) {
156
			serviceTypeListeners.add(listener);
157
		}
158
	}
159
160
	/*
161
	 * (non-Javadoc)
162
	 * 
163
	 * @see org.eclipse.ecf.core.IContainer#connect(org.eclipse.ecf.core.identity.ID,
164
	 *      org.eclipse.ecf.core.security.IConnectContext)
165
	 */
166
	public void connect(ID targetID, IConnectContext connectContext) throws ContainerConnectException {
167
		synchronized (containers) {
168
			for (Iterator itr = containers.iterator(); itr.hasNext();) {
169
				IContainer container = (IContainer) itr.next();
170
				container.connect(targetID, connectContext);
171
				IDiscoveryContainerAdapter idca = (IDiscoveryContainerAdapter) container;
172
				idca.addServiceTypeListener(ccstl);
173
			}
174
		}
175
	}
176
177
	/*
178
	 * (non-Javadoc)
179
	 * 
180
	 * @see org.eclipse.ecf.core.IContainer#disconnect()
181
	 */
182
	public void disconnect() {
183
		fireContainerEvent(new ContainerDisconnectingEvent(this.getID(), getConnectedID()));
184
		synchronized (containers) {
185
			for (Iterator itr = containers.iterator(); itr.hasNext();) {
186
				IContainer container = (IContainer) itr.next();
187
				container.disconnect();
188
			}
189
		}
190
		fireContainerEvent(new ContainerDisconnectedEvent(this.getID(), getConnectedID()));
191
	}
192
193
	/* (non-Javadoc)
194
	 * @see org.eclipse.ecf.core.AbstractContainer#dispose()
195
	 */
196
	public void dispose() {
197
		disconnect();
198
		synchronized (containers) {
199
			for (Iterator itr = containers.iterator(); itr.hasNext();) {
200
				IContainer container = (IContainer) itr.next();
201
				container.dispose();
202
			}
203
		}
204
		super.dispose();
205
	}
206
207
	/* (non-Javadoc)
208
	 * @see org.eclipse.ecf.core.IContainer#getConnectedID()
209
	 */
210
	public ID getConnectedID() {
211
		return getID();
212
	}
213
214
	/* (non-Javadoc)
215
	 * @see org.eclipse.ecf.core.IContainer#getConnectNamespace()
216
	 */
217
	public Namespace getConnectNamespace() {
218
		throw new UnsupportedOperationException("not yet implemented"); //$NON-NLS-1$
219
	}
220
221
	/**
222
	 * Get the IContainer for the given Namespace
223
	 * @param aNamespace 
224
	 * @return The IDiscoveryContainerAdapter for the given Namespace
225
	 */
226
	private IDiscoveryContainerAdapter getContainerByNamespace(Namespace aNamespace) {
227
		synchronized (containers) {
228
			for (Iterator itr = containers.iterator(); itr.hasNext();) {
229
				IContainer container = (IContainer) itr.next();
230
				// TODO handle the case for the generic ServiceID which should work with all containers
231
				// could be done by a smart equals impl or better a comparator
232
				Namespace containerNamespace = container.getConnectNamespace();
233
				if (containerNamespace.equals(aNamespace)) {
234
					return (IDiscoveryContainerAdapter) container;
235
				}
236
			}
237
		}
238
		return null;
239
	}
240
241
	/*
242
	 * (non-Javadoc)
243
	 * 
244
	 * @see org.eclipse.ecf.core.identity.IIdentifiable#getID()
245
	 */
246
	public ID getID() {
247
		return id;
248
	}
249
250
	/* (non-Javadoc)
251
	 * @see org.eclipse.ecf.discovery.IDiscoveryContainerAdapter#getServiceInfo(org.eclipse.ecf.discovery.identity.IServiceID, int)
252
	 */
253
	public IServiceInfo getServiceInfo(IServiceID aService, int timeout) {
254
		synchronized (containers) {
255
			for (Iterator itr = containers.iterator(); itr.hasNext();) {
256
				IDiscoveryContainerAdapter idca = (IDiscoveryContainerAdapter) itr.next();
257
				IServiceInfo service = idca.getServiceInfo(aService, timeout);
258
				if (service != null) {
259
					return service;
260
				}
261
			}
262
		}
263
		return null;
264
	}
265
266
	/* (non-Javadoc)
267
	 * @see org.eclipse.ecf.discovery.IDiscoveryContainerAdapter#getServices(org.eclipse.ecf.discovery.identity.IServiceTypeID)
268
	 */
269
	public IServiceInfo[] getServices(IServiceTypeID type) {
270
		Set set = new HashSet();
271
		synchronized (containers) {
272
			for (Iterator itr = containers.iterator(); itr.hasNext();) {
273
				IDiscoveryContainerAdapter idca = (IDiscoveryContainerAdapter) itr.next();
274
				IServiceInfo[] services = idca.getServices(type);
275
				for (int i = 0; i < services.length; i++) {
276
					set.add(services[i]);
277
				}
278
			}
279
		}
280
		return (IServiceInfo[]) set.toArray(new IServiceInfo[set.size()]);
281
	}
282
283
	/**
284
	 * @deprecated
285
	 * @see org.eclipse.ecf.discovery.IDiscoveryContainerAdapter#getServices(java.lang.String)
286
	 */
287
	public IServiceInfo[] getServices(String type) {
288
		throw new UnsupportedOperationException(Messages.CompositeDiscoveryContainer_DEPRECATED);
289
	}
290
291
	/* (non-Javadoc)
292
	 * @see org.eclipse.ecf.discovery.IDiscoveryContainerAdapter#getServicesNamespace()
293
	 */
294
	public Namespace getServicesNamespace() {
295
		throw new UnsupportedOperationException("not yet implemented"); //$NON-NLS-1$
296
	}
297
298
	/* (non-Javadoc)
299
	 * @see org.eclipse.ecf.discovery.IDiscoveryContainerAdapter#registerService(org.eclipse.ecf.discovery.IServiceInfo)
300
	 */
301
	public void registerService(IServiceInfo serviceInfo) throws ECFException {
302
		IDiscoveryContainerAdapter idca = getContainerByNamespace(serviceInfo.getServiceID().getNamespace());
303
		if (idca != null) {
304
			idca.registerService(serviceInfo);
305
		}
306
	}
307
308
	/* (non-Javadoc)
309
	 * @see org.eclipse.ecf.discovery.IDiscoveryContainerAdapter#registerServiceType(org.eclipse.ecf.discovery.identity.IServiceTypeID)
310
	 */
311
	public void registerServiceType(IServiceTypeID type) {
312
		IDiscoveryContainerAdapter idca = getContainerByNamespace(type.getNamespace());
313
		if (idca != null) {
314
			idca.registerServiceType(type);
315
		}
316
	}
317
318
	/**
319
	 * @deprecated
320
	 * @see org.eclipse.ecf.discovery.IDiscoveryContainerAdapter#registerServiceType(java.lang.String)
321
	 */
322
	public void registerServiceType(String serviceType) {
323
		throw new UnsupportedOperationException(Messages.CompositeDiscoveryContainer_DEPRECATED);
324
	}
325
326
	/*
327
	 * (non-Javadoc)
328
	 * 
329
	 * @see org.eclipse.ecf.discovery.IDiscoveryContainerAdapter#removeServiceListener(org.eclipse.ecf.discovery.identity.IServiceTypeID,
330
	 *      org.eclipse.ecf.discovery.IServiceListener)
331
	 */
332
	public void removeServiceListener(IServiceTypeID type, IServiceListener listener) {
333
		synchronized (serviceListeners) {
334
			List l = (List) serviceListeners.get(type);
335
			synchronized (l) {
336
				l.remove(listener);
337
			}
338
		}
339
	}
340
341
	/**
342
	 * @deprecated
343
	 * @see org.eclipse.ecf.discovery.IDiscoveryContainerAdapter#removeServiceListener(java.lang.String,
344
	 *      org.eclipse.ecf.discovery.IServiceListener)
345
	 */
346
	public void removeServiceListener(String type, IServiceListener listener) {
347
		throw new UnsupportedOperationException(Messages.CompositeDiscoveryContainer_DEPRECATED);
348
	}
349
350
	/*
351
	 * (non-Javadoc)
352
	 * 
353
	 * @see org.eclipse.ecf.discovery.IDiscoveryContainerAdapter#removeServiceTypeListener(org.eclipse.ecf.discovery.IServiceTypeListener)
354
	 */
355
	public void removeServiceTypeListener(IServiceTypeListener listener) {
356
		synchronized (serviceTypeListeners) {
357
			serviceTypeListeners.remove(listener);
358
		}
359
	}
360
361
	/* (non-Javadoc)
362
	 * @see org.eclipse.ecf.discovery.IDiscoveryContainerAdapter#requestServiceInfo(org.eclipse.ecf.discovery.identity.IServiceID, int)
363
	 */
364
	public void requestServiceInfo(IServiceID service, int timeout) {
365
		IDiscoveryContainerAdapter idca = getContainerByNamespace(service.getNamespace());
366
		if (idca != null) {
367
			idca.requestServiceInfo(service, timeout);
368
		}
369
	}
370
371
	/* (non-Javadoc)
372
	 * @see org.eclipse.ecf.discovery.IDiscoveryContainerAdapter#unregisterService(org.eclipse.ecf.discovery.IServiceInfo)
373
	 */
374
	public void unregisterService(IServiceInfo serviceInfo) {
375
		synchronized (containers) {
376
			for (Iterator itr = containers.iterator(); itr.hasNext();) {
377
				IDiscoveryContainerAdapter idca = (IDiscoveryContainerAdapter) itr.next();
378
				idca.unregisterService(serviceInfo);
379
			}
380
		}
381
	}
382
}
(-)src/org/eclipse/ecf/internal/discovery/CompositeDiscoveryContainerInstantiator.java (+73 lines)
Added Link Here
1
/*******************************************************************************
2
 * Copyright (c) 2007 Versant Corp.
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
6
 * http://www.eclipse.org/legal/epl-v10.html
7
 *
8
 * Contributors:
9
 *     Markus Kuppe (mkuppe <at> versant <dot> com) - initial API and implementation
10
 ******************************************************************************/
11
12
package org.eclipse.ecf.internal.discovery;
13
14
import java.util.*;
15
import org.eclipse.ecf.core.*;
16
import org.eclipse.ecf.core.identity.IDCreateException;
17
import org.eclipse.ecf.core.provider.IContainerInstantiator;
18
import org.eclipse.ecf.discovery.IDiscoveryContainerAdapter;
19
20
public class CompositeDiscoveryContainerInstantiator implements IContainerInstantiator {
21
22
	/*
23
	 * (non-Javadoc)
24
	 * 
25
	 * @see org.eclipse.ecf.core.provider.IContainerInstantiator#createInstance(org.eclipse.ecf.core.ContainerTypeDescription,
26
	 *      java.lang.Object[])
27
	 */
28
	public IContainer createInstance(ContainerTypeDescription description, Object[] parameters) throws ContainerCreateException {
29
30
		try {
31
			IContainerFactory factory = ContainerFactory.getDefault();
32
			List containers = new ArrayList();
33
			List list = factory.getDescriptions();
34
			for (Iterator itr = list.iterator(); itr.hasNext();) {
35
				ContainerTypeDescription ctd = (ContainerTypeDescription) itr.next();
36
				String name = ctd.getName();
37
				if (!name.equals("ecf.discovery.*") //$NON-NLS-1$
38
						&& name.startsWith("ecf.discovery.")) { //$NON-NLS-1$
39
					IContainer container = factory.createContainer(ctd.getName());
40
					containers.add(container);
41
				}
42
			}
43
			return new CompositeDiscoveryContainer(containers);
44
		} catch (IDCreateException e) {
45
			ContainerCreateException excep = new ContainerCreateException(Messages.CompositeDiscoveryContainerInstantiator_2);
46
			excep.setStackTrace(e.getStackTrace());
47
			throw excep;
48
		} catch (ContainerCreateException e) {
49
			ContainerCreateException excep = new ContainerCreateException(Messages.CompositeDiscoveryContainerInstantiator_3);
50
			excep.setStackTrace(e.getStackTrace());
51
			throw excep;
52
		}
53
	}
54
55
	/*
56
	 * (non-Javadoc)
57
	 * 
58
	 * @see org.eclipse.ecf.core.provider.IContainerInstantiator#getSupportedAdapterTypes(org.eclipse.ecf.core.ContainerTypeDescription)
59
	 */
60
	public String[] getSupportedAdapterTypes(ContainerTypeDescription description) {
61
		return new String[] {IDiscoveryContainerAdapter.class.getName()};
62
	}
63
64
	/*
65
	 * (non-Javadoc)
66
	 * 
67
	 * @see org.eclipse.ecf.core.provider.IContainerInstantiator#getSupportedParameterTypes(org.eclipse.ecf.core.ContainerTypeDescription)
68
	 */
69
	public Class[][] getSupportedParameterTypes(ContainerTypeDescription description) {
70
		return new Class[0][0];
71
	}
72
73
}
(-)META-INF/MANIFEST.MF (-1 / +2 lines)
Lines 9-15 Link Here
9
Require-Bundle: org.junit,
9
Require-Bundle: org.junit,
10
 org.eclipse.ecf,
10
 org.eclipse.ecf,
11
 org.eclipse.ecf.discovery,
11
 org.eclipse.ecf.discovery,
12
 org.eclipse.equinox.common
12
 org.eclipse.equinox.common,
13
 org.eclipse.ecf.provider.jmdns
13
Eclipse-LazyStart: true
14
Eclipse-LazyStart: true
14
Import-Package: org.osgi.framework;version="1.4.0",
15
Import-Package: org.osgi.framework;version="1.4.0",
15
 org.osgi.util.tracker;version="1.3.2"
16
 org.osgi.util.tracker;version="1.3.2"
(-)src/org/eclipse/ecf/tests/discovery/JMDNSNamespaceTest.java (-89 lines)
Removed Link Here
1
/*******************************************************************************
2
 * Copyright (c) 2007 Versant Corp.
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
6
 * http://www.eclipse.org/legal/epl-v10.html
7
 *
8
 * Contributors:
9
 *     Markus Kuppe (mkuppe <at> versant <dot> com) - initial API and implementation
10
 ******************************************************************************/
11
12
package org.eclipse.ecf.tests.discovery;
13
14
import java.util.Arrays;
15
16
import junit.framework.TestCase;
17
18
import org.eclipse.ecf.core.identity.IDCreateException;
19
import org.eclipse.ecf.core.identity.IDFactory;
20
import org.eclipse.ecf.discovery.identity.IServiceID;
21
import org.eclipse.ecf.discovery.identity.IServiceTypeID;
22
import org.eclipse.ecf.discovery.identity.ServiceIDFactory;
23
24
/**
25
 *
26
 */
27
public class JMDNSNamespaceTest extends TestCase {
28
	private IServiceID createID(String serviceType, String serviceName) {
29
		try {
30
			return createIDWithEx(serviceType, serviceName);
31
		} catch (final IDCreateException e) {
32
			fail(e.getMessage());
33
		} catch (final ClassCastException e) {
34
			fail(e.getMessage());
35
		}
36
		return null;
37
	}
38
39
	private IServiceID createIDWithEx(String serviceType, String serviceName) throws IDCreateException {
40
		return ServiceIDFactory.getDefault().createServiceID(IDFactory.getDefault().getNamespaceByName("ecf.namespace.jmdns"), serviceType, serviceName);
41
	}
42
43
	public void testJMDNSServiceTypeID() {
44
		final IServiceID sid = createID(DiscoveryServiceTest.TEST_SERVICE_TYPE, null);
45
		final IServiceTypeID stid = sid.getServiceTypeID();
46
		assertEquals(stid.getName(), DiscoveryServiceTest.TEST_SERVICE_TYPE);
47
		assertEquals(stid.getNamingAuthority(), "IANA");
48
		assertTrue(Arrays.equals(stid.getProtocols(), new String[] {"tcp"}));
49
		assertTrue(Arrays.equals(stid.getScopes(), new String[] {"local"}));
50
		assertTrue(Arrays.equals(stid.getServices(), new String[] {"ecftcp"}));
51
	}
52
53
	public void testJMDNSServiceTypeID2() {
54
		final String serviceType = "_service._dns-srv._udp.ecf.eclipse.org.";
55
		final IServiceID sid = createID(serviceType, null);
56
		final IServiceTypeID stid = sid.getServiceTypeID();
57
		assertEquals(stid.getName(), serviceType);
58
		assertEquals(stid.getNamingAuthority(), "IANA");
59
		assertTrue(Arrays.equals(stid.getProtocols(), new String[] {"udp"}));
60
		assertTrue(Arrays.equals(stid.getScopes(), new String[] {"ecf.eclipse.org"}));
61
		assertTrue(Arrays.equals(stid.getServices(), new String[] {"service", "dns-srv"}));
62
	}
63
64
	public void testJMDNSServiceTypeIDWithNullString() {
65
		try {
66
			createIDWithEx(null, null);
67
		} catch (final IDCreateException ex) {
68
			return;
69
		}
70
		fail();
71
	}
72
73
	public void testJMDNSServiceTypeIDWithEmptyString() {
74
		try {
75
			createIDWithEx("", null);
76
		} catch (final IDCreateException ex) {
77
			return;
78
		}
79
		fail();
80
	}
81
82
	/*
83
	public void testJMDNSServiceTypeIDWithIPv6() {
84
		final String serviceType = "1.0.0.0.0.c.e.f.f.f.6.5.0.5.2.0.0.0.0.0.0.0.0.0.0.0.0.0.0.8.e.f.ip6.arpa.";
85
		fail("Not implemented yet, don't know how to handle this service type " + serviceType + " if it even is one");
86
	}
87
	*/
88
89
}
(-)src/org/eclipse/ecf/tests/discovery/DiscoveryServiceTest.java (-1 / +1 lines)
Lines 27-33 Link Here
27
27
28
public class DiscoveryServiceTest extends TestCase {
28
public class DiscoveryServiceTest extends TestCase {
29
29
30
	static final String TEST_SERVICE_TYPE = "_ecftcp._tcp.local.";
30
	public static final String TEST_SERVICE_TYPE = "_ecftcp._tcp.local.";
31
	static final String TEST_PROTOCOL = "ecftcp";
31
	static final String TEST_PROTOCOL = "ecftcp";
32
	static final String TEST_HOST = "localhost";
32
	static final String TEST_HOST = "localhost";
33
	static final int TEST_PORT = 3282;
33
	static final int TEST_PORT = 3282;
(-)src/org/eclipse/ecf/tests/discovery/AllTests.java (-2 / +2 lines)
Lines 8-14 Link Here
8
 * Contributors:
8
 * Contributors:
9
 *    Composent, Inc. - initial API and implementation
9
 *    Composent, Inc. - initial API and implementation
10
 *****************************************************************************/
10
 *****************************************************************************/
11
12
package org.eclipse.ecf.tests.discovery;
11
package org.eclipse.ecf.tests.discovery;
13
12
14
import junit.framework.Test;
13
import junit.framework.Test;
Lines 25-31 Link Here
25
		//$JUnit-BEGIN$
24
		//$JUnit-BEGIN$
26
		suite.addTestSuite(DiscoveryServiceTest.class);
25
		suite.addTestSuite(DiscoveryServiceTest.class);
27
		suite.addTestSuite(DiscoveryTest.class);
26
		suite.addTestSuite(DiscoveryTest.class);
28
		suite.addTestSuite(JMDNSNamespaceTest.class);
27
		Test ts = org.eclipse.ecf.tests.discovery.identity.AllTests.suite();
28
		suite.addTest(ts);
29
		//$JUnit-END$
29
		//$JUnit-END$
30
		return suite;
30
		return suite;
31
	}
31
	}
(-)src/org/eclipse/ecf/tests/discovery/identity/AllTests.java (+19 lines)
Added Link Here
1
package org.eclipse.ecf.tests.discovery.identity;
2
3
import junit.framework.Test;
4
import junit.framework.TestSuite;
5
6
public class AllTests {
7
8
	public static Test suite() {
9
		TestSuite suite = new TestSuite(
10
				"Test for org.eclipse.ecf.tests.discovery.identity");
11
		//$JUnit-BEGIN$
12
		suite.addTestSuite(JMDNSServiceIDTest.class);
13
		suite.addTestSuite(CompositeServiceIDTest.class);
14
		suite.addTestSuite(JSLPServiceIDTest.class);
15
		//$JUnit-END$
16
		return suite;
17
	}
18
19
}
(-)src/org/eclipse/ecf/tests/discovery/identity/CompositeServiceIDTest.java (+24 lines)
Added Link Here
1
/*******************************************************************************
2
 * Copyright (c) 2007 Versant Corp.
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
6
 * http://www.eclipse.org/legal/epl-v10.html
7
 *
8
 * Contributors:
9
 *     Markus Kuppe (mkuppe <at> versant <dot> com) - initial API and implementation
10
 ******************************************************************************/
11
package org.eclipse.ecf.tests.discovery.identity;
12
13
/**
14
 * 
15
 */
16
public class CompositeServiceIDTest extends ServiceIDTest {
17
18
	private static final String ECF_NAMESPACE_DISCOVERY = "ecf.namespace.discovery";
19
20
	public CompositeServiceIDTest() {
21
		super(ECF_NAMESPACE_DISCOVERY);
22
	}
23
24
}
(-)src/org/eclipse/ecf/tests/discovery/identity/JMDNSServiceIDTest.java (+30 lines)
Added Link Here
1
/*******************************************************************************
2
 * Copyright (c) 2007 Versant Corp.
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
6
 * http://www.eclipse.org/legal/epl-v10.html
7
 *
8
 * Contributors:
9
 *     Markus Kuppe (mkuppe <at> versant <dot> com) - initial API and implementation
10
 ******************************************************************************/
11
12
package org.eclipse.ecf.tests.discovery.identity;
13
14
15
import org.eclipse.ecf.provider.jmdns.identity.JMDNSNamespace;
16
17
/**
18
 *
19
 */
20
public class JMDNSServiceIDTest extends ServiceIDTest {
21
	
22
	public JMDNSServiceIDTest() {
23
		super(JMDNSNamespace.NAME);
24
	}
25
	
26
	public void testJMDNSServiceTypeIDWithIPv6() {
27
		final String serviceType = "1.0.0.0.0.c.e.f.f.f.6.5.0.5.2.0.0.0.0.0.0.0.0.0.0.0.0.0.0.8.e.f.ip6.arpa.";
28
		fail("Not implemented yet, don't know how to handle this service type " + serviceType + " if it even is one");
29
	}
30
}
(-)src/org/eclipse/ecf/tests/discovery/identity/ServiceIDTest.java (+99 lines)
Added Link Here
1
/*******************************************************************************
2
 * Copyright (c) 2007 Versant Corp.
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
6
 * http://www.eclipse.org/legal/epl-v10.html
7
 *
8
 * Contributors:
9
 *     Markus Kuppe (mkuppe <at> versant <dot> com) - initial API and implementation
10
 ******************************************************************************/
11
package org.eclipse.ecf.tests.discovery.identity;
12
13
import java.util.Arrays;
14
15
import junit.framework.TestCase;
16
17
import org.eclipse.ecf.core.identity.IDCreateException;
18
import org.eclipse.ecf.core.identity.IDFactory;
19
import org.eclipse.ecf.discovery.identity.IServiceID;
20
import org.eclipse.ecf.discovery.identity.IServiceTypeID;
21
import org.eclipse.ecf.discovery.identity.ServiceIDFactory;
22
import org.eclipse.ecf.tests.discovery.DiscoveryServiceTest;
23
24
public abstract class ServiceIDTest extends TestCase {
25
26
	protected String namespace;
27
28
	public ServiceIDTest(String string) {
29
		namespace = string;
30
	}
31
32
	protected IServiceID createID(String serviceType, String serviceName) {
33
		try {
34
			return createIDWithEx(serviceType, serviceName);
35
		} catch (final IDCreateException e) {
36
			fail(e.getMessage());
37
		} catch (final ClassCastException e) {
38
			fail(e.getMessage());
39
		}
40
		return null;
41
	}
42
43
	protected IServiceID createIDWithEx(String serviceType, String serviceName)
44
			throws IDCreateException {
45
		return ServiceIDFactory.getDefault().createServiceID(
46
				IDFactory.getDefault().getNamespaceByName(namespace),
47
				serviceType, serviceName);
48
	}
49
50
	public void testServiceTypeIDWithNullString() {
51
		try {
52
			createIDWithEx(null, null);
53
		} catch (final IDCreateException ex) {
54
			return;
55
		}
56
		fail();
57
	}
58
59
	public void testServiceTypeIDWithEmptyString() {
60
		try {
61
			createIDWithEx("", null);
62
		} catch (final IDCreateException ex) {
63
			return;
64
		}
65
		fail();
66
	}
67
68
	public void testServiceTypeID() {
69
		final IServiceID sid = createID(DiscoveryServiceTest.TEST_SERVICE_TYPE, null);
70
		final IServiceTypeID stid = sid.getServiceTypeID();
71
		assertEquals(stid.getName(), DiscoveryServiceTest.TEST_SERVICE_TYPE);
72
		assertEquals(stid.getNamingAuthority(), "IANA");
73
		assertTrue(Arrays.equals(stid.getProtocols(), new String[] {"tcp"}));
74
		assertTrue(Arrays.equals(stid.getScopes(), new String[] {"local"}));
75
		assertTrue(Arrays.equals(stid.getServices(), new String[] {"ecftcp"}));
76
	}
77
78
	public void testServiceTypeID2() {
79
		final String serviceType = "_service._dns-srv._udp.ecf.eclipse.org._IANA";
80
		final IServiceID sid = createID(serviceType, null);
81
		final IServiceTypeID stid = sid.getServiceTypeID();
82
		assertEquals(stid.getName(), serviceType);
83
		assertEquals(stid.getNamingAuthority(), "IANA");
84
		assertTrue(Arrays.equals(stid.getProtocols(), new String[] {"udp"}));
85
		assertTrue(Arrays.equals(stid.getScopes(), new String[] {"ecf.eclipse.org"}));
86
		assertTrue(Arrays.equals(stid.getServices(), new String[] {"service", "dns-srv"}));
87
	}
88
	
89
	public void testServiceTypeID3() {
90
		final String serviceType = "_service._dns-srv._udp.ecf.eclipse.org._ECLIPSE";
91
		final IServiceID sid = createID(serviceType, null);
92
		final IServiceTypeID stid = sid.getServiceTypeID();
93
		assertEquals(stid.getName(), serviceType);
94
		assertEquals(stid.getNamingAuthority(), "ECLIPSE");
95
		assertTrue(Arrays.equals(stid.getProtocols(), new String[] {"udp"}));
96
		assertTrue(Arrays.equals(stid.getScopes(), new String[] {"ecf.eclipse.org"}));
97
		assertTrue(Arrays.equals(stid.getServices(), new String[] {"service", "dns-srv"}));
98
	}
99
}

Return to bug 200803