JBoss Tools SVN: r24658 - in branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage: .settings and 12 other directories.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2010-09-02 11:17:54 -0400 (Thu, 02 Sep 2010)
New Revision: 24658
Added:
branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/.classpath
branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/.project
branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/.settings/
branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/.settings/net.sf.jautodoc.prefs
branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/.settings/org.eclipse.jdt.core.prefs
branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/.settings/org.eclipse.jdt.ui.prefs
branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/JBoss Usage Reporter.launch
branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/META-INF/
branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/META-INF/MANIFEST.MF
branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/about.html
branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/build.properties
branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/config.ini
branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/plugin.properties
branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/plugin.xml
branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/pom.xml
branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/
branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/
branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/
branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/
branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/
branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/FocusPoint.java
branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/HttpGetRequest.java
branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/HttpResourceMap.java
branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/IHttpGetRequest.java
branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/ILoggingAdapter.java
branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/ITracker.java
branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/IURLBuildingStrategy.java
branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/PluginLogger.java
branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/Tracker.java
branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/UsageMessages.java
branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/googleanalytics/
branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/googleanalytics/AbstractGoogleAnalyticsParameters.java
branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/googleanalytics/GoogleAnalyticsCookie.java
branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/googleanalytics/GoogleAnalyticsMessages.java
branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/googleanalytics/GoogleAnalyticsUrlStrategy.java
branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/googleanalytics/IGoogleAnalyticsParameters.java
branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/googleanalytics/messages.properties
branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/internal/
branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/internal/JBossToolsUsageActivator.java
branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/messages.properties
branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/preferences/
branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/preferences/GlobalUsageReportingSettings.java
branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/preferences/IUsageReportPreferenceConstants.java
branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/preferences/PreferencesMessages.java
branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/preferences/UsageReportPreferenceInitializer.java
branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/preferences/UsageReportPreferencePage.java
branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/preferences/UsageReportPreferences.java
branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/preferences/messages.properties
branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/reporting/
branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/reporting/EclipseEnvironment.java
branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/reporting/JBossBundleGroups.java
branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/reporting/ReportingMessages.java
branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/reporting/UsageReport.java
branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/reporting/UsageReportDispatcher.java
branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/reporting/UsageReportEnablementDialog.java
branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/reporting/messages.properties
branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/util/
branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/util/BrowserUtil.java
branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/util/BundleUtils.java
branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/util/HttpEncodingUtils.java
branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/util/PreferencesUtils.java
branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/util/StatusUtils.java
branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/util/reader/
branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/util/reader/AppendUntilAlternativeImpl.java
branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/util/reader/AppendUntilImpl.java
branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/util/reader/ReadUntilAlternativesImpl.java
branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/util/reader/ReadUntilImpl.java
branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/util/reader/ReaderUtils.java
branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/util/reader/ReaderVisitor.java
Log:
bringing trunk changes to M2
Added: branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/.classpath
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/.classpath (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/.classpath 2010-09-02 15:17:54 UTC (rev 24658)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
Property changes on: branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/.classpath
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/.project
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/.project (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/.project 2010-09-02 15:17:54 UTC (rev 24658)
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.jboss.tools.usage</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>
+ <buildCommand>
+ <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
+ </natures>
+</projectDescription>
Property changes on: branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/.project
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/.settings/net.sf.jautodoc.prefs
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/.settings/net.sf.jautodoc.prefs (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/.settings/net.sf.jautodoc.prefs 2010-09-02 15:17:54 UTC (rev 24658)
@@ -0,0 +1,7 @@
+#Thu Aug 12 14:50:29 CEST 2010
+add_header=true
+eclipse.preferences.version=1
+header_text=/*******************************************************************************\n * Copyright (c) 2010 Red Hat, Inc.\n * Distributed under license by Red Hat, Inc. All rights reserved.\n * This program is made available under the terms of the\n * Eclipse Public License v1.0 which accompanies this distribution,\n * and is available at http\://www.eclipse.org/legal/epl-v10.html\n *\n * Contributors\:\n * Red Hat, Inc. - initial API and implementation\n ******************************************************************************/
+project_specific_settings=true
+replace_header=true
+replacements=<?xml version\="1.0" standalone\="yes"?>\n\n<replacements>\n<replacement key\="get" scope\="1" mode\="0">Gets the</replacement>\n<replacement key\="set" scope\="1" mode\="0">Sets the</replacement>\n<replacement key\="add" scope\="1" mode\="0">Adds the</replacement>\n<replacement key\="edit" scope\="1" mode\="0">Edits the</replacement>\n<replacement key\="remove" scope\="1" mode\="0">Removes the</replacement>\n<replacement key\="init" scope\="1" mode\="0">Inits the</replacement>\n<replacement key\="parse" scope\="1" mode\="0">Parses the</replacement>\n<replacement key\="create" scope\="1" mode\="0">Creates the</replacement>\n<replacement key\="build" scope\="1" mode\="0">Builds the</replacement>\n<replacement key\="is" scope\="1" mode\="0">Checks if is</replacement>\n<replacement key\="print" scope\="1" mode\="0">Prints the</replacement>\n<replacement key\="has" scope\="1" mode\="0">Checks for</replacement>\n</replacements>\n\n
Property changes on: branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/.settings/net.sf.jautodoc.prefs
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/.settings/org.eclipse.jdt.core.prefs (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/.settings/org.eclipse.jdt.core.prefs 2010-09-02 15:17:54 UTC (rev 24658)
@@ -0,0 +1,260 @@
+#Fri Aug 06 17:57:19 CEST 2010
+eclipse.preferences.version=1
+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=true
+org.eclipse.jdt.core.formatter.comment.format_line_comments=true
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
+org.eclipse.jdt.core.formatter.comment.line_length=80
+org.eclipse.jdt.core.formatter.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=false
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_member=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.join_lines_in_comments=true
+org.eclipse.jdt.core.formatter.join_wrapped_lines=false
+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=120
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=tab
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
Property changes on: branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/.settings/org.eclipse.jdt.core.prefs
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/.settings/org.eclipse.jdt.ui.prefs
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/.settings/org.eclipse.jdt.ui.prefs (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/.settings/org.eclipse.jdt.ui.prefs 2010-09-02 15:17:54 UTC (rev 24658)
@@ -0,0 +1,6 @@
+#Wed Jul 28 11:02:07 CEST 2010
+eclipse.preferences.version=1
+formatter_profile=_Eclipse [built-in] extended
+formatter_settings_version=11
+org.eclipse.jdt.ui.javadoc=false
+org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\n * @return the ${bare_field_name}\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${param} the ${bare_field_name} to set\n */</template><template autoinsert\="true" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * ${tags}\n */</template><template autoinsert\="false" context\="filecommen!
t_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/*******************************************************************************\n * Copyright (c) 2010 Red Hat, Inc.\n * Distributed under license by Red Hat, Inc. All rights reserved.\n * This program is made available under the terms of the\n * Eclipse Public License v1.0 which accompanies this distribution,\n * and is available at http\://www.eclipse.org/legal/epl-v10.html\n *\n * Contributors\:\n * Red Hat, Inc. - initial API and implementation\n ******************************************************************************/</template><template autoinsert\="true" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n * @author ${user}\n *\n * ${tags}\n */</template><templa!
te autoinsert\="true" context\="fieldcomment_context" deleted\!
="false"
description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n * \n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="true" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/* (non-Javadoc)\n * ${see_to_overridden}\n */</template><template autoinsert\="true" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${tags}\n * ${see_to_target}\n */</template><template autoinser!
t\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\n</template><template autoinsert\="true" context\="annotationbod!
y_context" deleted\="false" description\="Code in new annotati!
on type
bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\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\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\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}\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><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter function" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\n * @return the ${bare_field_name}\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter function" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${pa!
ram} the ${bare_field_name} to set\n */</template><template au!
toinsert
\="true" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * ${tags}\n */</template><template autoinsert\="true" context\="filecomment_context" deleted\="false" description\="Comment for created JavaScript files" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.filecomment" name\="filecomment">/**\n * \n */</template><template autoinsert\="true" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n * @author ${user}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for vars" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n !
* \n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding function" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="true" context\="overridecomment_context" deleted\="false" description\="Comment for overriding functions" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/* (non-JSDoc)\n * ${see_to_overridden}\n */</template><template autoinsert\="true" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate functions" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${tags}\n * ${see_to_target}\n */</template><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.ec!
lipse.wst.jsdt.ui.text.codetemplates.newtype" name\="newtype">!
${fileco
mment}\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created function stubs" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated function stub\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code i!
n created constructor stubs" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\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.wst.jsdt.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.wst.jsdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates>
Property changes on: branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/.settings/org.eclipse.jdt.ui.prefs
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/JBoss Usage Reporter.launch
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/JBoss Usage Reporter.launch (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/JBoss Usage Reporter.launch 2010-09-02 15:17:54 UTC (rev 24658)
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<launchConfiguration type="org.eclipse.pde.ui.RuntimeWorkbench">
+<booleanAttribute key="append.args" value="true"/>
+<booleanAttribute key="askclear" value="false"/>
+<booleanAttribute key="automaticAdd" value="true"/>
+<booleanAttribute key="automaticValidate" value="false"/>
+<stringAttribute key="bootstrap" value=""/>
+<stringAttribute key="checked" value="[NONE]"/>
+<booleanAttribute key="clearConfig" value="true"/>
+<booleanAttribute key="clearws" value="true"/>
+<booleanAttribute key="clearwslog" value="false"/>
+<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/JBoss Usage Reporter"/>
+<booleanAttribute key="default" value="true"/>
+<stringAttribute key="deselected_workspace_plugins" value="org.jboss.tools.common.text.xml,org.jboss.tools.common.meta.ui,org.jboss.tools.ui.bot.ext,org.jboss.tools.common,org.jboss.tools.common.verification.ui.test,org.jboss.tools.common.projecttemplates,org.jboss.tools.common.el.core,org.jboss.tools.common.verification.ui,org.jboss.tools.common.gef,org.jboss.tools.common.test,org.jboss.tools.common.verification.test,org.jboss.tools.common.verification,org.jboss.tools.common.model,org.jboss.tools.gwt.ui,org.jboss.tools.common.model.ui.capabilities,org.jboss.tools.common.resref.core,org.jboss.tools.common.ui,org.jboss.tools.common.el.ui,org.jboss.tools.usage.test,org.jboss.tools.common.text.ext,org.jboss.tools.gwt.core,org.jboss.tools.common.resref.ui,org.jboss.tools.ui.bot.ext.test,org.jboss.tools.common.model.ui.test,org.jboss.tools.common.el.core.test,org.jboss.tools.common.model.ui,org.jboss.tools.tests,org.jboss.tools.common.model.test"/>
+<booleanAttribute key="includeOptional" value="true"/>
+<stringAttribute key="location" value="${workspace_loc}/../runtime-EclipseApplication2"/>
+<listAttribute key="org.eclipse.debug.ui.favoriteGroups">
+<listEntry value="org.eclipse.debug.ui.launchGroup.debug"/>
+<listEntry value="org.eclipse.debug.ui.launchGroup.run"/>
+</listAttribute>
+<stringAttribute key="org.eclipse.jdt.launching.JAVA_COMMAND" value="java"/>
+<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -console -consolelog -pluginCustomization ${workspace_loc}/../runtime-EclipseApplication/usage.properties"/>
+<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
+<booleanAttribute key="pde.generated.config" value="false"/>
+<stringAttribute key="pde.version" value="3.3"/>
+<stringAttribute key="product" value="org.eclipse.platform.ide"/>
+<stringAttribute key="selected_target_plugins" value="org.eclipse.jface.text@default:default,org.eclipse.core.contenttype@default:default,org.eclipse.help@default:default,org.eclipse.equinox.concurrent@default:default,com.ibm.icu@default:default,ch.qos.logback.classic@default:default,org.eclipse.swt.cocoa.macosx.x86_64@default:false,org.junit4@default:default,javax.mail@default:default,org.eclipse.core.filesystem.macosx@default:false,org.eclipse.ui.intro@default:default,org.eclipse.core.databinding.observable@default:default,org.eclipse.ecf.provider.filetransfer.ssl@default:false,org.eclipse.core.runtime@default:true,org.eclipse.help.base@default:default,org.eclipse.swtbot.ant.optional.junit4@default:false,org.eclipse.swt@default:default,org.eclipse.equinox.common@2:true,org.eclipse.net4j.jms.api@default:default,org.eclipse.equinox.security@default:default,org.eclipse.core.resources@default:default,org.eclipse.core.expressions@default:default,org.apache.lucene.analysis@defa!
ult:default,org.eclipse.jface@default:default,org.eclipse.ecf.filetransfer@default:default,org.eclipse.ecf@default:default,org.eclipse.update.configurator@3:true,org.eclipse.equinox.p2.repository@default:default,org.apache.jasper@default:default,org.eclipse.equinox.registry@default:default,org.eclipse.equinox.http.jetty@default:default,org.eclipse.equinox.preferences@default:default,org.eclipse.equinox.p2.metadata@default:default,org.mortbay.jetty.server@default:default,javax.servlet.jsp@default:default,org.eclipse.core.runtime.compatibility@default:default,org.eclipse.core.variables@default:default,org.eclipse.help.ui@default:default,org.eclipse.equinox.http.servlet@default:default,org.eclipse.core.filesystem@default:default,org.mortbay.jetty.util@default:default,org.eclipse.ui.ide@default:default,org.eclipse.jface.databinding@default:default,org.apache.commons.el@default:default,org.eclipse.equinox.app@default:default,org.eclipse.osgi@-1:true,org.eclipse.ui.views@default:!
default,javax.activation@default:default,org.apache.commons.lo!
gging*1.
0.4.v201005080501@default:default,javax.servlet@default:default,org.eclipse.core.databinding@default:default,org.eclipse.core.commands@default:default,org.eclipse.core.runtime.compatibility.registry@default:false,org.eclipse.equinox.p2.engine@default:default,org.slf4j.api@default:default,org.eclipse.ant.core@default:default,org.hamcrest.core@default:default,org.eclipse.core.runtime.compatibility.auth@default:default,ch.qos.logback.slf4j@default:false,org.eclipse.equinox.security.macosx@default:false,org.eclipse.ecf.identity@default:default,org.eclipse.ui.workbench@default:default,org.eclipse.ecf.ssl@default:false,org.junit*4.8.1.v4_8_1_v20100427-1100@default:default,org.eclipse.equinox.p2.core@default:default,org.eclipse.ui.cheatsheets@default:default,org.eclipse.ui.cocoa@default:false,org.eclipse.osgi.services@default:default,org.eclipse.ui@default:default,org.eclipse.ui.forms@default:default,org.eclipse.equinox.p2.metadata.repository@default:default,org.eclipse.text@defaul!
t:default,org.eclipse.core.databinding.property@default:default,org.eclipse.platform@default:default,ch.qos.logback.core@default:default,org.eclipse.core.net@default:default,org.apache.lucene@default:default,org.apache.ant@default:default,org.eclipse.core.jobs@default:default,org.eclipse.ecf.provider.filetransfer@default:default"/>
+<stringAttribute key="selected_workspace_plugins" value="org.jboss.tools.usage@default:default"/>
+<booleanAttribute key="show_selected_only" value="false"/>
+<stringAttribute key="templateConfig" value="${workspace_loc:org.jboss.tools.usage/config.ini}"/>
+<booleanAttribute key="tracing" value="false"/>
+<booleanAttribute key="useCustomFeatures" value="false"/>
+<booleanAttribute key="useDefaultConfig" value="false"/>
+<booleanAttribute key="useDefaultConfigArea" value="true"/>
+<booleanAttribute key="useProduct" value="true"/>
+<booleanAttribute key="usefeatures" value="false"/>
+</launchConfiguration>
Property changes on: branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/JBoss Usage Reporter.launch
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/META-INF/MANIFEST.MF
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/META-INF/MANIFEST.MF (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/META-INF/MANIFEST.MF 2010-09-02 15:17:54 UTC (rev 24658)
@@ -0,0 +1,17 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %BundleName
+Bundle-SymbolicName: org.jboss.tools.usage;singleton:=true
+Bundle-Version: 1.0.0.qualifier
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Export-Package: org.jboss.tools.usage,
+ org.jboss.tools.usage.googleanalytics,
+ org.jboss.tools.usage.preferences; x-friends:="org.jboss.tools.usage.test",
+ org.jboss.tools.usage.reporting;x-friends:="org.jboss.tools.usage.test",
+ org.jboss.tools.usage.util
+Require-Bundle: org.eclipse.osgi;bundle-version="3.5.0",
+ org.eclipse.core.runtime;bundle-version="[3.5.0,4.0.0)",
+ org.eclipse.ui;bundle-version="3.5.0"
+Bundle-Activator: org.jboss.tools.usage.internal.JBossToolsUsageActivator
+Bundle-Vendor: %BundleVendor
+Bundle-ActivationPolicy: lazy
Property changes on: branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/META-INF/MANIFEST.MF
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/about.html
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/about.html (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/about.html 2010-09-02 15:17:54 UTC (rev 24658)
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
+<title>Smooks Core</title>
+<style type="text/css" media="screen">
+<!--
+ body {
+ font-family: Sans-serif, Arial, Helvetica;
+ }
+
+-->
+</style>
+</head>
+<body>
+<h1>JBoss Usage Reporting</h1>
+
+<p>
+This plugin is part of the JBoss Tools developed by the <a href="http://www.jboss.com">JBoss Inc.</a>
+</p>
+
+<p>Information about this plugin is available at <a href="http://www.jboss.org/tools">JBoss Tools project page</a></p>
+
+<p>
+This software is distributed under the terms of the Eclipse Public License - v 1.0
+(see <a href="www.eclipse.org/legal/epl-v10.html">Eclipse Public License - Version 1.0</a>).
+</p>
+</body>
+</html>
\ No newline at end of file
Property changes on: branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/about.html
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/build.properties
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/build.properties (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/build.properties 2010-09-02 15:17:54 UTC (rev 24658)
@@ -0,0 +1,16 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ plugin.xml,\
+ about.html,\
+ bin/
+src.includes = .classpath,\
+ .project,\
+ .settings/,\
+ JBoss Usage Reporter.launch,\
+ META-INF/,\
+ about.html,\
+ build.properties,\
+ plugin.xml,\
+ src/
Property changes on: branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/build.properties
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/config.ini
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/config.ini (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/config.ini 2010-09-02 15:17:54 UTC (rev 24658)
@@ -0,0 +1,20 @@
+org.jboss.tools.usage/ask_user_for_usage_report_preference=false
+org.jboss.tools.usage.configuration.ask_user_for_usage_report_preference=false
+configuration/org.jboss.tools.usage.ask_user_for_usage_report_preference=false
+eclipse.ask_user_for_usage_report_preference=false
+org.eclipse.pde.core.ask_user_for_usage_report_preference=false
+org.eclipse.core.runtime.ask_user_for_usage_report_preference=false
+ask_user_for_usage_report_preference=false
+
+org.eclipse.update.reconcile=false
+eclipse.p2.profile=SDKProfile
+osgi.instance.area.default=(a)user.home/Documents/workspace
+osgi.framework=file\:/Applications/jbdevstudio/eclipse/plugins/org.eclipse.osgi_3.5.2.R35x_v20100126.jar
+eclipse.buildId=M20100211-1343
+org.eclipse.equinox.simpleconfigurator.configUrl=file\:/Users/admin/workspaces/jboss-tools-usage/.metadata/.plugins/org.eclipse.pde.core/JBoss Usage Reporter/org.eclipse.equinox.simpleconfigurator/bundles.info
+osgi.configuration.cascaded=true
+eclipse.product=com.jboss.jbds.product.product
+eclipse.application=org.eclipse.ui.ide.workbench
+eclipse.p2.data.area=(a)config.dir/.p2
+osgi.bundles.defaultStartLevel=4
+osgi.framework.extensions=reference\:file\:org.eclipse.equinox.transforms.hook_1.0.100.v20100119-2308.jar,reference\:file\:javax.transaction_1.1.1.v201002111330.jar
Property changes on: branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/config.ini
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/plugin.properties
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/plugin.properties (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/plugin.properties 2010-09-02 15:17:54 UTC (rev 24658)
@@ -0,0 +1,2 @@
+BundleName=JBoss Tools Usage Reporting
+BundleVendor=JBoss by Red Hat
\ No newline at end of file
Property changes on: branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/plugin.properties
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/plugin.xml
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/plugin.xml (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/plugin.xml 2010-09-02 15:17:54 UTC (rev 24658)
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+ <extension
+ point="org.eclipse.ui.startup">
+ <startup
+ class="org.jboss.tools.usage.reporting.UsageReportDispatcher">
+ </startup>
+ </extension>
+ <extension
+ point="org.eclipse.ui.preferencePages">
+ <page
+ class="org.jboss.tools.usage.preferences.UsageReportPreferencePage"
+ id="org.jboss.tools.usage.analytics.preferences.UsageAnalyticsPreferencePage"
+ name="Usage Reporting Preferences"
+ category="org.jboss.tools.common.model.ui.MainPreferencePage">
+ </page>
+ </extension>
+ <extension
+ point="org.eclipse.core.runtime.preferences">
+ <initializer
+ class="org.jboss.tools.usage.preferences.UsageReportPreferenceInitializer">
+ </initializer>
+ </extension>
+</plugin>
Property changes on: branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/plugin.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/pom.xml
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/pom.xml (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/pom.xml 2010-09-02 15:17:54 UTC (rev 24658)
@@ -0,0 +1,13 @@
+<project
+xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.jboss.tools</groupId>
+ <artifactId>org.jboss.tools.parent.pom</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ </parent>
+ <groupId>org.jboss.tools.usage.plugins</groupId>
+ <artifactId>org.jboss.tools.usage</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <packaging>eclipse-plugin</packaging>
+</project>
Property changes on: branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/pom.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/FocusPoint.java
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/FocusPoint.java (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/FocusPoint.java 2010-09-02 15:17:54 UTC (rev 24658)
@@ -0,0 +1,72 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is 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:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.usage;
+
+import org.jboss.tools.usage.util.HttpEncodingUtils;
+
+/**
+ * Focus point of the application. It can represent data points like application
+ * load, application module load, user actions, error events etc.
+ */
+public class FocusPoint {
+
+ private String name;
+ private FocusPoint childFocusPoint;
+ public static final String URI_SEPARATOR = "/";
+ public static final String TITLE_SEPARATOR = "-";
+
+ public FocusPoint(String name) {
+ this.name = name;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public FocusPoint setChild(FocusPoint childFocusPoint) {
+ this.childFocusPoint = childFocusPoint;
+ return this;
+ }
+
+ public FocusPoint getChild() {
+ return childFocusPoint;
+ }
+
+ public String getContentURI() {
+ StringBuilder builder = new StringBuilder();
+ appendContentURI(builder, this);
+ return HttpEncodingUtils.checkedEncodeUtf8(builder.toString());
+ }
+
+ private void appendContentURI(StringBuilder builder, FocusPoint focusPoint) {
+ FocusPoint parentFocuPoint = focusPoint.getChild();
+ builder.append(URI_SEPARATOR);
+ builder.append(focusPoint.getName());
+ if (parentFocuPoint != null) {
+ appendContentURI(builder, parentFocuPoint);
+ }
+ }
+
+ public String getContentTitle() {
+ StringBuilder builder = new StringBuilder();
+ appendContentTitle(builder, this);
+ return HttpEncodingUtils.checkedEncodeUtf8(builder.toString());
+ }
+
+ private void appendContentTitle(StringBuilder builder, FocusPoint focusPoint) {
+ FocusPoint childFocusPoint = focusPoint.getChild();
+ builder.append(focusPoint.getName());
+ if (childFocusPoint != null) {
+ builder.append(TITLE_SEPARATOR);
+ appendContentTitle(builder, childFocusPoint);
+ }
+ }
+}
Property changes on: branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/FocusPoint.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/HttpGetRequest.java
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/HttpGetRequest.java (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/HttpGetRequest.java 2010-09-02 15:17:54 UTC (rev 24658)
@@ -0,0 +1,100 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is 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:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.usage;
+
+import java.io.IOException;
+import java.net.HttpURLConnection;
+import java.net.URL;
+import java.text.MessageFormat;
+
+
+/**
+ * Class that executes a HTTP Get request to the given url.
+ *
+ * @author Andre Dietisheim
+ */
+public class HttpGetRequest implements IHttpGetRequest {
+
+ private static final String USER_AGENT = "User-Agent"; //$NON-NLS-1$
+
+ private static final String GET_METHOD_NAME = "GET"; //$NON-NLS-1$
+
+ private ILoggingAdapter loggingAdapter = null;
+
+// private CookieHandler cookieHandler;
+
+ private String userAgent;
+
+ public HttpGetRequest(String userAgent, ILoggingAdapter loggingAdapter) {
+ this.userAgent = userAgent;
+ this.loggingAdapter = loggingAdapter;
+// this.cookieHandler = new CookieHandler();
+// this.cookieHandler = CookieHandler.getDefault();
+// cookieHandler.setCookiePolicy(CookiePolicy.ACCEPT_ALL);
+ }
+
+ /* (non-Javadoc)
+ * @see org.jboss.tools.usage.IHttpGetRequest#request(java.lang.String)
+ */
+ public void request(String urlString) {
+
+// CookieHandler currentCookieHandler = setCookieHandler(cookieHandler);
+ try {
+ HttpURLConnection urlConnection = createURLConnection(urlString, userAgent);
+ urlConnection.connect();
+ int responseCode = getResponseCode(urlConnection);
+ if (responseCode == HttpURLConnection.HTTP_OK) {
+ loggingAdapter.logMessage(MessageFormat.format(UsageMessages.HttpGetMethod_Success, urlString, responseCode));
+ } else {
+ loggingAdapter.logError(MessageFormat.format(UsageMessages.HttpGetMethod_Error_Http, urlString));
+ }
+ } catch (Exception e) {
+ loggingAdapter.logMessage(MessageFormat.format(UsageMessages.HttpGetMethod_Error_Io, urlString, e.toString()));
+ } finally {
+// setCookieHandler(currentCookieHandler);
+ }
+ }
+
+ /**
+ * Returns the return code from the given {@link HttpURLConnection}.
+ * Provided to be called by test cases so that they can retrieve the return code.
+ *
+ * @param urlConnection to get the response code from
+ * @return the return code the HttpUrlConnection received
+ * @throws IOException Signals that an I/O exception has occurred.
+ */
+ protected int getResponseCode(HttpURLConnection urlConnection) throws IOException {
+ return urlConnection.getResponseCode();
+ }
+
+// private CookieHandler setCookieHandler(CookieHandler cookieHandler) {
+// CookieHandler currentCookieHandler = CookieHandler.getDefault();
+// CookieHandler.setDefault(cookieHandler);
+// return currentCookieHandler;
+// }
+
+ /**
+ * Creates a new url connection.
+ *
+ * @param urlString the url string
+ * @param userAgent the user agent
+ * @return the http url connection
+ * @throws IOException Signals that an I/O exception has occurred.
+ */
+ protected HttpURLConnection createURLConnection(String urlString, String userAgent) throws IOException {
+ URL url = new URL(urlString);
+ HttpURLConnection urlConnection = (HttpURLConnection) url.openConnection();
+ urlConnection.setInstanceFollowRedirects(true);
+ urlConnection.setRequestMethod(GET_METHOD_NAME);
+ urlConnection.setRequestProperty(USER_AGENT, userAgent);
+ return urlConnection;
+ }
+}
Property changes on: branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/HttpGetRequest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/HttpResourceMap.java
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/HttpResourceMap.java (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/HttpResourceMap.java 2010-09-02 15:17:54 UTC (rev 24658)
@@ -0,0 +1,150 @@
+package org.jboss.tools.usage;
+
+import java.io.BufferedInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.UnsupportedEncodingException;
+import java.net.HttpURLConnection;
+import java.net.URL;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Plugin;
+import org.jboss.tools.usage.util.HttpEncodingUtils;
+import org.jboss.tools.usage.util.StatusUtils;
+import org.jboss.tools.usage.util.reader.ReaderUtils;
+
+public abstract class HttpResourceMap {
+
+ static final String GET_METHOD_NAME = "GET"; //$NON-NLS-1$
+
+ protected Plugin plugin;
+ private Map<String, String> valuesMap;
+
+ private String[] keys;
+
+ private String url;
+
+ private char valueDelimiter;
+
+ public HttpResourceMap(String url, char valueDelimiter, Plugin plugin, String... keys) {
+ this.url = url;
+ this.keys = keys;
+ this.valueDelimiter = valueDelimiter;
+ this.plugin = plugin;
+ }
+
+ protected Map<String, String> getValueMap() throws IOException {
+ if (valuesMap == null) {
+ HttpURLConnection urlConnection = createURLConnection(url);
+ InputStreamReader reader = request(urlConnection);
+ this.valuesMap = parse(keys, valueDelimiter, reader, new HashMap<String, String>());
+ }
+ return valuesMap;
+ }
+
+ /**
+ * Sends a http GET request to the given URL. Returns the response string or
+ * <tt>null</tt> if an error occurred. The errors catched are Exceptions or
+ * HTTP error codes.
+ *
+ * @param url
+ * the url to send the GET request to
+ * @return the response or <tt>null</tt> if an error occured.
+ * @throws UnsupportedEncodingException
+ *
+ * @see HttpURLConnection
+ */
+ protected InputStreamReader request(HttpURLConnection urlConnection) throws IOException {
+ InputStreamReader responseReader = null;
+ try {
+ urlConnection.connect();
+ int responseCode = getResponseCode(urlConnection);
+ if (responseCode == HttpURLConnection.HTTP_OK) {
+ IStatus status = StatusUtils.getDebugStatus(
+ plugin.getBundle().getSymbolicName()
+ , UsageMessages.KillSwitchPreference_Info_HttpQuery
+ , url);
+ plugin.getLog().log(status);
+ responseReader = getInputStreamReader(urlConnection.getInputStream(), urlConnection.getContentType());
+ } else {
+ IStatus status = StatusUtils.getErrorStatus(
+ plugin.getBundle().getSymbolicName()
+ , UsageMessages.KillSwitchPreference_Error_Http, null, url);
+ plugin.getLog().log(status);
+ }
+ return responseReader;
+ } catch (IOException e) {
+ IStatus status = StatusUtils.getErrorStatus(
+ plugin.getBundle().getSymbolicName()
+ , UsageMessages.KillSwitchPreference_Error_Http, e, url);
+ plugin.getLog().log(status);
+ throw e;
+ }
+ }
+
+ private InputStreamReader getInputStreamReader(InputStream inputStream, String contentType) throws UnsupportedEncodingException, IOException {
+ String contentTypeCharset = HttpEncodingUtils.getContentTypeCharset(contentType);
+ if (contentTypeCharset != null && contentTypeCharset.length() > 0) {
+ return new InputStreamReader(new BufferedInputStream(inputStream),
+ contentTypeCharset);
+ } else {
+ return new InputStreamReader(new BufferedInputStream(inputStream));
+ }
+ }
+
+ /**
+ * Parses the given string and extracts the enablement value.
+ *
+ * @param valueDelimiter
+ *
+ * @param input
+ * stream that holds
+ * @return
+ * @return true, if successful
+ */
+ private Map<String, String> parse(String[] keys, char valueDelimiter, InputStreamReader reader,
+ Map<String, String> valuesMap) throws IOException {
+ for (String key = null; (key = ReaderUtils.skipUntil(reader, keys)) != null;) {
+ String value = ReaderUtils.readStringUntil(reader, valueDelimiter);
+ valuesMap.put(key, value);
+ }
+ return valuesMap;
+ }
+
+ /**
+ * Creates a new url connection.
+ *
+ * @param urlString
+ * the url string
+ * @return the http url connection
+ * @throws IOException
+ * @throws IOException
+ * Signals that an I/O exception has occurred.
+ */
+ protected HttpURLConnection createURLConnection(String urlString) throws IOException {
+ URL url = new URL(urlString);
+ HttpURLConnection urlConnection = (HttpURLConnection) url.openConnection();
+ urlConnection.setInstanceFollowRedirects(true);
+ urlConnection.setRequestMethod(GET_METHOD_NAME);
+ return urlConnection;
+ }
+
+ /**
+ * Returns the return code from the given {@link HttpURLConnection}.
+ * Provided to be called by test cases so that they can retrieve the return
+ * code.
+ *
+ * @param urlConnection
+ * to get the response code from
+ * @return the return code the HttpUrlConnection received
+ * @throws IOException
+ * Signals that an I/O exception has occurred.
+ */
+ protected int getResponseCode(HttpURLConnection urlConnection) throws IOException {
+ return urlConnection.getResponseCode();
+ }
+
+}
\ No newline at end of file
Property changes on: branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/HttpResourceMap.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/IHttpGetRequest.java
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/IHttpGetRequest.java (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/IHttpGetRequest.java 2010-09-02 15:17:54 UTC (rev 24658)
@@ -0,0 +1,22 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is 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:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.usage;
+
+/**
+ * A interface that represents a HTTP Get Request.
+ *
+ * @author Andre Dietisheim
+ */
+public interface IHttpGetRequest {
+
+ public abstract void request(String urlString);
+
+}
\ No newline at end of file
Property changes on: branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/IHttpGetRequest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/ILoggingAdapter.java
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/ILoggingAdapter.java (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/ILoggingAdapter.java 2010-09-02 15:17:54 UTC (rev 24658)
@@ -0,0 +1,22 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is 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:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.usage;
+
+/**
+ * @author Andre Dietisheim
+ */
+public interface ILoggingAdapter {
+
+ public void logError(String errorMessage);
+
+ public void logMessage(String message);
+
+}
Property changes on: branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/ILoggingAdapter.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/ITracker.java
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/ITracker.java (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/ITracker.java 2010-09-02 15:17:54 UTC (rev 24658)
@@ -0,0 +1,35 @@
+package org.jboss.tools.usage;
+
+import java.io.UnsupportedEncodingException;
+
+
+/**
+ * @author Andre Dietisheim
+ */
+public interface ITracker {
+
+ /**
+ * Track the focusPoint in the application synchronously. <br/>
+ * <red><b>Please be cognizant while using this method. Since, it would have
+ * a peformance hit on the actual application. Use it unless it's really
+ * needed</b></red>
+ *
+ * @param focusPoint
+ * Focus point of the application like application load,
+ * application module load, user actions, error events etc.
+ * @throws UnsupportedEncodingException
+ */
+
+ public abstract void trackSynchronously(FocusPoint focusPoint);
+
+ /**
+ * Track the focusPoint in the application asynchronously. <br/>
+ *
+ * @param focusPoint
+ * Focus point of the application like application load,
+ * application module load, user actions, error events etc.
+ */
+
+ public abstract void trackAsynchronously(FocusPoint focusPoint);
+
+}
\ No newline at end of file
Property changes on: branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/ITracker.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/IURLBuildingStrategy.java
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/IURLBuildingStrategy.java (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/IURLBuildingStrategy.java 2010-09-02 15:17:54 UTC (rev 24658)
@@ -0,0 +1,26 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is 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:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.usage;
+
+import java.io.UnsupportedEncodingException;
+
+
+/**
+ * Interface for the URL building strategy
+ *
+ * @author Andre Dietisheim
+ *
+ */
+public interface IURLBuildingStrategy {
+
+ public String build(FocusPoint focusPoint) throws UnsupportedEncodingException;
+
+}
Property changes on: branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/IURLBuildingStrategy.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/PluginLogger.java
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/PluginLogger.java (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/PluginLogger.java 2010-09-02 15:17:54 UTC (rev 24658)
@@ -0,0 +1,42 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is 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:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.usage;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Plugin;
+import org.eclipse.core.runtime.Status;
+
+/**
+ * @author Andre Dietisheim
+ */
+public class PluginLogger implements ILoggingAdapter {
+
+ private Plugin plugin;
+
+ public PluginLogger(Plugin plugin) {
+ this.plugin = plugin;
+ }
+
+ public void logError(String message) {
+ log(IStatus.ERROR, message);
+ }
+
+ public void logMessage(String message) {
+ log(IStatus.INFO, message);
+ }
+
+ private void log(int severity, String message) {
+ if (plugin != null) {
+ IStatus status = new Status(severity, plugin.getBundle().getSymbolicName(), message);
+ plugin.getLog().log(status);
+ }
+ }
+}
Property changes on: branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/PluginLogger.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/Tracker.java
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/Tracker.java (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/Tracker.java 2010-09-02 15:17:54 UTC (rev 24658)
@@ -0,0 +1,71 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is 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:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.usage;
+
+import java.io.UnsupportedEncodingException;
+import java.text.MessageFormat;
+
+/**
+ * Reports (tracks) usage
+ *
+ * @author Andre Dietisheim
+ * @see based on <a
+ * href="http://jgoogleAnalytics.googlecode.com">http://jgoogleAnalytics
+ * .googlecode.com</a>
+ */
+public class Tracker implements ITracker {
+
+ private IURLBuildingStrategy urlBuildingStrategy = null;
+ private IHttpGetRequest httpRequest;
+ private ILoggingAdapter loggingAdapter;
+
+ public Tracker(IURLBuildingStrategy urlBuildingStrategy, IHttpGetRequest httpGetRequest, ILoggingAdapter loggingAdapter) {
+ this.httpRequest = httpGetRequest;
+ this.loggingAdapter = loggingAdapter;
+ this.urlBuildingStrategy = urlBuildingStrategy;
+ }
+
+ public void trackSynchronously(FocusPoint focusPoint) {
+ loggingAdapter
+ .logMessage(MessageFormat.format(UsageMessages.Tracker_Synchronous, focusPoint.getContentTitle()));
+ try {
+ httpRequest.request(getTrackingUrl(focusPoint));
+ } catch (Exception e) {
+ loggingAdapter.logMessage(MessageFormat.format(UsageMessages.Tracker_Error, e.getMessage()));
+ }
+ }
+
+ protected String getTrackingUrl(FocusPoint focusPoint) throws UnsupportedEncodingException {
+ return urlBuildingStrategy.build(focusPoint);
+ }
+
+ public void trackAsynchronously(FocusPoint focusPoint) {
+ loggingAdapter.logMessage(MessageFormat
+ .format(UsageMessages.Tracker_Asynchronous, focusPoint.getContentTitle()));
+ new Thread(new TrackingRunnable(focusPoint)).start();
+ }
+
+ private class TrackingRunnable implements Runnable {
+ private FocusPoint focusPoint;
+
+ private TrackingRunnable(FocusPoint focusPoint) {
+ this.focusPoint = focusPoint;
+ }
+
+ public void run() {
+ try {
+ httpRequest.request(getTrackingUrl(focusPoint));
+ } catch (Exception e) {
+ loggingAdapter.logMessage(MessageFormat.format(UsageMessages.Tracker_Error, e.getMessage()));
+ }
+ }
+ }
+}
Property changes on: branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/Tracker.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/UsageMessages.java
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/UsageMessages.java (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/UsageMessages.java 2010-09-02 15:17:54 UTC (rev 24658)
@@ -0,0 +1,36 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is 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:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.usage;
+
+import org.eclipse.osgi.util.NLS;
+
+public class UsageMessages extends NLS {
+ private static final String BUNDLE_NAME = "org.jboss.tools.usage.messages"; //$NON-NLS-1$
+ public static String Tracker_Synchronous;
+ public static String Tracker_Asynchronous;
+ public static String Tracker_Error;
+
+ public static String HttpGetMethod_Error_Http;
+ public static String HttpGetMethod_Error_Io;
+ public static String HttpGetMethod_Success;
+
+ public static String KillSwitchPreference_Error_Exception;
+ public static String KillSwitchPreference_Error_Http;
+ public static String KillSwitchPreference_Info_HttpQuery;
+
+ static {
+ // initialize resource bundle
+ NLS.initializeMessages(BUNDLE_NAME, UsageMessages.class);
+ }
+
+ private UsageMessages() {
+ }
+}
Property changes on: branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/UsageMessages.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/googleanalytics/AbstractGoogleAnalyticsParameters.java
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/googleanalytics/AbstractGoogleAnalyticsParameters.java (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/googleanalytics/AbstractGoogleAnalyticsParameters.java 2010-09-02 15:17:54 UTC (rev 24658)
@@ -0,0 +1,40 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is 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:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.usage.googleanalytics;
+
+
+/**
+ * @author Andre Dietisheim
+ */
+public abstract class AbstractGoogleAnalyticsParameters implements IGoogleAnalyticsParameters {
+
+ private String accountName;
+ private String referral;
+ private String hostName;
+
+ public AbstractGoogleAnalyticsParameters(String accountName, String hostName, String referral) {
+ this.accountName = accountName;
+ this.hostName = hostName;
+ this.referral = referral;
+ }
+
+ public String getAccountName() {
+ return accountName;
+ }
+
+ public String getHostname() {
+ return hostName;
+ }
+
+ public String getReferral() {
+ return referral;
+ }
+}
Property changes on: branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/googleanalytics/AbstractGoogleAnalyticsParameters.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/googleanalytics/GoogleAnalyticsCookie.java
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/googleanalytics/GoogleAnalyticsCookie.java (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/googleanalytics/GoogleAnalyticsCookie.java 2010-09-02 15:17:54 UTC (rev 24658)
@@ -0,0 +1,42 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is 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:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.usage.googleanalytics;
+
+import org.eclipse.core.runtime.Assert;
+
+public class GoogleAnalyticsCookie {
+
+ private CharSequence value;
+ private String identifier;
+ private char[] delimiters;
+
+ public GoogleAnalyticsCookie(String identifier, CharSequence value, char... delimiters) {
+ Assert.isTrue(identifier != null && identifier.length() > 0);
+ Assert.isTrue(value != null && value.length() > 0);
+
+ this.identifier = identifier;
+ this.value = value;
+ this.delimiters = delimiters;
+ }
+
+ public GoogleAnalyticsCookie(String identifier, CharSequence value) {
+ this(identifier, value, (char) -1);
+ }
+
+ public void appendTo(StringBuilder builder) {
+ builder.append(identifier)
+ .append(IGoogleAnalyticsParameters.EQUALS_SIGN)
+ .append(value);
+ for (char delimiter : delimiters) {
+ builder.append(delimiter);
+ }
+ }
+}
Property changes on: branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/googleanalytics/GoogleAnalyticsCookie.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/googleanalytics/GoogleAnalyticsMessages.java
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/googleanalytics/GoogleAnalyticsMessages.java (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/googleanalytics/GoogleAnalyticsMessages.java 2010-09-02 15:17:54 UTC (rev 24658)
@@ -0,0 +1,25 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is 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:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.usage.googleanalytics;
+
+import org.eclipse.osgi.util.NLS;
+
+public class GoogleAnalyticsMessages extends NLS {
+
+ private static final String BUNDLE_NAME = "org.jboss.tools.usage.googleanalytics.messages"; //$NON-NLS-1$
+ static {
+ // initialize resource bundle
+ NLS.initializeMessages(BUNDLE_NAME, GoogleAnalyticsMessages.class);
+ }
+
+ private GoogleAnalyticsMessages() {
+ }
+}
Property changes on: branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/googleanalytics/GoogleAnalyticsMessages.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/googleanalytics/GoogleAnalyticsUrlStrategy.java
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/googleanalytics/GoogleAnalyticsUrlStrategy.java (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/googleanalytics/GoogleAnalyticsUrlStrategy.java 2010-09-02 15:17:54 UTC (rev 24658)
@@ -0,0 +1,218 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is 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:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.usage.googleanalytics;
+
+import java.io.UnsupportedEncodingException;
+
+import org.jboss.tools.usage.FocusPoint;
+import org.jboss.tools.usage.IURLBuildingStrategy;
+import org.jboss.tools.usage.util.HttpEncodingUtils;
+
+/**
+ * Class that builds an URL that passes given parameters to google analytics
+ *
+ * @author Andre Dietisheim
+ *
+ * @see <a
+ * href="http://code.google.com/apis/analytics/docs/tracking/gaTrackingTroubleshoo...">GIF
+ * Request Parameters</a>
+ * @see <a
+ * href="http://code.google.com/apis/analytics/docs/concepts/gaConceptsCookies.htm...">Cookies
+ * Set By Google Analytics</a>
+ *
+ * @see <a
+ * href="http://www.morevisibility.com/analyticsblog/from-__utma-to-__utmz-google-...">From
+ * __utma to __utmz (Google Analytics Cookies)</a>
+ */
+public class GoogleAnalyticsUrlStrategy implements IURLBuildingStrategy {
+
+ private static final String TRACKING_URL = "http://www.google-analytics.com/__utm.gif";
+
+ // private static final int VISITS = -1;
+
+ private IGoogleAnalyticsParameters googleParameters;
+
+ public GoogleAnalyticsUrlStrategy(IGoogleAnalyticsParameters googleAnalyticsParameters) {
+ this.googleParameters = googleAnalyticsParameters;
+ }
+
+ public String build(FocusPoint focusPoint) throws UnsupportedEncodingException {
+ /*
+ * Google Analytics for Android:
+ *
+ String str = "";
+ if (paramEvent.action != null)
+ str = paramEvent.action;
+ if (!(str.startsWith("/")))
+ str = "/" + str;
+ str = encode(str);
+ Locale localLocale = Locale.getDefault();
+ StringBuilder localStringBuilder = new StringBuilder();
+ localStringBuilder.append("/__utm.gif");
+ localStringBuilder.append("?utmwv=4.3");
+ localStringBuilder.append("&utmn=").append(paramEvent.randomVal);
+ localStringBuilder.append("&utmcs=UTF-8");
+ localStringBuilder.append(String.format("&utmsr=%dx%d", new Object[] {
+ Integer.valueOf(paramEvent.screenWidth)
+ , Integer.valueOf(paramEvent.screenHeight) }));
+ localStringBuilder.append(String.format("&utmul=%s-%s", new Object[] {
+ localLocale.getLanguage()
+ , localLocale.getCountry() }));
+ localStringBuilder.append("&utmp=").append(str);
+ localStringBuilder.append("&utmac=").append(paramEvent.accountId);
+ localStringBuilder.append("&utmcc=").append(
+ getEscapedCookieString(paramEvent, paramString));
+ return localStringBuilder.toString();
+
+ *
+ * getEscapedCookieString:
+ *
+ StringBuilder localStringBuilder = new StringBuilder();
+ localStringBuilder.append("__utma=");
+ localStringBuilder.append("999").append(".");
+ localStringBuilder.append(paramEvent.userId).append(".");
+ localStringBuilder.append(paramEvent.timestampFirst).append(".");
+ localStringBuilder.append(paramEvent.timestampPrevious).append(".");
+ localStringBuilder.append(paramEvent.timestampCurrent).append(".");
+ localStringBuilder.append(paramEvent.visits);
+ if (paramString != null)
+ {
+ localStringBuilder.append("+__utmz=");
+ localStringBuilder.append("999").append(".");
+ localStringBuilder.append(paramEvent.timestampFirst).append(".");
+ localStringBuilder.append("1.1.");
+ localStringBuilder.append(paramString);
+ }
+ return encode(localStringBuilder.toString());
+
+ */
+
+ StringBuilder builder = new StringBuilder(TRACKING_URL)
+ .append(IGoogleAnalyticsParameters.URL_PARAM_DELIMITER);
+ appendParameter(IGoogleAnalyticsParameters.PARAM_TRACKING_CODE_VERSION,
+ IGoogleAnalyticsParameters.VALUE_TRACKING_CODE_VERSION, builder);
+ appendParameter(IGoogleAnalyticsParameters.PARAM_UNIQUE_TRACKING_NUMBER, getRandomNumber(), builder);
+ appendParameter(IGoogleAnalyticsParameters.PARAM_HOST_NAME, googleParameters.getHostname(), builder);
+ appendParameter(IGoogleAnalyticsParameters.PARAM_LANGUAGE_ENCODING,
+ IGoogleAnalyticsParameters.VALUE_ENCODING_UTF8, builder);
+ appendParameter(IGoogleAnalyticsParameters.PARAM_SCREEN_RESOLUTION, googleParameters.getScreenResolution(),
+ builder);
+ appendParameter(IGoogleAnalyticsParameters.PARAM_SCREEN_COLOR_DEPTH, googleParameters.getScreenColorDepth(),
+ builder);
+ appendParameter(IGoogleAnalyticsParameters.PARAM_BROWSER_LANGUAGE, googleParameters.getBrowserLanguage(),
+ builder);
+ appendParameter(IGoogleAnalyticsParameters.PARAM_PAGE_TITLE, focusPoint.getContentTitle(), builder);
+ // appendParameter(IGoogleAnalyticsParameters.PARAM_HID,
+ // getRandomNumber(), builder);
+ appendParameter(IGoogleAnalyticsParameters.PARAM_REFERRAL, googleParameters.getReferral(), builder);
+ appendParameter(IGoogleAnalyticsParameters.PARAM_PAGE_REQUEST, focusPoint.getContentURI(), builder);
+
+ appendParameter(IGoogleAnalyticsParameters.PARAM_ACCOUNT_NAME, googleParameters.getAccountName(), builder);
+ appendParameter(IGoogleAnalyticsParameters.PARAM_COOKIES, getCookies(), builder);
+ appendParameter(IGoogleAnalyticsParameters.PARAM_GAQ, "1", false, builder);
+
+ googleParameters.visit();
+
+ return builder.toString();
+ }
+
+ /**
+ * Returns the google analytics cookies. These cookies determines user
+ * identity, session identity etc.
+ *
+ * @return the cookies
+ *
+ * @see <a
+ * href="http://www.analyticsexperts.com/google-analytics/information-about-the-ut...">Information
+ * about the utmLinker and the __utma, __utmb and __utmc cookies</a>
+ */
+ private String getCookies() {
+ StringBuilder builder = new StringBuilder();
+
+ /**
+ * unique visitor id cookie has to be unique per eclipse installation
+ */
+ // String timeStamp = "-1";
+ // //String.valueOf(System.currentTimeMillis());
+ new GoogleAnalyticsCookie(IGoogleAnalyticsParameters.PARAM_COOKIES_UNIQUE_VISITOR_ID,
+ new StringBuilder().append("999.")
+ .append(googleParameters.getUserId()).append(IGoogleAnalyticsParameters.DOT)
+ .append(googleParameters.getFirstVisit()).append(IGoogleAnalyticsParameters.DOT)
+ .append(googleParameters.getLastVisit()).append(IGoogleAnalyticsParameters.DOT)
+ .append(googleParameters.getCurrentVisit()).append(IGoogleAnalyticsParameters.DOT)
+ .append(googleParameters.getVisitCount())
+ .append(IGoogleAnalyticsParameters.SEMICOLON),
+ IGoogleAnalyticsParameters.PLUS_SIGN)
+ .appendTo(builder);
+
+ new GoogleAnalyticsCookie(IGoogleAnalyticsParameters.PARAM_COOKIES_REFERRAL_TYPE,
+ new StringBuilder()
+ .append("999.")
+ .append(googleParameters.getFirstVisit())
+ .append(IGoogleAnalyticsParameters.DOT)
+ .append("1.1."))
+ .appendTo(builder);
+
+// new GoogleAnalyticsCookie(IGoogleAnalyticsParameters.PARAM_COOKIES_SESSION,
+// new StringBuilder()
+// .append("1"),
+// IGoogleAnalyticsParameters.SEMICOLON
+// , IGoogleAnalyticsParameters.PLUS_SIGN)
+// .appendTo(builder);
+//
+// new GoogleAnalyticsCookie(IGoogleAnalyticsParameters.PARAM_COOKIES_BROWSERSESSION,
+// new StringBuilder()
+// .append("1"),
+// IGoogleAnalyticsParameters.SEMICOLON
+// , IGoogleAnalyticsParameters.PLUS_SIGN)
+// .appendTo(builder);
+
+ new GoogleAnalyticsCookie(IGoogleAnalyticsParameters.PARAM_COOKIES_UTMCSR,
+ "(direct)",
+ IGoogleAnalyticsParameters.PIPE)
+ .appendTo(builder);
+
+ new GoogleAnalyticsCookie(IGoogleAnalyticsParameters.PARAM_COOKIES_UTMCCN,
+ "(direct)",
+ IGoogleAnalyticsParameters.PIPE)
+ .appendTo(builder);
+
+ new GoogleAnalyticsCookie(IGoogleAnalyticsParameters.PARAM_COOKIES_UTMCMD,
+ "(none)",
+ IGoogleAnalyticsParameters.PIPE)
+ .appendTo(builder);
+
+ new GoogleAnalyticsCookie(IGoogleAnalyticsParameters.PARAM_COOKIES_KEYWORD,
+ googleParameters.getKeyword())
+ .appendTo(builder);
+
+ builder.append(IGoogleAnalyticsParameters.SEMICOLON);
+
+ return HttpEncodingUtils.checkedEncodeUtf8(builder.toString());
+ }
+
+ private String getRandomNumber() {
+ return Integer.toString((int) (Math.random() * 0x7fffffff));
+ }
+
+ private void appendParameter(String name, String value, StringBuilder builder) {
+ appendParameter(name, value, true, builder);
+ }
+
+ private void appendParameter(String name, String value, boolean appendAmpersand, StringBuilder builder) {
+ builder.append(name)
+ .append(IGoogleAnalyticsParameters.EQUALS_SIGN)
+ .append(value);
+ if (appendAmpersand) {
+ builder.append(IGoogleAnalyticsParameters.AMPERSAND);
+ }
+ }
+}
Property changes on: branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/googleanalytics/GoogleAnalyticsUrlStrategy.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/googleanalytics/IGoogleAnalyticsParameters.java
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/googleanalytics/IGoogleAnalyticsParameters.java (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/googleanalytics/IGoogleAnalyticsParameters.java 2010-09-02 15:17:54 UTC (rev 24658)
@@ -0,0 +1,95 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is 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:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.usage.googleanalytics;
+
+/**
+ * An interface that provides methods for all parameters that google analytics
+ * needs to know about.
+ *
+ * @author Andre Dietisheim
+ * @see <a
+ * href="http://code.google.com/apis/analytics/docs/tracking/gaTrackingTroubleshoo...">GIF Request Parameters</a>
+ */
+public interface IGoogleAnalyticsParameters {
+
+ public static final char AMPERSAND = '&';
+ public static final char EQUALS_SIGN = '=';
+ public static final char URL_PARAM_DELIMITER = '?';
+ public static final char PLUS_SIGN = '+';
+ public static final char DOT = '.';
+ public static final char SEMICOLON = ';';
+ public static final char JAVA_LOCALE_DELIMITER = '_';
+ public static final char BROWSER_LOCALE_DELIMITER = '-';
+ public static final char PIPE = '|';
+ public static final char VERSION_DELIMITER = '.';
+
+ public static final String PARAM_HID = "utmhid";
+ public static final String PARAM_PAGE_REQUEST = "utmp";
+ public static final String PARAM_ACCOUNT_NAME = "utmac";
+ public static final String PARAM_HOST_NAME = "utmhn";
+ public static final String PARAM_COOKIES = "utmcc";
+ public static final String PARAM_COOKIES_UNIQUE_VISITOR_ID = "__utma";
+ public static final String PARAM_COOKIES_SESSION = "__utmb";
+ public static final String PARAM_COOKIES_BROWSERSESSION = "__utmc";
+ public static final String PARAM_COOKIES_REFERRAL_TYPE = "__utmz";
+
+ public static final String PARAM_REFERRAL = "utmr";
+ public static final String PARAM_TRACKING_CODE_VERSION = "utmwv";
+ public static final String PARAM_UNIQUE_TRACKING_NUMBER = "utmn";
+ public static final String PARAM_LANGUAGE_ENCODING = "utmcs";
+ public static final String PARAM_SCREEN_RESOLUTION = "utmsr";
+ public static final String PARAM_SCREEN_COLOR_DEPTH = "utmsc";
+ public static final String PARAM_PRODUCT_NAME = "utmipn";
+ public static final String PARAM_PRODUCT_CODE = "utmipc";
+ public static final String PARAM_BROWSER_LANGUAGE = "utmul";
+ public static final String PARAM_REPEAT_CAMPAIGN_VISIT = "utmcr";
+ public static final String PARAM_PAGE_TITLE = "utmdt";
+ public static final String PARAM_GAQ = "gaq";
+ public static final String PARAM_COOKIES_UTMCSR = "utmcsr";
+ public static final String PARAM_COOKIES_UTMCCN = "utmccn";
+ public static final String PARAM_COOKIES_UTMCMD = "utmcmd";
+ public static final String PARAM_COOKIES_KEYWORD = "utmctr";
+
+ public static final String VALUE_TRACKING_CODE_VERSION = "4.7.2";
+ public static final String VALUE_NO_REFERRAL = "0";
+ public static final String VALUE_ENCODING_UTF8 = "UTF-8";
+
+ public static final String SCREERESOLUTION_DELIMITER = "x";
+ public static final String SCREENCOLORDEPTH_POSTFIX = "-bit";
+
+ public String getAccountName();
+
+ public String getReferral();
+
+ public String getScreenResolution();
+
+ public String getScreenColorDepth();
+
+ public String getBrowserLanguage();
+
+ public String getHostname();
+
+ public String getUserAgent();
+
+ public String getUserId();
+
+ public String getKeyword();
+
+ public String getFirstVisit();
+
+ public String getLastVisit();
+
+ public String getCurrentVisit();
+
+ public long getVisitCount();
+
+ public void visit();
+}
Property changes on: branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/googleanalytics/IGoogleAnalyticsParameters.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/googleanalytics/messages.properties
===================================================================
Property changes on: branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/googleanalytics/messages.properties
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/internal/JBossToolsUsageActivator.java
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/internal/JBossToolsUsageActivator.java (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/internal/JBossToolsUsageActivator.java 2010-09-02 15:17:54 UTC (rev 24658)
@@ -0,0 +1,47 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is 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:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.usage.internal;
+
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * @author Andre Dietisheim
+ */
+public class JBossToolsUsageActivator extends AbstractUIPlugin {
+
+ public static final String PLUGIN_ID = "org.jboss.tools.usage"; //$NON-NLS-1$
+
+ private static JBossToolsUsageActivator plugin;
+
+ public JBossToolsUsageActivator() {
+ plugin = this;
+ }
+
+ @Override
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+
+ public static JBossToolsUsageActivator getDefault() {
+ return plugin;
+ }
+
+ public static ImageDescriptor getImageDescriptor(String path) {
+ return imageDescriptorFromPlugin(PLUGIN_ID, path);
+ }
+
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ }
+}
Property changes on: branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/internal/JBossToolsUsageActivator.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/messages.properties
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/messages.properties (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/messages.properties 2010-09-02 15:17:54 UTC (rev 24658)
@@ -0,0 +1,11 @@
+HttpGetMethod_Error_Http=HTTP GET to \"{0}\" failed, response code received \"{1}\"
+HttpGetMethod_Error_Io=HTTP GET to \"{0}\" failed, exception occured: \"{1}\"
+HttpGetMethod_Success=HTTP GET to url \"{0}\" successfull\!
+
+Tracker_Asynchronous=Tracking asynchronously focusPoint \"{0}\"
+Tracker_Error=Tracking failed, exception thrown: \"{0}\"
+Tracker_Synchronous=Tracking synchronously focusPoint \"{0}\"
+
+KillSwitchPreference_Error_Exception=Could not query kill switch preference at \"{0}\"
+KillSwitchPreference_Error_Http=Could not query kill switch preference at \"{0}\, response code was \"{1}\""
+KillSwitchPreference_Info_HttpQuery=Queried kill switch preference at \"{0}\"
Property changes on: branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/messages.properties
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/preferences/GlobalUsageReportingSettings.java
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/preferences/GlobalUsageReportingSettings.java (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/preferences/GlobalUsageReportingSettings.java 2010-09-02 15:17:54 UTC (rev 24658)
@@ -0,0 +1,51 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is 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:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.usage.preferences;
+
+import java.util.Map;
+
+import org.eclipse.core.runtime.Plugin;
+import org.jboss.tools.usage.HttpResourceMap;
+
+/**
+ * A class that implements a global reporting enablement setting. The current
+ * implementation queries a given url and extracts the enablement value out of
+ * the response.
+ */
+public class GlobalUsageReportingSettings extends HttpResourceMap {
+
+ private static final String REPORTING_ENABLEMENT_URL = "http://anonsvn.jboss.org/repos/jbosstools/workspace/usage/usage.properties"; //$NON-NLS-1$
+
+ public static final String REPORT_ENABLEMENT_KEY = "usage_reporting_enabled="; //$NON-NLS-1$
+ private static final boolean REPORT_ENABLEMENT_DEFAULT = false;
+
+ /* the delimiter that delimits the value */
+ private static final char VALUE_DELIMITER = '\n';
+
+ public GlobalUsageReportingSettings(Plugin plugin) {
+ super(REPORTING_ENABLEMENT_URL
+ , VALUE_DELIMITER
+ , plugin
+ , REPORT_ENABLEMENT_KEY);
+
+ this.plugin = plugin;
+ }
+
+ public boolean isEnabled() {
+ try {
+ Map<String, String> valueMap = getValueMap();
+ String isEnabled = valueMap.get(REPORT_ENABLEMENT_KEY);
+ return Boolean.valueOf(isEnabled);
+ } catch (Exception e) {
+ return REPORT_ENABLEMENT_DEFAULT;
+ }
+ }
+}
Property changes on: branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/preferences/GlobalUsageReportingSettings.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/preferences/IUsageReportPreferenceConstants.java
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/preferences/IUsageReportPreferenceConstants.java (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/preferences/IUsageReportPreferenceConstants.java 2010-09-02 15:17:54 UTC (rev 24658)
@@ -0,0 +1,46 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is 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:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.usage.preferences;
+
+/**
+ * @author Andre Dietisheim
+ */
+public interface IUsageReportPreferenceConstants {
+
+ /** The value that determines if usage shall be reported if there's no user set setting. */
+ public static final boolean USAGEREPORT_ENABLED_DEFAULTVALUE = false;
+
+ /**
+ * The identifier to be used to identify the value that determines if usage
+ * shall be reported.
+ */
+ public static final String USAGEREPORT_ENABLED_ID = "allow_usage_report_preference"; //$NON-NLS-1$
+
+ /**
+ * The identifier to be used for the value that determines if the user shall
+ * be asked for reporting.
+ */
+ public static final String ASK_USER_USAGEREPORT_ID = "ask_user_for_usage_report_preference"; //$NON-NLS-1$
+
+ /**
+ * The identifier to be used for the value that determines this eclipse
+ * instance.
+ */
+ public static final String ECLIPSE_INSTANCE_ID = "eclipse_instance_id"; //$NON-NLS-1$
+
+ public static final String FIRST_VISIT = "first_visit";
+
+ public static final String LAST_VISIT = "last_visit";
+
+ public static final String VISIT_COUNT = "visit_count";
+
+ public static final boolean ASK_USER_USAGEREPORT_DEFAULTVALUE = true;
+}
Property changes on: branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/preferences/IUsageReportPreferenceConstants.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/preferences/PreferencesMessages.java
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/preferences/PreferencesMessages.java (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/preferences/PreferencesMessages.java 2010-09-02 15:17:54 UTC (rev 24658)
@@ -0,0 +1,29 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is 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:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.usage.preferences;
+
+import org.eclipse.osgi.util.NLS;
+
+public class PreferencesMessages extends NLS {
+ private static final String BUNDLE_NAME = "org.jboss.tools.usage.preferences.messages"; //$NON-NLS-1$
+
+ public static String UsageReportPreferencePage_Description;
+ public static String UsageReportPreferencePage_AllowReporting;
+ public static String UsageReportPreferencePage_Error_Saving;
+
+ static {
+ // initialize resource bundle
+ NLS.initializeMessages(BUNDLE_NAME, PreferencesMessages.class);
+ }
+
+ private PreferencesMessages() {
+ }
+}
Property changes on: branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/preferences/PreferencesMessages.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/preferences/UsageReportPreferenceInitializer.java
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/preferences/UsageReportPreferenceInitializer.java (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/preferences/UsageReportPreferenceInitializer.java 2010-09-02 15:17:54 UTC (rev 24658)
@@ -0,0 +1,31 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is 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:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.usage.preferences;
+
+import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
+import org.jboss.tools.usage.util.PreferencesUtils;
+
+/**
+ * @author Andre Dietisheim
+ */
+public class UsageReportPreferenceInitializer extends
+ AbstractPreferenceInitializer {
+
+ public void initializeDefaultPreferences() {
+ PreferencesUtils.getStore().setDefault(
+ IUsageReportPreferenceConstants.ASK_USER_USAGEREPORT_ID,
+ IUsageReportPreferenceConstants.ASK_USER_USAGEREPORT_DEFAULTVALUE);
+
+ PreferencesUtils.getStore().setDefault(
+ IUsageReportPreferenceConstants.USAGEREPORT_ENABLED_ID,
+ IUsageReportPreferenceConstants.USAGEREPORT_ENABLED_DEFAULTVALUE);
+ }
+}
Property changes on: branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/preferences/UsageReportPreferenceInitializer.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/preferences/UsageReportPreferencePage.java
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/preferences/UsageReportPreferencePage.java (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/preferences/UsageReportPreferencePage.java 2010-09-02 15:17:54 UTC (rev 24658)
@@ -0,0 +1,54 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is 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:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.usage.preferences;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.jface.preference.BooleanFieldEditor;
+import org.eclipse.jface.preference.FieldEditorPreferencePage;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchPreferencePage;
+import org.jboss.tools.usage.internal.JBossToolsUsageActivator;
+import org.jboss.tools.usage.util.StatusUtils;
+import org.osgi.service.prefs.BackingStoreException;
+
+/**
+ * @author Andre Dietisheim
+ */
+public class UsageReportPreferencePage extends FieldEditorPreferencePage implements IWorkbenchPreferencePage {
+
+ public UsageReportPreferencePage() {
+ super(GRID);
+ }
+
+ public void createFieldEditors() {
+ addField(new BooleanFieldEditor(
+ IUsageReportPreferenceConstants.USAGEREPORT_ENABLED_ID
+ , PreferencesMessages.UsageReportPreferencePage_AllowReporting
+ , getFieldEditorParent()));
+ }
+
+ public void init(IWorkbench workbench) {
+ setPreferenceStore(UsageReportPreferences.createPreferenceStore());
+ setDescription(PreferencesMessages.UsageReportPreferencePage_Description);
+ }
+
+ @Override
+ public boolean performOk() {
+ try {
+ UsageReportPreferences.flush();
+ } catch (BackingStoreException e) {
+ IStatus status = StatusUtils.getErrorStatus(JBossToolsUsageActivator.PLUGIN_ID,
+ PreferencesMessages.UsageReportPreferencePage_Error_Saving, e);
+ JBossToolsUsageActivator.getDefault().getLog().log(status);
+ }
+ return super.performOk();
+ }
+}
\ No newline at end of file
Property changes on: branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/preferences/UsageReportPreferencePage.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/preferences/UsageReportPreferences.java
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/preferences/UsageReportPreferences.java (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/preferences/UsageReportPreferences.java 2010-09-02 15:17:54 UTC (rev 24658)
@@ -0,0 +1,60 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is 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:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.usage.preferences;
+
+import org.eclipse.core.runtime.preferences.IEclipsePreferences;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.jboss.tools.usage.internal.JBossToolsUsageActivator;
+import org.jboss.tools.usage.reporting.ReportingMessages;
+import org.jboss.tools.usage.util.PreferencesUtils;
+import org.jboss.tools.usage.util.StatusUtils;
+import org.osgi.service.prefs.BackingStoreException;
+
+public class UsageReportPreferences {
+
+ public static void setEnabled(boolean enabled) {
+ PreferencesUtils.getStore().putValue(
+ IUsageReportPreferenceConstants.USAGEREPORT_ENABLED_ID, String.valueOf(enabled));
+ }
+
+ public static boolean isEnabled() {
+ return PreferencesUtils.getPreferences().getBoolean(
+ IUsageReportPreferenceConstants.USAGEREPORT_ENABLED_ID,
+ IUsageReportPreferenceConstants.USAGEREPORT_ENABLED_DEFAULTVALUE);
+ }
+
+ public static boolean isAskUser() {
+ return PreferencesUtils.getPreferences().getBoolean(
+ IUsageReportPreferenceConstants.ASK_USER_USAGEREPORT_ID,
+ IUsageReportPreferenceConstants.ASK_USER_USAGEREPORT_DEFAULTVALUE);
+ }
+
+ public static void setAskUser(boolean askUser) {
+ try {
+ IEclipsePreferences preferences = PreferencesUtils.getPreferences();
+ preferences.putBoolean(IUsageReportPreferenceConstants.ASK_USER_USAGEREPORT_ID, askUser);
+ preferences.flush();
+ } catch (BackingStoreException e) {
+ JBossToolsUsageActivator.getDefault().getLog().log(
+ StatusUtils.getErrorStatus(JBossToolsUsageActivator.PLUGIN_ID,
+ ReportingMessages.UsageReport_Error_SavePreferences, e,
+ IUsageReportPreferenceConstants.ASK_USER_USAGEREPORT_ID));
+ }
+ }
+
+ public static void flush() throws BackingStoreException {
+ PreferencesUtils.getPreferences().flush();
+ }
+
+ public static IPreferenceStore createPreferenceStore() {
+ return PreferencesUtils.getStore();
+ }
+}
Property changes on: branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/preferences/UsageReportPreferences.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/preferences/messages.properties
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/preferences/messages.properties (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/preferences/messages.properties 2010-09-02 15:17:54 UTC (rev 24658)
@@ -0,0 +1,3 @@
+UsageReportPreferencePage_Description=Preference page with options for anonymous usage data reporting. Usage data is used for statistical matters only.
+UsageReportPreferencePage_AllowReporting=&Allow Red Hat Inc. to report usage anonymously.
+UsageReportPreferencePage_Error_Saving=Could not save the preferences.
Property changes on: branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/preferences/messages.properties
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/reporting/EclipseEnvironment.java
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/reporting/EclipseEnvironment.java (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/reporting/EclipseEnvironment.java 2010-09-02 15:17:54 UTC (rev 24658)
@@ -0,0 +1,270 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is 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:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.usage.reporting;
+
+import java.text.MessageFormat;
+import java.util.Random;
+
+import org.eclipse.core.runtime.IProduct;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.preferences.IEclipsePreferences;
+import org.eclipse.swt.graphics.Rectangle;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.PlatformUI;
+import org.jboss.tools.usage.googleanalytics.AbstractGoogleAnalyticsParameters;
+import org.jboss.tools.usage.googleanalytics.IGoogleAnalyticsParameters;
+import org.jboss.tools.usage.internal.JBossToolsUsageActivator;
+import org.jboss.tools.usage.preferences.IUsageReportPreferenceConstants;
+import org.jboss.tools.usage.util.BundleUtils;
+import org.jboss.tools.usage.util.PreferencesUtils;
+import org.jboss.tools.usage.util.BundleUtils.IBundleEntryFilter;
+import org.osgi.framework.Bundle;
+
+/**
+ * @author Andre Dietisheim
+ */
+public class EclipseEnvironment extends AbstractGoogleAnalyticsParameters implements IGoogleAnalyticsParameters {
+
+ private static final String USERAGENT_WIN = "{0}/{1} (Windows; U; Windows NT 6.1; {2})"; //$NON-NLS-1$
+ private static final String USERAGENT_MAC = "{0}/{1} (Macintosh; U; Intel Mac OS X 10.5; {2})"; //$NON-NLS-1$
+ private static final String USERAGENT_LINUX = "{0}/{1} (X11; U; Linux i686; {2})"; //$NON-NLS-1$
+ private static final char BUNDLE_GROUP_DELIMITER = '-';
+ private static final String JBOSS_TOOLS_BUNDLES_PREFIX = "org\\.jboss\\.tools.+"; //$NON-NLS-1$
+ private static final String ECLIPSE_RUNTIME_BULDEID = "org.eclipse.core.runtime"; //$NON-NLS-1$
+
+ private String screenResolution;
+ private String screenColorDepth;
+ private Random random;
+ private IEclipsePreferences preferences;
+ private String firstVisit;
+ private String lastVisit;
+ private String currentVisit;
+ private long visitCount;
+
+ public EclipseEnvironment(String accountName, String hostName, String referral, IEclipsePreferences preferences) {
+ super(accountName, hostName, referral);
+ this.random = new Random();
+ this.preferences = preferences;
+ initScreenSettings();
+ initVisits();
+ }
+
+ protected void initScreenSettings() {
+ final Display display = getDisplay();
+ display.syncExec(new Runnable() {
+
+ public void run() {
+ screenColorDepth = display.getDepth() + SCREENCOLORDEPTH_POSTFIX;
+
+ Rectangle bounds = display.getBounds();
+ screenResolution = bounds.width + SCREERESOLUTION_DELIMITER + bounds.height;
+ }
+ });
+ }
+
+ private void initVisits() {
+ String currentTime = String.valueOf(System.currentTimeMillis());
+ this.currentVisit = currentTime;
+ this.firstVisit = preferences.get(IUsageReportPreferenceConstants.FIRST_VISIT, null);
+ if (firstVisit == null) {
+ this.firstVisit = currentTime;
+ preferences.put(IUsageReportPreferenceConstants.FIRST_VISIT, firstVisit);
+ }
+ lastVisit = preferences.get(IUsageReportPreferenceConstants.LAST_VISIT, currentTime);
+ visitCount = preferences.getLong(IUsageReportPreferenceConstants.VISIT_COUNT, 1);
+ }
+
+ public String getBrowserLanguage() {
+ String nl = getNL();
+ if (nl == null) {
+ return ""; //$NON-NLS-1$
+ }
+
+ int indexOf = nl.indexOf(JAVA_LOCALE_DELIMITER); //$NON-NLS-1$
+ if (indexOf <= 0) {
+ return nl;
+ }
+
+ StringBuilder builder = new StringBuilder();
+ builder.append(nl.substring(0, indexOf));
+ builder.append(BROWSER_LOCALE_DELIMITER);
+ builder.append(nl.substring(indexOf + 1));
+ return builder.toString();
+ }
+
+ protected String getNL() {
+ return Platform.getNL(); //$NON-NLS-1$
+ }
+
+ public String getScreenResolution() {
+ return screenResolution;
+ }
+
+ public String getScreenColorDepth() {
+ return screenColorDepth;
+ }
+
+ protected Display getDisplay() {
+ if (PlatformUI.isWorkbenchRunning()) {
+ return PlatformUI.getWorkbench().getDisplay();
+ }
+
+ Display display = Display.getCurrent();
+ if (display == null) {
+ display = Display.getDefault();
+ }
+ return display;
+ }
+
+ public String getUserAgent() {
+
+ String productId = getApplicationName();
+ String productVersion = getApplicationVersion();
+ String browserLanguage = getBrowserLanguage();
+
+ /**
+ * Google API for android: this.userAgent = String.format(
+ * "GoogleAnalytics/%s (Linux; U; Android %s; %s-%s; %s; Build/%s)" ,
+ * new Object[] { "1.0" , Build.VERSION.RELEASE ,
+ * (localLocale.getLanguage() != null) ?
+ * localLocale.getLanguage().toLowerCase() : "en" ,
+ * (localLocale.getCountry() != null) ?
+ * localLocale.getCountry().toLowerCase() : "" , Build.MODEL, Build.ID
+ * });
+ */
+
+ return MessageFormat.format(
+ getUserAgentPattern(getOS())
+ , productId
+ , productVersion
+ , browserLanguage
+ );
+ }
+
+ private String getUserAgentPattern(String os) {
+ String userAgentPattern = ""; //$NON-NLS-1$
+ /*
+ * TODO: implement architecture (i686, x86_64 etc.), Windows version, MacOS version etc.
+ */
+ if (Platform.OS_LINUX.equals(os)) {
+ return USERAGENT_LINUX; //$NON-NLS-1$
+ } else if (Platform.OS_MACOSX.equals(os)) {
+ return USERAGENT_MAC; //$NON-NLS-1$
+ } else if (Platform.OS_WIN32.equals(os)) {
+ return USERAGENT_WIN; //$NON-NLS-1$
+ }
+ return userAgentPattern;
+ }
+
+ protected String getOS() {
+ return Platform.getOS();
+ }
+
+ protected String getApplicationName() {
+ return getApplicationBundle().getSymbolicName();
+ }
+
+ protected String getApplicationVersion() {
+ String fullVersion = getApplicationBundle().getVersion().toString();
+ int productVersionStart = fullVersion.lastIndexOf(VERSION_DELIMITER);
+ if (productVersionStart > 0) {
+ return fullVersion.substring(0, productVersionStart);
+ } else {
+ return fullVersion;
+ }
+ }
+
+ /**
+ * Returns the bundle that launched the application that this class runs in.
+ *
+ * @return the defining bundle
+ */
+ private Bundle getApplicationBundle() {
+ IProduct product = Platform.getProduct();
+ if (product != null) {
+ return product.getDefiningBundle();
+ } else {
+ return Platform.getBundle(ECLIPSE_RUNTIME_BULDEID);
+ }
+ }
+
+ public String getUserId() {
+ String userId = preferences.get(IUsageReportPreferenceConstants.ECLIPSE_INSTANCE_ID, null);
+ if (userId == null) {
+ userId = createIdentifier();
+ preferences.put(IUsageReportPreferenceConstants.ECLIPSE_INSTANCE_ID, userId);
+ PreferencesUtils.checkedSavePreferences(preferences, JBossToolsUsageActivator.getDefault(), ReportingMessages.EclipseEnvironment_Error_SavePreferences);
+ }
+ return userId;
+ }
+
+ /**
+ * Creates an unique identifier.
+ *
+ * @return the identifier
+ */
+ private String createIdentifier() {
+ StringBuilder builder = new StringBuilder();
+ builder.append(Math.abs(random.nextLong()));
+ builder.append(System.currentTimeMillis());
+ return builder.toString();
+ }
+
+ public String getKeyword() {
+ JBossBundleGroups jbossBundleGroups = new JBossBundleGroups();
+ IBundleEntryFilter jbossToolsFilter = new BundleUtils.BundleSymbolicNameFilter(JBOSS_TOOLS_BUNDLES_PREFIX);
+ IBundleEntryFilter compositeFilter = new BundleUtils.CompositeFilter(
+ jbossToolsFilter
+ , jbossBundleGroups);
+ BundleUtils.getBundles(compositeFilter, getBundles());
+
+ return bundleGroupsToKeywordString(jbossBundleGroups);
+ }
+
+ protected Bundle[] getBundles() {
+ return JBossToolsUsageActivator.getDefault().getBundle().getBundleContext().getBundles();
+ }
+
+ private String bundleGroupsToKeywordString(JBossBundleGroups jbossBundleGroups) {
+ char delimiter = BUNDLE_GROUP_DELIMITER;
+ StringBuilder builder = new StringBuilder();
+ for (String bundleGroupId : jbossBundleGroups.getBundleGroupIds()) {
+ builder.append(bundleGroupId)
+ .append(delimiter);
+ }
+ return builder.toString();
+ }
+
+ public String getCurrentVisit() {
+ return currentVisit;
+ }
+
+ public String getFirstVisit() {
+ return firstVisit;
+ }
+
+ public String getLastVisit() {
+ return lastVisit;
+ }
+
+ public long getVisitCount() {
+ return visitCount;
+ }
+
+ public void visit() {
+ lastVisit = currentVisit;
+ preferences.put(IUsageReportPreferenceConstants.LAST_VISIT, lastVisit);
+ currentVisit = String.valueOf(System.currentTimeMillis());
+ visitCount++;
+ preferences.putLong(IUsageReportPreferenceConstants.VISIT_COUNT, visitCount);
+ PreferencesUtils.checkedSavePreferences(preferences, JBossToolsUsageActivator.getDefault(), ReportingMessages.EclipseEnvironment_Error_SavePreferences);
+ }
+}
Property changes on: branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/reporting/EclipseEnvironment.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/reporting/JBossBundleGroups.java
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/reporting/JBossBundleGroups.java (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/reporting/JBossBundleGroups.java 2010-09-02 15:17:54 UTC (rev 24658)
@@ -0,0 +1,223 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is 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:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.usage.reporting;
+
+import java.util.Collection;
+import java.util.Set;
+import java.util.TreeSet;
+
+import org.jboss.tools.usage.util.BundleUtils.IBundleEntryFilter;
+import org.osgi.framework.Bundle;
+
+/**
+ * @author Andre Dietisheim
+ */
+public class JBossBundleGroups implements IBundleEntryFilter {
+
+ public enum BundleGroup {
+ ARCHIVES("org.jboss.ide.eclipse.archives.core",
+ "org.jboss.ide.eclipse.archives.jdt.integration",
+ "org.jboss.ide.eclipse.archives.ui"
+ )
+ , AS("org.jboss.ide.eclipse.archives.webtools",
+ "org.jboss.ide.eclipse.as.classpath.core",
+ "org.jboss.ide.eclipse.as.classpath.ui",
+ "org.jboss.ide.eclipse.as.core",
+ "org.jboss.ide.eclipse.as.doc.user",
+ "org.jboss.ide.eclipse.as.ssh",
+ "org.jboss.ide.eclipse.as.ui",
+ "org.jboss.ide.eclipse.as.ui.mbeans",
+ "org.jboss.ide.eclipse.as.wtp.core",
+ "org.jboss.ide.eclipse.as.wtp.ui")
+ , BIRT("org.jboss.tools.birt.core",
+ "org.jboss.tools.birt.oda",
+ "org.jboss.tools.birt.oda.ui")
+ , BPEL("org.eclipse.bpel.apache.ode.deploy.model",
+ "org.eclipse.bpel.apache.ode.deploy.ui",
+ "org.eclipse.bpel.common.model",
+ "org.eclipse.bpel.common.ui",
+ "org.eclipse.bpel.model",
+ "org.eclipse.bpel.ui",
+ "org.eclipse.bpel.validator",
+ "org.eclipse.bpel.wsil.model",
+ "org.eclipse.bpel.xpath10",
+ "org.jboss.tools.bpel.cheatsheet",
+ "org.jboss.tools.bpel.runtimes")
+ , CDI("org.jboss.tools.cdi.core",
+ "org.jboss.tools.cdi.text.ext",
+ "org.jboss.tools.cdi.ui",
+ "org.jboss.tools.cdi.xml",
+ "org.jboss.tools.cdi.xml.ui")
+ , DELTACLOUD("org.jboss.tools.deltacloud.core",
+ "org.jboss.tools.deltacloud.ui")
+ , DROOLS("org.drools.eclipse",
+ "org.drools.eclipse.task",
+ "org.eclipse.webdav",
+ "org.guvnor.tools",
+ "org.jboss.tools.flow.ruleflow")
+ , ESB("org.jboss.tools.esb.core",
+ "org.jboss.tools.esb.project.core",
+ "org.jboss.tools.esb.project.ui",
+ "org.jboss.tools.esb.ui",
+ "org.jboss.tools.esb.validator")
+ , FLOW("org.jboss.tools.flow.common")
+ , FREEMARKER("org.jboss.ide.eclipse.freemarker")
+ , GWT("org.jboss.tools.gwt.core",
+ "org.jboss.tools.gwt.ui")
+ , HIBERNATETOOLS("org.hibernate.eclipse",
+ "org.hibernate.eclipse.console",
+ "org.hibernate.eclipse.help",
+ "org.hibernate.eclipse.jdt.apt.ui",
+ "org.hibernate.eclipse.jdt.ui",
+ "org.hibernate.eclipse.mapper",
+ "org.jboss.tools.hibernate.jpt.core",
+ "org.jboss.tools.hibernate.jpt.ui",
+ "org.jboss.tools.hibernate.ui",
+ "org.jboss.tools.hibernate.xml",
+ "org.jboss.tools.hibernate.xml.ui")
+ , JBPM("org.jboss.tools.flow.jpdl4",
+ "org.jboss.tools.flow.jpdl4.multipage",
+ "org.jboss.tools.jbpm.common",
+ "org.jboss.tools.jbpm.convert",
+ "org.jbpm.gd.jpdl")
+ , JMX("org.jboss.tools.jmx.core",
+ "org.jboss.tools.jmx.ui")
+ , JSF("org.jboss.tools.jsf",
+ "org.jboss.tools.jsf.doc.user",
+ "org.jboss.tools.jsf.text.ext",
+ "org.jboss.tools.jsf.text.ext.facelets",
+ "org.jboss.tools.jsf.text.ext.richfaces",
+ "org.jboss.tools.jsf.ui",
+ "org.jboss.tools.jsf.verification",
+ "org.jboss.tools.jsf.vpe.ajax4jsf",
+ "org.jboss.tools.jsf.vpe.facelets",
+ "org.jboss.tools.jsf.vpe.jbpm",
+ "org.jboss.tools.jsf.vpe.jsf",
+ "org.jboss.tools.jsf.vpe.jstl",
+ "org.jboss.tools.jsf.vpe.myfaces",
+ "org.jboss.tools.jsf.vpe.richfaces",
+ "org.jboss.tools.jsf.vpe.seam")
+ , JST("org.jboss.tools.jst.css",
+ "org.jboss.tools.jst.firstrun",
+ "org.jboss.tools.jst.jsp",
+ "org.jboss.tools.jst.text.ext",
+ "org.jboss.tools.jst.web",
+ "org.jboss.tools.jst.web.kb",
+ "org.jboss.tools.jst.web.tiles",
+ "org.jboss.tools.jst.web.tiles.ui",
+ "org.jboss.tools.jst.web.ui",
+ "org.jboss.tools.jst.web.verification")
+ , LABS("org.jboss.tools.labs.pde.sourceprovider")
+ , MAVEN("org.jboss.tools.maven.cdi",
+ "org.jboss.tools.maven.core",
+ "org.jboss.tools.maven.hibernate",
+ "org.jboss.tools.maven.jsf",
+ "org.jboss.tools.maven.portlet",
+ "org.jboss.tools.maven.seam",
+ "org.jboss.tools.maven.ui")
+ , MODESHAPE("org.jboss.tools.modeshape.rest")
+ , PORTLET("org.jboss.tools.portlet.core",
+ "org.jboss.tools.portlet.ui")
+ , PROFILER("org.jboss.tools.profiler.ui")
+ , RUNTIME("org.jboss.tools.runtime")
+ , SEAM("org.jboss.tools.seam.core",
+ "org.jboss.tools.seam.doc.user",
+ "org.jboss.tools.seam.pages.xml",
+ "org.jboss.tools.seam.text.ext",
+ "org.jboss.tools.seam.ui",
+ "org.jboss.tools.seam.ui.pages",
+ "org.jboss.tools.seam.xml",
+ "org.jboss.tools.seam.xml.ui")
+ , SMOOKS("org.jboss.tools.smooks.core",
+ "org.jboss.tools.smooks.runtime",
+ "org.jboss.tools.smooks.templating",
+ "org.jboss.tools.smooks.ui")
+ , STRUTS("org.jboss.tools.struts",
+ "org.jboss.tools.struts.text.ext",
+ "org.jboss.tools.struts.ui",
+ "org.jboss.tools.struts.validator.ui",
+ "org.jboss.tools.struts.verification",
+ "org.jboss.tools.struts.vpe.struts")
+ , TPTP("org.jboss.tools.eclipse.as.tptp")
+ , VPE("org.jboss.tools.vpe",
+ "org.jboss.tools.vpe.docbook",
+ "org.jboss.tools.vpe.html",
+ "org.jboss.tools.vpe.jsp",
+ "org.jboss.tools.vpe.resref",
+ "org.jboss.tools.vpe.spring",
+ "org.jboss.tools.vpe.ui.palette",
+ "org.jboss.tools.vpe.xulrunner",
+ "org.jboss.tools.xulrunner",
+ "org.jboss.tools.xulrunner.initializer")
+ , WORKINGSET("org.jboss.tools.workingset.core",
+ "org.jboss.tools.workingset.ui")
+ , WS("rg.jboss.tools.ws.core",
+ "org.jboss.tools.ws.creation.core",
+ "org.jboss.tools.ws.creation.ui",
+ "org.jboss.tools.ws.ui")
+ , XULRUNNER("org.mozilla.xpcom",
+ "org.mozilla.xulrunner.carbon.macosx",
+ "org.mozilla.xulrunner.cocoa.macosx",
+ "org.mozilla.xulrunner.gtk.linux.x86",
+ "org.mozilla.xulrunner.gtk.linux.x86_64",
+ "org.mozilla.xulrunner.win32.win32.x86");
+
+ private String[] bundleNames;
+
+ BundleGroup(String... bundleNames) {
+ this.bundleNames = bundleNames;
+ }
+
+ /**
+ * Returns <tt>true</tt> if the given bundle name is a member of this
+ * bundle group.
+ *
+ * @param bundleName
+ * the bundle name to check whether it's a member of this
+ * group of bundles.
+ * @return <tt>true</tt>, if the given bundle
+ */
+ public boolean isMember(String bundleName) {
+ boolean isMember = false;
+ for (String name : bundleNames) {
+ if (name.equals(bundleName)) {
+ return true;
+ }
+ }
+ return isMember;
+ }
+
+ public void addGroupIdTo(Collection<String> bundleGroupIds) {
+ bundleGroupIds.add(name());
+ }
+ }
+
+ private Set<String> jbossBundleGroups = new TreeSet<String>();
+
+ /**
+ * Collects the bundle groups the bundles it gets belong
+ * to. Always returns <tt>true</tt> (does match) while collecting
+ */
+ public boolean matches(Bundle bundle) {
+ String bundleName = bundle.getSymbolicName();
+ for (BundleGroup bundleGroup : BundleGroup.values()) {
+ if (bundleGroup.isMember(bundleName)) {
+ jbossBundleGroups.add(bundleGroup.name());
+ break;
+ }
+ }
+ return true;
+ }
+
+ public Collection<String> getBundleGroupIds() {
+ return jbossBundleGroups;
+ }
+}
\ No newline at end of file
Property changes on: branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/reporting/JBossBundleGroups.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/reporting/ReportingMessages.java
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/reporting/ReportingMessages.java (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/reporting/ReportingMessages.java 2010-09-02 15:17:54 UTC (rev 24658)
@@ -0,0 +1,36 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is 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:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.usage.reporting;
+
+import org.eclipse.osgi.util.NLS;
+
+public class ReportingMessages extends NLS {
+ private static final String BUNDLE_NAME = "org.jboss.tools.usage.reporting.messages"; //$NON-NLS-1$
+ public static String EclipseEnvironment_Error_SavePreferences;
+
+ public static String UsageReport_Reporting_Usage;
+ public static String UsageReport_Querying_Enablement;
+ public static String UsageReport_Asking_User;
+ public static String UsageReport_Checkbox_Text;
+ public static String UsageReport_DialogMessage;
+ public static String UsageReport_DialogTitle;
+
+ public static String UsageReport_Error_SavePreferences;
+ public static String UsageReport_GoogleAnalyticsAccount;
+ public static String UsageReport_HostName;
+ static {
+ // initialize resource bundle
+ NLS.initializeMessages(BUNDLE_NAME, ReportingMessages.class);
+ }
+
+ private ReportingMessages() {
+ }
+}
Property changes on: branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/reporting/ReportingMessages.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/reporting/UsageReport.java
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/reporting/UsageReport.java (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/reporting/UsageReport.java 2010-09-02 15:17:54 UTC (rev 24658)
@@ -0,0 +1,177 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is 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:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.usage.reporting;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.jobs.IJobChangeEvent;
+import org.eclipse.core.runtime.jobs.IJobChangeListener;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.jface.window.Window;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.progress.UIJob;
+import org.jboss.tools.usage.FocusPoint;
+import org.jboss.tools.usage.HttpGetRequest;
+import org.jboss.tools.usage.IHttpGetRequest;
+import org.jboss.tools.usage.ILoggingAdapter;
+import org.jboss.tools.usage.ITracker;
+import org.jboss.tools.usage.IURLBuildingStrategy;
+import org.jboss.tools.usage.PluginLogger;
+import org.jboss.tools.usage.Tracker;
+import org.jboss.tools.usage.googleanalytics.GoogleAnalyticsUrlStrategy;
+import org.jboss.tools.usage.googleanalytics.IGoogleAnalyticsParameters;
+import org.jboss.tools.usage.internal.JBossToolsUsageActivator;
+import org.jboss.tools.usage.preferences.GlobalUsageReportingSettings;
+import org.jboss.tools.usage.preferences.UsageReportPreferences;
+import org.jboss.tools.usage.util.PreferencesUtils;
+import org.jboss.tools.usage.util.StatusUtils;
+import org.osgi.service.prefs.BackingStoreException;
+
+/**
+ * @author Andre Dietisheim
+ */
+public class UsageReport {
+
+ private static final String GANALYTICS_ACCOUNTNAME = ReportingMessages.UsageReport_GoogleAnalyticsAccount;
+
+ private static final String HOST_NAME = ReportingMessages.UsageReport_HostName;
+
+ private FocusPoint focusPoint = new FocusPoint("tools") //$NON-NLS-1$
+ .setChild(new FocusPoint("usage") //$NON-NLS-1$
+ .setChild(new FocusPoint("action") //$NON-NLS-1$
+ .setChild(new FocusPoint("wsstartup")))); //$NON-NLS-1$
+
+ private GlobalUsageReportingSettings globalSettings = new GlobalUsageReportingSettings(JBossToolsUsageActivator
+ .getDefault());
+
+ public void report() {
+ new ReportingJob().schedule();
+ }
+
+ private void askUser() {
+ UsageReportEnablementDialog dialog = new UsageReportEnablementDialog(
+ true,
+ PlatformUI.getWorkbench().getActiveWorkbenchWindow());
+ if (dialog.open() == Window.OK) {
+ UsageReportPreferences.setEnabled(dialog.isReportEnabled());
+ UsageReportPreferences.setAskUser(false);
+ flushPreferences();
+ }
+ }
+
+ private void flushPreferences() {
+ try {
+ UsageReportPreferences.flush();
+ } catch (BackingStoreException e) {
+ IStatus status = StatusUtils.getErrorStatus(JBossToolsUsageActivator.PLUGIN_ID,
+ ReportingMessages.UsageReport_Error_SavePreferences, e);
+ JBossToolsUsageActivator.getDefault().getLog().log(status);
+ }
+ }
+
+ private void doReport() {
+ if (UsageReportPreferences.isEnabled()) {
+ getTracker().trackAsynchronously(focusPoint);
+ }
+ }
+
+ private ITracker getTracker() {
+ IGoogleAnalyticsParameters eclipseEnvironment = new EclipseEnvironment(
+ GANALYTICS_ACCOUNTNAME
+ , HOST_NAME
+ , IGoogleAnalyticsParameters.VALUE_NO_REFERRAL
+ , PreferencesUtils.getPreferences());
+ ILoggingAdapter loggingAdapter = new PluginLogger(JBossToolsUsageActivator.getDefault());
+ IURLBuildingStrategy urlStrategy = new GoogleAnalyticsUrlStrategy(eclipseEnvironment);
+ IHttpGetRequest httpGetRequest = new HttpGetRequest(eclipseEnvironment.getUserAgent(), loggingAdapter);
+ return new Tracker(urlStrategy, httpGetRequest, loggingAdapter);
+ }
+
+ private class ReportingJob extends Job {
+ private ReportingJob() {
+ super(ReportingMessages.UsageReport_Reporting_Usage);
+ }
+
+ @Override
+ protected IStatus run(IProgressMonitor monitor) {
+ if (monitor.isCanceled()) {
+ return Status.CANCEL_STATUS;
+ }
+ monitor.beginTask(ReportingMessages.UsageReport_Querying_Enablement, 2);
+ if (globalSettings.isEnabled()) {
+ if (monitor.isCanceled()) {
+ return Status.CANCEL_STATUS;
+ }
+ monitor.worked(1);
+ if (UsageReportPreferences.isAskUser()) {
+ if (monitor.isCanceled()) {
+ return Status.CANCEL_STATUS;
+ }
+ askUserAndReport();
+ } else {
+ if (monitor.isCanceled()) {
+ return Status.CANCEL_STATUS;
+ }
+ doReport();
+ }
+ monitor.worked(2);
+ monitor.done();
+ }
+ return Status.OK_STATUS;
+ }
+
+ private void askUserAndReport() {
+ Job askUserJob = new AskUserJob();
+ askUserJob.addJobChangeListener(new IJobChangeListener() {
+
+ public void sleeping(IJobChangeEvent event) {
+ // ignore
+ }
+
+ public void scheduled(IJobChangeEvent event) {
+ // ignore
+ }
+
+ public void running(IJobChangeEvent event) {
+ // ignore
+ }
+
+ public void done(IJobChangeEvent event) {
+ doReport();
+ }
+
+ public void awake(IJobChangeEvent event) {
+ // ignore
+ }
+
+ public void aboutToRun(IJobChangeEvent event) {
+ // ignore
+ }
+ });
+ askUserJob.setUser(true);
+ askUserJob.setPriority(Job.SHORT);
+ askUserJob.schedule();
+ }
+ }
+
+ private class AskUserJob extends UIJob {
+ private AskUserJob() {
+ super(ReportingMessages.UsageReport_Asking_User);
+ }
+
+ @Override
+ public IStatus runInUIThread(IProgressMonitor monitor) {
+ askUser();
+ return Status.OK_STATUS;
+ }
+ }
+}
Property changes on: branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/reporting/UsageReport.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/reporting/UsageReportDispatcher.java
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/reporting/UsageReportDispatcher.java (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/reporting/UsageReportDispatcher.java 2010-09-02 15:17:54 UTC (rev 24658)
@@ -0,0 +1,29 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is 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:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.usage.reporting;
+
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.IStartup;
+
+/**
+ * @author Andre Dieitsheim
+ */
+public class UsageReportDispatcher implements IStartup {
+
+ public void earlyStartup() {
+ Display.getDefault().asyncExec(new Runnable() {
+
+ public void run() {
+ new UsageReport().report();
+ }
+ });
+ }
+}
Property changes on: branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/reporting/UsageReportDispatcher.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/reporting/UsageReportEnablementDialog.java
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/reporting/UsageReportEnablementDialog.java (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/reporting/UsageReportEnablementDialog.java 2010-09-02 15:17:54 UTC (rev 24658)
@@ -0,0 +1,95 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is 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:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.usage.reporting;
+
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.layout.GridDataFactory;
+import org.eclipse.jface.window.IShellProvider;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Link;
+import org.eclipse.swt.widgets.Shell;
+import org.jboss.tools.usage.internal.JBossToolsUsageActivator;
+import org.jboss.tools.usage.util.BrowserUtil;
+
+/**
+ * @author Andre Dietisheim
+ */
+public class UsageReportEnablementDialog extends Dialog {
+
+ protected static final String USAGE_URL = "http://jboss.org/tools/usage"; // $NON
+ private Button checkBox;
+ private boolean reportEnabled;
+
+ public UsageReportEnablementDialog(boolean reportEnabled, IShellProvider parentShell) {
+ super(parentShell);
+ this.reportEnabled = reportEnabled;
+ }
+
+ protected void buttonPressed(int buttonId) {
+ if (buttonId == IDialogConstants.OK_ID) {
+ this.reportEnabled = checkBox.getSelection();
+ } else if (buttonId == IDialogConstants.CANCEL_ID) {
+ this.reportEnabled = false;
+ }
+ super.buttonPressed(buttonId);
+ }
+
+ protected void configureShell(Shell shell) {
+ super.configureShell(shell);
+ shell.setText(ReportingMessages.UsageReport_DialogTitle);
+ }
+
+ protected void createButtonsForButtonBar(Composite parent) {
+ createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true);
+ createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false);
+ checkBox.setFocus();
+ checkBox.setSelection(reportEnabled);
+ }
+
+ protected Control createDialogArea(Composite parent) {
+ Composite composite = (Composite) super.createDialogArea(parent);
+
+ // message
+ Link link = new Link(composite, SWT.WRAP);
+ link.setFont(parent.getFont());
+ link.setText(ReportingMessages.UsageReport_DialogMessage);
+ link.addSelectionListener(new SelectionAdapter() {
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ BrowserUtil.checkedCreateExternalBrowser(USAGE_URL, JBossToolsUsageActivator.PLUGIN_ID, JBossToolsUsageActivator.getDefault().getLog());
+ }
+ });
+ GridDataFactory.fillDefaults()
+ .align(SWT.FILL, SWT.CENTER)
+ .grab(true, false)
+ .hint(IDialogConstants.MINIMUM_MESSAGE_AREA_WIDTH, SWT.DEFAULT)
+ .applyTo(link);
+
+ // checkbox
+ checkBox = new Button(composite, SWT.CHECK);
+ checkBox.setText(ReportingMessages.UsageReport_Checkbox_Text);
+ GridDataFactory.fillDefaults().grab(true, false).align(SWT.LEFT, SWT.CENTER).applyTo(checkBox);
+
+ applyDialogFont(composite);
+
+ return composite;
+ }
+
+ public boolean isReportEnabled() {
+ return reportEnabled;
+ }
+}
Property changes on: branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/reporting/UsageReportEnablementDialog.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/reporting/messages.properties
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/reporting/messages.properties (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/reporting/messages.properties 2010-09-02 15:17:54 UTC (rev 24658)
@@ -0,0 +1,10 @@
+EclipseEnvironment_Error_SavePreferences=Could not sage {0} to preferences.
+UsageReport_Reporting_Usage=Reporting JBoss Tools usage
+UsageReport_Querying_Enablement=Querying whether reporting is globally enabled
+UsageReport_Asking_User=Asking User to allow reporting
+UsageReport_Checkbox_Text=Report usage of JBoss Tools to JBoss Tools team.
+UsageReport_DialogMessage=Please allow the JBoss Tools team to receive anonymous usage statistics for this Eclipse installation with JBoss tools (<a>info</a>).
+UsageReport_DialogTitle=JBoss Tools Usage
+UsageReport_Error_SavePreferences=Could not save preferences {0}
+UsageReport_GoogleAnalyticsAccount=UA-17645367-1
+UsageReport_HostName=jboss.org
Property changes on: branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/reporting/messages.properties
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/util/BrowserUtil.java
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/util/BrowserUtil.java (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/util/BrowserUtil.java 2010-09-02 15:17:54 UTC (rev 24658)
@@ -0,0 +1,71 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is 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:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.usage.util;
+
+import java.net.MalformedURLException;
+import java.net.URL;
+
+import org.eclipse.core.runtime.ILog;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.browser.IWebBrowser;
+
+public class BrowserUtil {
+
+ /**
+ * Opens a browser for the given url with the given id. If an error occurs
+ * it will be reported to the given log provider with the given plugin id.
+ *
+ * @param url
+ * the url to open a browser for.
+ * @param browserId
+ * the id for the new browser.
+ * @param pluginId
+ * the plugin id to log for.
+ * @param log
+ * the log provider to log against if an error occurred.
+ */
+ public static void checkedCreateInternalBrowser(String url, String browserId, String pluginId, ILog log) {
+ try {
+ openUrl(url, PlatformUI.getWorkbench().getBrowserSupport().createBrowser(browserId), pluginId, log);
+ } catch (PartInitException e) {
+ IStatus errorStatus = StatusUtils.getErrorStatus(pluginId, "Could not open browser for url \"{0}\".", e,
+ url);
+ log.log(errorStatus);
+ }
+ }
+
+
+ public static void checkedCreateExternalBrowser(String url, String pluginId, ILog log) {
+ try {
+ openUrl(url, PlatformUI.getWorkbench().getBrowserSupport().getExternalBrowser(), pluginId, log);
+ } catch (PartInitException e) {
+ IStatus errorStatus = StatusUtils.getErrorStatus(pluginId, "Could not open browser for url \"{0}\".", e,
+ url);
+ log.log(errorStatus);
+ }
+ }
+
+ public static void openUrl(String url, IWebBrowser browser, String pluginId, ILog log) {
+ try {
+ browser.openURL(new URL(url));
+ } catch (PartInitException e) {
+ IStatus errorStatus = StatusUtils.getErrorStatus(pluginId, "Could not open browser for url \"{0}\".", e,
+ url);
+ log.log(errorStatus);
+ } catch (MalformedURLException e) {
+ IStatus errorStatus = StatusUtils.getErrorStatus(pluginId, "Could not display malformed url \"{0}\".", e,
+ url);
+ log.log(errorStatus);
+ }
+ }
+}
Property changes on: branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/util/BrowserUtil.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/util/BundleUtils.java
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/util/BundleUtils.java (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/util/BundleUtils.java 2010-09-02 15:17:54 UTC (rev 24658)
@@ -0,0 +1,118 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is 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:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.usage.util;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.regex.Pattern;
+
+import org.eclipse.core.runtime.Assert;
+import org.osgi.framework.Bundle;
+
+/**
+ * @author Andre Dietisheim
+ */
+public class BundleUtils {
+
+ /**
+ * Returns the bundles among the available ones that match the given filter.
+ *
+ * @param filter the filter to match the available bundles against
+ * @param bundles the bundles
+ * @return the bundles that match the given filter
+ */
+ public static List<Bundle> getBundles(IBundleEntryFilter filter, Bundle[] bundles) {
+ List<Bundle> bundleList = new ArrayList<Bundle>();
+ for (Bundle bundle : bundles) {
+ if (filter.matches(bundle)) {
+ bundleList.add(bundle);
+ }
+ }
+ return bundleList;
+ }
+
+ /**
+ * Returns the bundles that have a symbolic name that match the given regex.
+ *
+ * @param bundleSymbolicNameRegex the symbolic name regex to match.
+ * @param bundles the bundles
+ * @return the bundles
+ */
+ public static List<Bundle> getBundles(String bundleSymbolicNameRegex, Bundle[] bundles) {
+ return getBundles(new BundleSymbolicNameFilter(bundleSymbolicNameRegex), bundles);
+ }
+
+ /**
+ * A filter that matches bundles against a given symbolic name regex.
+ */
+ public static class BundleSymbolicNameFilter implements IBundleEntryFilter {
+
+ private Pattern pattern;
+
+ public BundleSymbolicNameFilter(String symbolicNameRegex) {
+ this.pattern = Pattern.compile(symbolicNameRegex);
+ }
+
+ public boolean matches(Bundle bundle) {
+ Assert.isTrue(bundle != null);
+
+ return pattern.matcher(bundle.getSymbolicName()).matches();
+ }
+
+ }
+
+ /**
+ * A filter that applies several given filters
+ */
+ public static class CompositeFilter implements IBundleEntryFilter {
+
+ private IBundleEntryFilter filters[];
+
+ /**
+ * Instantiates a new composite filter that applies several given
+ * filters.
+ *
+ * @param filters
+ * the filters
+ */
+ public CompositeFilter(IBundleEntryFilter... filters) {
+ this.filters = filters;
+ }
+
+ /**
+ * Applies the filters this composite filter has. All filters have to
+ * match so that the filter says the given bundle matches.
+ */
+ public boolean matches(Bundle bundle) {
+ for (IBundleEntryFilter filter : filters) {
+ if (!filter.matches(bundle)) {
+ return false;
+ }
+ }
+ return true;
+ }
+ }
+
+ /**
+ * The Interface IBundleEntryFilter.
+ */
+ public static interface IBundleEntryFilter {
+
+ /**
+ * Matches.
+ *
+ * @param bundle
+ * the bundle
+ * @return true, if successful
+ */
+ public boolean matches(Bundle bundle);
+ }
+}
Property changes on: branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/util/BundleUtils.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/util/HttpEncodingUtils.java
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/util/HttpEncodingUtils.java (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/util/HttpEncodingUtils.java 2010-09-02 15:17:54 UTC (rev 24658)
@@ -0,0 +1,61 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is 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:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.usage.util;
+
+import java.io.UnsupportedEncodingException;
+import java.net.URLEncoder;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+/**
+ * @author Andre Dietisheim
+ */
+public class HttpEncodingUtils {
+
+ private static final String ENCODING_UTF8 = "UTF-8";
+
+ private static Pattern CHARSET_ENCODING_PATTERN = Pattern.compile("charset=(.+)");
+
+ /**
+ * Encodes the given string in utf8 while catching exceptions that may
+ * occur. If an encoding exception occurs, <tt>null</tt> is returned
+ *
+ * @param aString
+ * the a string to be encoded
+ * @return the encoded string or <tt>null</tt> if an error occured while
+ * encoding
+ */
+ public static String checkedEncodeUtf8(String aString) {
+ try {
+ return URLEncoder.encode(aString, ENCODING_UTF8);
+ } catch (UnsupportedEncodingException e) {
+ return aString;
+ }
+ }
+
+ /**
+ * Returns the charset indicated in the content-type field of the http
+ * header. Returns <tt>null</tt> if none is indicated.
+ *
+ * @param contentType
+ * the content type
+ * @return the content type charset or <tt>null</tt>
+ */
+ public static String getContentTypeCharset(String contentType) {
+ Matcher matcher = CHARSET_ENCODING_PATTERN.matcher(contentType);
+ if (!matcher.find()) {
+ return null;
+ }
+
+ return matcher.group(1);
+ }
+
+}
Property changes on: branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/util/HttpEncodingUtils.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/util/PreferencesUtils.java
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/util/PreferencesUtils.java (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/util/PreferencesUtils.java 2010-09-02 15:17:54 UTC (rev 24658)
@@ -0,0 +1,48 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is 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:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.usage.util;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Plugin;
+import org.eclipse.core.runtime.preferences.ConfigurationScope;
+import org.eclipse.core.runtime.preferences.IEclipsePreferences;
+import org.eclipse.jface.preference.IPersistentPreferenceStore;
+import org.eclipse.ui.preferences.ScopedPreferenceStore;
+import org.jboss.tools.usage.internal.JBossToolsUsageActivator;
+import org.jboss.tools.usage.reporting.ReportingMessages;
+import org.osgi.service.prefs.BackingStoreException;
+
+public class PreferencesUtils {
+
+ private PreferencesUtils() {
+ // inhibit instantiation
+ }
+
+ public static IEclipsePreferences getPreferences() {
+ return new ConfigurationScope().getNode(JBossToolsUsageActivator.PLUGIN_ID);
+ }
+
+ public static IPersistentPreferenceStore getStore() {
+ return new ScopedPreferenceStore(new ConfigurationScope(), JBossToolsUsageActivator.PLUGIN_ID);
+ }
+
+ public static void checkedSavePreferences(IEclipsePreferences preferences, Plugin plugin, String message) {
+ try {
+ preferences.flush();
+ } catch (BackingStoreException e) {
+ IStatus status = StatusUtils.getErrorStatus(plugin.getBundle().getSymbolicName(),
+ ReportingMessages.EclipseEnvironment_Error_SavePreferences,
+ e, message);
+ plugin.getLog().log(status);
+ }
+
+ }
+}
Property changes on: branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/util/PreferencesUtils.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/util/StatusUtils.java
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/util/StatusUtils.java (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/util/StatusUtils.java 2010-09-02 15:17:54 UTC (rev 24658)
@@ -0,0 +1,84 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is 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:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.usage.util;
+
+import java.text.MessageFormat;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+
+/**
+ * @author Andre Dietisheim
+ */
+public class StatusUtils {
+
+ private StatusUtils() {
+ // inhibit instantiation
+ }
+
+ /**
+ * Returns an error status for a given plugin id, message and arguments.
+ *
+ * @param pluginId
+ * the plugin id
+ * @param message
+ * the message
+ * @param throwable
+ * the throwable
+ * @param messageArguments
+ * the message arguments
+ * @return the error status
+ */
+ public static IStatus getErrorStatus(String pluginId, String message, Throwable throwable,
+ Object... messageArguments) {
+ String formattedMessage = null;
+ if (message != null) {
+ formattedMessage = MessageFormat.format(message, messageArguments);
+ }
+ return new Status(Status.ERROR, pluginId, Status.ERROR, formattedMessage,
+ throwable);
+ }
+
+ /**
+ * Returns an debug status for a given plugin id, message and arguments.
+ *
+ * @param pluginId
+ * the plugin id
+ * @param message
+ * the message
+ * @param messageArguments
+ * the message arguments
+ *
+ * @return the debug status
+ */
+ public static IStatus getDebugStatus(String pluginId, String message, Object... messageArguments) {
+ return new Status(Status.INFO, pluginId, Status.INFO, MessageFormat.format(message, messageArguments), null);
+ }
+
+ /**
+ * Clones a given status.
+ *
+ * @param status
+ * the status
+ *
+ * @return the i status
+ */
+ public static IStatus clone(IStatus status) {
+ switch (status.getSeverity()) {
+ case IStatus.INFO:
+ return getDebugStatus(status.getPlugin(), status.getMessage());
+ case IStatus.ERROR:
+ return getErrorStatus(status.getPlugin(), status.getMessage(), status.getException());
+ default:
+ throw new UnsupportedOperationException("noy implemented yet!");
+ }
+ }
+}
Property changes on: branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/util/StatusUtils.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/util/reader/AppendUntilAlternativeImpl.java
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/util/reader/AppendUntilAlternativeImpl.java (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/util/reader/AppendUntilAlternativeImpl.java 2010-09-02 15:17:54 UTC (rev 24658)
@@ -0,0 +1,47 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is 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:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.usage.util.reader;
+
+import java.io.IOException;
+import java.io.Reader;
+import java.io.Writer;
+
+/**
+ * @author Andre Dietisheim
+ */
+public class AppendUntilAlternativeImpl extends ReadUntilAlternativesImpl {
+
+ private Writer writer;
+ private int numOfWrittenCharacters;
+
+ public AppendUntilAlternativeImpl(Reader reader, Writer writer, String... alternatives) {
+ super(reader, alternatives);
+ this.writer = writer;
+ }
+
+ @Override
+ protected boolean doContinueRead(char character, int numberOfCharactersRead) throws IOException {
+ if (super.doContinueRead(character, numberOfCharactersRead)) {
+ if (!isMatching()) {
+ // don't append matching characters
+ writer.write(character);
+ numOfWrittenCharacters++;
+ }
+ return true;
+ } else {
+ return false;
+ }
+ }
+
+ public int getNumOfWrittenCharacters() {
+ return numOfWrittenCharacters;
+ }
+}
\ No newline at end of file
Property changes on: branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/util/reader/AppendUntilAlternativeImpl.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/util/reader/AppendUntilImpl.java
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/util/reader/AppendUntilImpl.java (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/util/reader/AppendUntilImpl.java 2010-09-02 15:17:54 UTC (rev 24658)
@@ -0,0 +1,48 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is 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:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+
+package org.jboss.tools.usage.util.reader;
+
+import java.io.IOException;
+import java.io.Reader;
+import java.io.Writer;
+
+/**
+ * @author Andre Dietisheim
+ */
+public class AppendUntilImpl extends ReadUntilImpl {
+
+ private Writer writer;
+ private int numOfWrittenCharacters;
+
+ public AppendUntilImpl(Reader reader, Writer writer, char... character) {
+ super(reader, character);
+ this.writer = writer;
+ }
+
+ @Override
+ protected boolean doContinueRead(char character, int numberOfCharactersRead) throws IOException {
+ if (super.doContinueRead(character, numberOfCharactersRead)) {
+ if (!isMatching()) {
+ // don't append matching characters
+ writer.write(character);
+ numOfWrittenCharacters++;
+ }
+ return true;
+ } else {
+ return false;
+ }
+ }
+
+ public int getNumOfWrittenCharacters() {
+ return numOfWrittenCharacters;
+ }
+}
\ No newline at end of file
Property changes on: branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/util/reader/AppendUntilImpl.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/util/reader/ReadUntilAlternativesImpl.java
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/util/reader/ReadUntilAlternativesImpl.java (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/util/reader/ReadUntilAlternativesImpl.java 2010-09-02 15:17:54 UTC (rev 24658)
@@ -0,0 +1,116 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is 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:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.usage.util.reader;
+
+import java.io.Reader;
+
+/**
+ * @author Andre Dietisheim
+ */
+public class ReadUntilAlternativesImpl extends ReadUntilImpl {
+
+ private char[][] allAlternatives;
+ private char[] currentAlternative;
+ private int alternativesIndex = -1;
+
+ public ReadUntilAlternativesImpl(Reader reader, String... stringAlternatives) {
+ super(reader);
+ initAlternativesCharSequences(stringAlternatives);
+ }
+
+ private void initAlternativesCharSequences(String... stringAlternatives) {
+ this.allAlternatives = new char[stringAlternatives.length][];
+ for (int i = 0; i < stringAlternatives.length; i++) {
+ this.allAlternatives[i] = stringAlternatives[i].toCharArray();
+ }
+ }
+
+ @Override
+ protected int getNumberOfCharactersToMatch() {
+ if (currentAlternative != null) {
+ return currentAlternative.length;
+ } else {
+ return 0;
+ }
+ }
+
+ @Override
+ protected boolean doesMatch(char character) {
+ if (currentAlternative == null || currentAlternative[getMatchingIndex()] != character) {
+ // current alternative does not match new character, select a new
+ // alternative
+ boolean newAlternativeSelected = matchAlternative(character);
+ if (!newAlternativeSelected) {
+ // no alternative matches current character + new one
+ setMatchingIndex(0);
+ }
+ return newAlternativeSelected;
+ } else {
+ return true;
+ }
+ }
+
+ /**
+ * Returns whether the given character matches an alternative (in other
+ * words the given character matches an alternative at the current matching
+ * index).
+ *
+ * @param character
+ * the character
+ * @return true, if successful
+ */
+ private boolean matchAlternative(char character) {
+ for (int i = alternativesIndex + 1; i < allAlternatives.length; i++) {
+ char[] alternative = allAlternatives[i];
+ if (doesMatch(character, alternative)) {
+ this.currentAlternative = alternative;
+ this.alternativesIndex = i;
+ return true;
+ }
+
+ }
+ this.currentAlternative = null;
+ this.alternativesIndex = -1;
+ return false;
+ }
+
+ /**
+ * Returns whether the given potentially matching alternative (String)
+ * matches the currently selected alternative and the additional character.
+ *
+ * @param character
+ * @param potentiallyMatchingAlternative
+ * the new alternative that could match
+ * @return
+ */
+ private boolean doesMatch(char character, char[] potentiallyMatchingAlternative) {
+ int currentMatchingIndex = getMatchingIndex();
+ for (int j = 0; j < currentMatchingIndex; j++) {
+ if (potentiallyMatchingAlternative[j] != currentAlternative[j]) {
+ return false;
+ }
+ }
+ return potentiallyMatchingAlternative[currentMatchingIndex] == character;
+ }
+
+ @Override
+ protected char[] getCharactersToMatch() {
+ return currentAlternative;
+ }
+
+ public String getAlternative() {
+ if (alternativesIndex >= 0) {
+ return new String(allAlternatives[alternativesIndex]);
+ } else {
+ return null;
+ }
+ }
+}
\ No newline at end of file
Property changes on: branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/util/reader/ReadUntilAlternativesImpl.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/util/reader/ReadUntilImpl.java
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/util/reader/ReadUntilImpl.java (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/util/reader/ReadUntilImpl.java 2010-09-02 15:17:54 UTC (rev 24658)
@@ -0,0 +1,97 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is 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:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.usage.util.reader;
+
+import java.io.IOException;
+import java.io.Reader;
+
+/**
+ * @author Andre Dietisheim
+ */
+public class ReadUntilImpl implements ReaderVisitor {
+
+ /** returned by a stream if the end of the stream is reached. */
+ private static final char EOS = (char) -1;
+
+ private Reader reader;
+ private boolean matched = false;
+ private int numberOfCharactersRead;
+ private char[] characters;
+ private int matchingCharactersIndex = 0;
+
+ public ReadUntilImpl(Reader reader, char... characters) {
+ this.reader = reader;
+ this.numberOfCharactersRead = 0;
+ this.characters = characters;
+ }
+
+ public final boolean continueRead(char character, int numberOfCharactersRead) throws IOException {
+ this.numberOfCharactersRead = numberOfCharactersRead;
+ return doContinueRead(character, numberOfCharactersRead);
+ }
+
+ protected boolean doContinueRead(char character, int numberOfCharactersRead) throws IOException {
+ boolean continueRead = false;
+ boolean matches = doesMatch(character);
+ if (!matches) {
+ continueRead = !matches;
+ } else {
+ int matchingIndex = getMatchingIndex() + 1;
+ setMatchingIndex(matchingIndex);
+ continueRead = matches
+ && matchingIndex < getNumberOfCharactersToMatch();
+ }
+
+ setMatches(matches);
+ return continueRead;
+ }
+
+ public boolean isMatching() {
+ return matched;
+ }
+
+ public int getNumberOfCharactersRead() {
+ return this.numberOfCharactersRead;
+ }
+
+ public void read() throws IOException {
+ char character = 0;
+ while ((character = (char) reader.read()) != EOS) {
+ if (!continueRead(character, ++numberOfCharactersRead)) {
+ return;
+ }
+ }
+ }
+
+ protected void setMatchingIndex(int index) {
+ this.matchingCharactersIndex = index;
+ }
+
+ protected int getMatchingIndex() {
+ return matchingCharactersIndex;
+ }
+
+ protected boolean doesMatch(char character) {
+ return characters[matchingCharactersIndex] == character;
+ }
+
+ protected int getNumberOfCharactersToMatch() {
+ return characters.length;
+ }
+
+ protected char[] getCharactersToMatch() {
+ return characters;
+ }
+
+ protected void setMatches(boolean matches) {
+ matched = matches;
+ }
+}
\ No newline at end of file
Property changes on: branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/util/reader/ReadUntilImpl.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/util/reader/ReaderUtils.java
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/util/reader/ReaderUtils.java (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/util/reader/ReaderUtils.java 2010-09-02 15:17:54 UTC (rev 24658)
@@ -0,0 +1,96 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is 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:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.usage.util.reader;
+
+import java.io.CharArrayWriter;
+import java.io.IOException;
+import java.io.Reader;
+import java.io.Writer;
+
+/**
+ * @author Andre Dietisheim
+ */
+public class ReaderUtils {
+
+ /**
+ * Reads from the given input stream until a signal is found. The signal
+ * itself is not appended to the string that is returned.
+ * <p>
+ * This method does not read any further as the maximum number of bytes
+ * given and the end of the stream is reached. If the signal's not found
+ * <tt>null</tt> is returned.
+ *
+ * @param signal
+ * the signal
+ * @param maxRead
+ * the max number of bytes to read
+ * @param reader
+ * the reader
+ * @return the string that holds the bytes read
+ * @throws Exception
+ */
+ public static String readStringUntil(Reader reader, char... signal) throws IOException {
+ Writer writer = new CharArrayWriter();
+ AppendUntilImpl visitor = new AppendUntilImpl(reader, writer, signal);
+ try {
+ visitor.read();
+ if (!visitor.isMatching()
+ || visitor.getNumOfWrittenCharacters() == 0) {
+ return null;
+ }
+ writer.flush();
+ return writer.toString();
+ } finally {
+ writer.close();
+ }
+ }
+
+ public static String readStringUntil(Reader reader, String signal) throws IOException {
+ return readStringUntil(reader, signal.toCharArray());
+ }
+
+ public static String readStringUntil(Reader reader, String... alternatives) throws IOException {
+ Writer writer = new CharArrayWriter();
+ AppendUntilAlternativeImpl visitor = new AppendUntilAlternativeImpl(reader, writer, alternatives);
+ try {
+ visitor.read();
+ if (!visitor.isMatching()
+ || visitor.getNumOfWrittenCharacters() == 0) {
+ return null;
+ }
+ writer.flush();
+ return writer.toString();
+ } finally {
+ writer.close();
+ }
+ }
+
+ /**
+ * Skips the characters in the given reader until one of the given
+ * alternatives is found.
+ *
+ * @param maxRead
+ * the max number of characters to read
+ * @param reader
+ * the reader to read from
+ * @param alternatives
+ * the strings to find (alternatively) in the reader
+ * @return the index of the alternative that was found or <tt>-1</tt> if
+ * none was found
+ * @throws IOException
+ * Signals that an I/O exception has occurred.
+ */
+ public static String skipUntil(Reader reader, String... alternatives) throws IOException {
+ ReadUntilAlternativesImpl visitor = new ReadUntilAlternativesImpl(reader, alternatives);
+ visitor.read();
+ return visitor.getAlternative();
+ }
+}
Property changes on: branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/util/reader/ReaderUtils.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/util/reader/ReaderVisitor.java
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/util/reader/ReaderVisitor.java (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/util/reader/ReaderVisitor.java 2010-09-02 15:17:54 UTC (rev 24658)
@@ -0,0 +1,19 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is 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:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.usage.util.reader;
+
+/**
+ * @author Andre Dietisheim
+ */
+public interface ReaderVisitor {
+ public boolean continueRead(char character, int numberOfCharactersRead) throws Exception;
+ public int getNumberOfCharactersRead();
+}
Property changes on: branches/jbosstools-3.2.0.M2/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/util/reader/ReaderVisitor.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
15 years, 7 months
JBoss Tools SVN: r24657 - trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/messages.
by jbosstools-commits@lists.jboss.org
Author: bfitzpat
Date: 2010-09-02 11:11:05 -0400 (Thu, 02 Sep 2010)
New Revision: 24657
Modified:
trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/messages/JBossWSUI.properties
Log:
OPEN - issue JBIDE-6700: [tester] details section label names in UI should be consistent
https://jira.jboss.org/browse/JBIDE-6700
Modified: trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/messages/JBossWSUI.properties
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/messages/JBossWSUI.properties 2010-09-02 15:10:29 UTC (rev 24656)
+++ trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/messages/JBossWSUI.properties 2010-09-02 15:11:05 UTC (rev 24657)
@@ -82,6 +82,24 @@
JBossWS_DelimitedStringList_EditValue_Dialog_Title=Edit Value
JBossWS_DelimitedStringList_EditValue_Dialog_Message=Specify the updated value below.
+JBossWSAnnotatedClassWizard_Annotated_Class_WS_Wizard_Title=Create a Web Service (Botom-up)
+JBossWSAnnotatedClassWizardPage_Application_Class_Browse_btn=...
+JBossWSAnnotatedClassWizardPage_Application_Class_field=Application class (JAX-RS only)
+JBossWSAnnotatedClassWizardPage_JAXRS_Button=JAX-RS (REST)
+JBossWSAnnotatedClassWizardPage_JAXWS_Button=JAX-WS (WSDL-based)
+JBossWSAnnotatedClassWizardPage_package_browse_btn=...
+JBossWSAnnotatedClassWizardPage_package_name_field=Package name
+JBossWSAnnotatedClassWizardPage_PageDescription=Select the details for the new web service below. If a class does not yet exist, a sample will be created.
+JBossWSAnnotatedClassWizardPage_PageTitle=Project and Web Service Details
+JBossWSAnnotatedClassWizardPage_Project_Group=Dynamic web project
+JBossWSAnnotatedClassWizardPage_Projects_Combo_Tooltip=If no Dynamic Web Project exists, you must create one before creating your web service.
+JBossWSAnnotatedClassWizardPage_Service_class_Browse_btn=...
+JBossWSAnnotatedClassWizardPage_Service_class_field=Service class
+JBossWSAnnotatedClassWizardPage_Service_implementation_group=Service implementation
+JBossWSAnnotatedClassWizardPage_Service_Name_field=Service name
+JBossWSAnnotatedClassWizardPage_Update_Web_xml_checkbox=Update web.xml
+JBossWSAnnotatedClassWizardPage_Web_Service_Group=Web service
+JBossWSAnnotatedClassWizardPage_WS_Tech_Group=Web service technology:
JAXRSWSTestView_Action_URL_Label=Action URL:
JAXRSWSTestView_Button_Get_From_WSDL=Get from WSDL...
@@ -109,14 +127,14 @@
JAXRSWSTestView_Service_URL_Label=Service URL:
JAXRSWSTestView_Set_Sample_Data_Label=Set Sample Data
JAXRSWSTestView_Web_Service_Type_Label=Web Service Type:
-JAXRSWSTestView2_BodyText_Section=Body Text
+JAXRSWSTestView2_BodyText_Section=Request Body
JAXRSWSTestView2_Checkbox_Basic_Authentication=Prompt for Basic Authentication
JAXRSWSTestView2_GetFromWSDL_Tooltip=Get from WSDL
JAXRSWSTestView2_Go_Tooltip=Invoke
-JAXRSWSTestView2_Headers_Section=Headers
+JAXRSWSTestView2_Headers_Section=Request Headers
JAXRSWSTestView2_Msg_No_Results_Check_Headers=No textual results to display. Check Response Headers list.
JAXRSWSTestView2_OpenInEditor_Action=Open in Editor
-JAXRSWSTestView2_Parameters_Section=Parameters
+JAXRSWSTestView2_Parameters_Section=Request Parameters
JAXRSWSTestView2_RequestDetails_Section=Request Details
JAXRSWSTestView2_ResponseBody_Section=Response Body
JAXRSWSTestView2_ResponseDetails_Section=Response Details
15 years, 7 months
JBoss Tools SVN: r24655 - branches/jbosstools-3.2.0.M2/usage/plugins.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2010-09-02 11:07:01 -0400 (Thu, 02 Sep 2010)
New Revision: 24655
Removed:
branches/jbosstools-3.2.0.M2/usage/plugins/.classpath
branches/jbosstools-3.2.0.M2/usage/plugins/.project
branches/jbosstools-3.2.0.M2/usage/plugins/.settings/
branches/jbosstools-3.2.0.M2/usage/plugins/JBoss Usage Reporter.launch
branches/jbosstools-3.2.0.M2/usage/plugins/META-INF/
branches/jbosstools-3.2.0.M2/usage/plugins/about.html
branches/jbosstools-3.2.0.M2/usage/plugins/build.properties
branches/jbosstools-3.2.0.M2/usage/plugins/config.ini
branches/jbosstools-3.2.0.M2/usage/plugins/plugin.properties
branches/jbosstools-3.2.0.M2/usage/plugins/plugin.xml
branches/jbosstools-3.2.0.M2/usage/plugins/src/
Log:
bringing trunk changes to M2
Deleted: branches/jbosstools-3.2.0.M2/usage/plugins/.classpath
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/plugins/.classpath 2010-09-02 15:03:44 UTC (rev 24654)
+++ branches/jbosstools-3.2.0.M2/usage/plugins/.classpath 2010-09-02 15:07:01 UTC (rev 24655)
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
Deleted: branches/jbosstools-3.2.0.M2/usage/plugins/.project
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/plugins/.project 2010-09-02 15:03:44 UTC (rev 24654)
+++ branches/jbosstools-3.2.0.M2/usage/plugins/.project 2010-09-02 15:07:01 UTC (rev 24655)
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.jboss.tools.usage</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>
- <buildCommand>
- <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
- </natures>
-</projectDescription>
Deleted: branches/jbosstools-3.2.0.M2/usage/plugins/JBoss Usage Reporter.launch
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/plugins/JBoss Usage Reporter.launch 2010-09-02 15:03:44 UTC (rev 24654)
+++ branches/jbosstools-3.2.0.M2/usage/plugins/JBoss Usage Reporter.launch 2010-09-02 15:07:01 UTC (rev 24655)
@@ -1,38 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<launchConfiguration type="org.eclipse.pde.ui.RuntimeWorkbench">
-<booleanAttribute key="append.args" value="true"/>
-<booleanAttribute key="askclear" value="false"/>
-<booleanAttribute key="automaticAdd" value="true"/>
-<booleanAttribute key="automaticValidate" value="false"/>
-<stringAttribute key="bootstrap" value=""/>
-<stringAttribute key="checked" value="[NONE]"/>
-<booleanAttribute key="clearConfig" value="true"/>
-<booleanAttribute key="clearws" value="true"/>
-<booleanAttribute key="clearwslog" value="false"/>
-<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/JBoss Usage Reporter"/>
-<booleanAttribute key="default" value="true"/>
-<stringAttribute key="deselected_workspace_plugins" value="org.jboss.tools.common.text.xml,org.jboss.tools.common.meta.ui,org.jboss.tools.ui.bot.ext,org.jboss.tools.common,org.jboss.tools.common.verification.ui.test,org.jboss.tools.common.projecttemplates,org.jboss.tools.common.el.core,org.jboss.tools.common.verification.ui,org.jboss.tools.common.gef,org.jboss.tools.common.test,org.jboss.tools.common.verification.test,org.jboss.tools.common.verification,org.jboss.tools.common.model,org.jboss.tools.gwt.ui,org.jboss.tools.common.model.ui.capabilities,org.jboss.tools.common.resref.core,org.jboss.tools.common.ui,org.jboss.tools.common.el.ui,org.jboss.tools.usage.test,org.jboss.tools.common.text.ext,org.jboss.tools.gwt.core,org.jboss.tools.common.resref.ui,org.jboss.tools.ui.bot.ext.test,org.jboss.tools.common.model.ui.test,org.jboss.tools.common.el.core.test,org.jboss.tools.common.model.ui,org.jboss.tools.tests,org.jboss.tools.common.model.test"/>
-<booleanAttribute key="includeOptional" value="true"/>
-<stringAttribute key="location" value="${workspace_loc}/../runtime-EclipseApplication2"/>
-<listAttribute key="org.eclipse.debug.ui.favoriteGroups">
-<listEntry value="org.eclipse.debug.ui.launchGroup.debug"/>
-<listEntry value="org.eclipse.debug.ui.launchGroup.run"/>
-</listAttribute>
-<stringAttribute key="org.eclipse.jdt.launching.JAVA_COMMAND" value="java"/>
-<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -console -consolelog -pluginCustomization ${workspace_loc}/../runtime-EclipseApplication/usage.properties"/>
-<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
-<booleanAttribute key="pde.generated.config" value="false"/>
-<stringAttribute key="pde.version" value="3.3"/>
-<stringAttribute key="product" value="org.eclipse.platform.ide"/>
-<stringAttribute key="selected_target_plugins" value="org.eclipse.jface.text@default:default,org.eclipse.core.contenttype@default:default,org.eclipse.help@default:default,org.eclipse.equinox.concurrent@default:default,com.ibm.icu@default:default,ch.qos.logback.classic@default:default,org.eclipse.swt.cocoa.macosx.x86_64@default:false,org.junit4@default:default,javax.mail@default:default,org.eclipse.core.filesystem.macosx@default:false,org.eclipse.ui.intro@default:default,org.eclipse.core.databinding.observable@default:default,org.eclipse.ecf.provider.filetransfer.ssl@default:false,org.eclipse.core.runtime@default:true,org.eclipse.help.base@default:default,org.eclipse.swtbot.ant.optional.junit4@default:false,org.eclipse.swt@default:default,org.eclipse.equinox.common@2:true,org.eclipse.net4j.jms.api@default:default,org.eclipse.equinox.security@default:default,org.eclipse.core.resources@default:default,org.eclipse.core.expressions@default:default,org.apache.lucene.analysis@defa!
ult:default,org.eclipse.jface@default:default,org.eclipse.ecf.filetransfer@default:default,org.eclipse.ecf@default:default,org.eclipse.update.configurator@3:true,org.eclipse.equinox.p2.repository@default:default,org.apache.jasper@default:default,org.eclipse.equinox.registry@default:default,org.eclipse.equinox.http.jetty@default:default,org.eclipse.equinox.preferences@default:default,org.eclipse.equinox.p2.metadata@default:default,org.mortbay.jetty.server@default:default,javax.servlet.jsp@default:default,org.eclipse.core.runtime.compatibility@default:default,org.eclipse.core.variables@default:default,org.eclipse.help.ui@default:default,org.eclipse.equinox.http.servlet@default:default,org.eclipse.core.filesystem@default:default,org.mortbay.jetty.util@default:default,org.eclipse.ui.ide@default:default,org.eclipse.jface.databinding@default:default,org.apache.commons.el@default:default,org.eclipse.equinox.app@default:default,org.eclipse.osgi@-1:true,org.eclipse.ui.views@default:!
default,javax.activation@default:default,org.apache.commons.lo!
gging*1.
0.4.v201005080501@default:default,javax.servlet@default:default,org.eclipse.core.databinding@default:default,org.eclipse.core.commands@default:default,org.eclipse.core.runtime.compatibility.registry@default:false,org.eclipse.equinox.p2.engine@default:default,org.slf4j.api@default:default,org.eclipse.ant.core@default:default,org.hamcrest.core@default:default,org.eclipse.core.runtime.compatibility.auth@default:default,ch.qos.logback.slf4j@default:false,org.eclipse.equinox.security.macosx@default:false,org.eclipse.ecf.identity@default:default,org.eclipse.ui.workbench@default:default,org.eclipse.ecf.ssl@default:false,org.junit*4.8.1.v4_8_1_v20100427-1100@default:default,org.eclipse.equinox.p2.core@default:default,org.eclipse.ui.cheatsheets@default:default,org.eclipse.ui.cocoa@default:false,org.eclipse.osgi.services@default:default,org.eclipse.ui@default:default,org.eclipse.ui.forms@default:default,org.eclipse.equinox.p2.metadata.repository@default:default,org.eclipse.text@defaul!
t:default,org.eclipse.core.databinding.property@default:default,org.eclipse.platform@default:default,ch.qos.logback.core@default:default,org.eclipse.core.net@default:default,org.apache.lucene@default:default,org.apache.ant@default:default,org.eclipse.core.jobs@default:default,org.eclipse.ecf.provider.filetransfer@default:default"/>
-<stringAttribute key="selected_workspace_plugins" value="org.jboss.tools.usage@default:default"/>
-<booleanAttribute key="show_selected_only" value="false"/>
-<stringAttribute key="templateConfig" value="${workspace_loc:org.jboss.tools.usage/config.ini}"/>
-<booleanAttribute key="tracing" value="false"/>
-<booleanAttribute key="useCustomFeatures" value="false"/>
-<booleanAttribute key="useDefaultConfig" value="false"/>
-<booleanAttribute key="useDefaultConfigArea" value="true"/>
-<booleanAttribute key="useProduct" value="true"/>
-<booleanAttribute key="usefeatures" value="false"/>
-</launchConfiguration>
Deleted: branches/jbosstools-3.2.0.M2/usage/plugins/about.html
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/plugins/about.html 2010-09-02 15:03:44 UTC (rev 24654)
+++ branches/jbosstools-3.2.0.M2/usage/plugins/about.html 2010-09-02 15:07:01 UTC (rev 24655)
@@ -1,30 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1" ?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
-<title>Smooks Core</title>
-<style type="text/css" media="screen">
-<!--
- body {
- font-family: Sans-serif, Arial, Helvetica;
- }
-
--->
-</style>
-</head>
-<body>
-<h1>JBoss Usage Reporting</h1>
-
-<p>
-This plugin is part of the JBoss Tools developed by the <a href="http://www.jboss.com">JBoss Inc.</a>
-</p>
-
-<p>Information about this plugin is available at <a href="http://www.jboss.org/tools">JBoss Tools project page</a></p>
-
-<p>
-This software is distributed under the terms of the Eclipse Public License - v 1.0
-(see <a href="www.eclipse.org/legal/epl-v10.html">Eclipse Public License - Version 1.0</a>).
-</p>
-</body>
-</html>
\ No newline at end of file
Deleted: branches/jbosstools-3.2.0.M2/usage/plugins/build.properties
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/plugins/build.properties 2010-09-02 15:03:44 UTC (rev 24654)
+++ branches/jbosstools-3.2.0.M2/usage/plugins/build.properties 2010-09-02 15:07:01 UTC (rev 24655)
@@ -1,16 +0,0 @@
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- plugin.xml,\
- about.html,\
- bin/
-src.includes = .classpath,\
- .project,\
- .settings/,\
- JBoss Usage Reporter.launch,\
- META-INF/,\
- about.html,\
- build.properties,\
- plugin.xml,\
- src/
Deleted: branches/jbosstools-3.2.0.M2/usage/plugins/config.ini
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/plugins/config.ini 2010-09-02 15:03:44 UTC (rev 24654)
+++ branches/jbosstools-3.2.0.M2/usage/plugins/config.ini 2010-09-02 15:07:01 UTC (rev 24655)
@@ -1,20 +0,0 @@
-org.jboss.tools.usage/ask_user_for_usage_report_preference=false
-org.jboss.tools.usage.configuration.ask_user_for_usage_report_preference=false
-configuration/org.jboss.tools.usage.ask_user_for_usage_report_preference=false
-eclipse.ask_user_for_usage_report_preference=false
-org.eclipse.pde.core.ask_user_for_usage_report_preference=false
-org.eclipse.core.runtime.ask_user_for_usage_report_preference=false
-ask_user_for_usage_report_preference=false
-
-org.eclipse.update.reconcile=false
-eclipse.p2.profile=SDKProfile
-osgi.instance.area.default=(a)user.home/Documents/workspace
-osgi.framework=file\:/Applications/jbdevstudio/eclipse/plugins/org.eclipse.osgi_3.5.2.R35x_v20100126.jar
-eclipse.buildId=M20100211-1343
-org.eclipse.equinox.simpleconfigurator.configUrl=file\:/Users/admin/workspaces/jboss-tools-usage/.metadata/.plugins/org.eclipse.pde.core/JBoss Usage Reporter/org.eclipse.equinox.simpleconfigurator/bundles.info
-osgi.configuration.cascaded=true
-eclipse.product=com.jboss.jbds.product.product
-eclipse.application=org.eclipse.ui.ide.workbench
-eclipse.p2.data.area=(a)config.dir/.p2
-osgi.bundles.defaultStartLevel=4
-osgi.framework.extensions=reference\:file\:org.eclipse.equinox.transforms.hook_1.0.100.v20100119-2308.jar,reference\:file\:javax.transaction_1.1.1.v201002111330.jar
Deleted: branches/jbosstools-3.2.0.M2/usage/plugins/plugin.properties
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/plugins/plugin.properties 2010-09-02 15:03:44 UTC (rev 24654)
+++ branches/jbosstools-3.2.0.M2/usage/plugins/plugin.properties 2010-09-02 15:07:01 UTC (rev 24655)
@@ -1,2 +0,0 @@
-BundleName=JBoss Tools Usage Reporting
-BundleVendor=JBoss by Red Hat
\ No newline at end of file
Deleted: branches/jbosstools-3.2.0.M2/usage/plugins/plugin.xml
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/plugins/plugin.xml 2010-09-02 15:03:44 UTC (rev 24654)
+++ branches/jbosstools-3.2.0.M2/usage/plugins/plugin.xml 2010-09-02 15:07:01 UTC (rev 24655)
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.4"?>
-<plugin>
- <extension
- point="org.eclipse.ui.startup">
- <startup
- class="org.jboss.tools.usage.reporting.UsageReportDispatcher">
- </startup>
- </extension>
- <extension
- point="org.eclipse.ui.preferencePages">
- <page
- class="org.jboss.tools.usage.preferences.UsageReportPreferencePage"
- id="org.jboss.tools.usage.analytics.preferences.UsageAnalyticsPreferencePage"
- name="Usage Reporting Preferences"
- category="org.jboss.tools.common.model.ui.MainPreferencePage">
- </page>
- </extension>
- <extension
- point="org.eclipse.core.runtime.preferences">
- <initializer
- class="org.jboss.tools.usage.preferences.UsageReportPreferenceInitializer">
- </initializer>
- </extension>
-</plugin>
15 years, 7 months
JBoss Tools SVN: r24654 - in branches/jbosstools-3.2.0.M2/usage/plugins: .settings and 12 other directories.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2010-09-02 11:03:44 -0400 (Thu, 02 Sep 2010)
New Revision: 24654
Added:
branches/jbosstools-3.2.0.M2/usage/plugins/.classpath
branches/jbosstools-3.2.0.M2/usage/plugins/.project
branches/jbosstools-3.2.0.M2/usage/plugins/.settings/
branches/jbosstools-3.2.0.M2/usage/plugins/.settings/net.sf.jautodoc.prefs
branches/jbosstools-3.2.0.M2/usage/plugins/.settings/org.eclipse.jdt.core.prefs
branches/jbosstools-3.2.0.M2/usage/plugins/.settings/org.eclipse.jdt.ui.prefs
branches/jbosstools-3.2.0.M2/usage/plugins/JBoss Usage Reporter.launch
branches/jbosstools-3.2.0.M2/usage/plugins/META-INF/
branches/jbosstools-3.2.0.M2/usage/plugins/META-INF/MANIFEST.MF
branches/jbosstools-3.2.0.M2/usage/plugins/about.html
branches/jbosstools-3.2.0.M2/usage/plugins/build.properties
branches/jbosstools-3.2.0.M2/usage/plugins/config.ini
branches/jbosstools-3.2.0.M2/usage/plugins/plugin.properties
branches/jbosstools-3.2.0.M2/usage/plugins/plugin.xml
branches/jbosstools-3.2.0.M2/usage/plugins/src/
branches/jbosstools-3.2.0.M2/usage/plugins/src/org/
branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/
branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/
branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/
branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/FocusPoint.java
branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/HttpGetRequest.java
branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/HttpResourceMap.java
branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/IHttpGetRequest.java
branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/ILoggingAdapter.java
branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/ITracker.java
branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/IURLBuildingStrategy.java
branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/PluginLogger.java
branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/Tracker.java
branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/UsageMessages.java
branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/googleanalytics/
branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/googleanalytics/AbstractGoogleAnalyticsParameters.java
branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/googleanalytics/GoogleAnalyticsCookie.java
branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/googleanalytics/GoogleAnalyticsMessages.java
branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/googleanalytics/GoogleAnalyticsUrlStrategy.java
branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/googleanalytics/IGoogleAnalyticsParameters.java
branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/googleanalytics/messages.properties
branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/internal/
branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/internal/JBossToolsUsageActivator.java
branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/messages.properties
branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/preferences/
branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/preferences/GlobalUsageReportingSettings.java
branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/preferences/IUsageReportPreferenceConstants.java
branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/preferences/PreferencesMessages.java
branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/preferences/UsageReportPreferenceInitializer.java
branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/preferences/UsageReportPreferencePage.java
branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/preferences/UsageReportPreferences.java
branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/preferences/messages.properties
branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/reporting/
branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/reporting/EclipseEnvironment.java
branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/reporting/JBossBundleGroups.java
branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/reporting/ReportingMessages.java
branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/reporting/UsageReport.java
branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/reporting/UsageReportDispatcher.java
branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/reporting/UsageReportEnablementDialog.java
branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/reporting/messages.properties
branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/util/
branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/util/BrowserUtil.java
branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/util/BundleUtils.java
branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/util/HttpEncodingUtils.java
branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/util/PreferencesUtils.java
branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/util/StatusUtils.java
branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/util/reader/
branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/util/reader/AppendUntilAlternativeImpl.java
branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/util/reader/AppendUntilImpl.java
branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/util/reader/ReadUntilAlternativesImpl.java
branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/util/reader/ReadUntilImpl.java
branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/util/reader/ReaderUtils.java
branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/util/reader/ReaderVisitor.java
Modified:
branches/jbosstools-3.2.0.M2/usage/plugins/pom.xml
Log:
bringing trunk changes to M2
Added: branches/jbosstools-3.2.0.M2/usage/plugins/.classpath
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/plugins/.classpath (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/plugins/.classpath 2010-09-02 15:03:44 UTC (rev 24654)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
Property changes on: branches/jbosstools-3.2.0.M2/usage/plugins/.classpath
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/plugins/.project
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/plugins/.project (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/plugins/.project 2010-09-02 15:03:44 UTC (rev 24654)
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.jboss.tools.usage</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>
+ <buildCommand>
+ <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
+ </natures>
+</projectDescription>
Property changes on: branches/jbosstools-3.2.0.M2/usage/plugins/.project
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/plugins/.settings/net.sf.jautodoc.prefs
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/plugins/.settings/net.sf.jautodoc.prefs (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/plugins/.settings/net.sf.jautodoc.prefs 2010-09-02 15:03:44 UTC (rev 24654)
@@ -0,0 +1,7 @@
+#Thu Aug 12 14:50:29 CEST 2010
+add_header=true
+eclipse.preferences.version=1
+header_text=/*******************************************************************************\n * Copyright (c) 2010 Red Hat, Inc.\n * Distributed under license by Red Hat, Inc. All rights reserved.\n * This program is made available under the terms of the\n * Eclipse Public License v1.0 which accompanies this distribution,\n * and is available at http\://www.eclipse.org/legal/epl-v10.html\n *\n * Contributors\:\n * Red Hat, Inc. - initial API and implementation\n ******************************************************************************/
+project_specific_settings=true
+replace_header=true
+replacements=<?xml version\="1.0" standalone\="yes"?>\n\n<replacements>\n<replacement key\="get" scope\="1" mode\="0">Gets the</replacement>\n<replacement key\="set" scope\="1" mode\="0">Sets the</replacement>\n<replacement key\="add" scope\="1" mode\="0">Adds the</replacement>\n<replacement key\="edit" scope\="1" mode\="0">Edits the</replacement>\n<replacement key\="remove" scope\="1" mode\="0">Removes the</replacement>\n<replacement key\="init" scope\="1" mode\="0">Inits the</replacement>\n<replacement key\="parse" scope\="1" mode\="0">Parses the</replacement>\n<replacement key\="create" scope\="1" mode\="0">Creates the</replacement>\n<replacement key\="build" scope\="1" mode\="0">Builds the</replacement>\n<replacement key\="is" scope\="1" mode\="0">Checks if is</replacement>\n<replacement key\="print" scope\="1" mode\="0">Prints the</replacement>\n<replacement key\="has" scope\="1" mode\="0">Checks for</replacement>\n</replacements>\n\n
Property changes on: branches/jbosstools-3.2.0.M2/usage/plugins/.settings/net.sf.jautodoc.prefs
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/plugins/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/plugins/.settings/org.eclipse.jdt.core.prefs (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/plugins/.settings/org.eclipse.jdt.core.prefs 2010-09-02 15:03:44 UTC (rev 24654)
@@ -0,0 +1,260 @@
+#Fri Aug 06 17:57:19 CEST 2010
+eclipse.preferences.version=1
+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=true
+org.eclipse.jdt.core.formatter.comment.format_line_comments=true
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
+org.eclipse.jdt.core.formatter.comment.line_length=80
+org.eclipse.jdt.core.formatter.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=false
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_member=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.join_lines_in_comments=true
+org.eclipse.jdt.core.formatter.join_wrapped_lines=false
+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=120
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=tab
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
Property changes on: branches/jbosstools-3.2.0.M2/usage/plugins/.settings/org.eclipse.jdt.core.prefs
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/plugins/.settings/org.eclipse.jdt.ui.prefs
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/plugins/.settings/org.eclipse.jdt.ui.prefs (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/plugins/.settings/org.eclipse.jdt.ui.prefs 2010-09-02 15:03:44 UTC (rev 24654)
@@ -0,0 +1,6 @@
+#Wed Jul 28 11:02:07 CEST 2010
+eclipse.preferences.version=1
+formatter_profile=_Eclipse [built-in] extended
+formatter_settings_version=11
+org.eclipse.jdt.ui.javadoc=false
+org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\n * @return the ${bare_field_name}\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${param} the ${bare_field_name} to set\n */</template><template autoinsert\="true" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * ${tags}\n */</template><template autoinsert\="false" context\="filecommen!
t_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/*******************************************************************************\n * Copyright (c) 2010 Red Hat, Inc.\n * Distributed under license by Red Hat, Inc. All rights reserved.\n * This program is made available under the terms of the\n * Eclipse Public License v1.0 which accompanies this distribution,\n * and is available at http\://www.eclipse.org/legal/epl-v10.html\n *\n * Contributors\:\n * Red Hat, Inc. - initial API and implementation\n ******************************************************************************/</template><template autoinsert\="true" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n * @author ${user}\n *\n * ${tags}\n */</template><templa!
te autoinsert\="true" context\="fieldcomment_context" deleted\!
="false"
description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n * \n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="true" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/* (non-Javadoc)\n * ${see_to_overridden}\n */</template><template autoinsert\="true" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${tags}\n * ${see_to_target}\n */</template><template autoinser!
t\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\n</template><template autoinsert\="true" context\="annotationbod!
y_context" deleted\="false" description\="Code in new annotati!
on type
bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\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\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\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}\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><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter function" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\n * @return the ${bare_field_name}\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter function" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${pa!
ram} the ${bare_field_name} to set\n */</template><template au!
toinsert
\="true" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * ${tags}\n */</template><template autoinsert\="true" context\="filecomment_context" deleted\="false" description\="Comment for created JavaScript files" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.filecomment" name\="filecomment">/**\n * \n */</template><template autoinsert\="true" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n * @author ${user}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for vars" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n !
* \n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding function" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="true" context\="overridecomment_context" deleted\="false" description\="Comment for overriding functions" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/* (non-JSDoc)\n * ${see_to_overridden}\n */</template><template autoinsert\="true" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate functions" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${tags}\n * ${see_to_target}\n */</template><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.ec!
lipse.wst.jsdt.ui.text.codetemplates.newtype" name\="newtype">!
${fileco
mment}\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created function stubs" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated function stub\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code i!
n created constructor stubs" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\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.wst.jsdt.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.wst.jsdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates>
Property changes on: branches/jbosstools-3.2.0.M2/usage/plugins/.settings/org.eclipse.jdt.ui.prefs
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/plugins/JBoss Usage Reporter.launch
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/plugins/JBoss Usage Reporter.launch (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/plugins/JBoss Usage Reporter.launch 2010-09-02 15:03:44 UTC (rev 24654)
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<launchConfiguration type="org.eclipse.pde.ui.RuntimeWorkbench">
+<booleanAttribute key="append.args" value="true"/>
+<booleanAttribute key="askclear" value="false"/>
+<booleanAttribute key="automaticAdd" value="true"/>
+<booleanAttribute key="automaticValidate" value="false"/>
+<stringAttribute key="bootstrap" value=""/>
+<stringAttribute key="checked" value="[NONE]"/>
+<booleanAttribute key="clearConfig" value="true"/>
+<booleanAttribute key="clearws" value="true"/>
+<booleanAttribute key="clearwslog" value="false"/>
+<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/JBoss Usage Reporter"/>
+<booleanAttribute key="default" value="true"/>
+<stringAttribute key="deselected_workspace_plugins" value="org.jboss.tools.common.text.xml,org.jboss.tools.common.meta.ui,org.jboss.tools.ui.bot.ext,org.jboss.tools.common,org.jboss.tools.common.verification.ui.test,org.jboss.tools.common.projecttemplates,org.jboss.tools.common.el.core,org.jboss.tools.common.verification.ui,org.jboss.tools.common.gef,org.jboss.tools.common.test,org.jboss.tools.common.verification.test,org.jboss.tools.common.verification,org.jboss.tools.common.model,org.jboss.tools.gwt.ui,org.jboss.tools.common.model.ui.capabilities,org.jboss.tools.common.resref.core,org.jboss.tools.common.ui,org.jboss.tools.common.el.ui,org.jboss.tools.usage.test,org.jboss.tools.common.text.ext,org.jboss.tools.gwt.core,org.jboss.tools.common.resref.ui,org.jboss.tools.ui.bot.ext.test,org.jboss.tools.common.model.ui.test,org.jboss.tools.common.el.core.test,org.jboss.tools.common.model.ui,org.jboss.tools.tests,org.jboss.tools.common.model.test"/>
+<booleanAttribute key="includeOptional" value="true"/>
+<stringAttribute key="location" value="${workspace_loc}/../runtime-EclipseApplication2"/>
+<listAttribute key="org.eclipse.debug.ui.favoriteGroups">
+<listEntry value="org.eclipse.debug.ui.launchGroup.debug"/>
+<listEntry value="org.eclipse.debug.ui.launchGroup.run"/>
+</listAttribute>
+<stringAttribute key="org.eclipse.jdt.launching.JAVA_COMMAND" value="java"/>
+<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -console -consolelog -pluginCustomization ${workspace_loc}/../runtime-EclipseApplication/usage.properties"/>
+<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
+<booleanAttribute key="pde.generated.config" value="false"/>
+<stringAttribute key="pde.version" value="3.3"/>
+<stringAttribute key="product" value="org.eclipse.platform.ide"/>
+<stringAttribute key="selected_target_plugins" value="org.eclipse.jface.text@default:default,org.eclipse.core.contenttype@default:default,org.eclipse.help@default:default,org.eclipse.equinox.concurrent@default:default,com.ibm.icu@default:default,ch.qos.logback.classic@default:default,org.eclipse.swt.cocoa.macosx.x86_64@default:false,org.junit4@default:default,javax.mail@default:default,org.eclipse.core.filesystem.macosx@default:false,org.eclipse.ui.intro@default:default,org.eclipse.core.databinding.observable@default:default,org.eclipse.ecf.provider.filetransfer.ssl@default:false,org.eclipse.core.runtime@default:true,org.eclipse.help.base@default:default,org.eclipse.swtbot.ant.optional.junit4@default:false,org.eclipse.swt@default:default,org.eclipse.equinox.common@2:true,org.eclipse.net4j.jms.api@default:default,org.eclipse.equinox.security@default:default,org.eclipse.core.resources@default:default,org.eclipse.core.expressions@default:default,org.apache.lucene.analysis@defa!
ult:default,org.eclipse.jface@default:default,org.eclipse.ecf.filetransfer@default:default,org.eclipse.ecf@default:default,org.eclipse.update.configurator@3:true,org.eclipse.equinox.p2.repository@default:default,org.apache.jasper@default:default,org.eclipse.equinox.registry@default:default,org.eclipse.equinox.http.jetty@default:default,org.eclipse.equinox.preferences@default:default,org.eclipse.equinox.p2.metadata@default:default,org.mortbay.jetty.server@default:default,javax.servlet.jsp@default:default,org.eclipse.core.runtime.compatibility@default:default,org.eclipse.core.variables@default:default,org.eclipse.help.ui@default:default,org.eclipse.equinox.http.servlet@default:default,org.eclipse.core.filesystem@default:default,org.mortbay.jetty.util@default:default,org.eclipse.ui.ide@default:default,org.eclipse.jface.databinding@default:default,org.apache.commons.el@default:default,org.eclipse.equinox.app@default:default,org.eclipse.osgi@-1:true,org.eclipse.ui.views@default:!
default,javax.activation@default:default,org.apache.commons.lo!
gging*1.
0.4.v201005080501@default:default,javax.servlet@default:default,org.eclipse.core.databinding@default:default,org.eclipse.core.commands@default:default,org.eclipse.core.runtime.compatibility.registry@default:false,org.eclipse.equinox.p2.engine@default:default,org.slf4j.api@default:default,org.eclipse.ant.core@default:default,org.hamcrest.core@default:default,org.eclipse.core.runtime.compatibility.auth@default:default,ch.qos.logback.slf4j@default:false,org.eclipse.equinox.security.macosx@default:false,org.eclipse.ecf.identity@default:default,org.eclipse.ui.workbench@default:default,org.eclipse.ecf.ssl@default:false,org.junit*4.8.1.v4_8_1_v20100427-1100@default:default,org.eclipse.equinox.p2.core@default:default,org.eclipse.ui.cheatsheets@default:default,org.eclipse.ui.cocoa@default:false,org.eclipse.osgi.services@default:default,org.eclipse.ui@default:default,org.eclipse.ui.forms@default:default,org.eclipse.equinox.p2.metadata.repository@default:default,org.eclipse.text@defaul!
t:default,org.eclipse.core.databinding.property@default:default,org.eclipse.platform@default:default,ch.qos.logback.core@default:default,org.eclipse.core.net@default:default,org.apache.lucene@default:default,org.apache.ant@default:default,org.eclipse.core.jobs@default:default,org.eclipse.ecf.provider.filetransfer@default:default"/>
+<stringAttribute key="selected_workspace_plugins" value="org.jboss.tools.usage@default:default"/>
+<booleanAttribute key="show_selected_only" value="false"/>
+<stringAttribute key="templateConfig" value="${workspace_loc:org.jboss.tools.usage/config.ini}"/>
+<booleanAttribute key="tracing" value="false"/>
+<booleanAttribute key="useCustomFeatures" value="false"/>
+<booleanAttribute key="useDefaultConfig" value="false"/>
+<booleanAttribute key="useDefaultConfigArea" value="true"/>
+<booleanAttribute key="useProduct" value="true"/>
+<booleanAttribute key="usefeatures" value="false"/>
+</launchConfiguration>
Property changes on: branches/jbosstools-3.2.0.M2/usage/plugins/JBoss Usage Reporter.launch
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/plugins/META-INF/MANIFEST.MF
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/plugins/META-INF/MANIFEST.MF (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/plugins/META-INF/MANIFEST.MF 2010-09-02 15:03:44 UTC (rev 24654)
@@ -0,0 +1,17 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %BundleName
+Bundle-SymbolicName: org.jboss.tools.usage;singleton:=true
+Bundle-Version: 1.0.0.qualifier
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Export-Package: org.jboss.tools.usage,
+ org.jboss.tools.usage.googleanalytics,
+ org.jboss.tools.usage.preferences; x-friends:="org.jboss.tools.usage.test",
+ org.jboss.tools.usage.reporting;x-friends:="org.jboss.tools.usage.test",
+ org.jboss.tools.usage.util
+Require-Bundle: org.eclipse.osgi;bundle-version="3.5.0",
+ org.eclipse.core.runtime;bundle-version="[3.5.0,4.0.0)",
+ org.eclipse.ui;bundle-version="3.5.0"
+Bundle-Activator: org.jboss.tools.usage.internal.JBossToolsUsageActivator
+Bundle-Vendor: %BundleVendor
+Bundle-ActivationPolicy: lazy
Property changes on: branches/jbosstools-3.2.0.M2/usage/plugins/META-INF/MANIFEST.MF
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/plugins/about.html
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/plugins/about.html (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/plugins/about.html 2010-09-02 15:03:44 UTC (rev 24654)
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
+<title>Smooks Core</title>
+<style type="text/css" media="screen">
+<!--
+ body {
+ font-family: Sans-serif, Arial, Helvetica;
+ }
+
+-->
+</style>
+</head>
+<body>
+<h1>JBoss Usage Reporting</h1>
+
+<p>
+This plugin is part of the JBoss Tools developed by the <a href="http://www.jboss.com">JBoss Inc.</a>
+</p>
+
+<p>Information about this plugin is available at <a href="http://www.jboss.org/tools">JBoss Tools project page</a></p>
+
+<p>
+This software is distributed under the terms of the Eclipse Public License - v 1.0
+(see <a href="www.eclipse.org/legal/epl-v10.html">Eclipse Public License - Version 1.0</a>).
+</p>
+</body>
+</html>
\ No newline at end of file
Property changes on: branches/jbosstools-3.2.0.M2/usage/plugins/about.html
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/plugins/build.properties
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/plugins/build.properties (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/plugins/build.properties 2010-09-02 15:03:44 UTC (rev 24654)
@@ -0,0 +1,16 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ plugin.xml,\
+ about.html,\
+ bin/
+src.includes = .classpath,\
+ .project,\
+ .settings/,\
+ JBoss Usage Reporter.launch,\
+ META-INF/,\
+ about.html,\
+ build.properties,\
+ plugin.xml,\
+ src/
Property changes on: branches/jbosstools-3.2.0.M2/usage/plugins/build.properties
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/plugins/config.ini
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/plugins/config.ini (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/plugins/config.ini 2010-09-02 15:03:44 UTC (rev 24654)
@@ -0,0 +1,20 @@
+org.jboss.tools.usage/ask_user_for_usage_report_preference=false
+org.jboss.tools.usage.configuration.ask_user_for_usage_report_preference=false
+configuration/org.jboss.tools.usage.ask_user_for_usage_report_preference=false
+eclipse.ask_user_for_usage_report_preference=false
+org.eclipse.pde.core.ask_user_for_usage_report_preference=false
+org.eclipse.core.runtime.ask_user_for_usage_report_preference=false
+ask_user_for_usage_report_preference=false
+
+org.eclipse.update.reconcile=false
+eclipse.p2.profile=SDKProfile
+osgi.instance.area.default=(a)user.home/Documents/workspace
+osgi.framework=file\:/Applications/jbdevstudio/eclipse/plugins/org.eclipse.osgi_3.5.2.R35x_v20100126.jar
+eclipse.buildId=M20100211-1343
+org.eclipse.equinox.simpleconfigurator.configUrl=file\:/Users/admin/workspaces/jboss-tools-usage/.metadata/.plugins/org.eclipse.pde.core/JBoss Usage Reporter/org.eclipse.equinox.simpleconfigurator/bundles.info
+osgi.configuration.cascaded=true
+eclipse.product=com.jboss.jbds.product.product
+eclipse.application=org.eclipse.ui.ide.workbench
+eclipse.p2.data.area=(a)config.dir/.p2
+osgi.bundles.defaultStartLevel=4
+osgi.framework.extensions=reference\:file\:org.eclipse.equinox.transforms.hook_1.0.100.v20100119-2308.jar,reference\:file\:javax.transaction_1.1.1.v201002111330.jar
Property changes on: branches/jbosstools-3.2.0.M2/usage/plugins/config.ini
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/plugins/plugin.properties
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/plugins/plugin.properties (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/plugins/plugin.properties 2010-09-02 15:03:44 UTC (rev 24654)
@@ -0,0 +1,2 @@
+BundleName=JBoss Tools Usage Reporting
+BundleVendor=JBoss by Red Hat
\ No newline at end of file
Property changes on: branches/jbosstools-3.2.0.M2/usage/plugins/plugin.properties
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/plugins/plugin.xml
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/plugins/plugin.xml (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/plugins/plugin.xml 2010-09-02 15:03:44 UTC (rev 24654)
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+ <extension
+ point="org.eclipse.ui.startup">
+ <startup
+ class="org.jboss.tools.usage.reporting.UsageReportDispatcher">
+ </startup>
+ </extension>
+ <extension
+ point="org.eclipse.ui.preferencePages">
+ <page
+ class="org.jboss.tools.usage.preferences.UsageReportPreferencePage"
+ id="org.jboss.tools.usage.analytics.preferences.UsageAnalyticsPreferencePage"
+ name="Usage Reporting Preferences"
+ category="org.jboss.tools.common.model.ui.MainPreferencePage">
+ </page>
+ </extension>
+ <extension
+ point="org.eclipse.core.runtime.preferences">
+ <initializer
+ class="org.jboss.tools.usage.preferences.UsageReportPreferenceInitializer">
+ </initializer>
+ </extension>
+</plugin>
Property changes on: branches/jbosstools-3.2.0.M2/usage/plugins/plugin.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: branches/jbosstools-3.2.0.M2/usage/plugins/pom.xml
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/plugins/pom.xml 2010-09-02 14:59:54 UTC (rev 24653)
+++ branches/jbosstools-3.2.0.M2/usage/plugins/pom.xml 2010-09-02 15:03:44 UTC (rev 24654)
@@ -1,13 +1,13 @@
<project
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <modelVersion>4.0.0</modelVersion>
- <groupId>org.jboss.tools.usage</groupId>
- <artifactId>plugins</artifactId>
- <name>usage.plugins</name>
- <version>0.0.1-SNAPSHOT</version>
- <packaging>pom</packaging>
- <modules>
- <module>org.jboss.tools.usage</module>
- </modules>
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.jboss.tools</groupId>
+ <artifactId>org.jboss.tools.parent.pom</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ </parent>
+ <groupId>org.jboss.tools.usage.plugins</groupId>
+ <artifactId>org.jboss.tools.usage</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <packaging>eclipse-plugin</packaging>
</project>
-
Added: branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/FocusPoint.java
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/FocusPoint.java (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/FocusPoint.java 2010-09-02 15:03:44 UTC (rev 24654)
@@ -0,0 +1,72 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is 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:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.usage;
+
+import org.jboss.tools.usage.util.HttpEncodingUtils;
+
+/**
+ * Focus point of the application. It can represent data points like application
+ * load, application module load, user actions, error events etc.
+ */
+public class FocusPoint {
+
+ private String name;
+ private FocusPoint childFocusPoint;
+ public static final String URI_SEPARATOR = "/";
+ public static final String TITLE_SEPARATOR = "-";
+
+ public FocusPoint(String name) {
+ this.name = name;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public FocusPoint setChild(FocusPoint childFocusPoint) {
+ this.childFocusPoint = childFocusPoint;
+ return this;
+ }
+
+ public FocusPoint getChild() {
+ return childFocusPoint;
+ }
+
+ public String getContentURI() {
+ StringBuilder builder = new StringBuilder();
+ appendContentURI(builder, this);
+ return HttpEncodingUtils.checkedEncodeUtf8(builder.toString());
+ }
+
+ private void appendContentURI(StringBuilder builder, FocusPoint focusPoint) {
+ FocusPoint parentFocuPoint = focusPoint.getChild();
+ builder.append(URI_SEPARATOR);
+ builder.append(focusPoint.getName());
+ if (parentFocuPoint != null) {
+ appendContentURI(builder, parentFocuPoint);
+ }
+ }
+
+ public String getContentTitle() {
+ StringBuilder builder = new StringBuilder();
+ appendContentTitle(builder, this);
+ return HttpEncodingUtils.checkedEncodeUtf8(builder.toString());
+ }
+
+ private void appendContentTitle(StringBuilder builder, FocusPoint focusPoint) {
+ FocusPoint childFocusPoint = focusPoint.getChild();
+ builder.append(focusPoint.getName());
+ if (childFocusPoint != null) {
+ builder.append(TITLE_SEPARATOR);
+ appendContentTitle(builder, childFocusPoint);
+ }
+ }
+}
Property changes on: branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/FocusPoint.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/HttpGetRequest.java
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/HttpGetRequest.java (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/HttpGetRequest.java 2010-09-02 15:03:44 UTC (rev 24654)
@@ -0,0 +1,100 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is 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:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.usage;
+
+import java.io.IOException;
+import java.net.HttpURLConnection;
+import java.net.URL;
+import java.text.MessageFormat;
+
+
+/**
+ * Class that executes a HTTP Get request to the given url.
+ *
+ * @author Andre Dietisheim
+ */
+public class HttpGetRequest implements IHttpGetRequest {
+
+ private static final String USER_AGENT = "User-Agent"; //$NON-NLS-1$
+
+ private static final String GET_METHOD_NAME = "GET"; //$NON-NLS-1$
+
+ private ILoggingAdapter loggingAdapter = null;
+
+// private CookieHandler cookieHandler;
+
+ private String userAgent;
+
+ public HttpGetRequest(String userAgent, ILoggingAdapter loggingAdapter) {
+ this.userAgent = userAgent;
+ this.loggingAdapter = loggingAdapter;
+// this.cookieHandler = new CookieHandler();
+// this.cookieHandler = CookieHandler.getDefault();
+// cookieHandler.setCookiePolicy(CookiePolicy.ACCEPT_ALL);
+ }
+
+ /* (non-Javadoc)
+ * @see org.jboss.tools.usage.IHttpGetRequest#request(java.lang.String)
+ */
+ public void request(String urlString) {
+
+// CookieHandler currentCookieHandler = setCookieHandler(cookieHandler);
+ try {
+ HttpURLConnection urlConnection = createURLConnection(urlString, userAgent);
+ urlConnection.connect();
+ int responseCode = getResponseCode(urlConnection);
+ if (responseCode == HttpURLConnection.HTTP_OK) {
+ loggingAdapter.logMessage(MessageFormat.format(UsageMessages.HttpGetMethod_Success, urlString, responseCode));
+ } else {
+ loggingAdapter.logError(MessageFormat.format(UsageMessages.HttpGetMethod_Error_Http, urlString));
+ }
+ } catch (Exception e) {
+ loggingAdapter.logMessage(MessageFormat.format(UsageMessages.HttpGetMethod_Error_Io, urlString, e.toString()));
+ } finally {
+// setCookieHandler(currentCookieHandler);
+ }
+ }
+
+ /**
+ * Returns the return code from the given {@link HttpURLConnection}.
+ * Provided to be called by test cases so that they can retrieve the return code.
+ *
+ * @param urlConnection to get the response code from
+ * @return the return code the HttpUrlConnection received
+ * @throws IOException Signals that an I/O exception has occurred.
+ */
+ protected int getResponseCode(HttpURLConnection urlConnection) throws IOException {
+ return urlConnection.getResponseCode();
+ }
+
+// private CookieHandler setCookieHandler(CookieHandler cookieHandler) {
+// CookieHandler currentCookieHandler = CookieHandler.getDefault();
+// CookieHandler.setDefault(cookieHandler);
+// return currentCookieHandler;
+// }
+
+ /**
+ * Creates a new url connection.
+ *
+ * @param urlString the url string
+ * @param userAgent the user agent
+ * @return the http url connection
+ * @throws IOException Signals that an I/O exception has occurred.
+ */
+ protected HttpURLConnection createURLConnection(String urlString, String userAgent) throws IOException {
+ URL url = new URL(urlString);
+ HttpURLConnection urlConnection = (HttpURLConnection) url.openConnection();
+ urlConnection.setInstanceFollowRedirects(true);
+ urlConnection.setRequestMethod(GET_METHOD_NAME);
+ urlConnection.setRequestProperty(USER_AGENT, userAgent);
+ return urlConnection;
+ }
+}
Property changes on: branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/HttpGetRequest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/HttpResourceMap.java
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/HttpResourceMap.java (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/HttpResourceMap.java 2010-09-02 15:03:44 UTC (rev 24654)
@@ -0,0 +1,150 @@
+package org.jboss.tools.usage;
+
+import java.io.BufferedInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.UnsupportedEncodingException;
+import java.net.HttpURLConnection;
+import java.net.URL;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Plugin;
+import org.jboss.tools.usage.util.HttpEncodingUtils;
+import org.jboss.tools.usage.util.StatusUtils;
+import org.jboss.tools.usage.util.reader.ReaderUtils;
+
+public abstract class HttpResourceMap {
+
+ static final String GET_METHOD_NAME = "GET"; //$NON-NLS-1$
+
+ protected Plugin plugin;
+ private Map<String, String> valuesMap;
+
+ private String[] keys;
+
+ private String url;
+
+ private char valueDelimiter;
+
+ public HttpResourceMap(String url, char valueDelimiter, Plugin plugin, String... keys) {
+ this.url = url;
+ this.keys = keys;
+ this.valueDelimiter = valueDelimiter;
+ this.plugin = plugin;
+ }
+
+ protected Map<String, String> getValueMap() throws IOException {
+ if (valuesMap == null) {
+ HttpURLConnection urlConnection = createURLConnection(url);
+ InputStreamReader reader = request(urlConnection);
+ this.valuesMap = parse(keys, valueDelimiter, reader, new HashMap<String, String>());
+ }
+ return valuesMap;
+ }
+
+ /**
+ * Sends a http GET request to the given URL. Returns the response string or
+ * <tt>null</tt> if an error occurred. The errors catched are Exceptions or
+ * HTTP error codes.
+ *
+ * @param url
+ * the url to send the GET request to
+ * @return the response or <tt>null</tt> if an error occured.
+ * @throws UnsupportedEncodingException
+ *
+ * @see HttpURLConnection
+ */
+ protected InputStreamReader request(HttpURLConnection urlConnection) throws IOException {
+ InputStreamReader responseReader = null;
+ try {
+ urlConnection.connect();
+ int responseCode = getResponseCode(urlConnection);
+ if (responseCode == HttpURLConnection.HTTP_OK) {
+ IStatus status = StatusUtils.getDebugStatus(
+ plugin.getBundle().getSymbolicName()
+ , UsageMessages.KillSwitchPreference_Info_HttpQuery
+ , url);
+ plugin.getLog().log(status);
+ responseReader = getInputStreamReader(urlConnection.getInputStream(), urlConnection.getContentType());
+ } else {
+ IStatus status = StatusUtils.getErrorStatus(
+ plugin.getBundle().getSymbolicName()
+ , UsageMessages.KillSwitchPreference_Error_Http, null, url);
+ plugin.getLog().log(status);
+ }
+ return responseReader;
+ } catch (IOException e) {
+ IStatus status = StatusUtils.getErrorStatus(
+ plugin.getBundle().getSymbolicName()
+ , UsageMessages.KillSwitchPreference_Error_Http, e, url);
+ plugin.getLog().log(status);
+ throw e;
+ }
+ }
+
+ private InputStreamReader getInputStreamReader(InputStream inputStream, String contentType) throws UnsupportedEncodingException, IOException {
+ String contentTypeCharset = HttpEncodingUtils.getContentTypeCharset(contentType);
+ if (contentTypeCharset != null && contentTypeCharset.length() > 0) {
+ return new InputStreamReader(new BufferedInputStream(inputStream),
+ contentTypeCharset);
+ } else {
+ return new InputStreamReader(new BufferedInputStream(inputStream));
+ }
+ }
+
+ /**
+ * Parses the given string and extracts the enablement value.
+ *
+ * @param valueDelimiter
+ *
+ * @param input
+ * stream that holds
+ * @return
+ * @return true, if successful
+ */
+ private Map<String, String> parse(String[] keys, char valueDelimiter, InputStreamReader reader,
+ Map<String, String> valuesMap) throws IOException {
+ for (String key = null; (key = ReaderUtils.skipUntil(reader, keys)) != null;) {
+ String value = ReaderUtils.readStringUntil(reader, valueDelimiter);
+ valuesMap.put(key, value);
+ }
+ return valuesMap;
+ }
+
+ /**
+ * Creates a new url connection.
+ *
+ * @param urlString
+ * the url string
+ * @return the http url connection
+ * @throws IOException
+ * @throws IOException
+ * Signals that an I/O exception has occurred.
+ */
+ protected HttpURLConnection createURLConnection(String urlString) throws IOException {
+ URL url = new URL(urlString);
+ HttpURLConnection urlConnection = (HttpURLConnection) url.openConnection();
+ urlConnection.setInstanceFollowRedirects(true);
+ urlConnection.setRequestMethod(GET_METHOD_NAME);
+ return urlConnection;
+ }
+
+ /**
+ * Returns the return code from the given {@link HttpURLConnection}.
+ * Provided to be called by test cases so that they can retrieve the return
+ * code.
+ *
+ * @param urlConnection
+ * to get the response code from
+ * @return the return code the HttpUrlConnection received
+ * @throws IOException
+ * Signals that an I/O exception has occurred.
+ */
+ protected int getResponseCode(HttpURLConnection urlConnection) throws IOException {
+ return urlConnection.getResponseCode();
+ }
+
+}
\ No newline at end of file
Property changes on: branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/HttpResourceMap.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/IHttpGetRequest.java
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/IHttpGetRequest.java (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/IHttpGetRequest.java 2010-09-02 15:03:44 UTC (rev 24654)
@@ -0,0 +1,22 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is 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:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.usage;
+
+/**
+ * A interface that represents a HTTP Get Request.
+ *
+ * @author Andre Dietisheim
+ */
+public interface IHttpGetRequest {
+
+ public abstract void request(String urlString);
+
+}
\ No newline at end of file
Property changes on: branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/IHttpGetRequest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/ILoggingAdapter.java
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/ILoggingAdapter.java (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/ILoggingAdapter.java 2010-09-02 15:03:44 UTC (rev 24654)
@@ -0,0 +1,22 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is 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:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.usage;
+
+/**
+ * @author Andre Dietisheim
+ */
+public interface ILoggingAdapter {
+
+ public void logError(String errorMessage);
+
+ public void logMessage(String message);
+
+}
Property changes on: branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/ILoggingAdapter.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/ITracker.java
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/ITracker.java (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/ITracker.java 2010-09-02 15:03:44 UTC (rev 24654)
@@ -0,0 +1,35 @@
+package org.jboss.tools.usage;
+
+import java.io.UnsupportedEncodingException;
+
+
+/**
+ * @author Andre Dietisheim
+ */
+public interface ITracker {
+
+ /**
+ * Track the focusPoint in the application synchronously. <br/>
+ * <red><b>Please be cognizant while using this method. Since, it would have
+ * a peformance hit on the actual application. Use it unless it's really
+ * needed</b></red>
+ *
+ * @param focusPoint
+ * Focus point of the application like application load,
+ * application module load, user actions, error events etc.
+ * @throws UnsupportedEncodingException
+ */
+
+ public abstract void trackSynchronously(FocusPoint focusPoint);
+
+ /**
+ * Track the focusPoint in the application asynchronously. <br/>
+ *
+ * @param focusPoint
+ * Focus point of the application like application load,
+ * application module load, user actions, error events etc.
+ */
+
+ public abstract void trackAsynchronously(FocusPoint focusPoint);
+
+}
\ No newline at end of file
Property changes on: branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/ITracker.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/IURLBuildingStrategy.java
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/IURLBuildingStrategy.java (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/IURLBuildingStrategy.java 2010-09-02 15:03:44 UTC (rev 24654)
@@ -0,0 +1,26 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is 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:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.usage;
+
+import java.io.UnsupportedEncodingException;
+
+
+/**
+ * Interface for the URL building strategy
+ *
+ * @author Andre Dietisheim
+ *
+ */
+public interface IURLBuildingStrategy {
+
+ public String build(FocusPoint focusPoint) throws UnsupportedEncodingException;
+
+}
Property changes on: branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/IURLBuildingStrategy.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/PluginLogger.java
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/PluginLogger.java (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/PluginLogger.java 2010-09-02 15:03:44 UTC (rev 24654)
@@ -0,0 +1,42 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is 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:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.usage;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Plugin;
+import org.eclipse.core.runtime.Status;
+
+/**
+ * @author Andre Dietisheim
+ */
+public class PluginLogger implements ILoggingAdapter {
+
+ private Plugin plugin;
+
+ public PluginLogger(Plugin plugin) {
+ this.plugin = plugin;
+ }
+
+ public void logError(String message) {
+ log(IStatus.ERROR, message);
+ }
+
+ public void logMessage(String message) {
+ log(IStatus.INFO, message);
+ }
+
+ private void log(int severity, String message) {
+ if (plugin != null) {
+ IStatus status = new Status(severity, plugin.getBundle().getSymbolicName(), message);
+ plugin.getLog().log(status);
+ }
+ }
+}
Property changes on: branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/PluginLogger.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/Tracker.java
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/Tracker.java (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/Tracker.java 2010-09-02 15:03:44 UTC (rev 24654)
@@ -0,0 +1,71 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is 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:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.usage;
+
+import java.io.UnsupportedEncodingException;
+import java.text.MessageFormat;
+
+/**
+ * Reports (tracks) usage
+ *
+ * @author Andre Dietisheim
+ * @see based on <a
+ * href="http://jgoogleAnalytics.googlecode.com">http://jgoogleAnalytics
+ * .googlecode.com</a>
+ */
+public class Tracker implements ITracker {
+
+ private IURLBuildingStrategy urlBuildingStrategy = null;
+ private IHttpGetRequest httpRequest;
+ private ILoggingAdapter loggingAdapter;
+
+ public Tracker(IURLBuildingStrategy urlBuildingStrategy, IHttpGetRequest httpGetRequest, ILoggingAdapter loggingAdapter) {
+ this.httpRequest = httpGetRequest;
+ this.loggingAdapter = loggingAdapter;
+ this.urlBuildingStrategy = urlBuildingStrategy;
+ }
+
+ public void trackSynchronously(FocusPoint focusPoint) {
+ loggingAdapter
+ .logMessage(MessageFormat.format(UsageMessages.Tracker_Synchronous, focusPoint.getContentTitle()));
+ try {
+ httpRequest.request(getTrackingUrl(focusPoint));
+ } catch (Exception e) {
+ loggingAdapter.logMessage(MessageFormat.format(UsageMessages.Tracker_Error, e.getMessage()));
+ }
+ }
+
+ protected String getTrackingUrl(FocusPoint focusPoint) throws UnsupportedEncodingException {
+ return urlBuildingStrategy.build(focusPoint);
+ }
+
+ public void trackAsynchronously(FocusPoint focusPoint) {
+ loggingAdapter.logMessage(MessageFormat
+ .format(UsageMessages.Tracker_Asynchronous, focusPoint.getContentTitle()));
+ new Thread(new TrackingRunnable(focusPoint)).start();
+ }
+
+ private class TrackingRunnable implements Runnable {
+ private FocusPoint focusPoint;
+
+ private TrackingRunnable(FocusPoint focusPoint) {
+ this.focusPoint = focusPoint;
+ }
+
+ public void run() {
+ try {
+ httpRequest.request(getTrackingUrl(focusPoint));
+ } catch (Exception e) {
+ loggingAdapter.logMessage(MessageFormat.format(UsageMessages.Tracker_Error, e.getMessage()));
+ }
+ }
+ }
+}
Property changes on: branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/Tracker.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/UsageMessages.java
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/UsageMessages.java (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/UsageMessages.java 2010-09-02 15:03:44 UTC (rev 24654)
@@ -0,0 +1,36 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is 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:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.usage;
+
+import org.eclipse.osgi.util.NLS;
+
+public class UsageMessages extends NLS {
+ private static final String BUNDLE_NAME = "org.jboss.tools.usage.messages"; //$NON-NLS-1$
+ public static String Tracker_Synchronous;
+ public static String Tracker_Asynchronous;
+ public static String Tracker_Error;
+
+ public static String HttpGetMethod_Error_Http;
+ public static String HttpGetMethod_Error_Io;
+ public static String HttpGetMethod_Success;
+
+ public static String KillSwitchPreference_Error_Exception;
+ public static String KillSwitchPreference_Error_Http;
+ public static String KillSwitchPreference_Info_HttpQuery;
+
+ static {
+ // initialize resource bundle
+ NLS.initializeMessages(BUNDLE_NAME, UsageMessages.class);
+ }
+
+ private UsageMessages() {
+ }
+}
Property changes on: branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/UsageMessages.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/googleanalytics/AbstractGoogleAnalyticsParameters.java
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/googleanalytics/AbstractGoogleAnalyticsParameters.java (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/googleanalytics/AbstractGoogleAnalyticsParameters.java 2010-09-02 15:03:44 UTC (rev 24654)
@@ -0,0 +1,40 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is 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:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.usage.googleanalytics;
+
+
+/**
+ * @author Andre Dietisheim
+ */
+public abstract class AbstractGoogleAnalyticsParameters implements IGoogleAnalyticsParameters {
+
+ private String accountName;
+ private String referral;
+ private String hostName;
+
+ public AbstractGoogleAnalyticsParameters(String accountName, String hostName, String referral) {
+ this.accountName = accountName;
+ this.hostName = hostName;
+ this.referral = referral;
+ }
+
+ public String getAccountName() {
+ return accountName;
+ }
+
+ public String getHostname() {
+ return hostName;
+ }
+
+ public String getReferral() {
+ return referral;
+ }
+}
Property changes on: branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/googleanalytics/AbstractGoogleAnalyticsParameters.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/googleanalytics/GoogleAnalyticsCookie.java
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/googleanalytics/GoogleAnalyticsCookie.java (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/googleanalytics/GoogleAnalyticsCookie.java 2010-09-02 15:03:44 UTC (rev 24654)
@@ -0,0 +1,42 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is 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:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.usage.googleanalytics;
+
+import org.eclipse.core.runtime.Assert;
+
+public class GoogleAnalyticsCookie {
+
+ private CharSequence value;
+ private String identifier;
+ private char[] delimiters;
+
+ public GoogleAnalyticsCookie(String identifier, CharSequence value, char... delimiters) {
+ Assert.isTrue(identifier != null && identifier.length() > 0);
+ Assert.isTrue(value != null && value.length() > 0);
+
+ this.identifier = identifier;
+ this.value = value;
+ this.delimiters = delimiters;
+ }
+
+ public GoogleAnalyticsCookie(String identifier, CharSequence value) {
+ this(identifier, value, (char) -1);
+ }
+
+ public void appendTo(StringBuilder builder) {
+ builder.append(identifier)
+ .append(IGoogleAnalyticsParameters.EQUALS_SIGN)
+ .append(value);
+ for (char delimiter : delimiters) {
+ builder.append(delimiter);
+ }
+ }
+}
Property changes on: branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/googleanalytics/GoogleAnalyticsCookie.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/googleanalytics/GoogleAnalyticsMessages.java
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/googleanalytics/GoogleAnalyticsMessages.java (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/googleanalytics/GoogleAnalyticsMessages.java 2010-09-02 15:03:44 UTC (rev 24654)
@@ -0,0 +1,25 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is 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:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.usage.googleanalytics;
+
+import org.eclipse.osgi.util.NLS;
+
+public class GoogleAnalyticsMessages extends NLS {
+
+ private static final String BUNDLE_NAME = "org.jboss.tools.usage.googleanalytics.messages"; //$NON-NLS-1$
+ static {
+ // initialize resource bundle
+ NLS.initializeMessages(BUNDLE_NAME, GoogleAnalyticsMessages.class);
+ }
+
+ private GoogleAnalyticsMessages() {
+ }
+}
Property changes on: branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/googleanalytics/GoogleAnalyticsMessages.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/googleanalytics/GoogleAnalyticsUrlStrategy.java
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/googleanalytics/GoogleAnalyticsUrlStrategy.java (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/googleanalytics/GoogleAnalyticsUrlStrategy.java 2010-09-02 15:03:44 UTC (rev 24654)
@@ -0,0 +1,218 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is 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:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.usage.googleanalytics;
+
+import java.io.UnsupportedEncodingException;
+
+import org.jboss.tools.usage.FocusPoint;
+import org.jboss.tools.usage.IURLBuildingStrategy;
+import org.jboss.tools.usage.util.HttpEncodingUtils;
+
+/**
+ * Class that builds an URL that passes given parameters to google analytics
+ *
+ * @author Andre Dietisheim
+ *
+ * @see <a
+ * href="http://code.google.com/apis/analytics/docs/tracking/gaTrackingTroubleshoo...">GIF
+ * Request Parameters</a>
+ * @see <a
+ * href="http://code.google.com/apis/analytics/docs/concepts/gaConceptsCookies.htm...">Cookies
+ * Set By Google Analytics</a>
+ *
+ * @see <a
+ * href="http://www.morevisibility.com/analyticsblog/from-__utma-to-__utmz-google-...">From
+ * __utma to __utmz (Google Analytics Cookies)</a>
+ */
+public class GoogleAnalyticsUrlStrategy implements IURLBuildingStrategy {
+
+ private static final String TRACKING_URL = "http://www.google-analytics.com/__utm.gif";
+
+ // private static final int VISITS = -1;
+
+ private IGoogleAnalyticsParameters googleParameters;
+
+ public GoogleAnalyticsUrlStrategy(IGoogleAnalyticsParameters googleAnalyticsParameters) {
+ this.googleParameters = googleAnalyticsParameters;
+ }
+
+ public String build(FocusPoint focusPoint) throws UnsupportedEncodingException {
+ /*
+ * Google Analytics for Android:
+ *
+ String str = "";
+ if (paramEvent.action != null)
+ str = paramEvent.action;
+ if (!(str.startsWith("/")))
+ str = "/" + str;
+ str = encode(str);
+ Locale localLocale = Locale.getDefault();
+ StringBuilder localStringBuilder = new StringBuilder();
+ localStringBuilder.append("/__utm.gif");
+ localStringBuilder.append("?utmwv=4.3");
+ localStringBuilder.append("&utmn=").append(paramEvent.randomVal);
+ localStringBuilder.append("&utmcs=UTF-8");
+ localStringBuilder.append(String.format("&utmsr=%dx%d", new Object[] {
+ Integer.valueOf(paramEvent.screenWidth)
+ , Integer.valueOf(paramEvent.screenHeight) }));
+ localStringBuilder.append(String.format("&utmul=%s-%s", new Object[] {
+ localLocale.getLanguage()
+ , localLocale.getCountry() }));
+ localStringBuilder.append("&utmp=").append(str);
+ localStringBuilder.append("&utmac=").append(paramEvent.accountId);
+ localStringBuilder.append("&utmcc=").append(
+ getEscapedCookieString(paramEvent, paramString));
+ return localStringBuilder.toString();
+
+ *
+ * getEscapedCookieString:
+ *
+ StringBuilder localStringBuilder = new StringBuilder();
+ localStringBuilder.append("__utma=");
+ localStringBuilder.append("999").append(".");
+ localStringBuilder.append(paramEvent.userId).append(".");
+ localStringBuilder.append(paramEvent.timestampFirst).append(".");
+ localStringBuilder.append(paramEvent.timestampPrevious).append(".");
+ localStringBuilder.append(paramEvent.timestampCurrent).append(".");
+ localStringBuilder.append(paramEvent.visits);
+ if (paramString != null)
+ {
+ localStringBuilder.append("+__utmz=");
+ localStringBuilder.append("999").append(".");
+ localStringBuilder.append(paramEvent.timestampFirst).append(".");
+ localStringBuilder.append("1.1.");
+ localStringBuilder.append(paramString);
+ }
+ return encode(localStringBuilder.toString());
+
+ */
+
+ StringBuilder builder = new StringBuilder(TRACKING_URL)
+ .append(IGoogleAnalyticsParameters.URL_PARAM_DELIMITER);
+ appendParameter(IGoogleAnalyticsParameters.PARAM_TRACKING_CODE_VERSION,
+ IGoogleAnalyticsParameters.VALUE_TRACKING_CODE_VERSION, builder);
+ appendParameter(IGoogleAnalyticsParameters.PARAM_UNIQUE_TRACKING_NUMBER, getRandomNumber(), builder);
+ appendParameter(IGoogleAnalyticsParameters.PARAM_HOST_NAME, googleParameters.getHostname(), builder);
+ appendParameter(IGoogleAnalyticsParameters.PARAM_LANGUAGE_ENCODING,
+ IGoogleAnalyticsParameters.VALUE_ENCODING_UTF8, builder);
+ appendParameter(IGoogleAnalyticsParameters.PARAM_SCREEN_RESOLUTION, googleParameters.getScreenResolution(),
+ builder);
+ appendParameter(IGoogleAnalyticsParameters.PARAM_SCREEN_COLOR_DEPTH, googleParameters.getScreenColorDepth(),
+ builder);
+ appendParameter(IGoogleAnalyticsParameters.PARAM_BROWSER_LANGUAGE, googleParameters.getBrowserLanguage(),
+ builder);
+ appendParameter(IGoogleAnalyticsParameters.PARAM_PAGE_TITLE, focusPoint.getContentTitle(), builder);
+ // appendParameter(IGoogleAnalyticsParameters.PARAM_HID,
+ // getRandomNumber(), builder);
+ appendParameter(IGoogleAnalyticsParameters.PARAM_REFERRAL, googleParameters.getReferral(), builder);
+ appendParameter(IGoogleAnalyticsParameters.PARAM_PAGE_REQUEST, focusPoint.getContentURI(), builder);
+
+ appendParameter(IGoogleAnalyticsParameters.PARAM_ACCOUNT_NAME, googleParameters.getAccountName(), builder);
+ appendParameter(IGoogleAnalyticsParameters.PARAM_COOKIES, getCookies(), builder);
+ appendParameter(IGoogleAnalyticsParameters.PARAM_GAQ, "1", false, builder);
+
+ googleParameters.visit();
+
+ return builder.toString();
+ }
+
+ /**
+ * Returns the google analytics cookies. These cookies determines user
+ * identity, session identity etc.
+ *
+ * @return the cookies
+ *
+ * @see <a
+ * href="http://www.analyticsexperts.com/google-analytics/information-about-the-ut...">Information
+ * about the utmLinker and the __utma, __utmb and __utmc cookies</a>
+ */
+ private String getCookies() {
+ StringBuilder builder = new StringBuilder();
+
+ /**
+ * unique visitor id cookie has to be unique per eclipse installation
+ */
+ // String timeStamp = "-1";
+ // //String.valueOf(System.currentTimeMillis());
+ new GoogleAnalyticsCookie(IGoogleAnalyticsParameters.PARAM_COOKIES_UNIQUE_VISITOR_ID,
+ new StringBuilder().append("999.")
+ .append(googleParameters.getUserId()).append(IGoogleAnalyticsParameters.DOT)
+ .append(googleParameters.getFirstVisit()).append(IGoogleAnalyticsParameters.DOT)
+ .append(googleParameters.getLastVisit()).append(IGoogleAnalyticsParameters.DOT)
+ .append(googleParameters.getCurrentVisit()).append(IGoogleAnalyticsParameters.DOT)
+ .append(googleParameters.getVisitCount())
+ .append(IGoogleAnalyticsParameters.SEMICOLON),
+ IGoogleAnalyticsParameters.PLUS_SIGN)
+ .appendTo(builder);
+
+ new GoogleAnalyticsCookie(IGoogleAnalyticsParameters.PARAM_COOKIES_REFERRAL_TYPE,
+ new StringBuilder()
+ .append("999.")
+ .append(googleParameters.getFirstVisit())
+ .append(IGoogleAnalyticsParameters.DOT)
+ .append("1.1."))
+ .appendTo(builder);
+
+// new GoogleAnalyticsCookie(IGoogleAnalyticsParameters.PARAM_COOKIES_SESSION,
+// new StringBuilder()
+// .append("1"),
+// IGoogleAnalyticsParameters.SEMICOLON
+// , IGoogleAnalyticsParameters.PLUS_SIGN)
+// .appendTo(builder);
+//
+// new GoogleAnalyticsCookie(IGoogleAnalyticsParameters.PARAM_COOKIES_BROWSERSESSION,
+// new StringBuilder()
+// .append("1"),
+// IGoogleAnalyticsParameters.SEMICOLON
+// , IGoogleAnalyticsParameters.PLUS_SIGN)
+// .appendTo(builder);
+
+ new GoogleAnalyticsCookie(IGoogleAnalyticsParameters.PARAM_COOKIES_UTMCSR,
+ "(direct)",
+ IGoogleAnalyticsParameters.PIPE)
+ .appendTo(builder);
+
+ new GoogleAnalyticsCookie(IGoogleAnalyticsParameters.PARAM_COOKIES_UTMCCN,
+ "(direct)",
+ IGoogleAnalyticsParameters.PIPE)
+ .appendTo(builder);
+
+ new GoogleAnalyticsCookie(IGoogleAnalyticsParameters.PARAM_COOKIES_UTMCMD,
+ "(none)",
+ IGoogleAnalyticsParameters.PIPE)
+ .appendTo(builder);
+
+ new GoogleAnalyticsCookie(IGoogleAnalyticsParameters.PARAM_COOKIES_KEYWORD,
+ googleParameters.getKeyword())
+ .appendTo(builder);
+
+ builder.append(IGoogleAnalyticsParameters.SEMICOLON);
+
+ return HttpEncodingUtils.checkedEncodeUtf8(builder.toString());
+ }
+
+ private String getRandomNumber() {
+ return Integer.toString((int) (Math.random() * 0x7fffffff));
+ }
+
+ private void appendParameter(String name, String value, StringBuilder builder) {
+ appendParameter(name, value, true, builder);
+ }
+
+ private void appendParameter(String name, String value, boolean appendAmpersand, StringBuilder builder) {
+ builder.append(name)
+ .append(IGoogleAnalyticsParameters.EQUALS_SIGN)
+ .append(value);
+ if (appendAmpersand) {
+ builder.append(IGoogleAnalyticsParameters.AMPERSAND);
+ }
+ }
+}
Property changes on: branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/googleanalytics/GoogleAnalyticsUrlStrategy.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/googleanalytics/IGoogleAnalyticsParameters.java
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/googleanalytics/IGoogleAnalyticsParameters.java (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/googleanalytics/IGoogleAnalyticsParameters.java 2010-09-02 15:03:44 UTC (rev 24654)
@@ -0,0 +1,95 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is 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:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.usage.googleanalytics;
+
+/**
+ * An interface that provides methods for all parameters that google analytics
+ * needs to know about.
+ *
+ * @author Andre Dietisheim
+ * @see <a
+ * href="http://code.google.com/apis/analytics/docs/tracking/gaTrackingTroubleshoo...">GIF Request Parameters</a>
+ */
+public interface IGoogleAnalyticsParameters {
+
+ public static final char AMPERSAND = '&';
+ public static final char EQUALS_SIGN = '=';
+ public static final char URL_PARAM_DELIMITER = '?';
+ public static final char PLUS_SIGN = '+';
+ public static final char DOT = '.';
+ public static final char SEMICOLON = ';';
+ public static final char JAVA_LOCALE_DELIMITER = '_';
+ public static final char BROWSER_LOCALE_DELIMITER = '-';
+ public static final char PIPE = '|';
+ public static final char VERSION_DELIMITER = '.';
+
+ public static final String PARAM_HID = "utmhid";
+ public static final String PARAM_PAGE_REQUEST = "utmp";
+ public static final String PARAM_ACCOUNT_NAME = "utmac";
+ public static final String PARAM_HOST_NAME = "utmhn";
+ public static final String PARAM_COOKIES = "utmcc";
+ public static final String PARAM_COOKIES_UNIQUE_VISITOR_ID = "__utma";
+ public static final String PARAM_COOKIES_SESSION = "__utmb";
+ public static final String PARAM_COOKIES_BROWSERSESSION = "__utmc";
+ public static final String PARAM_COOKIES_REFERRAL_TYPE = "__utmz";
+
+ public static final String PARAM_REFERRAL = "utmr";
+ public static final String PARAM_TRACKING_CODE_VERSION = "utmwv";
+ public static final String PARAM_UNIQUE_TRACKING_NUMBER = "utmn";
+ public static final String PARAM_LANGUAGE_ENCODING = "utmcs";
+ public static final String PARAM_SCREEN_RESOLUTION = "utmsr";
+ public static final String PARAM_SCREEN_COLOR_DEPTH = "utmsc";
+ public static final String PARAM_PRODUCT_NAME = "utmipn";
+ public static final String PARAM_PRODUCT_CODE = "utmipc";
+ public static final String PARAM_BROWSER_LANGUAGE = "utmul";
+ public static final String PARAM_REPEAT_CAMPAIGN_VISIT = "utmcr";
+ public static final String PARAM_PAGE_TITLE = "utmdt";
+ public static final String PARAM_GAQ = "gaq";
+ public static final String PARAM_COOKIES_UTMCSR = "utmcsr";
+ public static final String PARAM_COOKIES_UTMCCN = "utmccn";
+ public static final String PARAM_COOKIES_UTMCMD = "utmcmd";
+ public static final String PARAM_COOKIES_KEYWORD = "utmctr";
+
+ public static final String VALUE_TRACKING_CODE_VERSION = "4.7.2";
+ public static final String VALUE_NO_REFERRAL = "0";
+ public static final String VALUE_ENCODING_UTF8 = "UTF-8";
+
+ public static final String SCREERESOLUTION_DELIMITER = "x";
+ public static final String SCREENCOLORDEPTH_POSTFIX = "-bit";
+
+ public String getAccountName();
+
+ public String getReferral();
+
+ public String getScreenResolution();
+
+ public String getScreenColorDepth();
+
+ public String getBrowserLanguage();
+
+ public String getHostname();
+
+ public String getUserAgent();
+
+ public String getUserId();
+
+ public String getKeyword();
+
+ public String getFirstVisit();
+
+ public String getLastVisit();
+
+ public String getCurrentVisit();
+
+ public long getVisitCount();
+
+ public void visit();
+}
Property changes on: branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/googleanalytics/IGoogleAnalyticsParameters.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/googleanalytics/messages.properties
===================================================================
Property changes on: branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/googleanalytics/messages.properties
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/internal/JBossToolsUsageActivator.java
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/internal/JBossToolsUsageActivator.java (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/internal/JBossToolsUsageActivator.java 2010-09-02 15:03:44 UTC (rev 24654)
@@ -0,0 +1,47 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is 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:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.usage.internal;
+
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * @author Andre Dietisheim
+ */
+public class JBossToolsUsageActivator extends AbstractUIPlugin {
+
+ public static final String PLUGIN_ID = "org.jboss.tools.usage"; //$NON-NLS-1$
+
+ private static JBossToolsUsageActivator plugin;
+
+ public JBossToolsUsageActivator() {
+ plugin = this;
+ }
+
+ @Override
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+
+ public static JBossToolsUsageActivator getDefault() {
+ return plugin;
+ }
+
+ public static ImageDescriptor getImageDescriptor(String path) {
+ return imageDescriptorFromPlugin(PLUGIN_ID, path);
+ }
+
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ }
+}
Property changes on: branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/internal/JBossToolsUsageActivator.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/messages.properties
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/messages.properties (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/messages.properties 2010-09-02 15:03:44 UTC (rev 24654)
@@ -0,0 +1,11 @@
+HttpGetMethod_Error_Http=HTTP GET to \"{0}\" failed, response code received \"{1}\"
+HttpGetMethod_Error_Io=HTTP GET to \"{0}\" failed, exception occured: \"{1}\"
+HttpGetMethod_Success=HTTP GET to url \"{0}\" successfull\!
+
+Tracker_Asynchronous=Tracking asynchronously focusPoint \"{0}\"
+Tracker_Error=Tracking failed, exception thrown: \"{0}\"
+Tracker_Synchronous=Tracking synchronously focusPoint \"{0}\"
+
+KillSwitchPreference_Error_Exception=Could not query kill switch preference at \"{0}\"
+KillSwitchPreference_Error_Http=Could not query kill switch preference at \"{0}\, response code was \"{1}\""
+KillSwitchPreference_Info_HttpQuery=Queried kill switch preference at \"{0}\"
Property changes on: branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/messages.properties
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/preferences/GlobalUsageReportingSettings.java
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/preferences/GlobalUsageReportingSettings.java (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/preferences/GlobalUsageReportingSettings.java 2010-09-02 15:03:44 UTC (rev 24654)
@@ -0,0 +1,51 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is 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:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.usage.preferences;
+
+import java.util.Map;
+
+import org.eclipse.core.runtime.Plugin;
+import org.jboss.tools.usage.HttpResourceMap;
+
+/**
+ * A class that implements a global reporting enablement setting. The current
+ * implementation queries a given url and extracts the enablement value out of
+ * the response.
+ */
+public class GlobalUsageReportingSettings extends HttpResourceMap {
+
+ private static final String REPORTING_ENABLEMENT_URL = "http://anonsvn.jboss.org/repos/jbosstools/workspace/usage/usage.properties"; //$NON-NLS-1$
+
+ public static final String REPORT_ENABLEMENT_KEY = "usage_reporting_enabled="; //$NON-NLS-1$
+ private static final boolean REPORT_ENABLEMENT_DEFAULT = false;
+
+ /* the delimiter that delimits the value */
+ private static final char VALUE_DELIMITER = '\n';
+
+ public GlobalUsageReportingSettings(Plugin plugin) {
+ super(REPORTING_ENABLEMENT_URL
+ , VALUE_DELIMITER
+ , plugin
+ , REPORT_ENABLEMENT_KEY);
+
+ this.plugin = plugin;
+ }
+
+ public boolean isEnabled() {
+ try {
+ Map<String, String> valueMap = getValueMap();
+ String isEnabled = valueMap.get(REPORT_ENABLEMENT_KEY);
+ return Boolean.valueOf(isEnabled);
+ } catch (Exception e) {
+ return REPORT_ENABLEMENT_DEFAULT;
+ }
+ }
+}
Property changes on: branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/preferences/GlobalUsageReportingSettings.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/preferences/IUsageReportPreferenceConstants.java
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/preferences/IUsageReportPreferenceConstants.java (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/preferences/IUsageReportPreferenceConstants.java 2010-09-02 15:03:44 UTC (rev 24654)
@@ -0,0 +1,46 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is 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:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.usage.preferences;
+
+/**
+ * @author Andre Dietisheim
+ */
+public interface IUsageReportPreferenceConstants {
+
+ /** The value that determines if usage shall be reported if there's no user set setting. */
+ public static final boolean USAGEREPORT_ENABLED_DEFAULTVALUE = false;
+
+ /**
+ * The identifier to be used to identify the value that determines if usage
+ * shall be reported.
+ */
+ public static final String USAGEREPORT_ENABLED_ID = "allow_usage_report_preference"; //$NON-NLS-1$
+
+ /**
+ * The identifier to be used for the value that determines if the user shall
+ * be asked for reporting.
+ */
+ public static final String ASK_USER_USAGEREPORT_ID = "ask_user_for_usage_report_preference"; //$NON-NLS-1$
+
+ /**
+ * The identifier to be used for the value that determines this eclipse
+ * instance.
+ */
+ public static final String ECLIPSE_INSTANCE_ID = "eclipse_instance_id"; //$NON-NLS-1$
+
+ public static final String FIRST_VISIT = "first_visit";
+
+ public static final String LAST_VISIT = "last_visit";
+
+ public static final String VISIT_COUNT = "visit_count";
+
+ public static final boolean ASK_USER_USAGEREPORT_DEFAULTVALUE = true;
+}
Property changes on: branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/preferences/IUsageReportPreferenceConstants.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/preferences/PreferencesMessages.java
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/preferences/PreferencesMessages.java (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/preferences/PreferencesMessages.java 2010-09-02 15:03:44 UTC (rev 24654)
@@ -0,0 +1,29 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is 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:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.usage.preferences;
+
+import org.eclipse.osgi.util.NLS;
+
+public class PreferencesMessages extends NLS {
+ private static final String BUNDLE_NAME = "org.jboss.tools.usage.preferences.messages"; //$NON-NLS-1$
+
+ public static String UsageReportPreferencePage_Description;
+ public static String UsageReportPreferencePage_AllowReporting;
+ public static String UsageReportPreferencePage_Error_Saving;
+
+ static {
+ // initialize resource bundle
+ NLS.initializeMessages(BUNDLE_NAME, PreferencesMessages.class);
+ }
+
+ private PreferencesMessages() {
+ }
+}
Property changes on: branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/preferences/PreferencesMessages.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/preferences/UsageReportPreferenceInitializer.java
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/preferences/UsageReportPreferenceInitializer.java (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/preferences/UsageReportPreferenceInitializer.java 2010-09-02 15:03:44 UTC (rev 24654)
@@ -0,0 +1,31 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is 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:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.usage.preferences;
+
+import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
+import org.jboss.tools.usage.util.PreferencesUtils;
+
+/**
+ * @author Andre Dietisheim
+ */
+public class UsageReportPreferenceInitializer extends
+ AbstractPreferenceInitializer {
+
+ public void initializeDefaultPreferences() {
+ PreferencesUtils.getStore().setDefault(
+ IUsageReportPreferenceConstants.ASK_USER_USAGEREPORT_ID,
+ IUsageReportPreferenceConstants.ASK_USER_USAGEREPORT_DEFAULTVALUE);
+
+ PreferencesUtils.getStore().setDefault(
+ IUsageReportPreferenceConstants.USAGEREPORT_ENABLED_ID,
+ IUsageReportPreferenceConstants.USAGEREPORT_ENABLED_DEFAULTVALUE);
+ }
+}
Property changes on: branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/preferences/UsageReportPreferenceInitializer.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/preferences/UsageReportPreferencePage.java
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/preferences/UsageReportPreferencePage.java (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/preferences/UsageReportPreferencePage.java 2010-09-02 15:03:44 UTC (rev 24654)
@@ -0,0 +1,54 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is 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:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.usage.preferences;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.jface.preference.BooleanFieldEditor;
+import org.eclipse.jface.preference.FieldEditorPreferencePage;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchPreferencePage;
+import org.jboss.tools.usage.internal.JBossToolsUsageActivator;
+import org.jboss.tools.usage.util.StatusUtils;
+import org.osgi.service.prefs.BackingStoreException;
+
+/**
+ * @author Andre Dietisheim
+ */
+public class UsageReportPreferencePage extends FieldEditorPreferencePage implements IWorkbenchPreferencePage {
+
+ public UsageReportPreferencePage() {
+ super(GRID);
+ }
+
+ public void createFieldEditors() {
+ addField(new BooleanFieldEditor(
+ IUsageReportPreferenceConstants.USAGEREPORT_ENABLED_ID
+ , PreferencesMessages.UsageReportPreferencePage_AllowReporting
+ , getFieldEditorParent()));
+ }
+
+ public void init(IWorkbench workbench) {
+ setPreferenceStore(UsageReportPreferences.createPreferenceStore());
+ setDescription(PreferencesMessages.UsageReportPreferencePage_Description);
+ }
+
+ @Override
+ public boolean performOk() {
+ try {
+ UsageReportPreferences.flush();
+ } catch (BackingStoreException e) {
+ IStatus status = StatusUtils.getErrorStatus(JBossToolsUsageActivator.PLUGIN_ID,
+ PreferencesMessages.UsageReportPreferencePage_Error_Saving, e);
+ JBossToolsUsageActivator.getDefault().getLog().log(status);
+ }
+ return super.performOk();
+ }
+}
\ No newline at end of file
Property changes on: branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/preferences/UsageReportPreferencePage.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/preferences/UsageReportPreferences.java
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/preferences/UsageReportPreferences.java (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/preferences/UsageReportPreferences.java 2010-09-02 15:03:44 UTC (rev 24654)
@@ -0,0 +1,60 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is 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:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.usage.preferences;
+
+import org.eclipse.core.runtime.preferences.IEclipsePreferences;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.jboss.tools.usage.internal.JBossToolsUsageActivator;
+import org.jboss.tools.usage.reporting.ReportingMessages;
+import org.jboss.tools.usage.util.PreferencesUtils;
+import org.jboss.tools.usage.util.StatusUtils;
+import org.osgi.service.prefs.BackingStoreException;
+
+public class UsageReportPreferences {
+
+ public static void setEnabled(boolean enabled) {
+ PreferencesUtils.getStore().putValue(
+ IUsageReportPreferenceConstants.USAGEREPORT_ENABLED_ID, String.valueOf(enabled));
+ }
+
+ public static boolean isEnabled() {
+ return PreferencesUtils.getPreferences().getBoolean(
+ IUsageReportPreferenceConstants.USAGEREPORT_ENABLED_ID,
+ IUsageReportPreferenceConstants.USAGEREPORT_ENABLED_DEFAULTVALUE);
+ }
+
+ public static boolean isAskUser() {
+ return PreferencesUtils.getPreferences().getBoolean(
+ IUsageReportPreferenceConstants.ASK_USER_USAGEREPORT_ID,
+ IUsageReportPreferenceConstants.ASK_USER_USAGEREPORT_DEFAULTVALUE);
+ }
+
+ public static void setAskUser(boolean askUser) {
+ try {
+ IEclipsePreferences preferences = PreferencesUtils.getPreferences();
+ preferences.putBoolean(IUsageReportPreferenceConstants.ASK_USER_USAGEREPORT_ID, askUser);
+ preferences.flush();
+ } catch (BackingStoreException e) {
+ JBossToolsUsageActivator.getDefault().getLog().log(
+ StatusUtils.getErrorStatus(JBossToolsUsageActivator.PLUGIN_ID,
+ ReportingMessages.UsageReport_Error_SavePreferences, e,
+ IUsageReportPreferenceConstants.ASK_USER_USAGEREPORT_ID));
+ }
+ }
+
+ public static void flush() throws BackingStoreException {
+ PreferencesUtils.getPreferences().flush();
+ }
+
+ public static IPreferenceStore createPreferenceStore() {
+ return PreferencesUtils.getStore();
+ }
+}
Property changes on: branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/preferences/UsageReportPreferences.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/preferences/messages.properties
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/preferences/messages.properties (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/preferences/messages.properties 2010-09-02 15:03:44 UTC (rev 24654)
@@ -0,0 +1,3 @@
+UsageReportPreferencePage_Description=Preference page with options for anonymous usage data reporting. Usage data is used for statistical matters only.
+UsageReportPreferencePage_AllowReporting=&Allow Red Hat Inc. to report usage anonymously.
+UsageReportPreferencePage_Error_Saving=Could not save the preferences.
Property changes on: branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/preferences/messages.properties
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/reporting/EclipseEnvironment.java
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/reporting/EclipseEnvironment.java (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/reporting/EclipseEnvironment.java 2010-09-02 15:03:44 UTC (rev 24654)
@@ -0,0 +1,270 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is 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:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.usage.reporting;
+
+import java.text.MessageFormat;
+import java.util.Random;
+
+import org.eclipse.core.runtime.IProduct;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.preferences.IEclipsePreferences;
+import org.eclipse.swt.graphics.Rectangle;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.PlatformUI;
+import org.jboss.tools.usage.googleanalytics.AbstractGoogleAnalyticsParameters;
+import org.jboss.tools.usage.googleanalytics.IGoogleAnalyticsParameters;
+import org.jboss.tools.usage.internal.JBossToolsUsageActivator;
+import org.jboss.tools.usage.preferences.IUsageReportPreferenceConstants;
+import org.jboss.tools.usage.util.BundleUtils;
+import org.jboss.tools.usage.util.PreferencesUtils;
+import org.jboss.tools.usage.util.BundleUtils.IBundleEntryFilter;
+import org.osgi.framework.Bundle;
+
+/**
+ * @author Andre Dietisheim
+ */
+public class EclipseEnvironment extends AbstractGoogleAnalyticsParameters implements IGoogleAnalyticsParameters {
+
+ private static final String USERAGENT_WIN = "{0}/{1} (Windows; U; Windows NT 6.1; {2})"; //$NON-NLS-1$
+ private static final String USERAGENT_MAC = "{0}/{1} (Macintosh; U; Intel Mac OS X 10.5; {2})"; //$NON-NLS-1$
+ private static final String USERAGENT_LINUX = "{0}/{1} (X11; U; Linux i686; {2})"; //$NON-NLS-1$
+ private static final char BUNDLE_GROUP_DELIMITER = '-';
+ private static final String JBOSS_TOOLS_BUNDLES_PREFIX = "org\\.jboss\\.tools.+"; //$NON-NLS-1$
+ private static final String ECLIPSE_RUNTIME_BULDEID = "org.eclipse.core.runtime"; //$NON-NLS-1$
+
+ private String screenResolution;
+ private String screenColorDepth;
+ private Random random;
+ private IEclipsePreferences preferences;
+ private String firstVisit;
+ private String lastVisit;
+ private String currentVisit;
+ private long visitCount;
+
+ public EclipseEnvironment(String accountName, String hostName, String referral, IEclipsePreferences preferences) {
+ super(accountName, hostName, referral);
+ this.random = new Random();
+ this.preferences = preferences;
+ initScreenSettings();
+ initVisits();
+ }
+
+ protected void initScreenSettings() {
+ final Display display = getDisplay();
+ display.syncExec(new Runnable() {
+
+ public void run() {
+ screenColorDepth = display.getDepth() + SCREENCOLORDEPTH_POSTFIX;
+
+ Rectangle bounds = display.getBounds();
+ screenResolution = bounds.width + SCREERESOLUTION_DELIMITER + bounds.height;
+ }
+ });
+ }
+
+ private void initVisits() {
+ String currentTime = String.valueOf(System.currentTimeMillis());
+ this.currentVisit = currentTime;
+ this.firstVisit = preferences.get(IUsageReportPreferenceConstants.FIRST_VISIT, null);
+ if (firstVisit == null) {
+ this.firstVisit = currentTime;
+ preferences.put(IUsageReportPreferenceConstants.FIRST_VISIT, firstVisit);
+ }
+ lastVisit = preferences.get(IUsageReportPreferenceConstants.LAST_VISIT, currentTime);
+ visitCount = preferences.getLong(IUsageReportPreferenceConstants.VISIT_COUNT, 1);
+ }
+
+ public String getBrowserLanguage() {
+ String nl = getNL();
+ if (nl == null) {
+ return ""; //$NON-NLS-1$
+ }
+
+ int indexOf = nl.indexOf(JAVA_LOCALE_DELIMITER); //$NON-NLS-1$
+ if (indexOf <= 0) {
+ return nl;
+ }
+
+ StringBuilder builder = new StringBuilder();
+ builder.append(nl.substring(0, indexOf));
+ builder.append(BROWSER_LOCALE_DELIMITER);
+ builder.append(nl.substring(indexOf + 1));
+ return builder.toString();
+ }
+
+ protected String getNL() {
+ return Platform.getNL(); //$NON-NLS-1$
+ }
+
+ public String getScreenResolution() {
+ return screenResolution;
+ }
+
+ public String getScreenColorDepth() {
+ return screenColorDepth;
+ }
+
+ protected Display getDisplay() {
+ if (PlatformUI.isWorkbenchRunning()) {
+ return PlatformUI.getWorkbench().getDisplay();
+ }
+
+ Display display = Display.getCurrent();
+ if (display == null) {
+ display = Display.getDefault();
+ }
+ return display;
+ }
+
+ public String getUserAgent() {
+
+ String productId = getApplicationName();
+ String productVersion = getApplicationVersion();
+ String browserLanguage = getBrowserLanguage();
+
+ /**
+ * Google API for android: this.userAgent = String.format(
+ * "GoogleAnalytics/%s (Linux; U; Android %s; %s-%s; %s; Build/%s)" ,
+ * new Object[] { "1.0" , Build.VERSION.RELEASE ,
+ * (localLocale.getLanguage() != null) ?
+ * localLocale.getLanguage().toLowerCase() : "en" ,
+ * (localLocale.getCountry() != null) ?
+ * localLocale.getCountry().toLowerCase() : "" , Build.MODEL, Build.ID
+ * });
+ */
+
+ return MessageFormat.format(
+ getUserAgentPattern(getOS())
+ , productId
+ , productVersion
+ , browserLanguage
+ );
+ }
+
+ private String getUserAgentPattern(String os) {
+ String userAgentPattern = ""; //$NON-NLS-1$
+ /*
+ * TODO: implement architecture (i686, x86_64 etc.), Windows version, MacOS version etc.
+ */
+ if (Platform.OS_LINUX.equals(os)) {
+ return USERAGENT_LINUX; //$NON-NLS-1$
+ } else if (Platform.OS_MACOSX.equals(os)) {
+ return USERAGENT_MAC; //$NON-NLS-1$
+ } else if (Platform.OS_WIN32.equals(os)) {
+ return USERAGENT_WIN; //$NON-NLS-1$
+ }
+ return userAgentPattern;
+ }
+
+ protected String getOS() {
+ return Platform.getOS();
+ }
+
+ protected String getApplicationName() {
+ return getApplicationBundle().getSymbolicName();
+ }
+
+ protected String getApplicationVersion() {
+ String fullVersion = getApplicationBundle().getVersion().toString();
+ int productVersionStart = fullVersion.lastIndexOf(VERSION_DELIMITER);
+ if (productVersionStart > 0) {
+ return fullVersion.substring(0, productVersionStart);
+ } else {
+ return fullVersion;
+ }
+ }
+
+ /**
+ * Returns the bundle that launched the application that this class runs in.
+ *
+ * @return the defining bundle
+ */
+ private Bundle getApplicationBundle() {
+ IProduct product = Platform.getProduct();
+ if (product != null) {
+ return product.getDefiningBundle();
+ } else {
+ return Platform.getBundle(ECLIPSE_RUNTIME_BULDEID);
+ }
+ }
+
+ public String getUserId() {
+ String userId = preferences.get(IUsageReportPreferenceConstants.ECLIPSE_INSTANCE_ID, null);
+ if (userId == null) {
+ userId = createIdentifier();
+ preferences.put(IUsageReportPreferenceConstants.ECLIPSE_INSTANCE_ID, userId);
+ PreferencesUtils.checkedSavePreferences(preferences, JBossToolsUsageActivator.getDefault(), ReportingMessages.EclipseEnvironment_Error_SavePreferences);
+ }
+ return userId;
+ }
+
+ /**
+ * Creates an unique identifier.
+ *
+ * @return the identifier
+ */
+ private String createIdentifier() {
+ StringBuilder builder = new StringBuilder();
+ builder.append(Math.abs(random.nextLong()));
+ builder.append(System.currentTimeMillis());
+ return builder.toString();
+ }
+
+ public String getKeyword() {
+ JBossBundleGroups jbossBundleGroups = new JBossBundleGroups();
+ IBundleEntryFilter jbossToolsFilter = new BundleUtils.BundleSymbolicNameFilter(JBOSS_TOOLS_BUNDLES_PREFIX);
+ IBundleEntryFilter compositeFilter = new BundleUtils.CompositeFilter(
+ jbossToolsFilter
+ , jbossBundleGroups);
+ BundleUtils.getBundles(compositeFilter, getBundles());
+
+ return bundleGroupsToKeywordString(jbossBundleGroups);
+ }
+
+ protected Bundle[] getBundles() {
+ return JBossToolsUsageActivator.getDefault().getBundle().getBundleContext().getBundles();
+ }
+
+ private String bundleGroupsToKeywordString(JBossBundleGroups jbossBundleGroups) {
+ char delimiter = BUNDLE_GROUP_DELIMITER;
+ StringBuilder builder = new StringBuilder();
+ for (String bundleGroupId : jbossBundleGroups.getBundleGroupIds()) {
+ builder.append(bundleGroupId)
+ .append(delimiter);
+ }
+ return builder.toString();
+ }
+
+ public String getCurrentVisit() {
+ return currentVisit;
+ }
+
+ public String getFirstVisit() {
+ return firstVisit;
+ }
+
+ public String getLastVisit() {
+ return lastVisit;
+ }
+
+ public long getVisitCount() {
+ return visitCount;
+ }
+
+ public void visit() {
+ lastVisit = currentVisit;
+ preferences.put(IUsageReportPreferenceConstants.LAST_VISIT, lastVisit);
+ currentVisit = String.valueOf(System.currentTimeMillis());
+ visitCount++;
+ preferences.putLong(IUsageReportPreferenceConstants.VISIT_COUNT, visitCount);
+ PreferencesUtils.checkedSavePreferences(preferences, JBossToolsUsageActivator.getDefault(), ReportingMessages.EclipseEnvironment_Error_SavePreferences);
+ }
+}
Property changes on: branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/reporting/EclipseEnvironment.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/reporting/JBossBundleGroups.java
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/reporting/JBossBundleGroups.java (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/reporting/JBossBundleGroups.java 2010-09-02 15:03:44 UTC (rev 24654)
@@ -0,0 +1,223 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is 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:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.usage.reporting;
+
+import java.util.Collection;
+import java.util.Set;
+import java.util.TreeSet;
+
+import org.jboss.tools.usage.util.BundleUtils.IBundleEntryFilter;
+import org.osgi.framework.Bundle;
+
+/**
+ * @author Andre Dietisheim
+ */
+public class JBossBundleGroups implements IBundleEntryFilter {
+
+ public enum BundleGroup {
+ ARCHIVES("org.jboss.ide.eclipse.archives.core",
+ "org.jboss.ide.eclipse.archives.jdt.integration",
+ "org.jboss.ide.eclipse.archives.ui"
+ )
+ , AS("org.jboss.ide.eclipse.archives.webtools",
+ "org.jboss.ide.eclipse.as.classpath.core",
+ "org.jboss.ide.eclipse.as.classpath.ui",
+ "org.jboss.ide.eclipse.as.core",
+ "org.jboss.ide.eclipse.as.doc.user",
+ "org.jboss.ide.eclipse.as.ssh",
+ "org.jboss.ide.eclipse.as.ui",
+ "org.jboss.ide.eclipse.as.ui.mbeans",
+ "org.jboss.ide.eclipse.as.wtp.core",
+ "org.jboss.ide.eclipse.as.wtp.ui")
+ , BIRT("org.jboss.tools.birt.core",
+ "org.jboss.tools.birt.oda",
+ "org.jboss.tools.birt.oda.ui")
+ , BPEL("org.eclipse.bpel.apache.ode.deploy.model",
+ "org.eclipse.bpel.apache.ode.deploy.ui",
+ "org.eclipse.bpel.common.model",
+ "org.eclipse.bpel.common.ui",
+ "org.eclipse.bpel.model",
+ "org.eclipse.bpel.ui",
+ "org.eclipse.bpel.validator",
+ "org.eclipse.bpel.wsil.model",
+ "org.eclipse.bpel.xpath10",
+ "org.jboss.tools.bpel.cheatsheet",
+ "org.jboss.tools.bpel.runtimes")
+ , CDI("org.jboss.tools.cdi.core",
+ "org.jboss.tools.cdi.text.ext",
+ "org.jboss.tools.cdi.ui",
+ "org.jboss.tools.cdi.xml",
+ "org.jboss.tools.cdi.xml.ui")
+ , DELTACLOUD("org.jboss.tools.deltacloud.core",
+ "org.jboss.tools.deltacloud.ui")
+ , DROOLS("org.drools.eclipse",
+ "org.drools.eclipse.task",
+ "org.eclipse.webdav",
+ "org.guvnor.tools",
+ "org.jboss.tools.flow.ruleflow")
+ , ESB("org.jboss.tools.esb.core",
+ "org.jboss.tools.esb.project.core",
+ "org.jboss.tools.esb.project.ui",
+ "org.jboss.tools.esb.ui",
+ "org.jboss.tools.esb.validator")
+ , FLOW("org.jboss.tools.flow.common")
+ , FREEMARKER("org.jboss.ide.eclipse.freemarker")
+ , GWT("org.jboss.tools.gwt.core",
+ "org.jboss.tools.gwt.ui")
+ , HIBERNATETOOLS("org.hibernate.eclipse",
+ "org.hibernate.eclipse.console",
+ "org.hibernate.eclipse.help",
+ "org.hibernate.eclipse.jdt.apt.ui",
+ "org.hibernate.eclipse.jdt.ui",
+ "org.hibernate.eclipse.mapper",
+ "org.jboss.tools.hibernate.jpt.core",
+ "org.jboss.tools.hibernate.jpt.ui",
+ "org.jboss.tools.hibernate.ui",
+ "org.jboss.tools.hibernate.xml",
+ "org.jboss.tools.hibernate.xml.ui")
+ , JBPM("org.jboss.tools.flow.jpdl4",
+ "org.jboss.tools.flow.jpdl4.multipage",
+ "org.jboss.tools.jbpm.common",
+ "org.jboss.tools.jbpm.convert",
+ "org.jbpm.gd.jpdl")
+ , JMX("org.jboss.tools.jmx.core",
+ "org.jboss.tools.jmx.ui")
+ , JSF("org.jboss.tools.jsf",
+ "org.jboss.tools.jsf.doc.user",
+ "org.jboss.tools.jsf.text.ext",
+ "org.jboss.tools.jsf.text.ext.facelets",
+ "org.jboss.tools.jsf.text.ext.richfaces",
+ "org.jboss.tools.jsf.ui",
+ "org.jboss.tools.jsf.verification",
+ "org.jboss.tools.jsf.vpe.ajax4jsf",
+ "org.jboss.tools.jsf.vpe.facelets",
+ "org.jboss.tools.jsf.vpe.jbpm",
+ "org.jboss.tools.jsf.vpe.jsf",
+ "org.jboss.tools.jsf.vpe.jstl",
+ "org.jboss.tools.jsf.vpe.myfaces",
+ "org.jboss.tools.jsf.vpe.richfaces",
+ "org.jboss.tools.jsf.vpe.seam")
+ , JST("org.jboss.tools.jst.css",
+ "org.jboss.tools.jst.firstrun",
+ "org.jboss.tools.jst.jsp",
+ "org.jboss.tools.jst.text.ext",
+ "org.jboss.tools.jst.web",
+ "org.jboss.tools.jst.web.kb",
+ "org.jboss.tools.jst.web.tiles",
+ "org.jboss.tools.jst.web.tiles.ui",
+ "org.jboss.tools.jst.web.ui",
+ "org.jboss.tools.jst.web.verification")
+ , LABS("org.jboss.tools.labs.pde.sourceprovider")
+ , MAVEN("org.jboss.tools.maven.cdi",
+ "org.jboss.tools.maven.core",
+ "org.jboss.tools.maven.hibernate",
+ "org.jboss.tools.maven.jsf",
+ "org.jboss.tools.maven.portlet",
+ "org.jboss.tools.maven.seam",
+ "org.jboss.tools.maven.ui")
+ , MODESHAPE("org.jboss.tools.modeshape.rest")
+ , PORTLET("org.jboss.tools.portlet.core",
+ "org.jboss.tools.portlet.ui")
+ , PROFILER("org.jboss.tools.profiler.ui")
+ , RUNTIME("org.jboss.tools.runtime")
+ , SEAM("org.jboss.tools.seam.core",
+ "org.jboss.tools.seam.doc.user",
+ "org.jboss.tools.seam.pages.xml",
+ "org.jboss.tools.seam.text.ext",
+ "org.jboss.tools.seam.ui",
+ "org.jboss.tools.seam.ui.pages",
+ "org.jboss.tools.seam.xml",
+ "org.jboss.tools.seam.xml.ui")
+ , SMOOKS("org.jboss.tools.smooks.core",
+ "org.jboss.tools.smooks.runtime",
+ "org.jboss.tools.smooks.templating",
+ "org.jboss.tools.smooks.ui")
+ , STRUTS("org.jboss.tools.struts",
+ "org.jboss.tools.struts.text.ext",
+ "org.jboss.tools.struts.ui",
+ "org.jboss.tools.struts.validator.ui",
+ "org.jboss.tools.struts.verification",
+ "org.jboss.tools.struts.vpe.struts")
+ , TPTP("org.jboss.tools.eclipse.as.tptp")
+ , VPE("org.jboss.tools.vpe",
+ "org.jboss.tools.vpe.docbook",
+ "org.jboss.tools.vpe.html",
+ "org.jboss.tools.vpe.jsp",
+ "org.jboss.tools.vpe.resref",
+ "org.jboss.tools.vpe.spring",
+ "org.jboss.tools.vpe.ui.palette",
+ "org.jboss.tools.vpe.xulrunner",
+ "org.jboss.tools.xulrunner",
+ "org.jboss.tools.xulrunner.initializer")
+ , WORKINGSET("org.jboss.tools.workingset.core",
+ "org.jboss.tools.workingset.ui")
+ , WS("rg.jboss.tools.ws.core",
+ "org.jboss.tools.ws.creation.core",
+ "org.jboss.tools.ws.creation.ui",
+ "org.jboss.tools.ws.ui")
+ , XULRUNNER("org.mozilla.xpcom",
+ "org.mozilla.xulrunner.carbon.macosx",
+ "org.mozilla.xulrunner.cocoa.macosx",
+ "org.mozilla.xulrunner.gtk.linux.x86",
+ "org.mozilla.xulrunner.gtk.linux.x86_64",
+ "org.mozilla.xulrunner.win32.win32.x86");
+
+ private String[] bundleNames;
+
+ BundleGroup(String... bundleNames) {
+ this.bundleNames = bundleNames;
+ }
+
+ /**
+ * Returns <tt>true</tt> if the given bundle name is a member of this
+ * bundle group.
+ *
+ * @param bundleName
+ * the bundle name to check whether it's a member of this
+ * group of bundles.
+ * @return <tt>true</tt>, if the given bundle
+ */
+ public boolean isMember(String bundleName) {
+ boolean isMember = false;
+ for (String name : bundleNames) {
+ if (name.equals(bundleName)) {
+ return true;
+ }
+ }
+ return isMember;
+ }
+
+ public void addGroupIdTo(Collection<String> bundleGroupIds) {
+ bundleGroupIds.add(name());
+ }
+ }
+
+ private Set<String> jbossBundleGroups = new TreeSet<String>();
+
+ /**
+ * Collects the bundle groups the bundles it gets belong
+ * to. Always returns <tt>true</tt> (does match) while collecting
+ */
+ public boolean matches(Bundle bundle) {
+ String bundleName = bundle.getSymbolicName();
+ for (BundleGroup bundleGroup : BundleGroup.values()) {
+ if (bundleGroup.isMember(bundleName)) {
+ jbossBundleGroups.add(bundleGroup.name());
+ break;
+ }
+ }
+ return true;
+ }
+
+ public Collection<String> getBundleGroupIds() {
+ return jbossBundleGroups;
+ }
+}
\ No newline at end of file
Property changes on: branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/reporting/JBossBundleGroups.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/reporting/ReportingMessages.java
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/reporting/ReportingMessages.java (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/reporting/ReportingMessages.java 2010-09-02 15:03:44 UTC (rev 24654)
@@ -0,0 +1,36 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is 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:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.usage.reporting;
+
+import org.eclipse.osgi.util.NLS;
+
+public class ReportingMessages extends NLS {
+ private static final String BUNDLE_NAME = "org.jboss.tools.usage.reporting.messages"; //$NON-NLS-1$
+ public static String EclipseEnvironment_Error_SavePreferences;
+
+ public static String UsageReport_Reporting_Usage;
+ public static String UsageReport_Querying_Enablement;
+ public static String UsageReport_Asking_User;
+ public static String UsageReport_Checkbox_Text;
+ public static String UsageReport_DialogMessage;
+ public static String UsageReport_DialogTitle;
+
+ public static String UsageReport_Error_SavePreferences;
+ public static String UsageReport_GoogleAnalyticsAccount;
+ public static String UsageReport_HostName;
+ static {
+ // initialize resource bundle
+ NLS.initializeMessages(BUNDLE_NAME, ReportingMessages.class);
+ }
+
+ private ReportingMessages() {
+ }
+}
Property changes on: branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/reporting/ReportingMessages.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/reporting/UsageReport.java
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/reporting/UsageReport.java (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/reporting/UsageReport.java 2010-09-02 15:03:44 UTC (rev 24654)
@@ -0,0 +1,177 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is 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:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.usage.reporting;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.jobs.IJobChangeEvent;
+import org.eclipse.core.runtime.jobs.IJobChangeListener;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.jface.window.Window;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.progress.UIJob;
+import org.jboss.tools.usage.FocusPoint;
+import org.jboss.tools.usage.HttpGetRequest;
+import org.jboss.tools.usage.IHttpGetRequest;
+import org.jboss.tools.usage.ILoggingAdapter;
+import org.jboss.tools.usage.ITracker;
+import org.jboss.tools.usage.IURLBuildingStrategy;
+import org.jboss.tools.usage.PluginLogger;
+import org.jboss.tools.usage.Tracker;
+import org.jboss.tools.usage.googleanalytics.GoogleAnalyticsUrlStrategy;
+import org.jboss.tools.usage.googleanalytics.IGoogleAnalyticsParameters;
+import org.jboss.tools.usage.internal.JBossToolsUsageActivator;
+import org.jboss.tools.usage.preferences.GlobalUsageReportingSettings;
+import org.jboss.tools.usage.preferences.UsageReportPreferences;
+import org.jboss.tools.usage.util.PreferencesUtils;
+import org.jboss.tools.usage.util.StatusUtils;
+import org.osgi.service.prefs.BackingStoreException;
+
+/**
+ * @author Andre Dietisheim
+ */
+public class UsageReport {
+
+ private static final String GANALYTICS_ACCOUNTNAME = ReportingMessages.UsageReport_GoogleAnalyticsAccount;
+
+ private static final String HOST_NAME = ReportingMessages.UsageReport_HostName;
+
+ private FocusPoint focusPoint = new FocusPoint("tools") //$NON-NLS-1$
+ .setChild(new FocusPoint("usage") //$NON-NLS-1$
+ .setChild(new FocusPoint("action") //$NON-NLS-1$
+ .setChild(new FocusPoint("wsstartup")))); //$NON-NLS-1$
+
+ private GlobalUsageReportingSettings globalSettings = new GlobalUsageReportingSettings(JBossToolsUsageActivator
+ .getDefault());
+
+ public void report() {
+ new ReportingJob().schedule();
+ }
+
+ private void askUser() {
+ UsageReportEnablementDialog dialog = new UsageReportEnablementDialog(
+ true,
+ PlatformUI.getWorkbench().getActiveWorkbenchWindow());
+ if (dialog.open() == Window.OK) {
+ UsageReportPreferences.setEnabled(dialog.isReportEnabled());
+ UsageReportPreferences.setAskUser(false);
+ flushPreferences();
+ }
+ }
+
+ private void flushPreferences() {
+ try {
+ UsageReportPreferences.flush();
+ } catch (BackingStoreException e) {
+ IStatus status = StatusUtils.getErrorStatus(JBossToolsUsageActivator.PLUGIN_ID,
+ ReportingMessages.UsageReport_Error_SavePreferences, e);
+ JBossToolsUsageActivator.getDefault().getLog().log(status);
+ }
+ }
+
+ private void doReport() {
+ if (UsageReportPreferences.isEnabled()) {
+ getTracker().trackAsynchronously(focusPoint);
+ }
+ }
+
+ private ITracker getTracker() {
+ IGoogleAnalyticsParameters eclipseEnvironment = new EclipseEnvironment(
+ GANALYTICS_ACCOUNTNAME
+ , HOST_NAME
+ , IGoogleAnalyticsParameters.VALUE_NO_REFERRAL
+ , PreferencesUtils.getPreferences());
+ ILoggingAdapter loggingAdapter = new PluginLogger(JBossToolsUsageActivator.getDefault());
+ IURLBuildingStrategy urlStrategy = new GoogleAnalyticsUrlStrategy(eclipseEnvironment);
+ IHttpGetRequest httpGetRequest = new HttpGetRequest(eclipseEnvironment.getUserAgent(), loggingAdapter);
+ return new Tracker(urlStrategy, httpGetRequest, loggingAdapter);
+ }
+
+ private class ReportingJob extends Job {
+ private ReportingJob() {
+ super(ReportingMessages.UsageReport_Reporting_Usage);
+ }
+
+ @Override
+ protected IStatus run(IProgressMonitor monitor) {
+ if (monitor.isCanceled()) {
+ return Status.CANCEL_STATUS;
+ }
+ monitor.beginTask(ReportingMessages.UsageReport_Querying_Enablement, 2);
+ if (globalSettings.isEnabled()) {
+ if (monitor.isCanceled()) {
+ return Status.CANCEL_STATUS;
+ }
+ monitor.worked(1);
+ if (UsageReportPreferences.isAskUser()) {
+ if (monitor.isCanceled()) {
+ return Status.CANCEL_STATUS;
+ }
+ askUserAndReport();
+ } else {
+ if (monitor.isCanceled()) {
+ return Status.CANCEL_STATUS;
+ }
+ doReport();
+ }
+ monitor.worked(2);
+ monitor.done();
+ }
+ return Status.OK_STATUS;
+ }
+
+ private void askUserAndReport() {
+ Job askUserJob = new AskUserJob();
+ askUserJob.addJobChangeListener(new IJobChangeListener() {
+
+ public void sleeping(IJobChangeEvent event) {
+ // ignore
+ }
+
+ public void scheduled(IJobChangeEvent event) {
+ // ignore
+ }
+
+ public void running(IJobChangeEvent event) {
+ // ignore
+ }
+
+ public void done(IJobChangeEvent event) {
+ doReport();
+ }
+
+ public void awake(IJobChangeEvent event) {
+ // ignore
+ }
+
+ public void aboutToRun(IJobChangeEvent event) {
+ // ignore
+ }
+ });
+ askUserJob.setUser(true);
+ askUserJob.setPriority(Job.SHORT);
+ askUserJob.schedule();
+ }
+ }
+
+ private class AskUserJob extends UIJob {
+ private AskUserJob() {
+ super(ReportingMessages.UsageReport_Asking_User);
+ }
+
+ @Override
+ public IStatus runInUIThread(IProgressMonitor monitor) {
+ askUser();
+ return Status.OK_STATUS;
+ }
+ }
+}
Property changes on: branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/reporting/UsageReport.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/reporting/UsageReportDispatcher.java
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/reporting/UsageReportDispatcher.java (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/reporting/UsageReportDispatcher.java 2010-09-02 15:03:44 UTC (rev 24654)
@@ -0,0 +1,29 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is 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:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.usage.reporting;
+
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.IStartup;
+
+/**
+ * @author Andre Dieitsheim
+ */
+public class UsageReportDispatcher implements IStartup {
+
+ public void earlyStartup() {
+ Display.getDefault().asyncExec(new Runnable() {
+
+ public void run() {
+ new UsageReport().report();
+ }
+ });
+ }
+}
Property changes on: branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/reporting/UsageReportDispatcher.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/reporting/UsageReportEnablementDialog.java
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/reporting/UsageReportEnablementDialog.java (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/reporting/UsageReportEnablementDialog.java 2010-09-02 15:03:44 UTC (rev 24654)
@@ -0,0 +1,95 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is 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:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.usage.reporting;
+
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.layout.GridDataFactory;
+import org.eclipse.jface.window.IShellProvider;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Link;
+import org.eclipse.swt.widgets.Shell;
+import org.jboss.tools.usage.internal.JBossToolsUsageActivator;
+import org.jboss.tools.usage.util.BrowserUtil;
+
+/**
+ * @author Andre Dietisheim
+ */
+public class UsageReportEnablementDialog extends Dialog {
+
+ protected static final String USAGE_URL = "http://jboss.org/tools/usage"; // $NON
+ private Button checkBox;
+ private boolean reportEnabled;
+
+ public UsageReportEnablementDialog(boolean reportEnabled, IShellProvider parentShell) {
+ super(parentShell);
+ this.reportEnabled = reportEnabled;
+ }
+
+ protected void buttonPressed(int buttonId) {
+ if (buttonId == IDialogConstants.OK_ID) {
+ this.reportEnabled = checkBox.getSelection();
+ } else if (buttonId == IDialogConstants.CANCEL_ID) {
+ this.reportEnabled = false;
+ }
+ super.buttonPressed(buttonId);
+ }
+
+ protected void configureShell(Shell shell) {
+ super.configureShell(shell);
+ shell.setText(ReportingMessages.UsageReport_DialogTitle);
+ }
+
+ protected void createButtonsForButtonBar(Composite parent) {
+ createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true);
+ createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false);
+ checkBox.setFocus();
+ checkBox.setSelection(reportEnabled);
+ }
+
+ protected Control createDialogArea(Composite parent) {
+ Composite composite = (Composite) super.createDialogArea(parent);
+
+ // message
+ Link link = new Link(composite, SWT.WRAP);
+ link.setFont(parent.getFont());
+ link.setText(ReportingMessages.UsageReport_DialogMessage);
+ link.addSelectionListener(new SelectionAdapter() {
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ BrowserUtil.checkedCreateExternalBrowser(USAGE_URL, JBossToolsUsageActivator.PLUGIN_ID, JBossToolsUsageActivator.getDefault().getLog());
+ }
+ });
+ GridDataFactory.fillDefaults()
+ .align(SWT.FILL, SWT.CENTER)
+ .grab(true, false)
+ .hint(IDialogConstants.MINIMUM_MESSAGE_AREA_WIDTH, SWT.DEFAULT)
+ .applyTo(link);
+
+ // checkbox
+ checkBox = new Button(composite, SWT.CHECK);
+ checkBox.setText(ReportingMessages.UsageReport_Checkbox_Text);
+ GridDataFactory.fillDefaults().grab(true, false).align(SWT.LEFT, SWT.CENTER).applyTo(checkBox);
+
+ applyDialogFont(composite);
+
+ return composite;
+ }
+
+ public boolean isReportEnabled() {
+ return reportEnabled;
+ }
+}
Property changes on: branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/reporting/UsageReportEnablementDialog.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/reporting/messages.properties
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/reporting/messages.properties (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/reporting/messages.properties 2010-09-02 15:03:44 UTC (rev 24654)
@@ -0,0 +1,10 @@
+EclipseEnvironment_Error_SavePreferences=Could not sage {0} to preferences.
+UsageReport_Reporting_Usage=Reporting JBoss Tools usage
+UsageReport_Querying_Enablement=Querying whether reporting is globally enabled
+UsageReport_Asking_User=Asking User to allow reporting
+UsageReport_Checkbox_Text=Report usage of JBoss Tools to JBoss Tools team.
+UsageReport_DialogMessage=Please allow the JBoss Tools team to receive anonymous usage statistics for this Eclipse installation with JBoss tools (<a>info</a>).
+UsageReport_DialogTitle=JBoss Tools Usage
+UsageReport_Error_SavePreferences=Could not save preferences {0}
+UsageReport_GoogleAnalyticsAccount=UA-17645367-1
+UsageReport_HostName=jboss.org
Property changes on: branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/reporting/messages.properties
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/util/BrowserUtil.java
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/util/BrowserUtil.java (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/util/BrowserUtil.java 2010-09-02 15:03:44 UTC (rev 24654)
@@ -0,0 +1,71 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is 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:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.usage.util;
+
+import java.net.MalformedURLException;
+import java.net.URL;
+
+import org.eclipse.core.runtime.ILog;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.browser.IWebBrowser;
+
+public class BrowserUtil {
+
+ /**
+ * Opens a browser for the given url with the given id. If an error occurs
+ * it will be reported to the given log provider with the given plugin id.
+ *
+ * @param url
+ * the url to open a browser for.
+ * @param browserId
+ * the id for the new browser.
+ * @param pluginId
+ * the plugin id to log for.
+ * @param log
+ * the log provider to log against if an error occurred.
+ */
+ public static void checkedCreateInternalBrowser(String url, String browserId, String pluginId, ILog log) {
+ try {
+ openUrl(url, PlatformUI.getWorkbench().getBrowserSupport().createBrowser(browserId), pluginId, log);
+ } catch (PartInitException e) {
+ IStatus errorStatus = StatusUtils.getErrorStatus(pluginId, "Could not open browser for url \"{0}\".", e,
+ url);
+ log.log(errorStatus);
+ }
+ }
+
+
+ public static void checkedCreateExternalBrowser(String url, String pluginId, ILog log) {
+ try {
+ openUrl(url, PlatformUI.getWorkbench().getBrowserSupport().getExternalBrowser(), pluginId, log);
+ } catch (PartInitException e) {
+ IStatus errorStatus = StatusUtils.getErrorStatus(pluginId, "Could not open browser for url \"{0}\".", e,
+ url);
+ log.log(errorStatus);
+ }
+ }
+
+ public static void openUrl(String url, IWebBrowser browser, String pluginId, ILog log) {
+ try {
+ browser.openURL(new URL(url));
+ } catch (PartInitException e) {
+ IStatus errorStatus = StatusUtils.getErrorStatus(pluginId, "Could not open browser for url \"{0}\".", e,
+ url);
+ log.log(errorStatus);
+ } catch (MalformedURLException e) {
+ IStatus errorStatus = StatusUtils.getErrorStatus(pluginId, "Could not display malformed url \"{0}\".", e,
+ url);
+ log.log(errorStatus);
+ }
+ }
+}
Property changes on: branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/util/BrowserUtil.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/util/BundleUtils.java
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/util/BundleUtils.java (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/util/BundleUtils.java 2010-09-02 15:03:44 UTC (rev 24654)
@@ -0,0 +1,118 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is 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:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.usage.util;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.regex.Pattern;
+
+import org.eclipse.core.runtime.Assert;
+import org.osgi.framework.Bundle;
+
+/**
+ * @author Andre Dietisheim
+ */
+public class BundleUtils {
+
+ /**
+ * Returns the bundles among the available ones that match the given filter.
+ *
+ * @param filter the filter to match the available bundles against
+ * @param bundles the bundles
+ * @return the bundles that match the given filter
+ */
+ public static List<Bundle> getBundles(IBundleEntryFilter filter, Bundle[] bundles) {
+ List<Bundle> bundleList = new ArrayList<Bundle>();
+ for (Bundle bundle : bundles) {
+ if (filter.matches(bundle)) {
+ bundleList.add(bundle);
+ }
+ }
+ return bundleList;
+ }
+
+ /**
+ * Returns the bundles that have a symbolic name that match the given regex.
+ *
+ * @param bundleSymbolicNameRegex the symbolic name regex to match.
+ * @param bundles the bundles
+ * @return the bundles
+ */
+ public static List<Bundle> getBundles(String bundleSymbolicNameRegex, Bundle[] bundles) {
+ return getBundles(new BundleSymbolicNameFilter(bundleSymbolicNameRegex), bundles);
+ }
+
+ /**
+ * A filter that matches bundles against a given symbolic name regex.
+ */
+ public static class BundleSymbolicNameFilter implements IBundleEntryFilter {
+
+ private Pattern pattern;
+
+ public BundleSymbolicNameFilter(String symbolicNameRegex) {
+ this.pattern = Pattern.compile(symbolicNameRegex);
+ }
+
+ public boolean matches(Bundle bundle) {
+ Assert.isTrue(bundle != null);
+
+ return pattern.matcher(bundle.getSymbolicName()).matches();
+ }
+
+ }
+
+ /**
+ * A filter that applies several given filters
+ */
+ public static class CompositeFilter implements IBundleEntryFilter {
+
+ private IBundleEntryFilter filters[];
+
+ /**
+ * Instantiates a new composite filter that applies several given
+ * filters.
+ *
+ * @param filters
+ * the filters
+ */
+ public CompositeFilter(IBundleEntryFilter... filters) {
+ this.filters = filters;
+ }
+
+ /**
+ * Applies the filters this composite filter has. All filters have to
+ * match so that the filter says the given bundle matches.
+ */
+ public boolean matches(Bundle bundle) {
+ for (IBundleEntryFilter filter : filters) {
+ if (!filter.matches(bundle)) {
+ return false;
+ }
+ }
+ return true;
+ }
+ }
+
+ /**
+ * The Interface IBundleEntryFilter.
+ */
+ public static interface IBundleEntryFilter {
+
+ /**
+ * Matches.
+ *
+ * @param bundle
+ * the bundle
+ * @return true, if successful
+ */
+ public boolean matches(Bundle bundle);
+ }
+}
Property changes on: branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/util/BundleUtils.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/util/HttpEncodingUtils.java
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/util/HttpEncodingUtils.java (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/util/HttpEncodingUtils.java 2010-09-02 15:03:44 UTC (rev 24654)
@@ -0,0 +1,61 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is 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:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.usage.util;
+
+import java.io.UnsupportedEncodingException;
+import java.net.URLEncoder;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+/**
+ * @author Andre Dietisheim
+ */
+public class HttpEncodingUtils {
+
+ private static final String ENCODING_UTF8 = "UTF-8";
+
+ private static Pattern CHARSET_ENCODING_PATTERN = Pattern.compile("charset=(.+)");
+
+ /**
+ * Encodes the given string in utf8 while catching exceptions that may
+ * occur. If an encoding exception occurs, <tt>null</tt> is returned
+ *
+ * @param aString
+ * the a string to be encoded
+ * @return the encoded string or <tt>null</tt> if an error occured while
+ * encoding
+ */
+ public static String checkedEncodeUtf8(String aString) {
+ try {
+ return URLEncoder.encode(aString, ENCODING_UTF8);
+ } catch (UnsupportedEncodingException e) {
+ return aString;
+ }
+ }
+
+ /**
+ * Returns the charset indicated in the content-type field of the http
+ * header. Returns <tt>null</tt> if none is indicated.
+ *
+ * @param contentType
+ * the content type
+ * @return the content type charset or <tt>null</tt>
+ */
+ public static String getContentTypeCharset(String contentType) {
+ Matcher matcher = CHARSET_ENCODING_PATTERN.matcher(contentType);
+ if (!matcher.find()) {
+ return null;
+ }
+
+ return matcher.group(1);
+ }
+
+}
Property changes on: branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/util/HttpEncodingUtils.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/util/PreferencesUtils.java
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/util/PreferencesUtils.java (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/util/PreferencesUtils.java 2010-09-02 15:03:44 UTC (rev 24654)
@@ -0,0 +1,48 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is 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:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.usage.util;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Plugin;
+import org.eclipse.core.runtime.preferences.ConfigurationScope;
+import org.eclipse.core.runtime.preferences.IEclipsePreferences;
+import org.eclipse.jface.preference.IPersistentPreferenceStore;
+import org.eclipse.ui.preferences.ScopedPreferenceStore;
+import org.jboss.tools.usage.internal.JBossToolsUsageActivator;
+import org.jboss.tools.usage.reporting.ReportingMessages;
+import org.osgi.service.prefs.BackingStoreException;
+
+public class PreferencesUtils {
+
+ private PreferencesUtils() {
+ // inhibit instantiation
+ }
+
+ public static IEclipsePreferences getPreferences() {
+ return new ConfigurationScope().getNode(JBossToolsUsageActivator.PLUGIN_ID);
+ }
+
+ public static IPersistentPreferenceStore getStore() {
+ return new ScopedPreferenceStore(new ConfigurationScope(), JBossToolsUsageActivator.PLUGIN_ID);
+ }
+
+ public static void checkedSavePreferences(IEclipsePreferences preferences, Plugin plugin, String message) {
+ try {
+ preferences.flush();
+ } catch (BackingStoreException e) {
+ IStatus status = StatusUtils.getErrorStatus(plugin.getBundle().getSymbolicName(),
+ ReportingMessages.EclipseEnvironment_Error_SavePreferences,
+ e, message);
+ plugin.getLog().log(status);
+ }
+
+ }
+}
Property changes on: branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/util/PreferencesUtils.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/util/StatusUtils.java
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/util/StatusUtils.java (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/util/StatusUtils.java 2010-09-02 15:03:44 UTC (rev 24654)
@@ -0,0 +1,84 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is 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:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.usage.util;
+
+import java.text.MessageFormat;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+
+/**
+ * @author Andre Dietisheim
+ */
+public class StatusUtils {
+
+ private StatusUtils() {
+ // inhibit instantiation
+ }
+
+ /**
+ * Returns an error status for a given plugin id, message and arguments.
+ *
+ * @param pluginId
+ * the plugin id
+ * @param message
+ * the message
+ * @param throwable
+ * the throwable
+ * @param messageArguments
+ * the message arguments
+ * @return the error status
+ */
+ public static IStatus getErrorStatus(String pluginId, String message, Throwable throwable,
+ Object... messageArguments) {
+ String formattedMessage = null;
+ if (message != null) {
+ formattedMessage = MessageFormat.format(message, messageArguments);
+ }
+ return new Status(Status.ERROR, pluginId, Status.ERROR, formattedMessage,
+ throwable);
+ }
+
+ /**
+ * Returns an debug status for a given plugin id, message and arguments.
+ *
+ * @param pluginId
+ * the plugin id
+ * @param message
+ * the message
+ * @param messageArguments
+ * the message arguments
+ *
+ * @return the debug status
+ */
+ public static IStatus getDebugStatus(String pluginId, String message, Object... messageArguments) {
+ return new Status(Status.INFO, pluginId, Status.INFO, MessageFormat.format(message, messageArguments), null);
+ }
+
+ /**
+ * Clones a given status.
+ *
+ * @param status
+ * the status
+ *
+ * @return the i status
+ */
+ public static IStatus clone(IStatus status) {
+ switch (status.getSeverity()) {
+ case IStatus.INFO:
+ return getDebugStatus(status.getPlugin(), status.getMessage());
+ case IStatus.ERROR:
+ return getErrorStatus(status.getPlugin(), status.getMessage(), status.getException());
+ default:
+ throw new UnsupportedOperationException("noy implemented yet!");
+ }
+ }
+}
Property changes on: branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/util/StatusUtils.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/util/reader/AppendUntilAlternativeImpl.java
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/util/reader/AppendUntilAlternativeImpl.java (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/util/reader/AppendUntilAlternativeImpl.java 2010-09-02 15:03:44 UTC (rev 24654)
@@ -0,0 +1,47 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is 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:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.usage.util.reader;
+
+import java.io.IOException;
+import java.io.Reader;
+import java.io.Writer;
+
+/**
+ * @author Andre Dietisheim
+ */
+public class AppendUntilAlternativeImpl extends ReadUntilAlternativesImpl {
+
+ private Writer writer;
+ private int numOfWrittenCharacters;
+
+ public AppendUntilAlternativeImpl(Reader reader, Writer writer, String... alternatives) {
+ super(reader, alternatives);
+ this.writer = writer;
+ }
+
+ @Override
+ protected boolean doContinueRead(char character, int numberOfCharactersRead) throws IOException {
+ if (super.doContinueRead(character, numberOfCharactersRead)) {
+ if (!isMatching()) {
+ // don't append matching characters
+ writer.write(character);
+ numOfWrittenCharacters++;
+ }
+ return true;
+ } else {
+ return false;
+ }
+ }
+
+ public int getNumOfWrittenCharacters() {
+ return numOfWrittenCharacters;
+ }
+}
\ No newline at end of file
Property changes on: branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/util/reader/AppendUntilAlternativeImpl.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/util/reader/AppendUntilImpl.java
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/util/reader/AppendUntilImpl.java (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/util/reader/AppendUntilImpl.java 2010-09-02 15:03:44 UTC (rev 24654)
@@ -0,0 +1,48 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is 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:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+
+package org.jboss.tools.usage.util.reader;
+
+import java.io.IOException;
+import java.io.Reader;
+import java.io.Writer;
+
+/**
+ * @author Andre Dietisheim
+ */
+public class AppendUntilImpl extends ReadUntilImpl {
+
+ private Writer writer;
+ private int numOfWrittenCharacters;
+
+ public AppendUntilImpl(Reader reader, Writer writer, char... character) {
+ super(reader, character);
+ this.writer = writer;
+ }
+
+ @Override
+ protected boolean doContinueRead(char character, int numberOfCharactersRead) throws IOException {
+ if (super.doContinueRead(character, numberOfCharactersRead)) {
+ if (!isMatching()) {
+ // don't append matching characters
+ writer.write(character);
+ numOfWrittenCharacters++;
+ }
+ return true;
+ } else {
+ return false;
+ }
+ }
+
+ public int getNumOfWrittenCharacters() {
+ return numOfWrittenCharacters;
+ }
+}
\ No newline at end of file
Property changes on: branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/util/reader/AppendUntilImpl.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/util/reader/ReadUntilAlternativesImpl.java
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/util/reader/ReadUntilAlternativesImpl.java (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/util/reader/ReadUntilAlternativesImpl.java 2010-09-02 15:03:44 UTC (rev 24654)
@@ -0,0 +1,116 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is 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:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.usage.util.reader;
+
+import java.io.Reader;
+
+/**
+ * @author Andre Dietisheim
+ */
+public class ReadUntilAlternativesImpl extends ReadUntilImpl {
+
+ private char[][] allAlternatives;
+ private char[] currentAlternative;
+ private int alternativesIndex = -1;
+
+ public ReadUntilAlternativesImpl(Reader reader, String... stringAlternatives) {
+ super(reader);
+ initAlternativesCharSequences(stringAlternatives);
+ }
+
+ private void initAlternativesCharSequences(String... stringAlternatives) {
+ this.allAlternatives = new char[stringAlternatives.length][];
+ for (int i = 0; i < stringAlternatives.length; i++) {
+ this.allAlternatives[i] = stringAlternatives[i].toCharArray();
+ }
+ }
+
+ @Override
+ protected int getNumberOfCharactersToMatch() {
+ if (currentAlternative != null) {
+ return currentAlternative.length;
+ } else {
+ return 0;
+ }
+ }
+
+ @Override
+ protected boolean doesMatch(char character) {
+ if (currentAlternative == null || currentAlternative[getMatchingIndex()] != character) {
+ // current alternative does not match new character, select a new
+ // alternative
+ boolean newAlternativeSelected = matchAlternative(character);
+ if (!newAlternativeSelected) {
+ // no alternative matches current character + new one
+ setMatchingIndex(0);
+ }
+ return newAlternativeSelected;
+ } else {
+ return true;
+ }
+ }
+
+ /**
+ * Returns whether the given character matches an alternative (in other
+ * words the given character matches an alternative at the current matching
+ * index).
+ *
+ * @param character
+ * the character
+ * @return true, if successful
+ */
+ private boolean matchAlternative(char character) {
+ for (int i = alternativesIndex + 1; i < allAlternatives.length; i++) {
+ char[] alternative = allAlternatives[i];
+ if (doesMatch(character, alternative)) {
+ this.currentAlternative = alternative;
+ this.alternativesIndex = i;
+ return true;
+ }
+
+ }
+ this.currentAlternative = null;
+ this.alternativesIndex = -1;
+ return false;
+ }
+
+ /**
+ * Returns whether the given potentially matching alternative (String)
+ * matches the currently selected alternative and the additional character.
+ *
+ * @param character
+ * @param potentiallyMatchingAlternative
+ * the new alternative that could match
+ * @return
+ */
+ private boolean doesMatch(char character, char[] potentiallyMatchingAlternative) {
+ int currentMatchingIndex = getMatchingIndex();
+ for (int j = 0; j < currentMatchingIndex; j++) {
+ if (potentiallyMatchingAlternative[j] != currentAlternative[j]) {
+ return false;
+ }
+ }
+ return potentiallyMatchingAlternative[currentMatchingIndex] == character;
+ }
+
+ @Override
+ protected char[] getCharactersToMatch() {
+ return currentAlternative;
+ }
+
+ public String getAlternative() {
+ if (alternativesIndex >= 0) {
+ return new String(allAlternatives[alternativesIndex]);
+ } else {
+ return null;
+ }
+ }
+}
\ No newline at end of file
Property changes on: branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/util/reader/ReadUntilAlternativesImpl.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/util/reader/ReadUntilImpl.java
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/util/reader/ReadUntilImpl.java (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/util/reader/ReadUntilImpl.java 2010-09-02 15:03:44 UTC (rev 24654)
@@ -0,0 +1,97 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is 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:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.usage.util.reader;
+
+import java.io.IOException;
+import java.io.Reader;
+
+/**
+ * @author Andre Dietisheim
+ */
+public class ReadUntilImpl implements ReaderVisitor {
+
+ /** returned by a stream if the end of the stream is reached. */
+ private static final char EOS = (char) -1;
+
+ private Reader reader;
+ private boolean matched = false;
+ private int numberOfCharactersRead;
+ private char[] characters;
+ private int matchingCharactersIndex = 0;
+
+ public ReadUntilImpl(Reader reader, char... characters) {
+ this.reader = reader;
+ this.numberOfCharactersRead = 0;
+ this.characters = characters;
+ }
+
+ public final boolean continueRead(char character, int numberOfCharactersRead) throws IOException {
+ this.numberOfCharactersRead = numberOfCharactersRead;
+ return doContinueRead(character, numberOfCharactersRead);
+ }
+
+ protected boolean doContinueRead(char character, int numberOfCharactersRead) throws IOException {
+ boolean continueRead = false;
+ boolean matches = doesMatch(character);
+ if (!matches) {
+ continueRead = !matches;
+ } else {
+ int matchingIndex = getMatchingIndex() + 1;
+ setMatchingIndex(matchingIndex);
+ continueRead = matches
+ && matchingIndex < getNumberOfCharactersToMatch();
+ }
+
+ setMatches(matches);
+ return continueRead;
+ }
+
+ public boolean isMatching() {
+ return matched;
+ }
+
+ public int getNumberOfCharactersRead() {
+ return this.numberOfCharactersRead;
+ }
+
+ public void read() throws IOException {
+ char character = 0;
+ while ((character = (char) reader.read()) != EOS) {
+ if (!continueRead(character, ++numberOfCharactersRead)) {
+ return;
+ }
+ }
+ }
+
+ protected void setMatchingIndex(int index) {
+ this.matchingCharactersIndex = index;
+ }
+
+ protected int getMatchingIndex() {
+ return matchingCharactersIndex;
+ }
+
+ protected boolean doesMatch(char character) {
+ return characters[matchingCharactersIndex] == character;
+ }
+
+ protected int getNumberOfCharactersToMatch() {
+ return characters.length;
+ }
+
+ protected char[] getCharactersToMatch() {
+ return characters;
+ }
+
+ protected void setMatches(boolean matches) {
+ matched = matches;
+ }
+}
\ No newline at end of file
Property changes on: branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/util/reader/ReadUntilImpl.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/util/reader/ReaderUtils.java
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/util/reader/ReaderUtils.java (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/util/reader/ReaderUtils.java 2010-09-02 15:03:44 UTC (rev 24654)
@@ -0,0 +1,96 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is 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:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.usage.util.reader;
+
+import java.io.CharArrayWriter;
+import java.io.IOException;
+import java.io.Reader;
+import java.io.Writer;
+
+/**
+ * @author Andre Dietisheim
+ */
+public class ReaderUtils {
+
+ /**
+ * Reads from the given input stream until a signal is found. The signal
+ * itself is not appended to the string that is returned.
+ * <p>
+ * This method does not read any further as the maximum number of bytes
+ * given and the end of the stream is reached. If the signal's not found
+ * <tt>null</tt> is returned.
+ *
+ * @param signal
+ * the signal
+ * @param maxRead
+ * the max number of bytes to read
+ * @param reader
+ * the reader
+ * @return the string that holds the bytes read
+ * @throws Exception
+ */
+ public static String readStringUntil(Reader reader, char... signal) throws IOException {
+ Writer writer = new CharArrayWriter();
+ AppendUntilImpl visitor = new AppendUntilImpl(reader, writer, signal);
+ try {
+ visitor.read();
+ if (!visitor.isMatching()
+ || visitor.getNumOfWrittenCharacters() == 0) {
+ return null;
+ }
+ writer.flush();
+ return writer.toString();
+ } finally {
+ writer.close();
+ }
+ }
+
+ public static String readStringUntil(Reader reader, String signal) throws IOException {
+ return readStringUntil(reader, signal.toCharArray());
+ }
+
+ public static String readStringUntil(Reader reader, String... alternatives) throws IOException {
+ Writer writer = new CharArrayWriter();
+ AppendUntilAlternativeImpl visitor = new AppendUntilAlternativeImpl(reader, writer, alternatives);
+ try {
+ visitor.read();
+ if (!visitor.isMatching()
+ || visitor.getNumOfWrittenCharacters() == 0) {
+ return null;
+ }
+ writer.flush();
+ return writer.toString();
+ } finally {
+ writer.close();
+ }
+ }
+
+ /**
+ * Skips the characters in the given reader until one of the given
+ * alternatives is found.
+ *
+ * @param maxRead
+ * the max number of characters to read
+ * @param reader
+ * the reader to read from
+ * @param alternatives
+ * the strings to find (alternatively) in the reader
+ * @return the index of the alternative that was found or <tt>-1</tt> if
+ * none was found
+ * @throws IOException
+ * Signals that an I/O exception has occurred.
+ */
+ public static String skipUntil(Reader reader, String... alternatives) throws IOException {
+ ReadUntilAlternativesImpl visitor = new ReadUntilAlternativesImpl(reader, alternatives);
+ visitor.read();
+ return visitor.getAlternative();
+ }
+}
Property changes on: branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/util/reader/ReaderUtils.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/util/reader/ReaderVisitor.java
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/util/reader/ReaderVisitor.java (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/util/reader/ReaderVisitor.java 2010-09-02 15:03:44 UTC (rev 24654)
@@ -0,0 +1,19 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is 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:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.usage.util.reader;
+
+/**
+ * @author Andre Dietisheim
+ */
+public interface ReaderVisitor {
+ public boolean continueRead(char character, int numberOfCharactersRead) throws Exception;
+ public int getNumberOfCharactersRead();
+}
Property changes on: branches/jbosstools-3.2.0.M2/usage/plugins/src/org/jboss/tools/usage/util/reader/ReaderVisitor.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
15 years, 7 months
JBoss Tools SVN: r24653 - trunk/tests/features/org.jboss.tools.test.sdk.feature.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2010-09-02 10:59:54 -0400 (Thu, 02 Sep 2010)
New Revision: 24653
Modified:
trunk/tests/features/org.jboss.tools.test.sdk.feature/feature.xml
Log:
add ModeShape test to uberbuilder test feature
Modified: trunk/tests/features/org.jboss.tools.test.sdk.feature/feature.xml
===================================================================
--- trunk/tests/features/org.jboss.tools.test.sdk.feature/feature.xml 2010-09-02 14:57:11 UTC (rev 24652)
+++ trunk/tests/features/org.jboss.tools.test.sdk.feature/feature.xml 2010-09-02 14:59:54 UTC (rev 24653)
@@ -339,7 +339,7 @@
version="0.0.0"/>
<plugin
- id="org.jboss.tools.drools.ui.bot.test"
+ id="org.jboss.tools.modeshape.rest.test"
download-size="0"
install-size="0"
version="0.0.0"/>
15 years, 7 months
JBoss Tools SVN: r24650 - branches/jbosstools-3.2.0.M2/usage.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2010-09-02 10:48:40 -0400 (Thu, 02 Sep 2010)
New Revision: 24650
Removed:
branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.feature/
branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.test.feature/
branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.test/
branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/
Log:
15 years, 7 months
JBoss Tools SVN: r24649 - in branches/jbosstools-3.2.0.M2/usage: org.jboss.tools.usage/.settings and 24 other directories.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2010-09-02 10:35:43 -0400 (Thu, 02 Sep 2010)
New Revision: 24649
Added:
branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.feature/.project
branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.feature/build.properties
branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.feature/feature.properties
branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.feature/feature.xml
branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.feature/license.html
branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.feature/pom.xml
branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.test.feature/.project
branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.test.feature/build.properties
branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.test.feature/feature.properties
branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.test.feature/feature.xml
branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.test.feature/pom.xml
branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.test/.classpath
branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.test/.project
branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.test/.settings/
branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.test/.settings/org.eclipse.jdt.core.prefs
branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.test/.settings/org.eclipse.jdt.ui.prefs
branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.test/EclipseEnvironmentTest.launch
branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.test/FocusPointTest.launch
branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.test/GlobalUsageReportingSettingsTest.launch
branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.test/GoogleAnalyticsUrlStrategyTest.launch
branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.test/JBossToolsUsageIntegrationTest.launch
branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.test/JBossToolsUsageRequestsTest.launch
branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.test/META-INF/
branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.test/META-INF/MANIFEST.MF
branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.test/UsageTestSuite.launch
branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.test/about.html
branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.test/build.properties
branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.test/pom.xml
branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.test/src/
branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.test/src/org/
branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.test/src/org/jboss/
branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.test/src/org/jboss/tools/
branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.test/src/org/jboss/tools/usage/
branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.test/src/org/jboss/tools/usage/test/
branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.test/src/org/jboss/tools/usage/test/EclipseEnvironmenTest.java
branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.test/src/org/jboss/tools/usage/test/EclipseEnvironmentFake.java
branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.test/src/org/jboss/tools/usage/test/EclipsePreferencesFake.java
branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.test/src/org/jboss/tools/usage/test/FocusPointTest.java
branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.test/src/org/jboss/tools/usage/test/GlobalUsageReportingSettingsTest.java
branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.test/src/org/jboss/tools/usage/test/GoogleAnalyticsUrlStrategyTest.java
branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.test/src/org/jboss/tools/usage/test/JBossToolsUsageIntegrationTest.java
branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.test/src/org/jboss/tools/usage/test/JBossToolsUsageRequestsTest.java
branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.test/src/org/jboss/tools/usage/test/JBossToolsUsageTestActivator.java
branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.test/src/org/jboss/tools/usage/test/SystemOutLogger.java
branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.test/src/org/jboss/tools/usage/test/UsageTestSuite.java
branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/.classpath
branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/.project
branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/.settings/
branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/.settings/net.sf.jautodoc.prefs
branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/.settings/org.eclipse.jdt.core.prefs
branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/.settings/org.eclipse.jdt.ui.prefs
branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/JBoss Usage Reporter.launch
branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/META-INF/
branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/META-INF/MANIFEST.MF
branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/about.html
branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/build.properties
branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/config.ini
branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/plugin.properties
branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/plugin.xml
branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/pom.xml
branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/
branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/
branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/
branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/
branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/
branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/FocusPoint.java
branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/HttpGetRequest.java
branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/HttpResourceMap.java
branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/IHttpGetRequest.java
branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/ILoggingAdapter.java
branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/ITracker.java
branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/IURLBuildingStrategy.java
branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/PluginLogger.java
branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/Tracker.java
branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/UsageMessages.java
branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/googleanalytics/
branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/googleanalytics/AbstractGoogleAnalyticsParameters.java
branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/googleanalytics/GoogleAnalyticsCookie.java
branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/googleanalytics/GoogleAnalyticsMessages.java
branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/googleanalytics/GoogleAnalyticsUrlStrategy.java
branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/googleanalytics/IGoogleAnalyticsParameters.java
branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/googleanalytics/messages.properties
branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/internal/
branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/internal/JBossToolsUsageActivator.java
branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/messages.properties
branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/preferences/
branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/preferences/GlobalUsageReportingSettings.java
branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/preferences/IUsageReportPreferenceConstants.java
branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/preferences/PreferencesMessages.java
branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/preferences/UsageReportPreferenceInitializer.java
branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/preferences/UsageReportPreferencePage.java
branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/preferences/UsageReportPreferences.java
branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/preferences/messages.properties
branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/reporting/
branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/reporting/EclipseEnvironment.java
branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/reporting/JBossBundleGroups.java
branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/reporting/ReportingMessages.java
branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/reporting/UsageReport.java
branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/reporting/UsageReportDispatcher.java
branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/reporting/UsageReportEnablementDialog.java
branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/reporting/messages.properties
branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/util/
branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/util/BrowserUtil.java
branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/util/BundleUtils.java
branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/util/HttpEncodingUtils.java
branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/util/PreferencesUtils.java
branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/util/StatusUtils.java
branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/util/reader/
branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/util/reader/AppendUntilAlternativeImpl.java
branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/util/reader/AppendUntilImpl.java
branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/util/reader/ReadUntilAlternativesImpl.java
branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/util/reader/ReadUntilImpl.java
branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/util/reader/ReaderUtils.java
branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/util/reader/ReaderVisitor.java
branches/jbosstools-3.2.0.M2/usage/usage-site/.project
branches/jbosstools-3.2.0.M2/usage/usage-site/pom.xml
branches/jbosstools-3.2.0.M2/usage/usage-site/site.xml
Log:
bringing trunk changes to M2
Added: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/.classpath
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/.classpath (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/.classpath 2010-09-02 14:35:43 UTC (rev 24649)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
Property changes on: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/.classpath
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/.project
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/.project (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/.project 2010-09-02 14:35:43 UTC (rev 24649)
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.jboss.tools.usage</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>
+ <buildCommand>
+ <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
+ </natures>
+</projectDescription>
Property changes on: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/.project
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/.settings/net.sf.jautodoc.prefs
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/.settings/net.sf.jautodoc.prefs (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/.settings/net.sf.jautodoc.prefs 2010-09-02 14:35:43 UTC (rev 24649)
@@ -0,0 +1,7 @@
+#Thu Aug 12 14:50:29 CEST 2010
+add_header=true
+eclipse.preferences.version=1
+header_text=/*******************************************************************************\n * Copyright (c) 2010 Red Hat, Inc.\n * Distributed under license by Red Hat, Inc. All rights reserved.\n * This program is made available under the terms of the\n * Eclipse Public License v1.0 which accompanies this distribution,\n * and is available at http\://www.eclipse.org/legal/epl-v10.html\n *\n * Contributors\:\n * Red Hat, Inc. - initial API and implementation\n ******************************************************************************/
+project_specific_settings=true
+replace_header=true
+replacements=<?xml version\="1.0" standalone\="yes"?>\n\n<replacements>\n<replacement key\="get" scope\="1" mode\="0">Gets the</replacement>\n<replacement key\="set" scope\="1" mode\="0">Sets the</replacement>\n<replacement key\="add" scope\="1" mode\="0">Adds the</replacement>\n<replacement key\="edit" scope\="1" mode\="0">Edits the</replacement>\n<replacement key\="remove" scope\="1" mode\="0">Removes the</replacement>\n<replacement key\="init" scope\="1" mode\="0">Inits the</replacement>\n<replacement key\="parse" scope\="1" mode\="0">Parses the</replacement>\n<replacement key\="create" scope\="1" mode\="0">Creates the</replacement>\n<replacement key\="build" scope\="1" mode\="0">Builds the</replacement>\n<replacement key\="is" scope\="1" mode\="0">Checks if is</replacement>\n<replacement key\="print" scope\="1" mode\="0">Prints the</replacement>\n<replacement key\="has" scope\="1" mode\="0">Checks for</replacement>\n</replacements>\n\n
Property changes on: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/.settings/net.sf.jautodoc.prefs
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/.settings/org.eclipse.jdt.core.prefs (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/.settings/org.eclipse.jdt.core.prefs 2010-09-02 14:35:43 UTC (rev 24649)
@@ -0,0 +1,260 @@
+#Fri Aug 06 17:57:19 CEST 2010
+eclipse.preferences.version=1
+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=true
+org.eclipse.jdt.core.formatter.comment.format_line_comments=true
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
+org.eclipse.jdt.core.formatter.comment.line_length=80
+org.eclipse.jdt.core.formatter.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=false
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_member=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.join_lines_in_comments=true
+org.eclipse.jdt.core.formatter.join_wrapped_lines=false
+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=120
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=tab
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
Property changes on: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/.settings/org.eclipse.jdt.core.prefs
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/.settings/org.eclipse.jdt.ui.prefs
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/.settings/org.eclipse.jdt.ui.prefs (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/.settings/org.eclipse.jdt.ui.prefs 2010-09-02 14:35:43 UTC (rev 24649)
@@ -0,0 +1,6 @@
+#Wed Jul 28 11:02:07 CEST 2010
+eclipse.preferences.version=1
+formatter_profile=_Eclipse [built-in] extended
+formatter_settings_version=11
+org.eclipse.jdt.ui.javadoc=false
+org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\n * @return the ${bare_field_name}\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${param} the ${bare_field_name} to set\n */</template><template autoinsert\="true" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * ${tags}\n */</template><template autoinsert\="false" context\="filecommen!
t_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/*******************************************************************************\n * Copyright (c) 2010 Red Hat, Inc.\n * Distributed under license by Red Hat, Inc. All rights reserved.\n * This program is made available under the terms of the\n * Eclipse Public License v1.0 which accompanies this distribution,\n * and is available at http\://www.eclipse.org/legal/epl-v10.html\n *\n * Contributors\:\n * Red Hat, Inc. - initial API and implementation\n ******************************************************************************/</template><template autoinsert\="true" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n * @author ${user}\n *\n * ${tags}\n */</template><templa!
te autoinsert\="true" context\="fieldcomment_context" deleted\!
="false"
description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n * \n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="true" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/* (non-Javadoc)\n * ${see_to_overridden}\n */</template><template autoinsert\="true" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${tags}\n * ${see_to_target}\n */</template><template autoinser!
t\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\n</template><template autoinsert\="true" context\="annotationbod!
y_context" deleted\="false" description\="Code in new annotati!
on type
bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\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\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\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}\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><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter function" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\n * @return the ${bare_field_name}\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter function" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${pa!
ram} the ${bare_field_name} to set\n */</template><template au!
toinsert
\="true" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * ${tags}\n */</template><template autoinsert\="true" context\="filecomment_context" deleted\="false" description\="Comment for created JavaScript files" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.filecomment" name\="filecomment">/**\n * \n */</template><template autoinsert\="true" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n * @author ${user}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for vars" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n !
* \n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding function" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="true" context\="overridecomment_context" deleted\="false" description\="Comment for overriding functions" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/* (non-JSDoc)\n * ${see_to_overridden}\n */</template><template autoinsert\="true" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate functions" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${tags}\n * ${see_to_target}\n */</template><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.ec!
lipse.wst.jsdt.ui.text.codetemplates.newtype" name\="newtype">!
${fileco
mment}\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created function stubs" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated function stub\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code i!
n created constructor stubs" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\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.wst.jsdt.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.wst.jsdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates>
Property changes on: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/.settings/org.eclipse.jdt.ui.prefs
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/JBoss Usage Reporter.launch
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/JBoss Usage Reporter.launch (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/JBoss Usage Reporter.launch 2010-09-02 14:35:43 UTC (rev 24649)
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<launchConfiguration type="org.eclipse.pde.ui.RuntimeWorkbench">
+<booleanAttribute key="append.args" value="true"/>
+<booleanAttribute key="askclear" value="false"/>
+<booleanAttribute key="automaticAdd" value="true"/>
+<booleanAttribute key="automaticValidate" value="false"/>
+<stringAttribute key="bootstrap" value=""/>
+<stringAttribute key="checked" value="[NONE]"/>
+<booleanAttribute key="clearConfig" value="true"/>
+<booleanAttribute key="clearws" value="true"/>
+<booleanAttribute key="clearwslog" value="false"/>
+<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/JBoss Usage Reporter"/>
+<booleanAttribute key="default" value="true"/>
+<stringAttribute key="deselected_workspace_plugins" value="org.jboss.tools.common.text.xml,org.jboss.tools.common.meta.ui,org.jboss.tools.ui.bot.ext,org.jboss.tools.common,org.jboss.tools.common.verification.ui.test,org.jboss.tools.common.projecttemplates,org.jboss.tools.common.el.core,org.jboss.tools.common.verification.ui,org.jboss.tools.common.gef,org.jboss.tools.common.test,org.jboss.tools.common.verification.test,org.jboss.tools.common.verification,org.jboss.tools.common.model,org.jboss.tools.gwt.ui,org.jboss.tools.common.model.ui.capabilities,org.jboss.tools.common.resref.core,org.jboss.tools.common.ui,org.jboss.tools.common.el.ui,org.jboss.tools.usage.test,org.jboss.tools.common.text.ext,org.jboss.tools.gwt.core,org.jboss.tools.common.resref.ui,org.jboss.tools.ui.bot.ext.test,org.jboss.tools.common.model.ui.test,org.jboss.tools.common.el.core.test,org.jboss.tools.common.model.ui,org.jboss.tools.tests,org.jboss.tools.common.model.test"/>
+<booleanAttribute key="includeOptional" value="true"/>
+<stringAttribute key="location" value="${workspace_loc}/../runtime-EclipseApplication2"/>
+<listAttribute key="org.eclipse.debug.ui.favoriteGroups">
+<listEntry value="org.eclipse.debug.ui.launchGroup.debug"/>
+<listEntry value="org.eclipse.debug.ui.launchGroup.run"/>
+</listAttribute>
+<stringAttribute key="org.eclipse.jdt.launching.JAVA_COMMAND" value="java"/>
+<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -console -consolelog -pluginCustomization ${workspace_loc}/../runtime-EclipseApplication/usage.properties"/>
+<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
+<booleanAttribute key="pde.generated.config" value="false"/>
+<stringAttribute key="pde.version" value="3.3"/>
+<stringAttribute key="product" value="org.eclipse.platform.ide"/>
+<stringAttribute key="selected_target_plugins" value="org.eclipse.jface.text@default:default,org.eclipse.core.contenttype@default:default,org.eclipse.help@default:default,org.eclipse.equinox.concurrent@default:default,com.ibm.icu@default:default,ch.qos.logback.classic@default:default,org.eclipse.swt.cocoa.macosx.x86_64@default:false,org.junit4@default:default,javax.mail@default:default,org.eclipse.core.filesystem.macosx@default:false,org.eclipse.ui.intro@default:default,org.eclipse.core.databinding.observable@default:default,org.eclipse.ecf.provider.filetransfer.ssl@default:false,org.eclipse.core.runtime@default:true,org.eclipse.help.base@default:default,org.eclipse.swtbot.ant.optional.junit4@default:false,org.eclipse.swt@default:default,org.eclipse.equinox.common@2:true,org.eclipse.net4j.jms.api@default:default,org.eclipse.equinox.security@default:default,org.eclipse.core.resources@default:default,org.eclipse.core.expressions@default:default,org.apache.lucene.analysis@defa!
ult:default,org.eclipse.jface@default:default,org.eclipse.ecf.filetransfer@default:default,org.eclipse.ecf@default:default,org.eclipse.update.configurator@3:true,org.eclipse.equinox.p2.repository@default:default,org.apache.jasper@default:default,org.eclipse.equinox.registry@default:default,org.eclipse.equinox.http.jetty@default:default,org.eclipse.equinox.preferences@default:default,org.eclipse.equinox.p2.metadata@default:default,org.mortbay.jetty.server@default:default,javax.servlet.jsp@default:default,org.eclipse.core.runtime.compatibility@default:default,org.eclipse.core.variables@default:default,org.eclipse.help.ui@default:default,org.eclipse.equinox.http.servlet@default:default,org.eclipse.core.filesystem@default:default,org.mortbay.jetty.util@default:default,org.eclipse.ui.ide@default:default,org.eclipse.jface.databinding@default:default,org.apache.commons.el@default:default,org.eclipse.equinox.app@default:default,org.eclipse.osgi@-1:true,org.eclipse.ui.views@default:!
default,javax.activation@default:default,org.apache.commons.lo!
gging*1.
0.4.v201005080501@default:default,javax.servlet@default:default,org.eclipse.core.databinding@default:default,org.eclipse.core.commands@default:default,org.eclipse.core.runtime.compatibility.registry@default:false,org.eclipse.equinox.p2.engine@default:default,org.slf4j.api@default:default,org.eclipse.ant.core@default:default,org.hamcrest.core@default:default,org.eclipse.core.runtime.compatibility.auth@default:default,ch.qos.logback.slf4j@default:false,org.eclipse.equinox.security.macosx@default:false,org.eclipse.ecf.identity@default:default,org.eclipse.ui.workbench@default:default,org.eclipse.ecf.ssl@default:false,org.junit*4.8.1.v4_8_1_v20100427-1100@default:default,org.eclipse.equinox.p2.core@default:default,org.eclipse.ui.cheatsheets@default:default,org.eclipse.ui.cocoa@default:false,org.eclipse.osgi.services@default:default,org.eclipse.ui@default:default,org.eclipse.ui.forms@default:default,org.eclipse.equinox.p2.metadata.repository@default:default,org.eclipse.text@defaul!
t:default,org.eclipse.core.databinding.property@default:default,org.eclipse.platform@default:default,ch.qos.logback.core@default:default,org.eclipse.core.net@default:default,org.apache.lucene@default:default,org.apache.ant@default:default,org.eclipse.core.jobs@default:default,org.eclipse.ecf.provider.filetransfer@default:default"/>
+<stringAttribute key="selected_workspace_plugins" value="org.jboss.tools.usage@default:default"/>
+<booleanAttribute key="show_selected_only" value="false"/>
+<stringAttribute key="templateConfig" value="${workspace_loc:org.jboss.tools.usage/config.ini}"/>
+<booleanAttribute key="tracing" value="false"/>
+<booleanAttribute key="useCustomFeatures" value="false"/>
+<booleanAttribute key="useDefaultConfig" value="false"/>
+<booleanAttribute key="useDefaultConfigArea" value="true"/>
+<booleanAttribute key="useProduct" value="true"/>
+<booleanAttribute key="usefeatures" value="false"/>
+</launchConfiguration>
Property changes on: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/JBoss Usage Reporter.launch
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/META-INF/MANIFEST.MF
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/META-INF/MANIFEST.MF (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/META-INF/MANIFEST.MF 2010-09-02 14:35:43 UTC (rev 24649)
@@ -0,0 +1,17 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %BundleName
+Bundle-SymbolicName: org.jboss.tools.usage;singleton:=true
+Bundle-Version: 1.0.0.qualifier
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Export-Package: org.jboss.tools.usage,
+ org.jboss.tools.usage.googleanalytics,
+ org.jboss.tools.usage.preferences; x-friends:="org.jboss.tools.usage.test",
+ org.jboss.tools.usage.reporting;x-friends:="org.jboss.tools.usage.test",
+ org.jboss.tools.usage.util
+Require-Bundle: org.eclipse.osgi;bundle-version="3.5.0",
+ org.eclipse.core.runtime;bundle-version="[3.5.0,4.0.0)",
+ org.eclipse.ui;bundle-version="3.5.0"
+Bundle-Activator: org.jboss.tools.usage.internal.JBossToolsUsageActivator
+Bundle-Vendor: %BundleVendor
+Bundle-ActivationPolicy: lazy
Property changes on: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/META-INF/MANIFEST.MF
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/about.html
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/about.html (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/about.html 2010-09-02 14:35:43 UTC (rev 24649)
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
+<title>Smooks Core</title>
+<style type="text/css" media="screen">
+<!--
+ body {
+ font-family: Sans-serif, Arial, Helvetica;
+ }
+
+-->
+</style>
+</head>
+<body>
+<h1>JBoss Usage Reporting</h1>
+
+<p>
+This plugin is part of the JBoss Tools developed by the <a href="http://www.jboss.com">JBoss Inc.</a>
+</p>
+
+<p>Information about this plugin is available at <a href="http://www.jboss.org/tools">JBoss Tools project page</a></p>
+
+<p>
+This software is distributed under the terms of the Eclipse Public License - v 1.0
+(see <a href="www.eclipse.org/legal/epl-v10.html">Eclipse Public License - Version 1.0</a>).
+</p>
+</body>
+</html>
\ No newline at end of file
Property changes on: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/about.html
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/build.properties
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/build.properties (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/build.properties 2010-09-02 14:35:43 UTC (rev 24649)
@@ -0,0 +1,16 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ plugin.xml,\
+ about.html,\
+ bin/
+src.includes = .classpath,\
+ .project,\
+ .settings/,\
+ JBoss Usage Reporter.launch,\
+ META-INF/,\
+ about.html,\
+ build.properties,\
+ plugin.xml,\
+ src/
Property changes on: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/build.properties
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/config.ini
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/config.ini (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/config.ini 2010-09-02 14:35:43 UTC (rev 24649)
@@ -0,0 +1,20 @@
+org.jboss.tools.usage/ask_user_for_usage_report_preference=false
+org.jboss.tools.usage.configuration.ask_user_for_usage_report_preference=false
+configuration/org.jboss.tools.usage.ask_user_for_usage_report_preference=false
+eclipse.ask_user_for_usage_report_preference=false
+org.eclipse.pde.core.ask_user_for_usage_report_preference=false
+org.eclipse.core.runtime.ask_user_for_usage_report_preference=false
+ask_user_for_usage_report_preference=false
+
+org.eclipse.update.reconcile=false
+eclipse.p2.profile=SDKProfile
+osgi.instance.area.default=(a)user.home/Documents/workspace
+osgi.framework=file\:/Applications/jbdevstudio/eclipse/plugins/org.eclipse.osgi_3.5.2.R35x_v20100126.jar
+eclipse.buildId=M20100211-1343
+org.eclipse.equinox.simpleconfigurator.configUrl=file\:/Users/admin/workspaces/jboss-tools-usage/.metadata/.plugins/org.eclipse.pde.core/JBoss Usage Reporter/org.eclipse.equinox.simpleconfigurator/bundles.info
+osgi.configuration.cascaded=true
+eclipse.product=com.jboss.jbds.product.product
+eclipse.application=org.eclipse.ui.ide.workbench
+eclipse.p2.data.area=(a)config.dir/.p2
+osgi.bundles.defaultStartLevel=4
+osgi.framework.extensions=reference\:file\:org.eclipse.equinox.transforms.hook_1.0.100.v20100119-2308.jar,reference\:file\:javax.transaction_1.1.1.v201002111330.jar
Property changes on: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/config.ini
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/plugin.properties
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/plugin.properties (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/plugin.properties 2010-09-02 14:35:43 UTC (rev 24649)
@@ -0,0 +1,2 @@
+BundleName=JBoss Tools Usage Reporting
+BundleVendor=JBoss by Red Hat
\ No newline at end of file
Property changes on: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/plugin.properties
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/plugin.xml
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/plugin.xml (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/plugin.xml 2010-09-02 14:35:43 UTC (rev 24649)
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+ <extension
+ point="org.eclipse.ui.startup">
+ <startup
+ class="org.jboss.tools.usage.reporting.UsageReportDispatcher">
+ </startup>
+ </extension>
+ <extension
+ point="org.eclipse.ui.preferencePages">
+ <page
+ class="org.jboss.tools.usage.preferences.UsageReportPreferencePage"
+ id="org.jboss.tools.usage.analytics.preferences.UsageAnalyticsPreferencePage"
+ name="Usage Reporting Preferences"
+ category="org.jboss.tools.common.model.ui.MainPreferencePage">
+ </page>
+ </extension>
+ <extension
+ point="org.eclipse.core.runtime.preferences">
+ <initializer
+ class="org.jboss.tools.usage.preferences.UsageReportPreferenceInitializer">
+ </initializer>
+ </extension>
+</plugin>
Property changes on: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/plugin.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/pom.xml
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/pom.xml (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/pom.xml 2010-09-02 14:35:43 UTC (rev 24649)
@@ -0,0 +1,13 @@
+<project
+xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.jboss.tools</groupId>
+ <artifactId>org.jboss.tools.parent.pom</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ </parent>
+ <groupId>org.jboss.tools.usage.plugins</groupId>
+ <artifactId>org.jboss.tools.usage</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <packaging>eclipse-plugin</packaging>
+</project>
Property changes on: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/pom.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/FocusPoint.java
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/FocusPoint.java (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/FocusPoint.java 2010-09-02 14:35:43 UTC (rev 24649)
@@ -0,0 +1,72 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is 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:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.usage;
+
+import org.jboss.tools.usage.util.HttpEncodingUtils;
+
+/**
+ * Focus point of the application. It can represent data points like application
+ * load, application module load, user actions, error events etc.
+ */
+public class FocusPoint {
+
+ private String name;
+ private FocusPoint childFocusPoint;
+ public static final String URI_SEPARATOR = "/";
+ public static final String TITLE_SEPARATOR = "-";
+
+ public FocusPoint(String name) {
+ this.name = name;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public FocusPoint setChild(FocusPoint childFocusPoint) {
+ this.childFocusPoint = childFocusPoint;
+ return this;
+ }
+
+ public FocusPoint getChild() {
+ return childFocusPoint;
+ }
+
+ public String getContentURI() {
+ StringBuilder builder = new StringBuilder();
+ appendContentURI(builder, this);
+ return HttpEncodingUtils.checkedEncodeUtf8(builder.toString());
+ }
+
+ private void appendContentURI(StringBuilder builder, FocusPoint focusPoint) {
+ FocusPoint parentFocuPoint = focusPoint.getChild();
+ builder.append(URI_SEPARATOR);
+ builder.append(focusPoint.getName());
+ if (parentFocuPoint != null) {
+ appendContentURI(builder, parentFocuPoint);
+ }
+ }
+
+ public String getContentTitle() {
+ StringBuilder builder = new StringBuilder();
+ appendContentTitle(builder, this);
+ return HttpEncodingUtils.checkedEncodeUtf8(builder.toString());
+ }
+
+ private void appendContentTitle(StringBuilder builder, FocusPoint focusPoint) {
+ FocusPoint childFocusPoint = focusPoint.getChild();
+ builder.append(focusPoint.getName());
+ if (childFocusPoint != null) {
+ builder.append(TITLE_SEPARATOR);
+ appendContentTitle(builder, childFocusPoint);
+ }
+ }
+}
Property changes on: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/FocusPoint.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/HttpGetRequest.java
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/HttpGetRequest.java (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/HttpGetRequest.java 2010-09-02 14:35:43 UTC (rev 24649)
@@ -0,0 +1,100 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is 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:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.usage;
+
+import java.io.IOException;
+import java.net.HttpURLConnection;
+import java.net.URL;
+import java.text.MessageFormat;
+
+
+/**
+ * Class that executes a HTTP Get request to the given url.
+ *
+ * @author Andre Dietisheim
+ */
+public class HttpGetRequest implements IHttpGetRequest {
+
+ private static final String USER_AGENT = "User-Agent"; //$NON-NLS-1$
+
+ private static final String GET_METHOD_NAME = "GET"; //$NON-NLS-1$
+
+ private ILoggingAdapter loggingAdapter = null;
+
+// private CookieHandler cookieHandler;
+
+ private String userAgent;
+
+ public HttpGetRequest(String userAgent, ILoggingAdapter loggingAdapter) {
+ this.userAgent = userAgent;
+ this.loggingAdapter = loggingAdapter;
+// this.cookieHandler = new CookieHandler();
+// this.cookieHandler = CookieHandler.getDefault();
+// cookieHandler.setCookiePolicy(CookiePolicy.ACCEPT_ALL);
+ }
+
+ /* (non-Javadoc)
+ * @see org.jboss.tools.usage.IHttpGetRequest#request(java.lang.String)
+ */
+ public void request(String urlString) {
+
+// CookieHandler currentCookieHandler = setCookieHandler(cookieHandler);
+ try {
+ HttpURLConnection urlConnection = createURLConnection(urlString, userAgent);
+ urlConnection.connect();
+ int responseCode = getResponseCode(urlConnection);
+ if (responseCode == HttpURLConnection.HTTP_OK) {
+ loggingAdapter.logMessage(MessageFormat.format(UsageMessages.HttpGetMethod_Success, urlString, responseCode));
+ } else {
+ loggingAdapter.logError(MessageFormat.format(UsageMessages.HttpGetMethod_Error_Http, urlString));
+ }
+ } catch (Exception e) {
+ loggingAdapter.logMessage(MessageFormat.format(UsageMessages.HttpGetMethod_Error_Io, urlString, e.toString()));
+ } finally {
+// setCookieHandler(currentCookieHandler);
+ }
+ }
+
+ /**
+ * Returns the return code from the given {@link HttpURLConnection}.
+ * Provided to be called by test cases so that they can retrieve the return code.
+ *
+ * @param urlConnection to get the response code from
+ * @return the return code the HttpUrlConnection received
+ * @throws IOException Signals that an I/O exception has occurred.
+ */
+ protected int getResponseCode(HttpURLConnection urlConnection) throws IOException {
+ return urlConnection.getResponseCode();
+ }
+
+// private CookieHandler setCookieHandler(CookieHandler cookieHandler) {
+// CookieHandler currentCookieHandler = CookieHandler.getDefault();
+// CookieHandler.setDefault(cookieHandler);
+// return currentCookieHandler;
+// }
+
+ /**
+ * Creates a new url connection.
+ *
+ * @param urlString the url string
+ * @param userAgent the user agent
+ * @return the http url connection
+ * @throws IOException Signals that an I/O exception has occurred.
+ */
+ protected HttpURLConnection createURLConnection(String urlString, String userAgent) throws IOException {
+ URL url = new URL(urlString);
+ HttpURLConnection urlConnection = (HttpURLConnection) url.openConnection();
+ urlConnection.setInstanceFollowRedirects(true);
+ urlConnection.setRequestMethod(GET_METHOD_NAME);
+ urlConnection.setRequestProperty(USER_AGENT, userAgent);
+ return urlConnection;
+ }
+}
Property changes on: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/HttpGetRequest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/HttpResourceMap.java
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/HttpResourceMap.java (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/HttpResourceMap.java 2010-09-02 14:35:43 UTC (rev 24649)
@@ -0,0 +1,150 @@
+package org.jboss.tools.usage;
+
+import java.io.BufferedInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.UnsupportedEncodingException;
+import java.net.HttpURLConnection;
+import java.net.URL;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Plugin;
+import org.jboss.tools.usage.util.HttpEncodingUtils;
+import org.jboss.tools.usage.util.StatusUtils;
+import org.jboss.tools.usage.util.reader.ReaderUtils;
+
+public abstract class HttpResourceMap {
+
+ static final String GET_METHOD_NAME = "GET"; //$NON-NLS-1$
+
+ protected Plugin plugin;
+ private Map<String, String> valuesMap;
+
+ private String[] keys;
+
+ private String url;
+
+ private char valueDelimiter;
+
+ public HttpResourceMap(String url, char valueDelimiter, Plugin plugin, String... keys) {
+ this.url = url;
+ this.keys = keys;
+ this.valueDelimiter = valueDelimiter;
+ this.plugin = plugin;
+ }
+
+ protected Map<String, String> getValueMap() throws IOException {
+ if (valuesMap == null) {
+ HttpURLConnection urlConnection = createURLConnection(url);
+ InputStreamReader reader = request(urlConnection);
+ this.valuesMap = parse(keys, valueDelimiter, reader, new HashMap<String, String>());
+ }
+ return valuesMap;
+ }
+
+ /**
+ * Sends a http GET request to the given URL. Returns the response string or
+ * <tt>null</tt> if an error occurred. The errors catched are Exceptions or
+ * HTTP error codes.
+ *
+ * @param url
+ * the url to send the GET request to
+ * @return the response or <tt>null</tt> if an error occured.
+ * @throws UnsupportedEncodingException
+ *
+ * @see HttpURLConnection
+ */
+ protected InputStreamReader request(HttpURLConnection urlConnection) throws IOException {
+ InputStreamReader responseReader = null;
+ try {
+ urlConnection.connect();
+ int responseCode = getResponseCode(urlConnection);
+ if (responseCode == HttpURLConnection.HTTP_OK) {
+ IStatus status = StatusUtils.getDebugStatus(
+ plugin.getBundle().getSymbolicName()
+ , UsageMessages.KillSwitchPreference_Info_HttpQuery
+ , url);
+ plugin.getLog().log(status);
+ responseReader = getInputStreamReader(urlConnection.getInputStream(), urlConnection.getContentType());
+ } else {
+ IStatus status = StatusUtils.getErrorStatus(
+ plugin.getBundle().getSymbolicName()
+ , UsageMessages.KillSwitchPreference_Error_Http, null, url);
+ plugin.getLog().log(status);
+ }
+ return responseReader;
+ } catch (IOException e) {
+ IStatus status = StatusUtils.getErrorStatus(
+ plugin.getBundle().getSymbolicName()
+ , UsageMessages.KillSwitchPreference_Error_Http, e, url);
+ plugin.getLog().log(status);
+ throw e;
+ }
+ }
+
+ private InputStreamReader getInputStreamReader(InputStream inputStream, String contentType) throws UnsupportedEncodingException, IOException {
+ String contentTypeCharset = HttpEncodingUtils.getContentTypeCharset(contentType);
+ if (contentTypeCharset != null && contentTypeCharset.length() > 0) {
+ return new InputStreamReader(new BufferedInputStream(inputStream),
+ contentTypeCharset);
+ } else {
+ return new InputStreamReader(new BufferedInputStream(inputStream));
+ }
+ }
+
+ /**
+ * Parses the given string and extracts the enablement value.
+ *
+ * @param valueDelimiter
+ *
+ * @param input
+ * stream that holds
+ * @return
+ * @return true, if successful
+ */
+ private Map<String, String> parse(String[] keys, char valueDelimiter, InputStreamReader reader,
+ Map<String, String> valuesMap) throws IOException {
+ for (String key = null; (key = ReaderUtils.skipUntil(reader, keys)) != null;) {
+ String value = ReaderUtils.readStringUntil(reader, valueDelimiter);
+ valuesMap.put(key, value);
+ }
+ return valuesMap;
+ }
+
+ /**
+ * Creates a new url connection.
+ *
+ * @param urlString
+ * the url string
+ * @return the http url connection
+ * @throws IOException
+ * @throws IOException
+ * Signals that an I/O exception has occurred.
+ */
+ protected HttpURLConnection createURLConnection(String urlString) throws IOException {
+ URL url = new URL(urlString);
+ HttpURLConnection urlConnection = (HttpURLConnection) url.openConnection();
+ urlConnection.setInstanceFollowRedirects(true);
+ urlConnection.setRequestMethod(GET_METHOD_NAME);
+ return urlConnection;
+ }
+
+ /**
+ * Returns the return code from the given {@link HttpURLConnection}.
+ * Provided to be called by test cases so that they can retrieve the return
+ * code.
+ *
+ * @param urlConnection
+ * to get the response code from
+ * @return the return code the HttpUrlConnection received
+ * @throws IOException
+ * Signals that an I/O exception has occurred.
+ */
+ protected int getResponseCode(HttpURLConnection urlConnection) throws IOException {
+ return urlConnection.getResponseCode();
+ }
+
+}
\ No newline at end of file
Property changes on: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/HttpResourceMap.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/IHttpGetRequest.java
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/IHttpGetRequest.java (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/IHttpGetRequest.java 2010-09-02 14:35:43 UTC (rev 24649)
@@ -0,0 +1,22 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is 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:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.usage;
+
+/**
+ * A interface that represents a HTTP Get Request.
+ *
+ * @author Andre Dietisheim
+ */
+public interface IHttpGetRequest {
+
+ public abstract void request(String urlString);
+
+}
\ No newline at end of file
Property changes on: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/IHttpGetRequest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/ILoggingAdapter.java
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/ILoggingAdapter.java (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/ILoggingAdapter.java 2010-09-02 14:35:43 UTC (rev 24649)
@@ -0,0 +1,22 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is 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:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.usage;
+
+/**
+ * @author Andre Dietisheim
+ */
+public interface ILoggingAdapter {
+
+ public void logError(String errorMessage);
+
+ public void logMessage(String message);
+
+}
Property changes on: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/ILoggingAdapter.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/ITracker.java
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/ITracker.java (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/ITracker.java 2010-09-02 14:35:43 UTC (rev 24649)
@@ -0,0 +1,35 @@
+package org.jboss.tools.usage;
+
+import java.io.UnsupportedEncodingException;
+
+
+/**
+ * @author Andre Dietisheim
+ */
+public interface ITracker {
+
+ /**
+ * Track the focusPoint in the application synchronously. <br/>
+ * <red><b>Please be cognizant while using this method. Since, it would have
+ * a peformance hit on the actual application. Use it unless it's really
+ * needed</b></red>
+ *
+ * @param focusPoint
+ * Focus point of the application like application load,
+ * application module load, user actions, error events etc.
+ * @throws UnsupportedEncodingException
+ */
+
+ public abstract void trackSynchronously(FocusPoint focusPoint);
+
+ /**
+ * Track the focusPoint in the application asynchronously. <br/>
+ *
+ * @param focusPoint
+ * Focus point of the application like application load,
+ * application module load, user actions, error events etc.
+ */
+
+ public abstract void trackAsynchronously(FocusPoint focusPoint);
+
+}
\ No newline at end of file
Property changes on: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/ITracker.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/IURLBuildingStrategy.java
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/IURLBuildingStrategy.java (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/IURLBuildingStrategy.java 2010-09-02 14:35:43 UTC (rev 24649)
@@ -0,0 +1,26 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is 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:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.usage;
+
+import java.io.UnsupportedEncodingException;
+
+
+/**
+ * Interface for the URL building strategy
+ *
+ * @author Andre Dietisheim
+ *
+ */
+public interface IURLBuildingStrategy {
+
+ public String build(FocusPoint focusPoint) throws UnsupportedEncodingException;
+
+}
Property changes on: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/IURLBuildingStrategy.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/PluginLogger.java
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/PluginLogger.java (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/PluginLogger.java 2010-09-02 14:35:43 UTC (rev 24649)
@@ -0,0 +1,42 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is 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:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.usage;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Plugin;
+import org.eclipse.core.runtime.Status;
+
+/**
+ * @author Andre Dietisheim
+ */
+public class PluginLogger implements ILoggingAdapter {
+
+ private Plugin plugin;
+
+ public PluginLogger(Plugin plugin) {
+ this.plugin = plugin;
+ }
+
+ public void logError(String message) {
+ log(IStatus.ERROR, message);
+ }
+
+ public void logMessage(String message) {
+ log(IStatus.INFO, message);
+ }
+
+ private void log(int severity, String message) {
+ if (plugin != null) {
+ IStatus status = new Status(severity, plugin.getBundle().getSymbolicName(), message);
+ plugin.getLog().log(status);
+ }
+ }
+}
Property changes on: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/PluginLogger.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/Tracker.java
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/Tracker.java (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/Tracker.java 2010-09-02 14:35:43 UTC (rev 24649)
@@ -0,0 +1,71 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is 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:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.usage;
+
+import java.io.UnsupportedEncodingException;
+import java.text.MessageFormat;
+
+/**
+ * Reports (tracks) usage
+ *
+ * @author Andre Dietisheim
+ * @see based on <a
+ * href="http://jgoogleAnalytics.googlecode.com">http://jgoogleAnalytics
+ * .googlecode.com</a>
+ */
+public class Tracker implements ITracker {
+
+ private IURLBuildingStrategy urlBuildingStrategy = null;
+ private IHttpGetRequest httpRequest;
+ private ILoggingAdapter loggingAdapter;
+
+ public Tracker(IURLBuildingStrategy urlBuildingStrategy, IHttpGetRequest httpGetRequest, ILoggingAdapter loggingAdapter) {
+ this.httpRequest = httpGetRequest;
+ this.loggingAdapter = loggingAdapter;
+ this.urlBuildingStrategy = urlBuildingStrategy;
+ }
+
+ public void trackSynchronously(FocusPoint focusPoint) {
+ loggingAdapter
+ .logMessage(MessageFormat.format(UsageMessages.Tracker_Synchronous, focusPoint.getContentTitle()));
+ try {
+ httpRequest.request(getTrackingUrl(focusPoint));
+ } catch (Exception e) {
+ loggingAdapter.logMessage(MessageFormat.format(UsageMessages.Tracker_Error, e.getMessage()));
+ }
+ }
+
+ protected String getTrackingUrl(FocusPoint focusPoint) throws UnsupportedEncodingException {
+ return urlBuildingStrategy.build(focusPoint);
+ }
+
+ public void trackAsynchronously(FocusPoint focusPoint) {
+ loggingAdapter.logMessage(MessageFormat
+ .format(UsageMessages.Tracker_Asynchronous, focusPoint.getContentTitle()));
+ new Thread(new TrackingRunnable(focusPoint)).start();
+ }
+
+ private class TrackingRunnable implements Runnable {
+ private FocusPoint focusPoint;
+
+ private TrackingRunnable(FocusPoint focusPoint) {
+ this.focusPoint = focusPoint;
+ }
+
+ public void run() {
+ try {
+ httpRequest.request(getTrackingUrl(focusPoint));
+ } catch (Exception e) {
+ loggingAdapter.logMessage(MessageFormat.format(UsageMessages.Tracker_Error, e.getMessage()));
+ }
+ }
+ }
+}
Property changes on: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/Tracker.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/UsageMessages.java
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/UsageMessages.java (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/UsageMessages.java 2010-09-02 14:35:43 UTC (rev 24649)
@@ -0,0 +1,36 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is 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:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.usage;
+
+import org.eclipse.osgi.util.NLS;
+
+public class UsageMessages extends NLS {
+ private static final String BUNDLE_NAME = "org.jboss.tools.usage.messages"; //$NON-NLS-1$
+ public static String Tracker_Synchronous;
+ public static String Tracker_Asynchronous;
+ public static String Tracker_Error;
+
+ public static String HttpGetMethod_Error_Http;
+ public static String HttpGetMethod_Error_Io;
+ public static String HttpGetMethod_Success;
+
+ public static String KillSwitchPreference_Error_Exception;
+ public static String KillSwitchPreference_Error_Http;
+ public static String KillSwitchPreference_Info_HttpQuery;
+
+ static {
+ // initialize resource bundle
+ NLS.initializeMessages(BUNDLE_NAME, UsageMessages.class);
+ }
+
+ private UsageMessages() {
+ }
+}
Property changes on: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/UsageMessages.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/googleanalytics/AbstractGoogleAnalyticsParameters.java
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/googleanalytics/AbstractGoogleAnalyticsParameters.java (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/googleanalytics/AbstractGoogleAnalyticsParameters.java 2010-09-02 14:35:43 UTC (rev 24649)
@@ -0,0 +1,40 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is 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:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.usage.googleanalytics;
+
+
+/**
+ * @author Andre Dietisheim
+ */
+public abstract class AbstractGoogleAnalyticsParameters implements IGoogleAnalyticsParameters {
+
+ private String accountName;
+ private String referral;
+ private String hostName;
+
+ public AbstractGoogleAnalyticsParameters(String accountName, String hostName, String referral) {
+ this.accountName = accountName;
+ this.hostName = hostName;
+ this.referral = referral;
+ }
+
+ public String getAccountName() {
+ return accountName;
+ }
+
+ public String getHostname() {
+ return hostName;
+ }
+
+ public String getReferral() {
+ return referral;
+ }
+}
Property changes on: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/googleanalytics/AbstractGoogleAnalyticsParameters.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/googleanalytics/GoogleAnalyticsCookie.java
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/googleanalytics/GoogleAnalyticsCookie.java (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/googleanalytics/GoogleAnalyticsCookie.java 2010-09-02 14:35:43 UTC (rev 24649)
@@ -0,0 +1,42 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is 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:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.usage.googleanalytics;
+
+import org.eclipse.core.runtime.Assert;
+
+public class GoogleAnalyticsCookie {
+
+ private CharSequence value;
+ private String identifier;
+ private char[] delimiters;
+
+ public GoogleAnalyticsCookie(String identifier, CharSequence value, char... delimiters) {
+ Assert.isTrue(identifier != null && identifier.length() > 0);
+ Assert.isTrue(value != null && value.length() > 0);
+
+ this.identifier = identifier;
+ this.value = value;
+ this.delimiters = delimiters;
+ }
+
+ public GoogleAnalyticsCookie(String identifier, CharSequence value) {
+ this(identifier, value, (char) -1);
+ }
+
+ public void appendTo(StringBuilder builder) {
+ builder.append(identifier)
+ .append(IGoogleAnalyticsParameters.EQUALS_SIGN)
+ .append(value);
+ for (char delimiter : delimiters) {
+ builder.append(delimiter);
+ }
+ }
+}
Property changes on: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/googleanalytics/GoogleAnalyticsCookie.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/googleanalytics/GoogleAnalyticsMessages.java
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/googleanalytics/GoogleAnalyticsMessages.java (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/googleanalytics/GoogleAnalyticsMessages.java 2010-09-02 14:35:43 UTC (rev 24649)
@@ -0,0 +1,25 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is 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:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.usage.googleanalytics;
+
+import org.eclipse.osgi.util.NLS;
+
+public class GoogleAnalyticsMessages extends NLS {
+
+ private static final String BUNDLE_NAME = "org.jboss.tools.usage.googleanalytics.messages"; //$NON-NLS-1$
+ static {
+ // initialize resource bundle
+ NLS.initializeMessages(BUNDLE_NAME, GoogleAnalyticsMessages.class);
+ }
+
+ private GoogleAnalyticsMessages() {
+ }
+}
Property changes on: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/googleanalytics/GoogleAnalyticsMessages.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/googleanalytics/GoogleAnalyticsUrlStrategy.java
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/googleanalytics/GoogleAnalyticsUrlStrategy.java (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/googleanalytics/GoogleAnalyticsUrlStrategy.java 2010-09-02 14:35:43 UTC (rev 24649)
@@ -0,0 +1,218 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is 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:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.usage.googleanalytics;
+
+import java.io.UnsupportedEncodingException;
+
+import org.jboss.tools.usage.FocusPoint;
+import org.jboss.tools.usage.IURLBuildingStrategy;
+import org.jboss.tools.usage.util.HttpEncodingUtils;
+
+/**
+ * Class that builds an URL that passes given parameters to google analytics
+ *
+ * @author Andre Dietisheim
+ *
+ * @see <a
+ * href="http://code.google.com/apis/analytics/docs/tracking/gaTrackingTroubleshoo...">GIF
+ * Request Parameters</a>
+ * @see <a
+ * href="http://code.google.com/apis/analytics/docs/concepts/gaConceptsCookies.htm...">Cookies
+ * Set By Google Analytics</a>
+ *
+ * @see <a
+ * href="http://www.morevisibility.com/analyticsblog/from-__utma-to-__utmz-google-...">From
+ * __utma to __utmz (Google Analytics Cookies)</a>
+ */
+public class GoogleAnalyticsUrlStrategy implements IURLBuildingStrategy {
+
+ private static final String TRACKING_URL = "http://www.google-analytics.com/__utm.gif";
+
+ // private static final int VISITS = -1;
+
+ private IGoogleAnalyticsParameters googleParameters;
+
+ public GoogleAnalyticsUrlStrategy(IGoogleAnalyticsParameters googleAnalyticsParameters) {
+ this.googleParameters = googleAnalyticsParameters;
+ }
+
+ public String build(FocusPoint focusPoint) throws UnsupportedEncodingException {
+ /*
+ * Google Analytics for Android:
+ *
+ String str = "";
+ if (paramEvent.action != null)
+ str = paramEvent.action;
+ if (!(str.startsWith("/")))
+ str = "/" + str;
+ str = encode(str);
+ Locale localLocale = Locale.getDefault();
+ StringBuilder localStringBuilder = new StringBuilder();
+ localStringBuilder.append("/__utm.gif");
+ localStringBuilder.append("?utmwv=4.3");
+ localStringBuilder.append("&utmn=").append(paramEvent.randomVal);
+ localStringBuilder.append("&utmcs=UTF-8");
+ localStringBuilder.append(String.format("&utmsr=%dx%d", new Object[] {
+ Integer.valueOf(paramEvent.screenWidth)
+ , Integer.valueOf(paramEvent.screenHeight) }));
+ localStringBuilder.append(String.format("&utmul=%s-%s", new Object[] {
+ localLocale.getLanguage()
+ , localLocale.getCountry() }));
+ localStringBuilder.append("&utmp=").append(str);
+ localStringBuilder.append("&utmac=").append(paramEvent.accountId);
+ localStringBuilder.append("&utmcc=").append(
+ getEscapedCookieString(paramEvent, paramString));
+ return localStringBuilder.toString();
+
+ *
+ * getEscapedCookieString:
+ *
+ StringBuilder localStringBuilder = new StringBuilder();
+ localStringBuilder.append("__utma=");
+ localStringBuilder.append("999").append(".");
+ localStringBuilder.append(paramEvent.userId).append(".");
+ localStringBuilder.append(paramEvent.timestampFirst).append(".");
+ localStringBuilder.append(paramEvent.timestampPrevious).append(".");
+ localStringBuilder.append(paramEvent.timestampCurrent).append(".");
+ localStringBuilder.append(paramEvent.visits);
+ if (paramString != null)
+ {
+ localStringBuilder.append("+__utmz=");
+ localStringBuilder.append("999").append(".");
+ localStringBuilder.append(paramEvent.timestampFirst).append(".");
+ localStringBuilder.append("1.1.");
+ localStringBuilder.append(paramString);
+ }
+ return encode(localStringBuilder.toString());
+
+ */
+
+ StringBuilder builder = new StringBuilder(TRACKING_URL)
+ .append(IGoogleAnalyticsParameters.URL_PARAM_DELIMITER);
+ appendParameter(IGoogleAnalyticsParameters.PARAM_TRACKING_CODE_VERSION,
+ IGoogleAnalyticsParameters.VALUE_TRACKING_CODE_VERSION, builder);
+ appendParameter(IGoogleAnalyticsParameters.PARAM_UNIQUE_TRACKING_NUMBER, getRandomNumber(), builder);
+ appendParameter(IGoogleAnalyticsParameters.PARAM_HOST_NAME, googleParameters.getHostname(), builder);
+ appendParameter(IGoogleAnalyticsParameters.PARAM_LANGUAGE_ENCODING,
+ IGoogleAnalyticsParameters.VALUE_ENCODING_UTF8, builder);
+ appendParameter(IGoogleAnalyticsParameters.PARAM_SCREEN_RESOLUTION, googleParameters.getScreenResolution(),
+ builder);
+ appendParameter(IGoogleAnalyticsParameters.PARAM_SCREEN_COLOR_DEPTH, googleParameters.getScreenColorDepth(),
+ builder);
+ appendParameter(IGoogleAnalyticsParameters.PARAM_BROWSER_LANGUAGE, googleParameters.getBrowserLanguage(),
+ builder);
+ appendParameter(IGoogleAnalyticsParameters.PARAM_PAGE_TITLE, focusPoint.getContentTitle(), builder);
+ // appendParameter(IGoogleAnalyticsParameters.PARAM_HID,
+ // getRandomNumber(), builder);
+ appendParameter(IGoogleAnalyticsParameters.PARAM_REFERRAL, googleParameters.getReferral(), builder);
+ appendParameter(IGoogleAnalyticsParameters.PARAM_PAGE_REQUEST, focusPoint.getContentURI(), builder);
+
+ appendParameter(IGoogleAnalyticsParameters.PARAM_ACCOUNT_NAME, googleParameters.getAccountName(), builder);
+ appendParameter(IGoogleAnalyticsParameters.PARAM_COOKIES, getCookies(), builder);
+ appendParameter(IGoogleAnalyticsParameters.PARAM_GAQ, "1", false, builder);
+
+ googleParameters.visit();
+
+ return builder.toString();
+ }
+
+ /**
+ * Returns the google analytics cookies. These cookies determines user
+ * identity, session identity etc.
+ *
+ * @return the cookies
+ *
+ * @see <a
+ * href="http://www.analyticsexperts.com/google-analytics/information-about-the-ut...">Information
+ * about the utmLinker and the __utma, __utmb and __utmc cookies</a>
+ */
+ private String getCookies() {
+ StringBuilder builder = new StringBuilder();
+
+ /**
+ * unique visitor id cookie has to be unique per eclipse installation
+ */
+ // String timeStamp = "-1";
+ // //String.valueOf(System.currentTimeMillis());
+ new GoogleAnalyticsCookie(IGoogleAnalyticsParameters.PARAM_COOKIES_UNIQUE_VISITOR_ID,
+ new StringBuilder().append("999.")
+ .append(googleParameters.getUserId()).append(IGoogleAnalyticsParameters.DOT)
+ .append(googleParameters.getFirstVisit()).append(IGoogleAnalyticsParameters.DOT)
+ .append(googleParameters.getLastVisit()).append(IGoogleAnalyticsParameters.DOT)
+ .append(googleParameters.getCurrentVisit()).append(IGoogleAnalyticsParameters.DOT)
+ .append(googleParameters.getVisitCount())
+ .append(IGoogleAnalyticsParameters.SEMICOLON),
+ IGoogleAnalyticsParameters.PLUS_SIGN)
+ .appendTo(builder);
+
+ new GoogleAnalyticsCookie(IGoogleAnalyticsParameters.PARAM_COOKIES_REFERRAL_TYPE,
+ new StringBuilder()
+ .append("999.")
+ .append(googleParameters.getFirstVisit())
+ .append(IGoogleAnalyticsParameters.DOT)
+ .append("1.1."))
+ .appendTo(builder);
+
+// new GoogleAnalyticsCookie(IGoogleAnalyticsParameters.PARAM_COOKIES_SESSION,
+// new StringBuilder()
+// .append("1"),
+// IGoogleAnalyticsParameters.SEMICOLON
+// , IGoogleAnalyticsParameters.PLUS_SIGN)
+// .appendTo(builder);
+//
+// new GoogleAnalyticsCookie(IGoogleAnalyticsParameters.PARAM_COOKIES_BROWSERSESSION,
+// new StringBuilder()
+// .append("1"),
+// IGoogleAnalyticsParameters.SEMICOLON
+// , IGoogleAnalyticsParameters.PLUS_SIGN)
+// .appendTo(builder);
+
+ new GoogleAnalyticsCookie(IGoogleAnalyticsParameters.PARAM_COOKIES_UTMCSR,
+ "(direct)",
+ IGoogleAnalyticsParameters.PIPE)
+ .appendTo(builder);
+
+ new GoogleAnalyticsCookie(IGoogleAnalyticsParameters.PARAM_COOKIES_UTMCCN,
+ "(direct)",
+ IGoogleAnalyticsParameters.PIPE)
+ .appendTo(builder);
+
+ new GoogleAnalyticsCookie(IGoogleAnalyticsParameters.PARAM_COOKIES_UTMCMD,
+ "(none)",
+ IGoogleAnalyticsParameters.PIPE)
+ .appendTo(builder);
+
+ new GoogleAnalyticsCookie(IGoogleAnalyticsParameters.PARAM_COOKIES_KEYWORD,
+ googleParameters.getKeyword())
+ .appendTo(builder);
+
+ builder.append(IGoogleAnalyticsParameters.SEMICOLON);
+
+ return HttpEncodingUtils.checkedEncodeUtf8(builder.toString());
+ }
+
+ private String getRandomNumber() {
+ return Integer.toString((int) (Math.random() * 0x7fffffff));
+ }
+
+ private void appendParameter(String name, String value, StringBuilder builder) {
+ appendParameter(name, value, true, builder);
+ }
+
+ private void appendParameter(String name, String value, boolean appendAmpersand, StringBuilder builder) {
+ builder.append(name)
+ .append(IGoogleAnalyticsParameters.EQUALS_SIGN)
+ .append(value);
+ if (appendAmpersand) {
+ builder.append(IGoogleAnalyticsParameters.AMPERSAND);
+ }
+ }
+}
Property changes on: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/googleanalytics/GoogleAnalyticsUrlStrategy.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/googleanalytics/IGoogleAnalyticsParameters.java
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/googleanalytics/IGoogleAnalyticsParameters.java (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/googleanalytics/IGoogleAnalyticsParameters.java 2010-09-02 14:35:43 UTC (rev 24649)
@@ -0,0 +1,95 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is 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:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.usage.googleanalytics;
+
+/**
+ * An interface that provides methods for all parameters that google analytics
+ * needs to know about.
+ *
+ * @author Andre Dietisheim
+ * @see <a
+ * href="http://code.google.com/apis/analytics/docs/tracking/gaTrackingTroubleshoo...">GIF Request Parameters</a>
+ */
+public interface IGoogleAnalyticsParameters {
+
+ public static final char AMPERSAND = '&';
+ public static final char EQUALS_SIGN = '=';
+ public static final char URL_PARAM_DELIMITER = '?';
+ public static final char PLUS_SIGN = '+';
+ public static final char DOT = '.';
+ public static final char SEMICOLON = ';';
+ public static final char JAVA_LOCALE_DELIMITER = '_';
+ public static final char BROWSER_LOCALE_DELIMITER = '-';
+ public static final char PIPE = '|';
+ public static final char VERSION_DELIMITER = '.';
+
+ public static final String PARAM_HID = "utmhid";
+ public static final String PARAM_PAGE_REQUEST = "utmp";
+ public static final String PARAM_ACCOUNT_NAME = "utmac";
+ public static final String PARAM_HOST_NAME = "utmhn";
+ public static final String PARAM_COOKIES = "utmcc";
+ public static final String PARAM_COOKIES_UNIQUE_VISITOR_ID = "__utma";
+ public static final String PARAM_COOKIES_SESSION = "__utmb";
+ public static final String PARAM_COOKIES_BROWSERSESSION = "__utmc";
+ public static final String PARAM_COOKIES_REFERRAL_TYPE = "__utmz";
+
+ public static final String PARAM_REFERRAL = "utmr";
+ public static final String PARAM_TRACKING_CODE_VERSION = "utmwv";
+ public static final String PARAM_UNIQUE_TRACKING_NUMBER = "utmn";
+ public static final String PARAM_LANGUAGE_ENCODING = "utmcs";
+ public static final String PARAM_SCREEN_RESOLUTION = "utmsr";
+ public static final String PARAM_SCREEN_COLOR_DEPTH = "utmsc";
+ public static final String PARAM_PRODUCT_NAME = "utmipn";
+ public static final String PARAM_PRODUCT_CODE = "utmipc";
+ public static final String PARAM_BROWSER_LANGUAGE = "utmul";
+ public static final String PARAM_REPEAT_CAMPAIGN_VISIT = "utmcr";
+ public static final String PARAM_PAGE_TITLE = "utmdt";
+ public static final String PARAM_GAQ = "gaq";
+ public static final String PARAM_COOKIES_UTMCSR = "utmcsr";
+ public static final String PARAM_COOKIES_UTMCCN = "utmccn";
+ public static final String PARAM_COOKIES_UTMCMD = "utmcmd";
+ public static final String PARAM_COOKIES_KEYWORD = "utmctr";
+
+ public static final String VALUE_TRACKING_CODE_VERSION = "4.7.2";
+ public static final String VALUE_NO_REFERRAL = "0";
+ public static final String VALUE_ENCODING_UTF8 = "UTF-8";
+
+ public static final String SCREERESOLUTION_DELIMITER = "x";
+ public static final String SCREENCOLORDEPTH_POSTFIX = "-bit";
+
+ public String getAccountName();
+
+ public String getReferral();
+
+ public String getScreenResolution();
+
+ public String getScreenColorDepth();
+
+ public String getBrowserLanguage();
+
+ public String getHostname();
+
+ public String getUserAgent();
+
+ public String getUserId();
+
+ public String getKeyword();
+
+ public String getFirstVisit();
+
+ public String getLastVisit();
+
+ public String getCurrentVisit();
+
+ public long getVisitCount();
+
+ public void visit();
+}
Property changes on: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/googleanalytics/IGoogleAnalyticsParameters.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/googleanalytics/messages.properties
===================================================================
Property changes on: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/googleanalytics/messages.properties
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/internal/JBossToolsUsageActivator.java
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/internal/JBossToolsUsageActivator.java (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/internal/JBossToolsUsageActivator.java 2010-09-02 14:35:43 UTC (rev 24649)
@@ -0,0 +1,47 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is 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:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.usage.internal;
+
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * @author Andre Dietisheim
+ */
+public class JBossToolsUsageActivator extends AbstractUIPlugin {
+
+ public static final String PLUGIN_ID = "org.jboss.tools.usage"; //$NON-NLS-1$
+
+ private static JBossToolsUsageActivator plugin;
+
+ public JBossToolsUsageActivator() {
+ plugin = this;
+ }
+
+ @Override
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+
+ public static JBossToolsUsageActivator getDefault() {
+ return plugin;
+ }
+
+ public static ImageDescriptor getImageDescriptor(String path) {
+ return imageDescriptorFromPlugin(PLUGIN_ID, path);
+ }
+
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ }
+}
Property changes on: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/internal/JBossToolsUsageActivator.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/messages.properties
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/messages.properties (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/messages.properties 2010-09-02 14:35:43 UTC (rev 24649)
@@ -0,0 +1,11 @@
+HttpGetMethod_Error_Http=HTTP GET to \"{0}\" failed, response code received \"{1}\"
+HttpGetMethod_Error_Io=HTTP GET to \"{0}\" failed, exception occured: \"{1}\"
+HttpGetMethod_Success=HTTP GET to url \"{0}\" successfull\!
+
+Tracker_Asynchronous=Tracking asynchronously focusPoint \"{0}\"
+Tracker_Error=Tracking failed, exception thrown: \"{0}\"
+Tracker_Synchronous=Tracking synchronously focusPoint \"{0}\"
+
+KillSwitchPreference_Error_Exception=Could not query kill switch preference at \"{0}\"
+KillSwitchPreference_Error_Http=Could not query kill switch preference at \"{0}\, response code was \"{1}\""
+KillSwitchPreference_Info_HttpQuery=Queried kill switch preference at \"{0}\"
Property changes on: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/messages.properties
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/preferences/GlobalUsageReportingSettings.java
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/preferences/GlobalUsageReportingSettings.java (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/preferences/GlobalUsageReportingSettings.java 2010-09-02 14:35:43 UTC (rev 24649)
@@ -0,0 +1,51 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is 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:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.usage.preferences;
+
+import java.util.Map;
+
+import org.eclipse.core.runtime.Plugin;
+import org.jboss.tools.usage.HttpResourceMap;
+
+/**
+ * A class that implements a global reporting enablement setting. The current
+ * implementation queries a given url and extracts the enablement value out of
+ * the response.
+ */
+public class GlobalUsageReportingSettings extends HttpResourceMap {
+
+ private static final String REPORTING_ENABLEMENT_URL = "http://anonsvn.jboss.org/repos/jbosstools/workspace/usage/usage.properties"; //$NON-NLS-1$
+
+ public static final String REPORT_ENABLEMENT_KEY = "usage_reporting_enabled="; //$NON-NLS-1$
+ private static final boolean REPORT_ENABLEMENT_DEFAULT = false;
+
+ /* the delimiter that delimits the value */
+ private static final char VALUE_DELIMITER = '\n';
+
+ public GlobalUsageReportingSettings(Plugin plugin) {
+ super(REPORTING_ENABLEMENT_URL
+ , VALUE_DELIMITER
+ , plugin
+ , REPORT_ENABLEMENT_KEY);
+
+ this.plugin = plugin;
+ }
+
+ public boolean isEnabled() {
+ try {
+ Map<String, String> valueMap = getValueMap();
+ String isEnabled = valueMap.get(REPORT_ENABLEMENT_KEY);
+ return Boolean.valueOf(isEnabled);
+ } catch (Exception e) {
+ return REPORT_ENABLEMENT_DEFAULT;
+ }
+ }
+}
Property changes on: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/preferences/GlobalUsageReportingSettings.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/preferences/IUsageReportPreferenceConstants.java
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/preferences/IUsageReportPreferenceConstants.java (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/preferences/IUsageReportPreferenceConstants.java 2010-09-02 14:35:43 UTC (rev 24649)
@@ -0,0 +1,46 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is 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:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.usage.preferences;
+
+/**
+ * @author Andre Dietisheim
+ */
+public interface IUsageReportPreferenceConstants {
+
+ /** The value that determines if usage shall be reported if there's no user set setting. */
+ public static final boolean USAGEREPORT_ENABLED_DEFAULTVALUE = false;
+
+ /**
+ * The identifier to be used to identify the value that determines if usage
+ * shall be reported.
+ */
+ public static final String USAGEREPORT_ENABLED_ID = "allow_usage_report_preference"; //$NON-NLS-1$
+
+ /**
+ * The identifier to be used for the value that determines if the user shall
+ * be asked for reporting.
+ */
+ public static final String ASK_USER_USAGEREPORT_ID = "ask_user_for_usage_report_preference"; //$NON-NLS-1$
+
+ /**
+ * The identifier to be used for the value that determines this eclipse
+ * instance.
+ */
+ public static final String ECLIPSE_INSTANCE_ID = "eclipse_instance_id"; //$NON-NLS-1$
+
+ public static final String FIRST_VISIT = "first_visit";
+
+ public static final String LAST_VISIT = "last_visit";
+
+ public static final String VISIT_COUNT = "visit_count";
+
+ public static final boolean ASK_USER_USAGEREPORT_DEFAULTVALUE = true;
+}
Property changes on: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/preferences/IUsageReportPreferenceConstants.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/preferences/PreferencesMessages.java
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/preferences/PreferencesMessages.java (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/preferences/PreferencesMessages.java 2010-09-02 14:35:43 UTC (rev 24649)
@@ -0,0 +1,29 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is 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:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.usage.preferences;
+
+import org.eclipse.osgi.util.NLS;
+
+public class PreferencesMessages extends NLS {
+ private static final String BUNDLE_NAME = "org.jboss.tools.usage.preferences.messages"; //$NON-NLS-1$
+
+ public static String UsageReportPreferencePage_Description;
+ public static String UsageReportPreferencePage_AllowReporting;
+ public static String UsageReportPreferencePage_Error_Saving;
+
+ static {
+ // initialize resource bundle
+ NLS.initializeMessages(BUNDLE_NAME, PreferencesMessages.class);
+ }
+
+ private PreferencesMessages() {
+ }
+}
Property changes on: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/preferences/PreferencesMessages.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/preferences/UsageReportPreferenceInitializer.java
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/preferences/UsageReportPreferenceInitializer.java (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/preferences/UsageReportPreferenceInitializer.java 2010-09-02 14:35:43 UTC (rev 24649)
@@ -0,0 +1,31 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is 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:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.usage.preferences;
+
+import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
+import org.jboss.tools.usage.util.PreferencesUtils;
+
+/**
+ * @author Andre Dietisheim
+ */
+public class UsageReportPreferenceInitializer extends
+ AbstractPreferenceInitializer {
+
+ public void initializeDefaultPreferences() {
+ PreferencesUtils.getStore().setDefault(
+ IUsageReportPreferenceConstants.ASK_USER_USAGEREPORT_ID,
+ IUsageReportPreferenceConstants.ASK_USER_USAGEREPORT_DEFAULTVALUE);
+
+ PreferencesUtils.getStore().setDefault(
+ IUsageReportPreferenceConstants.USAGEREPORT_ENABLED_ID,
+ IUsageReportPreferenceConstants.USAGEREPORT_ENABLED_DEFAULTVALUE);
+ }
+}
Property changes on: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/preferences/UsageReportPreferenceInitializer.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/preferences/UsageReportPreferencePage.java
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/preferences/UsageReportPreferencePage.java (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/preferences/UsageReportPreferencePage.java 2010-09-02 14:35:43 UTC (rev 24649)
@@ -0,0 +1,54 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is 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:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.usage.preferences;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.jface.preference.BooleanFieldEditor;
+import org.eclipse.jface.preference.FieldEditorPreferencePage;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchPreferencePage;
+import org.jboss.tools.usage.internal.JBossToolsUsageActivator;
+import org.jboss.tools.usage.util.StatusUtils;
+import org.osgi.service.prefs.BackingStoreException;
+
+/**
+ * @author Andre Dietisheim
+ */
+public class UsageReportPreferencePage extends FieldEditorPreferencePage implements IWorkbenchPreferencePage {
+
+ public UsageReportPreferencePage() {
+ super(GRID);
+ }
+
+ public void createFieldEditors() {
+ addField(new BooleanFieldEditor(
+ IUsageReportPreferenceConstants.USAGEREPORT_ENABLED_ID
+ , PreferencesMessages.UsageReportPreferencePage_AllowReporting
+ , getFieldEditorParent()));
+ }
+
+ public void init(IWorkbench workbench) {
+ setPreferenceStore(UsageReportPreferences.createPreferenceStore());
+ setDescription(PreferencesMessages.UsageReportPreferencePage_Description);
+ }
+
+ @Override
+ public boolean performOk() {
+ try {
+ UsageReportPreferences.flush();
+ } catch (BackingStoreException e) {
+ IStatus status = StatusUtils.getErrorStatus(JBossToolsUsageActivator.PLUGIN_ID,
+ PreferencesMessages.UsageReportPreferencePage_Error_Saving, e);
+ JBossToolsUsageActivator.getDefault().getLog().log(status);
+ }
+ return super.performOk();
+ }
+}
\ No newline at end of file
Property changes on: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/preferences/UsageReportPreferencePage.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/preferences/UsageReportPreferences.java
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/preferences/UsageReportPreferences.java (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/preferences/UsageReportPreferences.java 2010-09-02 14:35:43 UTC (rev 24649)
@@ -0,0 +1,60 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is 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:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.usage.preferences;
+
+import org.eclipse.core.runtime.preferences.IEclipsePreferences;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.jboss.tools.usage.internal.JBossToolsUsageActivator;
+import org.jboss.tools.usage.reporting.ReportingMessages;
+import org.jboss.tools.usage.util.PreferencesUtils;
+import org.jboss.tools.usage.util.StatusUtils;
+import org.osgi.service.prefs.BackingStoreException;
+
+public class UsageReportPreferences {
+
+ public static void setEnabled(boolean enabled) {
+ PreferencesUtils.getStore().putValue(
+ IUsageReportPreferenceConstants.USAGEREPORT_ENABLED_ID, String.valueOf(enabled));
+ }
+
+ public static boolean isEnabled() {
+ return PreferencesUtils.getPreferences().getBoolean(
+ IUsageReportPreferenceConstants.USAGEREPORT_ENABLED_ID,
+ IUsageReportPreferenceConstants.USAGEREPORT_ENABLED_DEFAULTVALUE);
+ }
+
+ public static boolean isAskUser() {
+ return PreferencesUtils.getPreferences().getBoolean(
+ IUsageReportPreferenceConstants.ASK_USER_USAGEREPORT_ID,
+ IUsageReportPreferenceConstants.ASK_USER_USAGEREPORT_DEFAULTVALUE);
+ }
+
+ public static void setAskUser(boolean askUser) {
+ try {
+ IEclipsePreferences preferences = PreferencesUtils.getPreferences();
+ preferences.putBoolean(IUsageReportPreferenceConstants.ASK_USER_USAGEREPORT_ID, askUser);
+ preferences.flush();
+ } catch (BackingStoreException e) {
+ JBossToolsUsageActivator.getDefault().getLog().log(
+ StatusUtils.getErrorStatus(JBossToolsUsageActivator.PLUGIN_ID,
+ ReportingMessages.UsageReport_Error_SavePreferences, e,
+ IUsageReportPreferenceConstants.ASK_USER_USAGEREPORT_ID));
+ }
+ }
+
+ public static void flush() throws BackingStoreException {
+ PreferencesUtils.getPreferences().flush();
+ }
+
+ public static IPreferenceStore createPreferenceStore() {
+ return PreferencesUtils.getStore();
+ }
+}
Property changes on: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/preferences/UsageReportPreferences.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/preferences/messages.properties
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/preferences/messages.properties (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/preferences/messages.properties 2010-09-02 14:35:43 UTC (rev 24649)
@@ -0,0 +1,3 @@
+UsageReportPreferencePage_Description=Preference page with options for anonymous usage data reporting. Usage data is used for statistical matters only.
+UsageReportPreferencePage_AllowReporting=&Allow Red Hat Inc. to report usage anonymously.
+UsageReportPreferencePage_Error_Saving=Could not save the preferences.
Property changes on: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/preferences/messages.properties
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/reporting/EclipseEnvironment.java
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/reporting/EclipseEnvironment.java (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/reporting/EclipseEnvironment.java 2010-09-02 14:35:43 UTC (rev 24649)
@@ -0,0 +1,270 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is 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:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.usage.reporting;
+
+import java.text.MessageFormat;
+import java.util.Random;
+
+import org.eclipse.core.runtime.IProduct;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.preferences.IEclipsePreferences;
+import org.eclipse.swt.graphics.Rectangle;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.PlatformUI;
+import org.jboss.tools.usage.googleanalytics.AbstractGoogleAnalyticsParameters;
+import org.jboss.tools.usage.googleanalytics.IGoogleAnalyticsParameters;
+import org.jboss.tools.usage.internal.JBossToolsUsageActivator;
+import org.jboss.tools.usage.preferences.IUsageReportPreferenceConstants;
+import org.jboss.tools.usage.util.BundleUtils;
+import org.jboss.tools.usage.util.PreferencesUtils;
+import org.jboss.tools.usage.util.BundleUtils.IBundleEntryFilter;
+import org.osgi.framework.Bundle;
+
+/**
+ * @author Andre Dietisheim
+ */
+public class EclipseEnvironment extends AbstractGoogleAnalyticsParameters implements IGoogleAnalyticsParameters {
+
+ private static final String USERAGENT_WIN = "{0}/{1} (Windows; U; Windows NT 6.1; {2})"; //$NON-NLS-1$
+ private static final String USERAGENT_MAC = "{0}/{1} (Macintosh; U; Intel Mac OS X 10.5; {2})"; //$NON-NLS-1$
+ private static final String USERAGENT_LINUX = "{0}/{1} (X11; U; Linux i686; {2})"; //$NON-NLS-1$
+ private static final char BUNDLE_GROUP_DELIMITER = '-';
+ private static final String JBOSS_TOOLS_BUNDLES_PREFIX = "org\\.jboss\\.tools.+"; //$NON-NLS-1$
+ private static final String ECLIPSE_RUNTIME_BULDEID = "org.eclipse.core.runtime"; //$NON-NLS-1$
+
+ private String screenResolution;
+ private String screenColorDepth;
+ private Random random;
+ private IEclipsePreferences preferences;
+ private String firstVisit;
+ private String lastVisit;
+ private String currentVisit;
+ private long visitCount;
+
+ public EclipseEnvironment(String accountName, String hostName, String referral, IEclipsePreferences preferences) {
+ super(accountName, hostName, referral);
+ this.random = new Random();
+ this.preferences = preferences;
+ initScreenSettings();
+ initVisits();
+ }
+
+ protected void initScreenSettings() {
+ final Display display = getDisplay();
+ display.syncExec(new Runnable() {
+
+ public void run() {
+ screenColorDepth = display.getDepth() + SCREENCOLORDEPTH_POSTFIX;
+
+ Rectangle bounds = display.getBounds();
+ screenResolution = bounds.width + SCREERESOLUTION_DELIMITER + bounds.height;
+ }
+ });
+ }
+
+ private void initVisits() {
+ String currentTime = String.valueOf(System.currentTimeMillis());
+ this.currentVisit = currentTime;
+ this.firstVisit = preferences.get(IUsageReportPreferenceConstants.FIRST_VISIT, null);
+ if (firstVisit == null) {
+ this.firstVisit = currentTime;
+ preferences.put(IUsageReportPreferenceConstants.FIRST_VISIT, firstVisit);
+ }
+ lastVisit = preferences.get(IUsageReportPreferenceConstants.LAST_VISIT, currentTime);
+ visitCount = preferences.getLong(IUsageReportPreferenceConstants.VISIT_COUNT, 1);
+ }
+
+ public String getBrowserLanguage() {
+ String nl = getNL();
+ if (nl == null) {
+ return ""; //$NON-NLS-1$
+ }
+
+ int indexOf = nl.indexOf(JAVA_LOCALE_DELIMITER); //$NON-NLS-1$
+ if (indexOf <= 0) {
+ return nl;
+ }
+
+ StringBuilder builder = new StringBuilder();
+ builder.append(nl.substring(0, indexOf));
+ builder.append(BROWSER_LOCALE_DELIMITER);
+ builder.append(nl.substring(indexOf + 1));
+ return builder.toString();
+ }
+
+ protected String getNL() {
+ return Platform.getNL(); //$NON-NLS-1$
+ }
+
+ public String getScreenResolution() {
+ return screenResolution;
+ }
+
+ public String getScreenColorDepth() {
+ return screenColorDepth;
+ }
+
+ protected Display getDisplay() {
+ if (PlatformUI.isWorkbenchRunning()) {
+ return PlatformUI.getWorkbench().getDisplay();
+ }
+
+ Display display = Display.getCurrent();
+ if (display == null) {
+ display = Display.getDefault();
+ }
+ return display;
+ }
+
+ public String getUserAgent() {
+
+ String productId = getApplicationName();
+ String productVersion = getApplicationVersion();
+ String browserLanguage = getBrowserLanguage();
+
+ /**
+ * Google API for android: this.userAgent = String.format(
+ * "GoogleAnalytics/%s (Linux; U; Android %s; %s-%s; %s; Build/%s)" ,
+ * new Object[] { "1.0" , Build.VERSION.RELEASE ,
+ * (localLocale.getLanguage() != null) ?
+ * localLocale.getLanguage().toLowerCase() : "en" ,
+ * (localLocale.getCountry() != null) ?
+ * localLocale.getCountry().toLowerCase() : "" , Build.MODEL, Build.ID
+ * });
+ */
+
+ return MessageFormat.format(
+ getUserAgentPattern(getOS())
+ , productId
+ , productVersion
+ , browserLanguage
+ );
+ }
+
+ private String getUserAgentPattern(String os) {
+ String userAgentPattern = ""; //$NON-NLS-1$
+ /*
+ * TODO: implement architecture (i686, x86_64 etc.), Windows version, MacOS version etc.
+ */
+ if (Platform.OS_LINUX.equals(os)) {
+ return USERAGENT_LINUX; //$NON-NLS-1$
+ } else if (Platform.OS_MACOSX.equals(os)) {
+ return USERAGENT_MAC; //$NON-NLS-1$
+ } else if (Platform.OS_WIN32.equals(os)) {
+ return USERAGENT_WIN; //$NON-NLS-1$
+ }
+ return userAgentPattern;
+ }
+
+ protected String getOS() {
+ return Platform.getOS();
+ }
+
+ protected String getApplicationName() {
+ return getApplicationBundle().getSymbolicName();
+ }
+
+ protected String getApplicationVersion() {
+ String fullVersion = getApplicationBundle().getVersion().toString();
+ int productVersionStart = fullVersion.lastIndexOf(VERSION_DELIMITER);
+ if (productVersionStart > 0) {
+ return fullVersion.substring(0, productVersionStart);
+ } else {
+ return fullVersion;
+ }
+ }
+
+ /**
+ * Returns the bundle that launched the application that this class runs in.
+ *
+ * @return the defining bundle
+ */
+ private Bundle getApplicationBundle() {
+ IProduct product = Platform.getProduct();
+ if (product != null) {
+ return product.getDefiningBundle();
+ } else {
+ return Platform.getBundle(ECLIPSE_RUNTIME_BULDEID);
+ }
+ }
+
+ public String getUserId() {
+ String userId = preferences.get(IUsageReportPreferenceConstants.ECLIPSE_INSTANCE_ID, null);
+ if (userId == null) {
+ userId = createIdentifier();
+ preferences.put(IUsageReportPreferenceConstants.ECLIPSE_INSTANCE_ID, userId);
+ PreferencesUtils.checkedSavePreferences(preferences, JBossToolsUsageActivator.getDefault(), ReportingMessages.EclipseEnvironment_Error_SavePreferences);
+ }
+ return userId;
+ }
+
+ /**
+ * Creates an unique identifier.
+ *
+ * @return the identifier
+ */
+ private String createIdentifier() {
+ StringBuilder builder = new StringBuilder();
+ builder.append(Math.abs(random.nextLong()));
+ builder.append(System.currentTimeMillis());
+ return builder.toString();
+ }
+
+ public String getKeyword() {
+ JBossBundleGroups jbossBundleGroups = new JBossBundleGroups();
+ IBundleEntryFilter jbossToolsFilter = new BundleUtils.BundleSymbolicNameFilter(JBOSS_TOOLS_BUNDLES_PREFIX);
+ IBundleEntryFilter compositeFilter = new BundleUtils.CompositeFilter(
+ jbossToolsFilter
+ , jbossBundleGroups);
+ BundleUtils.getBundles(compositeFilter, getBundles());
+
+ return bundleGroupsToKeywordString(jbossBundleGroups);
+ }
+
+ protected Bundle[] getBundles() {
+ return JBossToolsUsageActivator.getDefault().getBundle().getBundleContext().getBundles();
+ }
+
+ private String bundleGroupsToKeywordString(JBossBundleGroups jbossBundleGroups) {
+ char delimiter = BUNDLE_GROUP_DELIMITER;
+ StringBuilder builder = new StringBuilder();
+ for (String bundleGroupId : jbossBundleGroups.getBundleGroupIds()) {
+ builder.append(bundleGroupId)
+ .append(delimiter);
+ }
+ return builder.toString();
+ }
+
+ public String getCurrentVisit() {
+ return currentVisit;
+ }
+
+ public String getFirstVisit() {
+ return firstVisit;
+ }
+
+ public String getLastVisit() {
+ return lastVisit;
+ }
+
+ public long getVisitCount() {
+ return visitCount;
+ }
+
+ public void visit() {
+ lastVisit = currentVisit;
+ preferences.put(IUsageReportPreferenceConstants.LAST_VISIT, lastVisit);
+ currentVisit = String.valueOf(System.currentTimeMillis());
+ visitCount++;
+ preferences.putLong(IUsageReportPreferenceConstants.VISIT_COUNT, visitCount);
+ PreferencesUtils.checkedSavePreferences(preferences, JBossToolsUsageActivator.getDefault(), ReportingMessages.EclipseEnvironment_Error_SavePreferences);
+ }
+}
Property changes on: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/reporting/EclipseEnvironment.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/reporting/JBossBundleGroups.java
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/reporting/JBossBundleGroups.java (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/reporting/JBossBundleGroups.java 2010-09-02 14:35:43 UTC (rev 24649)
@@ -0,0 +1,223 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is 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:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.usage.reporting;
+
+import java.util.Collection;
+import java.util.Set;
+import java.util.TreeSet;
+
+import org.jboss.tools.usage.util.BundleUtils.IBundleEntryFilter;
+import org.osgi.framework.Bundle;
+
+/**
+ * @author Andre Dietisheim
+ */
+public class JBossBundleGroups implements IBundleEntryFilter {
+
+ public enum BundleGroup {
+ ARCHIVES("org.jboss.ide.eclipse.archives.core",
+ "org.jboss.ide.eclipse.archives.jdt.integration",
+ "org.jboss.ide.eclipse.archives.ui"
+ )
+ , AS("org.jboss.ide.eclipse.archives.webtools",
+ "org.jboss.ide.eclipse.as.classpath.core",
+ "org.jboss.ide.eclipse.as.classpath.ui",
+ "org.jboss.ide.eclipse.as.core",
+ "org.jboss.ide.eclipse.as.doc.user",
+ "org.jboss.ide.eclipse.as.ssh",
+ "org.jboss.ide.eclipse.as.ui",
+ "org.jboss.ide.eclipse.as.ui.mbeans",
+ "org.jboss.ide.eclipse.as.wtp.core",
+ "org.jboss.ide.eclipse.as.wtp.ui")
+ , BIRT("org.jboss.tools.birt.core",
+ "org.jboss.tools.birt.oda",
+ "org.jboss.tools.birt.oda.ui")
+ , BPEL("org.eclipse.bpel.apache.ode.deploy.model",
+ "org.eclipse.bpel.apache.ode.deploy.ui",
+ "org.eclipse.bpel.common.model",
+ "org.eclipse.bpel.common.ui",
+ "org.eclipse.bpel.model",
+ "org.eclipse.bpel.ui",
+ "org.eclipse.bpel.validator",
+ "org.eclipse.bpel.wsil.model",
+ "org.eclipse.bpel.xpath10",
+ "org.jboss.tools.bpel.cheatsheet",
+ "org.jboss.tools.bpel.runtimes")
+ , CDI("org.jboss.tools.cdi.core",
+ "org.jboss.tools.cdi.text.ext",
+ "org.jboss.tools.cdi.ui",
+ "org.jboss.tools.cdi.xml",
+ "org.jboss.tools.cdi.xml.ui")
+ , DELTACLOUD("org.jboss.tools.deltacloud.core",
+ "org.jboss.tools.deltacloud.ui")
+ , DROOLS("org.drools.eclipse",
+ "org.drools.eclipse.task",
+ "org.eclipse.webdav",
+ "org.guvnor.tools",
+ "org.jboss.tools.flow.ruleflow")
+ , ESB("org.jboss.tools.esb.core",
+ "org.jboss.tools.esb.project.core",
+ "org.jboss.tools.esb.project.ui",
+ "org.jboss.tools.esb.ui",
+ "org.jboss.tools.esb.validator")
+ , FLOW("org.jboss.tools.flow.common")
+ , FREEMARKER("org.jboss.ide.eclipse.freemarker")
+ , GWT("org.jboss.tools.gwt.core",
+ "org.jboss.tools.gwt.ui")
+ , HIBERNATETOOLS("org.hibernate.eclipse",
+ "org.hibernate.eclipse.console",
+ "org.hibernate.eclipse.help",
+ "org.hibernate.eclipse.jdt.apt.ui",
+ "org.hibernate.eclipse.jdt.ui",
+ "org.hibernate.eclipse.mapper",
+ "org.jboss.tools.hibernate.jpt.core",
+ "org.jboss.tools.hibernate.jpt.ui",
+ "org.jboss.tools.hibernate.ui",
+ "org.jboss.tools.hibernate.xml",
+ "org.jboss.tools.hibernate.xml.ui")
+ , JBPM("org.jboss.tools.flow.jpdl4",
+ "org.jboss.tools.flow.jpdl4.multipage",
+ "org.jboss.tools.jbpm.common",
+ "org.jboss.tools.jbpm.convert",
+ "org.jbpm.gd.jpdl")
+ , JMX("org.jboss.tools.jmx.core",
+ "org.jboss.tools.jmx.ui")
+ , JSF("org.jboss.tools.jsf",
+ "org.jboss.tools.jsf.doc.user",
+ "org.jboss.tools.jsf.text.ext",
+ "org.jboss.tools.jsf.text.ext.facelets",
+ "org.jboss.tools.jsf.text.ext.richfaces",
+ "org.jboss.tools.jsf.ui",
+ "org.jboss.tools.jsf.verification",
+ "org.jboss.tools.jsf.vpe.ajax4jsf",
+ "org.jboss.tools.jsf.vpe.facelets",
+ "org.jboss.tools.jsf.vpe.jbpm",
+ "org.jboss.tools.jsf.vpe.jsf",
+ "org.jboss.tools.jsf.vpe.jstl",
+ "org.jboss.tools.jsf.vpe.myfaces",
+ "org.jboss.tools.jsf.vpe.richfaces",
+ "org.jboss.tools.jsf.vpe.seam")
+ , JST("org.jboss.tools.jst.css",
+ "org.jboss.tools.jst.firstrun",
+ "org.jboss.tools.jst.jsp",
+ "org.jboss.tools.jst.text.ext",
+ "org.jboss.tools.jst.web",
+ "org.jboss.tools.jst.web.kb",
+ "org.jboss.tools.jst.web.tiles",
+ "org.jboss.tools.jst.web.tiles.ui",
+ "org.jboss.tools.jst.web.ui",
+ "org.jboss.tools.jst.web.verification")
+ , LABS("org.jboss.tools.labs.pde.sourceprovider")
+ , MAVEN("org.jboss.tools.maven.cdi",
+ "org.jboss.tools.maven.core",
+ "org.jboss.tools.maven.hibernate",
+ "org.jboss.tools.maven.jsf",
+ "org.jboss.tools.maven.portlet",
+ "org.jboss.tools.maven.seam",
+ "org.jboss.tools.maven.ui")
+ , MODESHAPE("org.jboss.tools.modeshape.rest")
+ , PORTLET("org.jboss.tools.portlet.core",
+ "org.jboss.tools.portlet.ui")
+ , PROFILER("org.jboss.tools.profiler.ui")
+ , RUNTIME("org.jboss.tools.runtime")
+ , SEAM("org.jboss.tools.seam.core",
+ "org.jboss.tools.seam.doc.user",
+ "org.jboss.tools.seam.pages.xml",
+ "org.jboss.tools.seam.text.ext",
+ "org.jboss.tools.seam.ui",
+ "org.jboss.tools.seam.ui.pages",
+ "org.jboss.tools.seam.xml",
+ "org.jboss.tools.seam.xml.ui")
+ , SMOOKS("org.jboss.tools.smooks.core",
+ "org.jboss.tools.smooks.runtime",
+ "org.jboss.tools.smooks.templating",
+ "org.jboss.tools.smooks.ui")
+ , STRUTS("org.jboss.tools.struts",
+ "org.jboss.tools.struts.text.ext",
+ "org.jboss.tools.struts.ui",
+ "org.jboss.tools.struts.validator.ui",
+ "org.jboss.tools.struts.verification",
+ "org.jboss.tools.struts.vpe.struts")
+ , TPTP("org.jboss.tools.eclipse.as.tptp")
+ , VPE("org.jboss.tools.vpe",
+ "org.jboss.tools.vpe.docbook",
+ "org.jboss.tools.vpe.html",
+ "org.jboss.tools.vpe.jsp",
+ "org.jboss.tools.vpe.resref",
+ "org.jboss.tools.vpe.spring",
+ "org.jboss.tools.vpe.ui.palette",
+ "org.jboss.tools.vpe.xulrunner",
+ "org.jboss.tools.xulrunner",
+ "org.jboss.tools.xulrunner.initializer")
+ , WORKINGSET("org.jboss.tools.workingset.core",
+ "org.jboss.tools.workingset.ui")
+ , WS("rg.jboss.tools.ws.core",
+ "org.jboss.tools.ws.creation.core",
+ "org.jboss.tools.ws.creation.ui",
+ "org.jboss.tools.ws.ui")
+ , XULRUNNER("org.mozilla.xpcom",
+ "org.mozilla.xulrunner.carbon.macosx",
+ "org.mozilla.xulrunner.cocoa.macosx",
+ "org.mozilla.xulrunner.gtk.linux.x86",
+ "org.mozilla.xulrunner.gtk.linux.x86_64",
+ "org.mozilla.xulrunner.win32.win32.x86");
+
+ private String[] bundleNames;
+
+ BundleGroup(String... bundleNames) {
+ this.bundleNames = bundleNames;
+ }
+
+ /**
+ * Returns <tt>true</tt> if the given bundle name is a member of this
+ * bundle group.
+ *
+ * @param bundleName
+ * the bundle name to check whether it's a member of this
+ * group of bundles.
+ * @return <tt>true</tt>, if the given bundle
+ */
+ public boolean isMember(String bundleName) {
+ boolean isMember = false;
+ for (String name : bundleNames) {
+ if (name.equals(bundleName)) {
+ return true;
+ }
+ }
+ return isMember;
+ }
+
+ public void addGroupIdTo(Collection<String> bundleGroupIds) {
+ bundleGroupIds.add(name());
+ }
+ }
+
+ private Set<String> jbossBundleGroups = new TreeSet<String>();
+
+ /**
+ * Collects the bundle groups the bundles it gets belong
+ * to. Always returns <tt>true</tt> (does match) while collecting
+ */
+ public boolean matches(Bundle bundle) {
+ String bundleName = bundle.getSymbolicName();
+ for (BundleGroup bundleGroup : BundleGroup.values()) {
+ if (bundleGroup.isMember(bundleName)) {
+ jbossBundleGroups.add(bundleGroup.name());
+ break;
+ }
+ }
+ return true;
+ }
+
+ public Collection<String> getBundleGroupIds() {
+ return jbossBundleGroups;
+ }
+}
\ No newline at end of file
Property changes on: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/reporting/JBossBundleGroups.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/reporting/ReportingMessages.java
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/reporting/ReportingMessages.java (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/reporting/ReportingMessages.java 2010-09-02 14:35:43 UTC (rev 24649)
@@ -0,0 +1,36 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is 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:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.usage.reporting;
+
+import org.eclipse.osgi.util.NLS;
+
+public class ReportingMessages extends NLS {
+ private static final String BUNDLE_NAME = "org.jboss.tools.usage.reporting.messages"; //$NON-NLS-1$
+ public static String EclipseEnvironment_Error_SavePreferences;
+
+ public static String UsageReport_Reporting_Usage;
+ public static String UsageReport_Querying_Enablement;
+ public static String UsageReport_Asking_User;
+ public static String UsageReport_Checkbox_Text;
+ public static String UsageReport_DialogMessage;
+ public static String UsageReport_DialogTitle;
+
+ public static String UsageReport_Error_SavePreferences;
+ public static String UsageReport_GoogleAnalyticsAccount;
+ public static String UsageReport_HostName;
+ static {
+ // initialize resource bundle
+ NLS.initializeMessages(BUNDLE_NAME, ReportingMessages.class);
+ }
+
+ private ReportingMessages() {
+ }
+}
Property changes on: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/reporting/ReportingMessages.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/reporting/UsageReport.java
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/reporting/UsageReport.java (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/reporting/UsageReport.java 2010-09-02 14:35:43 UTC (rev 24649)
@@ -0,0 +1,177 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is 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:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.usage.reporting;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.jobs.IJobChangeEvent;
+import org.eclipse.core.runtime.jobs.IJobChangeListener;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.jface.window.Window;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.progress.UIJob;
+import org.jboss.tools.usage.FocusPoint;
+import org.jboss.tools.usage.HttpGetRequest;
+import org.jboss.tools.usage.IHttpGetRequest;
+import org.jboss.tools.usage.ILoggingAdapter;
+import org.jboss.tools.usage.ITracker;
+import org.jboss.tools.usage.IURLBuildingStrategy;
+import org.jboss.tools.usage.PluginLogger;
+import org.jboss.tools.usage.Tracker;
+import org.jboss.tools.usage.googleanalytics.GoogleAnalyticsUrlStrategy;
+import org.jboss.tools.usage.googleanalytics.IGoogleAnalyticsParameters;
+import org.jboss.tools.usage.internal.JBossToolsUsageActivator;
+import org.jboss.tools.usage.preferences.GlobalUsageReportingSettings;
+import org.jboss.tools.usage.preferences.UsageReportPreferences;
+import org.jboss.tools.usage.util.PreferencesUtils;
+import org.jboss.tools.usage.util.StatusUtils;
+import org.osgi.service.prefs.BackingStoreException;
+
+/**
+ * @author Andre Dietisheim
+ */
+public class UsageReport {
+
+ private static final String GANALYTICS_ACCOUNTNAME = ReportingMessages.UsageReport_GoogleAnalyticsAccount;
+
+ private static final String HOST_NAME = ReportingMessages.UsageReport_HostName;
+
+ private FocusPoint focusPoint = new FocusPoint("tools") //$NON-NLS-1$
+ .setChild(new FocusPoint("usage") //$NON-NLS-1$
+ .setChild(new FocusPoint("action") //$NON-NLS-1$
+ .setChild(new FocusPoint("wsstartup")))); //$NON-NLS-1$
+
+ private GlobalUsageReportingSettings globalSettings = new GlobalUsageReportingSettings(JBossToolsUsageActivator
+ .getDefault());
+
+ public void report() {
+ new ReportingJob().schedule();
+ }
+
+ private void askUser() {
+ UsageReportEnablementDialog dialog = new UsageReportEnablementDialog(
+ true,
+ PlatformUI.getWorkbench().getActiveWorkbenchWindow());
+ if (dialog.open() == Window.OK) {
+ UsageReportPreferences.setEnabled(dialog.isReportEnabled());
+ UsageReportPreferences.setAskUser(false);
+ flushPreferences();
+ }
+ }
+
+ private void flushPreferences() {
+ try {
+ UsageReportPreferences.flush();
+ } catch (BackingStoreException e) {
+ IStatus status = StatusUtils.getErrorStatus(JBossToolsUsageActivator.PLUGIN_ID,
+ ReportingMessages.UsageReport_Error_SavePreferences, e);
+ JBossToolsUsageActivator.getDefault().getLog().log(status);
+ }
+ }
+
+ private void doReport() {
+ if (UsageReportPreferences.isEnabled()) {
+ getTracker().trackAsynchronously(focusPoint);
+ }
+ }
+
+ private ITracker getTracker() {
+ IGoogleAnalyticsParameters eclipseEnvironment = new EclipseEnvironment(
+ GANALYTICS_ACCOUNTNAME
+ , HOST_NAME
+ , IGoogleAnalyticsParameters.VALUE_NO_REFERRAL
+ , PreferencesUtils.getPreferences());
+ ILoggingAdapter loggingAdapter = new PluginLogger(JBossToolsUsageActivator.getDefault());
+ IURLBuildingStrategy urlStrategy = new GoogleAnalyticsUrlStrategy(eclipseEnvironment);
+ IHttpGetRequest httpGetRequest = new HttpGetRequest(eclipseEnvironment.getUserAgent(), loggingAdapter);
+ return new Tracker(urlStrategy, httpGetRequest, loggingAdapter);
+ }
+
+ private class ReportingJob extends Job {
+ private ReportingJob() {
+ super(ReportingMessages.UsageReport_Reporting_Usage);
+ }
+
+ @Override
+ protected IStatus run(IProgressMonitor monitor) {
+ if (monitor.isCanceled()) {
+ return Status.CANCEL_STATUS;
+ }
+ monitor.beginTask(ReportingMessages.UsageReport_Querying_Enablement, 2);
+ if (globalSettings.isEnabled()) {
+ if (monitor.isCanceled()) {
+ return Status.CANCEL_STATUS;
+ }
+ monitor.worked(1);
+ if (UsageReportPreferences.isAskUser()) {
+ if (monitor.isCanceled()) {
+ return Status.CANCEL_STATUS;
+ }
+ askUserAndReport();
+ } else {
+ if (monitor.isCanceled()) {
+ return Status.CANCEL_STATUS;
+ }
+ doReport();
+ }
+ monitor.worked(2);
+ monitor.done();
+ }
+ return Status.OK_STATUS;
+ }
+
+ private void askUserAndReport() {
+ Job askUserJob = new AskUserJob();
+ askUserJob.addJobChangeListener(new IJobChangeListener() {
+
+ public void sleeping(IJobChangeEvent event) {
+ // ignore
+ }
+
+ public void scheduled(IJobChangeEvent event) {
+ // ignore
+ }
+
+ public void running(IJobChangeEvent event) {
+ // ignore
+ }
+
+ public void done(IJobChangeEvent event) {
+ doReport();
+ }
+
+ public void awake(IJobChangeEvent event) {
+ // ignore
+ }
+
+ public void aboutToRun(IJobChangeEvent event) {
+ // ignore
+ }
+ });
+ askUserJob.setUser(true);
+ askUserJob.setPriority(Job.SHORT);
+ askUserJob.schedule();
+ }
+ }
+
+ private class AskUserJob extends UIJob {
+ private AskUserJob() {
+ super(ReportingMessages.UsageReport_Asking_User);
+ }
+
+ @Override
+ public IStatus runInUIThread(IProgressMonitor monitor) {
+ askUser();
+ return Status.OK_STATUS;
+ }
+ }
+}
Property changes on: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/reporting/UsageReport.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/reporting/UsageReportDispatcher.java
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/reporting/UsageReportDispatcher.java (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/reporting/UsageReportDispatcher.java 2010-09-02 14:35:43 UTC (rev 24649)
@@ -0,0 +1,29 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is 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:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.usage.reporting;
+
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.IStartup;
+
+/**
+ * @author Andre Dieitsheim
+ */
+public class UsageReportDispatcher implements IStartup {
+
+ public void earlyStartup() {
+ Display.getDefault().asyncExec(new Runnable() {
+
+ public void run() {
+ new UsageReport().report();
+ }
+ });
+ }
+}
Property changes on: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/reporting/UsageReportDispatcher.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/reporting/UsageReportEnablementDialog.java
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/reporting/UsageReportEnablementDialog.java (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/reporting/UsageReportEnablementDialog.java 2010-09-02 14:35:43 UTC (rev 24649)
@@ -0,0 +1,95 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is 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:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.usage.reporting;
+
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.layout.GridDataFactory;
+import org.eclipse.jface.window.IShellProvider;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Link;
+import org.eclipse.swt.widgets.Shell;
+import org.jboss.tools.usage.internal.JBossToolsUsageActivator;
+import org.jboss.tools.usage.util.BrowserUtil;
+
+/**
+ * @author Andre Dietisheim
+ */
+public class UsageReportEnablementDialog extends Dialog {
+
+ protected static final String USAGE_URL = "http://jboss.org/tools/usage"; // $NON
+ private Button checkBox;
+ private boolean reportEnabled;
+
+ public UsageReportEnablementDialog(boolean reportEnabled, IShellProvider parentShell) {
+ super(parentShell);
+ this.reportEnabled = reportEnabled;
+ }
+
+ protected void buttonPressed(int buttonId) {
+ if (buttonId == IDialogConstants.OK_ID) {
+ this.reportEnabled = checkBox.getSelection();
+ } else if (buttonId == IDialogConstants.CANCEL_ID) {
+ this.reportEnabled = false;
+ }
+ super.buttonPressed(buttonId);
+ }
+
+ protected void configureShell(Shell shell) {
+ super.configureShell(shell);
+ shell.setText(ReportingMessages.UsageReport_DialogTitle);
+ }
+
+ protected void createButtonsForButtonBar(Composite parent) {
+ createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true);
+ createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false);
+ checkBox.setFocus();
+ checkBox.setSelection(reportEnabled);
+ }
+
+ protected Control createDialogArea(Composite parent) {
+ Composite composite = (Composite) super.createDialogArea(parent);
+
+ // message
+ Link link = new Link(composite, SWT.WRAP);
+ link.setFont(parent.getFont());
+ link.setText(ReportingMessages.UsageReport_DialogMessage);
+ link.addSelectionListener(new SelectionAdapter() {
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ BrowserUtil.checkedCreateExternalBrowser(USAGE_URL, JBossToolsUsageActivator.PLUGIN_ID, JBossToolsUsageActivator.getDefault().getLog());
+ }
+ });
+ GridDataFactory.fillDefaults()
+ .align(SWT.FILL, SWT.CENTER)
+ .grab(true, false)
+ .hint(IDialogConstants.MINIMUM_MESSAGE_AREA_WIDTH, SWT.DEFAULT)
+ .applyTo(link);
+
+ // checkbox
+ checkBox = new Button(composite, SWT.CHECK);
+ checkBox.setText(ReportingMessages.UsageReport_Checkbox_Text);
+ GridDataFactory.fillDefaults().grab(true, false).align(SWT.LEFT, SWT.CENTER).applyTo(checkBox);
+
+ applyDialogFont(composite);
+
+ return composite;
+ }
+
+ public boolean isReportEnabled() {
+ return reportEnabled;
+ }
+}
Property changes on: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/reporting/UsageReportEnablementDialog.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/reporting/messages.properties
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/reporting/messages.properties (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/reporting/messages.properties 2010-09-02 14:35:43 UTC (rev 24649)
@@ -0,0 +1,10 @@
+EclipseEnvironment_Error_SavePreferences=Could not sage {0} to preferences.
+UsageReport_Reporting_Usage=Reporting JBoss Tools usage
+UsageReport_Querying_Enablement=Querying whether reporting is globally enabled
+UsageReport_Asking_User=Asking User to allow reporting
+UsageReport_Checkbox_Text=Report usage of JBoss Tools to JBoss Tools team.
+UsageReport_DialogMessage=Please allow the JBoss Tools team to receive anonymous usage statistics for this Eclipse installation with JBoss tools (<a>info</a>).
+UsageReport_DialogTitle=JBoss Tools Usage
+UsageReport_Error_SavePreferences=Could not save preferences {0}
+UsageReport_GoogleAnalyticsAccount=UA-17645367-1
+UsageReport_HostName=jboss.org
Property changes on: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/reporting/messages.properties
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/util/BrowserUtil.java
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/util/BrowserUtil.java (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/util/BrowserUtil.java 2010-09-02 14:35:43 UTC (rev 24649)
@@ -0,0 +1,71 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is 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:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.usage.util;
+
+import java.net.MalformedURLException;
+import java.net.URL;
+
+import org.eclipse.core.runtime.ILog;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.browser.IWebBrowser;
+
+public class BrowserUtil {
+
+ /**
+ * Opens a browser for the given url with the given id. If an error occurs
+ * it will be reported to the given log provider with the given plugin id.
+ *
+ * @param url
+ * the url to open a browser for.
+ * @param browserId
+ * the id for the new browser.
+ * @param pluginId
+ * the plugin id to log for.
+ * @param log
+ * the log provider to log against if an error occurred.
+ */
+ public static void checkedCreateInternalBrowser(String url, String browserId, String pluginId, ILog log) {
+ try {
+ openUrl(url, PlatformUI.getWorkbench().getBrowserSupport().createBrowser(browserId), pluginId, log);
+ } catch (PartInitException e) {
+ IStatus errorStatus = StatusUtils.getErrorStatus(pluginId, "Could not open browser for url \"{0}\".", e,
+ url);
+ log.log(errorStatus);
+ }
+ }
+
+
+ public static void checkedCreateExternalBrowser(String url, String pluginId, ILog log) {
+ try {
+ openUrl(url, PlatformUI.getWorkbench().getBrowserSupport().getExternalBrowser(), pluginId, log);
+ } catch (PartInitException e) {
+ IStatus errorStatus = StatusUtils.getErrorStatus(pluginId, "Could not open browser for url \"{0}\".", e,
+ url);
+ log.log(errorStatus);
+ }
+ }
+
+ public static void openUrl(String url, IWebBrowser browser, String pluginId, ILog log) {
+ try {
+ browser.openURL(new URL(url));
+ } catch (PartInitException e) {
+ IStatus errorStatus = StatusUtils.getErrorStatus(pluginId, "Could not open browser for url \"{0}\".", e,
+ url);
+ log.log(errorStatus);
+ } catch (MalformedURLException e) {
+ IStatus errorStatus = StatusUtils.getErrorStatus(pluginId, "Could not display malformed url \"{0}\".", e,
+ url);
+ log.log(errorStatus);
+ }
+ }
+}
Property changes on: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/util/BrowserUtil.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/util/BundleUtils.java
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/util/BundleUtils.java (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/util/BundleUtils.java 2010-09-02 14:35:43 UTC (rev 24649)
@@ -0,0 +1,118 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is 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:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.usage.util;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.regex.Pattern;
+
+import org.eclipse.core.runtime.Assert;
+import org.osgi.framework.Bundle;
+
+/**
+ * @author Andre Dietisheim
+ */
+public class BundleUtils {
+
+ /**
+ * Returns the bundles among the available ones that match the given filter.
+ *
+ * @param filter the filter to match the available bundles against
+ * @param bundles the bundles
+ * @return the bundles that match the given filter
+ */
+ public static List<Bundle> getBundles(IBundleEntryFilter filter, Bundle[] bundles) {
+ List<Bundle> bundleList = new ArrayList<Bundle>();
+ for (Bundle bundle : bundles) {
+ if (filter.matches(bundle)) {
+ bundleList.add(bundle);
+ }
+ }
+ return bundleList;
+ }
+
+ /**
+ * Returns the bundles that have a symbolic name that match the given regex.
+ *
+ * @param bundleSymbolicNameRegex the symbolic name regex to match.
+ * @param bundles the bundles
+ * @return the bundles
+ */
+ public static List<Bundle> getBundles(String bundleSymbolicNameRegex, Bundle[] bundles) {
+ return getBundles(new BundleSymbolicNameFilter(bundleSymbolicNameRegex), bundles);
+ }
+
+ /**
+ * A filter that matches bundles against a given symbolic name regex.
+ */
+ public static class BundleSymbolicNameFilter implements IBundleEntryFilter {
+
+ private Pattern pattern;
+
+ public BundleSymbolicNameFilter(String symbolicNameRegex) {
+ this.pattern = Pattern.compile(symbolicNameRegex);
+ }
+
+ public boolean matches(Bundle bundle) {
+ Assert.isTrue(bundle != null);
+
+ return pattern.matcher(bundle.getSymbolicName()).matches();
+ }
+
+ }
+
+ /**
+ * A filter that applies several given filters
+ */
+ public static class CompositeFilter implements IBundleEntryFilter {
+
+ private IBundleEntryFilter filters[];
+
+ /**
+ * Instantiates a new composite filter that applies several given
+ * filters.
+ *
+ * @param filters
+ * the filters
+ */
+ public CompositeFilter(IBundleEntryFilter... filters) {
+ this.filters = filters;
+ }
+
+ /**
+ * Applies the filters this composite filter has. All filters have to
+ * match so that the filter says the given bundle matches.
+ */
+ public boolean matches(Bundle bundle) {
+ for (IBundleEntryFilter filter : filters) {
+ if (!filter.matches(bundle)) {
+ return false;
+ }
+ }
+ return true;
+ }
+ }
+
+ /**
+ * The Interface IBundleEntryFilter.
+ */
+ public static interface IBundleEntryFilter {
+
+ /**
+ * Matches.
+ *
+ * @param bundle
+ * the bundle
+ * @return true, if successful
+ */
+ public boolean matches(Bundle bundle);
+ }
+}
Property changes on: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/util/BundleUtils.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/util/HttpEncodingUtils.java
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/util/HttpEncodingUtils.java (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/util/HttpEncodingUtils.java 2010-09-02 14:35:43 UTC (rev 24649)
@@ -0,0 +1,61 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is 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:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.usage.util;
+
+import java.io.UnsupportedEncodingException;
+import java.net.URLEncoder;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+/**
+ * @author Andre Dietisheim
+ */
+public class HttpEncodingUtils {
+
+ private static final String ENCODING_UTF8 = "UTF-8";
+
+ private static Pattern CHARSET_ENCODING_PATTERN = Pattern.compile("charset=(.+)");
+
+ /**
+ * Encodes the given string in utf8 while catching exceptions that may
+ * occur. If an encoding exception occurs, <tt>null</tt> is returned
+ *
+ * @param aString
+ * the a string to be encoded
+ * @return the encoded string or <tt>null</tt> if an error occured while
+ * encoding
+ */
+ public static String checkedEncodeUtf8(String aString) {
+ try {
+ return URLEncoder.encode(aString, ENCODING_UTF8);
+ } catch (UnsupportedEncodingException e) {
+ return aString;
+ }
+ }
+
+ /**
+ * Returns the charset indicated in the content-type field of the http
+ * header. Returns <tt>null</tt> if none is indicated.
+ *
+ * @param contentType
+ * the content type
+ * @return the content type charset or <tt>null</tt>
+ */
+ public static String getContentTypeCharset(String contentType) {
+ Matcher matcher = CHARSET_ENCODING_PATTERN.matcher(contentType);
+ if (!matcher.find()) {
+ return null;
+ }
+
+ return matcher.group(1);
+ }
+
+}
Property changes on: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/util/HttpEncodingUtils.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/util/PreferencesUtils.java
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/util/PreferencesUtils.java (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/util/PreferencesUtils.java 2010-09-02 14:35:43 UTC (rev 24649)
@@ -0,0 +1,48 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is 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:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.usage.util;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Plugin;
+import org.eclipse.core.runtime.preferences.ConfigurationScope;
+import org.eclipse.core.runtime.preferences.IEclipsePreferences;
+import org.eclipse.jface.preference.IPersistentPreferenceStore;
+import org.eclipse.ui.preferences.ScopedPreferenceStore;
+import org.jboss.tools.usage.internal.JBossToolsUsageActivator;
+import org.jboss.tools.usage.reporting.ReportingMessages;
+import org.osgi.service.prefs.BackingStoreException;
+
+public class PreferencesUtils {
+
+ private PreferencesUtils() {
+ // inhibit instantiation
+ }
+
+ public static IEclipsePreferences getPreferences() {
+ return new ConfigurationScope().getNode(JBossToolsUsageActivator.PLUGIN_ID);
+ }
+
+ public static IPersistentPreferenceStore getStore() {
+ return new ScopedPreferenceStore(new ConfigurationScope(), JBossToolsUsageActivator.PLUGIN_ID);
+ }
+
+ public static void checkedSavePreferences(IEclipsePreferences preferences, Plugin plugin, String message) {
+ try {
+ preferences.flush();
+ } catch (BackingStoreException e) {
+ IStatus status = StatusUtils.getErrorStatus(plugin.getBundle().getSymbolicName(),
+ ReportingMessages.EclipseEnvironment_Error_SavePreferences,
+ e, message);
+ plugin.getLog().log(status);
+ }
+
+ }
+}
Property changes on: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/util/PreferencesUtils.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/util/StatusUtils.java
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/util/StatusUtils.java (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/util/StatusUtils.java 2010-09-02 14:35:43 UTC (rev 24649)
@@ -0,0 +1,84 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is 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:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.usage.util;
+
+import java.text.MessageFormat;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+
+/**
+ * @author Andre Dietisheim
+ */
+public class StatusUtils {
+
+ private StatusUtils() {
+ // inhibit instantiation
+ }
+
+ /**
+ * Returns an error status for a given plugin id, message and arguments.
+ *
+ * @param pluginId
+ * the plugin id
+ * @param message
+ * the message
+ * @param throwable
+ * the throwable
+ * @param messageArguments
+ * the message arguments
+ * @return the error status
+ */
+ public static IStatus getErrorStatus(String pluginId, String message, Throwable throwable,
+ Object... messageArguments) {
+ String formattedMessage = null;
+ if (message != null) {
+ formattedMessage = MessageFormat.format(message, messageArguments);
+ }
+ return new Status(Status.ERROR, pluginId, Status.ERROR, formattedMessage,
+ throwable);
+ }
+
+ /**
+ * Returns an debug status for a given plugin id, message and arguments.
+ *
+ * @param pluginId
+ * the plugin id
+ * @param message
+ * the message
+ * @param messageArguments
+ * the message arguments
+ *
+ * @return the debug status
+ */
+ public static IStatus getDebugStatus(String pluginId, String message, Object... messageArguments) {
+ return new Status(Status.INFO, pluginId, Status.INFO, MessageFormat.format(message, messageArguments), null);
+ }
+
+ /**
+ * Clones a given status.
+ *
+ * @param status
+ * the status
+ *
+ * @return the i status
+ */
+ public static IStatus clone(IStatus status) {
+ switch (status.getSeverity()) {
+ case IStatus.INFO:
+ return getDebugStatus(status.getPlugin(), status.getMessage());
+ case IStatus.ERROR:
+ return getErrorStatus(status.getPlugin(), status.getMessage(), status.getException());
+ default:
+ throw new UnsupportedOperationException("noy implemented yet!");
+ }
+ }
+}
Property changes on: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/util/StatusUtils.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/util/reader/AppendUntilAlternativeImpl.java
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/util/reader/AppendUntilAlternativeImpl.java (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/util/reader/AppendUntilAlternativeImpl.java 2010-09-02 14:35:43 UTC (rev 24649)
@@ -0,0 +1,47 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is 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:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.usage.util.reader;
+
+import java.io.IOException;
+import java.io.Reader;
+import java.io.Writer;
+
+/**
+ * @author Andre Dietisheim
+ */
+public class AppendUntilAlternativeImpl extends ReadUntilAlternativesImpl {
+
+ private Writer writer;
+ private int numOfWrittenCharacters;
+
+ public AppendUntilAlternativeImpl(Reader reader, Writer writer, String... alternatives) {
+ super(reader, alternatives);
+ this.writer = writer;
+ }
+
+ @Override
+ protected boolean doContinueRead(char character, int numberOfCharactersRead) throws IOException {
+ if (super.doContinueRead(character, numberOfCharactersRead)) {
+ if (!isMatching()) {
+ // don't append matching characters
+ writer.write(character);
+ numOfWrittenCharacters++;
+ }
+ return true;
+ } else {
+ return false;
+ }
+ }
+
+ public int getNumOfWrittenCharacters() {
+ return numOfWrittenCharacters;
+ }
+}
\ No newline at end of file
Property changes on: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/util/reader/AppendUntilAlternativeImpl.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/util/reader/AppendUntilImpl.java
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/util/reader/AppendUntilImpl.java (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/util/reader/AppendUntilImpl.java 2010-09-02 14:35:43 UTC (rev 24649)
@@ -0,0 +1,48 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is 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:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+
+package org.jboss.tools.usage.util.reader;
+
+import java.io.IOException;
+import java.io.Reader;
+import java.io.Writer;
+
+/**
+ * @author Andre Dietisheim
+ */
+public class AppendUntilImpl extends ReadUntilImpl {
+
+ private Writer writer;
+ private int numOfWrittenCharacters;
+
+ public AppendUntilImpl(Reader reader, Writer writer, char... character) {
+ super(reader, character);
+ this.writer = writer;
+ }
+
+ @Override
+ protected boolean doContinueRead(char character, int numberOfCharactersRead) throws IOException {
+ if (super.doContinueRead(character, numberOfCharactersRead)) {
+ if (!isMatching()) {
+ // don't append matching characters
+ writer.write(character);
+ numOfWrittenCharacters++;
+ }
+ return true;
+ } else {
+ return false;
+ }
+ }
+
+ public int getNumOfWrittenCharacters() {
+ return numOfWrittenCharacters;
+ }
+}
\ No newline at end of file
Property changes on: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/util/reader/AppendUntilImpl.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/util/reader/ReadUntilAlternativesImpl.java
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/util/reader/ReadUntilAlternativesImpl.java (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/util/reader/ReadUntilAlternativesImpl.java 2010-09-02 14:35:43 UTC (rev 24649)
@@ -0,0 +1,116 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is 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:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.usage.util.reader;
+
+import java.io.Reader;
+
+/**
+ * @author Andre Dietisheim
+ */
+public class ReadUntilAlternativesImpl extends ReadUntilImpl {
+
+ private char[][] allAlternatives;
+ private char[] currentAlternative;
+ private int alternativesIndex = -1;
+
+ public ReadUntilAlternativesImpl(Reader reader, String... stringAlternatives) {
+ super(reader);
+ initAlternativesCharSequences(stringAlternatives);
+ }
+
+ private void initAlternativesCharSequences(String... stringAlternatives) {
+ this.allAlternatives = new char[stringAlternatives.length][];
+ for (int i = 0; i < stringAlternatives.length; i++) {
+ this.allAlternatives[i] = stringAlternatives[i].toCharArray();
+ }
+ }
+
+ @Override
+ protected int getNumberOfCharactersToMatch() {
+ if (currentAlternative != null) {
+ return currentAlternative.length;
+ } else {
+ return 0;
+ }
+ }
+
+ @Override
+ protected boolean doesMatch(char character) {
+ if (currentAlternative == null || currentAlternative[getMatchingIndex()] != character) {
+ // current alternative does not match new character, select a new
+ // alternative
+ boolean newAlternativeSelected = matchAlternative(character);
+ if (!newAlternativeSelected) {
+ // no alternative matches current character + new one
+ setMatchingIndex(0);
+ }
+ return newAlternativeSelected;
+ } else {
+ return true;
+ }
+ }
+
+ /**
+ * Returns whether the given character matches an alternative (in other
+ * words the given character matches an alternative at the current matching
+ * index).
+ *
+ * @param character
+ * the character
+ * @return true, if successful
+ */
+ private boolean matchAlternative(char character) {
+ for (int i = alternativesIndex + 1; i < allAlternatives.length; i++) {
+ char[] alternative = allAlternatives[i];
+ if (doesMatch(character, alternative)) {
+ this.currentAlternative = alternative;
+ this.alternativesIndex = i;
+ return true;
+ }
+
+ }
+ this.currentAlternative = null;
+ this.alternativesIndex = -1;
+ return false;
+ }
+
+ /**
+ * Returns whether the given potentially matching alternative (String)
+ * matches the currently selected alternative and the additional character.
+ *
+ * @param character
+ * @param potentiallyMatchingAlternative
+ * the new alternative that could match
+ * @return
+ */
+ private boolean doesMatch(char character, char[] potentiallyMatchingAlternative) {
+ int currentMatchingIndex = getMatchingIndex();
+ for (int j = 0; j < currentMatchingIndex; j++) {
+ if (potentiallyMatchingAlternative[j] != currentAlternative[j]) {
+ return false;
+ }
+ }
+ return potentiallyMatchingAlternative[currentMatchingIndex] == character;
+ }
+
+ @Override
+ protected char[] getCharactersToMatch() {
+ return currentAlternative;
+ }
+
+ public String getAlternative() {
+ if (alternativesIndex >= 0) {
+ return new String(allAlternatives[alternativesIndex]);
+ } else {
+ return null;
+ }
+ }
+}
\ No newline at end of file
Property changes on: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/util/reader/ReadUntilAlternativesImpl.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/util/reader/ReadUntilImpl.java
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/util/reader/ReadUntilImpl.java (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/util/reader/ReadUntilImpl.java 2010-09-02 14:35:43 UTC (rev 24649)
@@ -0,0 +1,97 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is 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:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.usage.util.reader;
+
+import java.io.IOException;
+import java.io.Reader;
+
+/**
+ * @author Andre Dietisheim
+ */
+public class ReadUntilImpl implements ReaderVisitor {
+
+ /** returned by a stream if the end of the stream is reached. */
+ private static final char EOS = (char) -1;
+
+ private Reader reader;
+ private boolean matched = false;
+ private int numberOfCharactersRead;
+ private char[] characters;
+ private int matchingCharactersIndex = 0;
+
+ public ReadUntilImpl(Reader reader, char... characters) {
+ this.reader = reader;
+ this.numberOfCharactersRead = 0;
+ this.characters = characters;
+ }
+
+ public final boolean continueRead(char character, int numberOfCharactersRead) throws IOException {
+ this.numberOfCharactersRead = numberOfCharactersRead;
+ return doContinueRead(character, numberOfCharactersRead);
+ }
+
+ protected boolean doContinueRead(char character, int numberOfCharactersRead) throws IOException {
+ boolean continueRead = false;
+ boolean matches = doesMatch(character);
+ if (!matches) {
+ continueRead = !matches;
+ } else {
+ int matchingIndex = getMatchingIndex() + 1;
+ setMatchingIndex(matchingIndex);
+ continueRead = matches
+ && matchingIndex < getNumberOfCharactersToMatch();
+ }
+
+ setMatches(matches);
+ return continueRead;
+ }
+
+ public boolean isMatching() {
+ return matched;
+ }
+
+ public int getNumberOfCharactersRead() {
+ return this.numberOfCharactersRead;
+ }
+
+ public void read() throws IOException {
+ char character = 0;
+ while ((character = (char) reader.read()) != EOS) {
+ if (!continueRead(character, ++numberOfCharactersRead)) {
+ return;
+ }
+ }
+ }
+
+ protected void setMatchingIndex(int index) {
+ this.matchingCharactersIndex = index;
+ }
+
+ protected int getMatchingIndex() {
+ return matchingCharactersIndex;
+ }
+
+ protected boolean doesMatch(char character) {
+ return characters[matchingCharactersIndex] == character;
+ }
+
+ protected int getNumberOfCharactersToMatch() {
+ return characters.length;
+ }
+
+ protected char[] getCharactersToMatch() {
+ return characters;
+ }
+
+ protected void setMatches(boolean matches) {
+ matched = matches;
+ }
+}
\ No newline at end of file
Property changes on: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/util/reader/ReadUntilImpl.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/util/reader/ReaderUtils.java
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/util/reader/ReaderUtils.java (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/util/reader/ReaderUtils.java 2010-09-02 14:35:43 UTC (rev 24649)
@@ -0,0 +1,96 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is 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:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.usage.util.reader;
+
+import java.io.CharArrayWriter;
+import java.io.IOException;
+import java.io.Reader;
+import java.io.Writer;
+
+/**
+ * @author Andre Dietisheim
+ */
+public class ReaderUtils {
+
+ /**
+ * Reads from the given input stream until a signal is found. The signal
+ * itself is not appended to the string that is returned.
+ * <p>
+ * This method does not read any further as the maximum number of bytes
+ * given and the end of the stream is reached. If the signal's not found
+ * <tt>null</tt> is returned.
+ *
+ * @param signal
+ * the signal
+ * @param maxRead
+ * the max number of bytes to read
+ * @param reader
+ * the reader
+ * @return the string that holds the bytes read
+ * @throws Exception
+ */
+ public static String readStringUntil(Reader reader, char... signal) throws IOException {
+ Writer writer = new CharArrayWriter();
+ AppendUntilImpl visitor = new AppendUntilImpl(reader, writer, signal);
+ try {
+ visitor.read();
+ if (!visitor.isMatching()
+ || visitor.getNumOfWrittenCharacters() == 0) {
+ return null;
+ }
+ writer.flush();
+ return writer.toString();
+ } finally {
+ writer.close();
+ }
+ }
+
+ public static String readStringUntil(Reader reader, String signal) throws IOException {
+ return readStringUntil(reader, signal.toCharArray());
+ }
+
+ public static String readStringUntil(Reader reader, String... alternatives) throws IOException {
+ Writer writer = new CharArrayWriter();
+ AppendUntilAlternativeImpl visitor = new AppendUntilAlternativeImpl(reader, writer, alternatives);
+ try {
+ visitor.read();
+ if (!visitor.isMatching()
+ || visitor.getNumOfWrittenCharacters() == 0) {
+ return null;
+ }
+ writer.flush();
+ return writer.toString();
+ } finally {
+ writer.close();
+ }
+ }
+
+ /**
+ * Skips the characters in the given reader until one of the given
+ * alternatives is found.
+ *
+ * @param maxRead
+ * the max number of characters to read
+ * @param reader
+ * the reader to read from
+ * @param alternatives
+ * the strings to find (alternatively) in the reader
+ * @return the index of the alternative that was found or <tt>-1</tt> if
+ * none was found
+ * @throws IOException
+ * Signals that an I/O exception has occurred.
+ */
+ public static String skipUntil(Reader reader, String... alternatives) throws IOException {
+ ReadUntilAlternativesImpl visitor = new ReadUntilAlternativesImpl(reader, alternatives);
+ visitor.read();
+ return visitor.getAlternative();
+ }
+}
Property changes on: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/util/reader/ReaderUtils.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/util/reader/ReaderVisitor.java
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/util/reader/ReaderVisitor.java (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/util/reader/ReaderVisitor.java 2010-09-02 14:35:43 UTC (rev 24649)
@@ -0,0 +1,19 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is 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:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.usage.util.reader;
+
+/**
+ * @author Andre Dietisheim
+ */
+public interface ReaderVisitor {
+ public boolean continueRead(char character, int numberOfCharactersRead) throws Exception;
+ public int getNumberOfCharactersRead();
+}
Property changes on: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage/src/org/jboss/tools/usage/util/reader/ReaderVisitor.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.feature/.project
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.feature/.project (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.feature/.project 2010-09-02 14:35:43 UTC (rev 24649)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.jboss.tools.usage.feature</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.pde.FeatureBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.FeatureNature</nature>
+ </natures>
+</projectDescription>
Property changes on: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.feature/.project
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.feature/build.properties
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.feature/build.properties (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.feature/build.properties 2010-09-02 14:35:43 UTC (rev 24649)
@@ -0,0 +1,3 @@
+bin.includes = feature.xml,\
+ license.html,\
+ feature.properties
Property changes on: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.feature/build.properties
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.feature/feature.properties
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.feature/feature.properties (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.feature/feature.properties 2010-09-02 14:35:43 UTC (rev 24649)
@@ -0,0 +1,54 @@
+###############################################################################
+# Copyright (c) 2008-2010 JBoss by Red Hat 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:
+# JBoss by Red Hat - Initial implementation.
+##############################################################################
+# feature.properties
+# contains externalized strings for feature.xml
+# "%foo" in feature.xml corresponds to the key "foo" in this file
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# This file should be translated.
+
+# "featureName" property - name of the feature
+featureName=JBoss Tools Usage Reporting
+
+# "providerName" property - name of the company that provides the feature
+providerName=JBoss by Red Hat
+
+# "updateSiteName" property - label for the update site
+updateSiteName=JBossTools Update Site
+
+# "description" property - description of the feature
+description=JBoss Tools Usage Reporting
+
+# "copyright" property - text of the "Feature Update Copyright"
+copyright=Copyright (c) 2008-2010 JBoss by Red Hat and others.\n\
+All rights reserved. This program and the accompanying materials\n\
+are made available under the terms of the Eclipse Public License v1.0\n\
+which accompanies this distribution, and is available at\n\
+http\://www.eclipse.org/legal/epl-v10.html\n\n\
+Contributors\:\n\
+JBoss by Red Hat - Initial implementation.
+ ############### end of copyright property ####################################
+
+# "licenseURL" property - URL of the "Feature License"
+# do not translate value - just change to point to a locale-specific HTML page
+licenseURL=license.html
+
+# START NON-TRANSLATABLE
+# "license" property - text of the "Feature Update License"
+# should be plain text version of license agreement pointed to be "licenseURL"
+license=Red Hat, Inc. licenses these features and plugins to you under \
+certain open source licenses (or aggregations of such licenses), which \
+in a particular case may include the Eclipse Public License, the GNU \
+Lesser General Public License, and/or certain other open source \
+licenses. For precise licensing details, consult the corresponding \
+source code, or contact Red Hat Legal Affairs, 1801 Varsity Drive, \
+Raleigh NC 27606 USA.
+# END NON-TRANSLATABLE
+########### end of license property ##########################################
Property changes on: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.feature/feature.properties
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.feature/feature.xml
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.feature/feature.xml (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.feature/feature.xml 2010-09-02 14:35:43 UTC (rev 24649)
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<feature
+ id="org.jboss.tools.usage.feature"
+ label="%featureName"
+ version="1.0.0.qualifier"
+ provider-name="%providerName">
+
+ <description>
+ %description
+ </description>
+
+ <copyright>
+ %copyright
+ </copyright>
+
+ <license url="%licenseURL">
+ %license
+ </license>
+
+ <plugin
+ id="org.jboss.tools.usage"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+</feature>
Property changes on: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.feature/feature.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.feature/license.html
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.feature/license.html (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.feature/license.html 2010-09-02 14:35:43 UTC (rev 24649)
@@ -0,0 +1,14 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html>
+
+<body>
+<p>Red Hat, Inc. licenses these features and plugins to you under
+certain open source licenses (or aggregations of such licenses), which
+in a particular case may include the Eclipse Public License, the GNU
+Lesser General Public License, and/or certain other open source
+licenses. For precise licensing details, consult the corresponding
+source code, or contact Red Hat Legal Affairs, 1801 Varsity Drive,
+Raleigh NC 27606 USA.
+</p>
+</body>
+</html>
\ No newline at end of file
Property changes on: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.feature/license.html
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.feature/pom.xml
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.feature/pom.xml (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.feature/pom.xml 2010-09-02 14:35:43 UTC (rev 24649)
@@ -0,0 +1,14 @@
+<project
+xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.jboss.tools</groupId>
+ <artifactId>org.jboss.tools.parent.pom</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ </parent>
+ <groupId>org.jboss.tools.usage.features</groupId>
+ <artifactId>org.jboss.tools.usage.feature</artifactId>
+ <name>org.jboss.tools.usage.feature</name>
+ <version>1.0.0-SNAPSHOT</version>
+ <packaging>eclipse-feature</packaging>
+</project>
Property changes on: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.feature/pom.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.test/.classpath
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.test/.classpath (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.test/.classpath 2010-09-02 14:35:43 UTC (rev 24649)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
Property changes on: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.test/.classpath
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.test/.project
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.test/.project (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.test/.project 2010-09-02 14:35:43 UTC (rev 24649)
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.jboss.tools.usage.test</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>
Property changes on: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.test/.project
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.test/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.test/.settings/org.eclipse.jdt.core.prefs (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.test/.settings/org.eclipse.jdt.core.prefs 2010-09-02 14:35:43 UTC (rev 24649)
@@ -0,0 +1,260 @@
+#Wed Aug 18 12:56:58 CEST 2010
+eclipse.preferences.version=1
+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=true
+org.eclipse.jdt.core.formatter.comment.format_line_comments=true
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
+org.eclipse.jdt.core.formatter.comment.line_length=80
+org.eclipse.jdt.core.formatter.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=false
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_member=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.join_lines_in_comments=true
+org.eclipse.jdt.core.formatter.join_wrapped_lines=false
+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=120
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=tab
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
Property changes on: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.test/.settings/org.eclipse.jdt.core.prefs
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.test/.settings/org.eclipse.jdt.ui.prefs
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.test/.settings/org.eclipse.jdt.ui.prefs (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.test/.settings/org.eclipse.jdt.ui.prefs 2010-09-02 14:35:43 UTC (rev 24649)
@@ -0,0 +1,4 @@
+#Fri Jul 30 15:03:59 CEST 2010
+eclipse.preferences.version=1
+formatter_profile=_Eclipse [built-in] extended
+formatter_settings_version=11
Property changes on: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.test/.settings/org.eclipse.jdt.ui.prefs
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.test/EclipseEnvironmentTest.launch
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.test/EclipseEnvironmentTest.launch (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.test/EclipseEnvironmentTest.launch 2010-09-02 14:35:43 UTC (rev 24649)
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<launchConfiguration type="org.eclipse.pde.ui.JunitLaunchConfig">
+<booleanAttribute key="append.args" value="true"/>
+<stringAttribute key="application" value="org.eclipse.pde.junit.runtime.coretestapplication"/>
+<booleanAttribute key="askclear" value="false"/>
+<booleanAttribute key="automaticAdd" value="true"/>
+<booleanAttribute key="automaticValidate" value="false"/>
+<stringAttribute key="bootstrap" value=""/>
+<stringAttribute key="checked" value="[NONE]"/>
+<booleanAttribute key="clearConfig" value="true"/>
+<booleanAttribute key="clearws" value="true"/>
+<booleanAttribute key="clearwslog" value="false"/>
+<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/GoogleAnalyticsUrlStrategyTest (1)"/>
+<booleanAttribute key="default" value="false"/>
+<booleanAttribute key="includeOptional" value="true"/>
+<stringAttribute key="location" value="${workspace_loc}/../junit-workspace"/>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
+<listEntry value="/org.jboss.tools.usage.test/src/org/jboss/tools/usage/test/EclipseEnvironmenTest.java"/>
+</listAttribute>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
+<listEntry value="1"/>
+</listAttribute>
+<listAttribute key="org.eclipse.debug.ui.favoriteGroups">
+<listEntry value="org.eclipse.debug.ui.launchGroup.debug"/>
+<listEntry value="org.eclipse.debug.ui.launchGroup.run"/>
+</listAttribute>
+<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value=""/>
+<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
+<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
+<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit4"/>
+<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.jboss.tools.usage.test.EclipseEnvironmenTest"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl}"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.jboss.tools.usage.test"/>
+<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
+<stringAttribute key="pde.version" value="3.3"/>
+<stringAttribute key="product" value="com.jboss.jbds.product.product"/>
+<booleanAttribute key="run_in_ui_thread" value="true"/>
+<stringAttribute key="selected_target_plugins" value="javax.transaction@default:false,org.eclipse.equinox.registry@default:default,org.eclipse.equinox.p2.jarprocessor@default:default,org.hamcrest.core@default:default,org.eclipse.ecf.provider.filetransfer.ssl@default:false,org.eclipse.equinox.p2.metadata@default:default,org.eclipse.equinox.common@2:true,org.eclipse.text@default:default,org.eclipse.core.databinding.observable@default:default,org.eclipse.core.runtime@default:true,org.eclipse.core.contenttype@default:default,org.eclipse.core.commands@default:default,org.eclipse.equinox.p2.repository@default:default,org.eclipse.ui.cocoa@default:false,org.eclipse.jface.databinding@default:default,org.eclipse.core.runtime.compatibility.auth@default:default,org.eclipse.ui.forms@default:default,org.eclipse.ecf.filetransfer@default:default,org.eclipse.core.expressions@default:default,org.junit4@default:default,org.eclipse.ecf.provider.filetransfer@default:default,org.eclipse.ui.workb!
ench@default:default,org.eclipse.jface.text@default:default,org.eclipse.ecf.identity@default:default,org.eclipse.equinox.app@default:default,org.eclipse.ecf.ssl@default:false,org.eclipse.core.runtime.compatibility.registry@default:false,org.eclipse.equinox.preferences@default:default,org.eclipse.core.resources@default:default,org.eclipse.core.databinding.property@default:default,org.eclipse.equinox.transforms.hook@default:false,com.ibm.icu@default:default,org.eclipse.core.variables@default:default,org.eclipse.equinox.p2.artifact.repository@default:default,org.eclipse.ui.views@default:default,org.eclipse.core.resources.compatibility@default:false,org.eclipse.equinox.security.macosx@default:false,org.eclipse.swt@default:default,org.eclipse.equinox.p2.core@default:default,org.eclipse.equinox.p2.engine@default:default,org.eclipse.help@default:default,org.eclipse.osgi@-1:true,org.eclipse.equinox.p2.metadata.repository@default:default,org.eclipse.core.filesystem@default:default,o!
rg.eclipse.ecf@default:default,org.eclipse.core.databinding@de!
fault:de
fault,org.eclipse.core.jobs@default:default,org.eclipse.ant.core@default:default,org.jboss.tools.xulrunner.initializer@default:false,org.eclipse.equinox.concurrent@default:default,org.eclipse.core.filesystem.macosx@default:false,org.eclipse.swt.cocoa.macosx@default:false,org.eclipse.ui@default:default,org.eclipse.core.net@default:default,org.eclipse.equinox.security@default:default,org.eclipse.ui.ide@default:default,org.eclipse.jface@default:default,javax.servlet@default:default,org.eclipse.osgi.services@default:default"/>
+<stringAttribute key="selected_workspace_plugins" value="org.jboss.tools.usage.test@default:default,org.jboss.tools.usage@default:default"/>
+<booleanAttribute key="show_selected_only" value="false"/>
+<booleanAttribute key="tracing" value="false"/>
+<booleanAttribute key="useCustomFeatures" value="false"/>
+<booleanAttribute key="useDefaultConfig" value="true"/>
+<booleanAttribute key="useDefaultConfigArea" value="true"/>
+<booleanAttribute key="useProduct" value="false"/>
+</launchConfiguration>
Property changes on: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.test/EclipseEnvironmentTest.launch
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.test/FocusPointTest.launch
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.test/FocusPointTest.launch (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.test/FocusPointTest.launch 2010-09-02 14:35:43 UTC (rev 24649)
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<launchConfiguration type="org.eclipse.pde.ui.JunitLaunchConfig">
+<booleanAttribute key="append.args" value="true"/>
+<stringAttribute key="application" value="org.eclipse.pde.junit.runtime.coretestapplication"/>
+<booleanAttribute key="askclear" value="false"/>
+<booleanAttribute key="automaticAdd" value="true"/>
+<booleanAttribute key="automaticValidate" value="false"/>
+<stringAttribute key="bootstrap" value=""/>
+<stringAttribute key="checked" value="[NONE]"/>
+<booleanAttribute key="clearConfig" value="true"/>
+<booleanAttribute key="clearws" value="true"/>
+<booleanAttribute key="clearwslog" value="false"/>
+<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/FocusPointTest"/>
+<booleanAttribute key="default" value="false"/>
+<booleanAttribute key="includeOptional" value="true"/>
+<stringAttribute key="location" value="${workspace_loc}/../junit-workspace"/>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
+<listEntry value="/org.jboss.tools.usage.test/src/org/jboss/tools/usage/test/FocusPointTest.java"/>
+</listAttribute>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
+<listEntry value="1"/>
+</listAttribute>
+<listAttribute key="org.eclipse.debug.ui.favoriteGroups">
+<listEntry value="org.eclipse.debug.ui.launchGroup.debug"/>
+<listEntry value="org.eclipse.debug.ui.launchGroup.run"/>
+</listAttribute>
+<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value=""/>
+<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
+<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
+<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit4"/>
+<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.launching.macosx.MacOSXType/JVM 1.5"/>
+<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.jboss.tools.usage.test.FocusPointTest"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl}"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.jboss.tools.usage.test"/>
+<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
+<stringAttribute key="pde.version" value="3.3"/>
+<stringAttribute key="product" value="com.jboss.jbds.product.product"/>
+<booleanAttribute key="run_in_ui_thread" value="false"/>
+<stringAttribute key="selected_target_plugins" value="org.eclipse.help@default:default,org.eclipse.ecf.provider.filetransfer.ssl@default:false,org.eclipse.core.resources@default:default,org.eclipse.ui.ide@default:default,org.jboss.tools.xulrunner.initializer@default:false,org.eclipse.ui.views@default:default,org.eclipse.core.expressions@default:default,org.eclipse.swt@default:default,org.eclipse.osgi.services@default:default,org.eclipse.core.filesystem.macosx@default:false,org.eclipse.equinox.preferences@default:default,org.junit4@default:default,javax.servlet@default:default,org.eclipse.equinox.security@default:default,org.eclipse.ecf.provider.filetransfer@default:default,org.eclipse.ecf.filetransfer@default:default,org.eclipse.core.databinding@default:default,org.hamcrest.core@default:default,org.eclipse.jface@default:default,org.eclipse.equinox.transforms.hook@default:false,org.eclipse.equinox.p2.metadata.repository@default:default,org.eclipse.ecf.identity@default:defaul!
t,org.eclipse.equinox.p2.repository@default:default,org.eclipse.core.databinding.property@default:default,org.eclipse.core.net@default:default,org.eclipse.equinox.registry@default:default,org.eclipse.equinox.common@2:true,org.eclipse.equinox.security.macosx@default:false,org.eclipse.ant.core@default:default,org.eclipse.ui.forms@default:default,org.eclipse.core.databinding.observable@default:default,org.eclipse.ecf@default:default,org.eclipse.equinox.concurrent@default:default,org.eclipse.core.variables@default:default,org.eclipse.core.resources.compatibility@default:false,org.eclipse.equinox.p2.artifact.repository@default:default,org.eclipse.core.contenttype@default:default,org.eclipse.text@default:default,org.eclipse.core.commands@default:default,org.eclipse.equinox.p2.core@default:default,org.eclipse.core.filesystem@default:default,javax.transaction@default:false,org.eclipse.ecf.ssl@default:false,com.ibm.icu@default:default,org.eclipse.ui@default:default,org.eclipse.ui.co!
coa@default:false,org.eclipse.equinox.app@default:default,org.!
eclipse.
jface.databinding@default:default,org.eclipse.equinox.p2.metadata@default:default,org.eclipse.osgi@-1:true,org.eclipse.swt.cocoa.macosx@default:false,org.eclipse.core.runtime.compatibility.auth@default:default,org.eclipse.equinox.p2.engine@default:default,org.eclipse.ui.workbench@default:default,org.eclipse.core.runtime@default:true,org.eclipse.core.jobs@default:default,org.eclipse.core.runtime.compatibility.registry@default:false,org.eclipse.equinox.p2.jarprocessor@default:default,org.eclipse.jface.text@default:default"/>
+<stringAttribute key="selected_workspace_plugins" value="org.jboss.tools.usage@default:default,org.jboss.tools.usage.test@default:default"/>
+<booleanAttribute key="show_selected_only" value="false"/>
+<booleanAttribute key="tracing" value="false"/>
+<booleanAttribute key="useDefaultConfig" value="true"/>
+<booleanAttribute key="useDefaultConfigArea" value="true"/>
+<booleanAttribute key="useProduct" value="false"/>
+</launchConfiguration>
Property changes on: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.test/FocusPointTest.launch
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.test/GlobalUsageReportingSettingsTest.launch
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.test/GlobalUsageReportingSettingsTest.launch (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.test/GlobalUsageReportingSettingsTest.launch 2010-09-02 14:35:43 UTC (rev 24649)
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<launchConfiguration type="org.eclipse.pde.ui.JunitLaunchConfig">
+<booleanAttribute key="append.args" value="true"/>
+<stringAttribute key="application" value="org.eclipse.pde.junit.runtime.coretestapplication"/>
+<booleanAttribute key="askclear" value="false"/>
+<booleanAttribute key="automaticAdd" value="true"/>
+<booleanAttribute key="automaticValidate" value="false"/>
+<stringAttribute key="bootstrap" value=""/>
+<stringAttribute key="checked" value="[NONE]"/>
+<booleanAttribute key="clearConfig" value="false"/>
+<booleanAttribute key="clearws" value="true"/>
+<booleanAttribute key="clearwslog" value="false"/>
+<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/pde-junit"/>
+<booleanAttribute key="default" value="false"/>
+<stringAttribute key="deselected_workspace_plugins" value="org.jboss.tools.common.text.xml,org.jboss.tools.common.meta.ui,org.jboss.tools.ui.bot.ext,org.jboss.tools.common,org.jboss.tools.common.verification.ui.test,org.jboss.tools.common.projecttemplates,org.jboss.tools.common.el.core,org.jboss.tools.common.verification.ui,org.jboss.tools.common.gef,org.jboss.tools.common.test,org.jboss.tools.common.verification.test,org.jboss.tools.common.verification,org.jboss.tools.common.model,org.jboss.tools.gwt.ui,org.jboss.tools.common.model.ui.capabilities,org.jboss.tools.common.resref.core,org.jboss.tools.common.ui,org.jboss.tools.common.el.ui,org.jboss.tools.common.text.ext,org.jboss.tools.gwt.core,org.jboss.tools.common.resref.ui,org.jboss.tools.ui.bot.ext.test,org.jboss.tools.common.model.ui.test,org.jboss.tools.common.el.core.test,org.jboss.tools.common.model.ui,org.jboss.tools.tests,org.jboss.tools.common.model.test"/>
+<booleanAttribute key="includeOptional" value="true"/>
+<stringAttribute key="location" value="${workspace_loc}/../junit-workspace"/>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
+<listEntry value="/org.jboss.tools.usage.test/src/org/jboss/tools/usage/test/GlobalUsageReportingSettingsTest.java"/>
+</listAttribute>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
+<listEntry value="1"/>
+</listAttribute>
+<listAttribute key="org.eclipse.debug.ui.favoriteGroups">
+<listEntry value="org.eclipse.debug.ui.launchGroup.debug"/>
+<listEntry value="org.eclipse.debug.ui.launchGroup.run"/>
+</listAttribute>
+<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value=""/>
+<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
+<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
+<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit4"/>
+<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.jboss.tools.usage.test.GlobalUsageReportingSettingsTest"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl}"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.jboss.tools.usage.test"/>
+<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
+<stringAttribute key="pde.version" value="3.3"/>
+<stringAttribute key="product" value="com.jboss.jbds.product.product"/>
+<booleanAttribute key="run_in_ui_thread" value="true"/>
+<stringAttribute key="selected_target_plugins" value="org.eclipse.jface.text@default:default,org.eclipse.ui.ide.application@default:default,org.eclipse.core.contenttype@default:default,org.eclipse.help@default:default,org.eclipse.equinox.concurrent@default:default,org.eclipse.ltk.ui.refactoring@default:default,com.ibm.icu@default:default,ch.qos.logback.classic@default:default,org.eclipse.ui.editors@default:default,org.eclipse.swt.cocoa.macosx.x86_64@default:false,org.junit4@default:default,javax.mail@default:default,org.eclipse.core.filesystem.macosx@default:false,org.eclipse.ui.intro@default:default,org.eclipse.core.databinding.observable@default:default,org.eclipse.ecf.provider.filetransfer.ssl@default:false,org.eclipse.team.ui@default:default,org.eclipse.core.runtime@default:true,org.eclipse.ui.navigator.resources@default:default,org.eclipse.help.base@default:default,org.eclipse.ui.navigator@default:default,org.eclipse.swtbot.ant.optional.junit4@default:false,org.eclipse!
.swt@default:default,org.eclipse.equinox.common@2:true,org.eclipse.net4j.jms.api@default:default,org.eclipse.equinox.security@default:default,org.eclipse.core.resources@default:default,org.eclipse.core.expressions@default:default,org.apache.lucene.analysis@default:default,org.eclipse.jface@default:default,org.eclipse.ecf.filetransfer@default:default,org.eclipse.ecf@default:default,org.eclipse.update.configurator@3:true,org.eclipse.equinox.p2.repository@default:default,org.apache.jasper@default:default,org.eclipse.equinox.registry@default:default,org.eclipse.equinox.p2.jarprocessor@default:default,org.eclipse.equinox.http.jetty@default:default,org.eclipse.equinox.preferences@default:default,org.eclipse.equinox.p2.metadata@default:default,org.mortbay.jetty.server@default:default,javax.servlet.jsp@default:default,org.eclipse.core.runtime.compatibility@default:default,org.eclipse.core.variables@default:default,org.eclipse.help.ui@default:default,org.eclipse.equinox.http.servlet!
@default:default,org.eclipse.core.filesystem@default:default,o!
rg.mortb
ay.jetty.util@default:default,org.eclipse.ui.ide@default:default,org.eclipse.jface.databinding@default:default,org.eclipse.core.filebuffers@default:default,org.eclipse.ltk.core.refactoring@default:default,org.apache.commons.el@default:default,org.eclipse.equinox.app@default:default,org.eclipse.osgi@-1:true,org.eclipse.ui.views@default:default,org.eclipse.team.core@default:default,javax.activation@default:default,org.apache.commons.logging*1.0.4.v201005080501@default:default,javax.servlet@default:default,org.eclipse.core.databinding@default:default,org.eclipse.core.commands@default:default,org.eclipse.core.runtime.compatibility.registry@default:false,org.eclipse.equinox.p2.engine@default:default,org.slf4j.api@default:default,org.eclipse.ant.core@default:default,org.eclipse.compare.core@default:default,org.hamcrest.core@default:default,org.eclipse.core.runtime.compatibility.auth@default:default,ch.qos.logback.slf4j@default:false,org.eclipse.equinox.security.macosx@default:fals!
e,org.eclipse.ecf.identity@default:default,org.eclipse.ui.views.properties.tabbed@default:default,org.eclipse.ui.workbench@default:default,org.eclipse.ecf.ssl@default:false,org.junit*4.8.1.v4_8_1_v20100427-1100@default:default,org.eclipse.equinox.p2.core@default:default,org.eclipse.ui.cheatsheets@default:default,org.eclipse.ui.cocoa@default:false,org.eclipse.osgi.services@default:default,org.eclipse.ui@default:default,org.eclipse.ui.forms@default:default,org.eclipse.compare@default:default,org.eclipse.equinox.p2.metadata.repository@default:default,org.eclipse.text@default:default,org.eclipse.core.databinding.property@default:default,ch.qos.logback.core@default:default,org.eclipse.core.net@default:default,org.eclipse.ui.workbench.texteditor@default:default,org.apache.lucene@default:default,org.eclipse.ui.intro.universal@default:default,org.eclipse.equinox.p2.artifact.repository@default:default,org.apache.ant@default:default,org.eclipse.core.jobs@default:default,org.eclipse.e!
cf.provider.filetransfer@default:default"/>
+<stringAttribute key="selected_workspace_plugins" value="org.jboss.tools.usage@default:default,org.jboss.tools.usage.test@default:default"/>
+<booleanAttribute key="show_selected_only" value="false"/>
+<stringAttribute key="templateConfig" value="${workspace_loc:org.jboss.tools.usage/config.ini}"/>
+<booleanAttribute key="tracing" value="false"/>
+<booleanAttribute key="useCustomFeatures" value="false"/>
+<booleanAttribute key="useDefaultConfig" value="false"/>
+<booleanAttribute key="useDefaultConfigArea" value="false"/>
+<booleanAttribute key="useProduct" value="false"/>
+</launchConfiguration>
Property changes on: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.test/GlobalUsageReportingSettingsTest.launch
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.test/GoogleAnalyticsUrlStrategyTest.launch
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.test/GoogleAnalyticsUrlStrategyTest.launch (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.test/GoogleAnalyticsUrlStrategyTest.launch 2010-09-02 14:35:43 UTC (rev 24649)
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<launchConfiguration type="org.eclipse.pde.ui.JunitLaunchConfig">
+<booleanAttribute key="append.args" value="true"/>
+<stringAttribute key="application" value="org.eclipse.pde.junit.runtime.coretestapplication"/>
+<booleanAttribute key="askclear" value="false"/>
+<booleanAttribute key="automaticAdd" value="true"/>
+<booleanAttribute key="automaticValidate" value="false"/>
+<stringAttribute key="bootstrap" value=""/>
+<stringAttribute key="checked" value="[NONE]"/>
+<booleanAttribute key="clearConfig" value="true"/>
+<booleanAttribute key="clearws" value="true"/>
+<booleanAttribute key="clearwslog" value="false"/>
+<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/GoogleAnalyticsUrlStrategyTest"/>
+<booleanAttribute key="default" value="false"/>
+<booleanAttribute key="includeOptional" value="true"/>
+<stringAttribute key="location" value="${workspace_loc}/../junit-workspace"/>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
+<listEntry value="/org.jboss.tools.usage.test/src/org/jboss/tools/usage/test/GoogleAnalyticsUrlStrategyTest.java"/>
+</listAttribute>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
+<listEntry value="1"/>
+</listAttribute>
+<listAttribute key="org.eclipse.debug.ui.favoriteGroups">
+<listEntry value="org.eclipse.debug.ui.launchGroup.debug"/>
+<listEntry value="org.eclipse.debug.ui.launchGroup.run"/>
+</listAttribute>
+<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value=""/>
+<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
+<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
+<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit4"/>
+<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.jboss.tools.usage.test.GoogleAnalyticsUrlStrategyTest"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl}"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.jboss.tools.usage.test"/>
+<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
+<stringAttribute key="pde.version" value="3.3"/>
+<stringAttribute key="product" value="com.jboss.jbds.product.product"/>
+<booleanAttribute key="run_in_ui_thread" value="true"/>
+<stringAttribute key="selected_target_plugins" value="org.eclipse.core.commands@default:default,org.eclipse.equinox.security.macosx@default:false,org.eclipse.ecf.provider.filetransfer@default:default,org.eclipse.ecf.ssl@default:false,org.eclipse.core.resources@default:default,com.ibm.icu@default:default,org.eclipse.equinox.common@2:true,org.eclipse.core.contenttype@default:default,org.jboss.tools.seam.ui@default:default,org.jboss.tools.smooks.runtime@default:default,org.eclipse.core.resources.compatibility@default:false,org.eclipse.ecf.provider.filetransfer.ssl@default:false,org.eclipse.equinox.preferences@default:default,org.eclipse.osgi.services@default:default,org.eclipse.ecf@default:default,org.junit4@default:default,org.eclipse.ui@default:default,org.eclipse.core.filesystem@default:default,org.eclipse.ant.core@default:default,org.eclipse.core.runtime.compatibility.registry@default:false,org.eclipse.help@default:default,org.jboss.tools.seam.ui.pages@default:default,org.!
eclipse.swt.cocoa.macosx@default:false,org.eclipse.ui.cocoa@default:false,org.eclipse.core.runtime@default:true,javax.servlet@default:default,org.eclipse.core.net@default:default,org.eclipse.ecf.identity@default:default,org.eclipse.equinox.app@default:default,org.jboss.tools.smooks.core@default:default,org.eclipse.equinox.registry@default:default,org.eclipse.text@default:default,org.eclipse.ui.ide@default:default,org.eclipse.equinox.p2.artifact.repository@default:default,org.eclipse.core.databinding@default:default,org.eclipse.core.databinding.property@default:default,org.eclipse.equinox.p2.metadata.repository@default:default,org.eclipse.ecf.filetransfer@default:default,org.eclipse.ui.workbench@default:default,org.eclipse.jface@default:default,org.eclipse.swt@default:default,javax.transaction@default:false,org.eclipse.equinox.p2.jarprocessor@default:default,org.eclipse.core.jobs@default:default,org.eclipse.jface.databinding@default:default,org.eclipse.equinox.p2.metadata@de!
fault:default,org.eclipse.jface.text@default:default,org.eclip!
se.core.
databinding.observable@default:default,org.eclipse.ui.forms@default:default,org.eclipse.core.expressions@default:default,org.eclipse.core.runtime.compatibility.auth@default:default,org.eclipse.core.filesystem.macosx@default:false,org.jboss.tools.xulrunner.initializer@default:false,org.eclipse.equinox.p2.engine@default:default,org.eclipse.ui.views@default:default,org.eclipse.equinox.p2.core@default:default,org.eclipse.core.variables@default:default,org.eclipse.osgi@-1:true,org.hamcrest.core@default:default,org.eclipse.equinox.security@default:default,org.eclipse.equinox.transforms.hook@default:false,org.eclipse.equinox.concurrent@default:default,org.eclipse.equinox.p2.repository@default:default"/>
+<stringAttribute key="selected_workspace_plugins" value="org.jboss.tools.usage.test@default:default,org.jboss.tools.usage@default:default"/>
+<booleanAttribute key="show_selected_only" value="false"/>
+<booleanAttribute key="tracing" value="false"/>
+<booleanAttribute key="useCustomFeatures" value="false"/>
+<booleanAttribute key="useDefaultConfig" value="true"/>
+<booleanAttribute key="useDefaultConfigArea" value="true"/>
+<booleanAttribute key="useProduct" value="false"/>
+</launchConfiguration>
Property changes on: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.test/GoogleAnalyticsUrlStrategyTest.launch
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.test/JBossToolsUsageIntegrationTest.launch
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.test/JBossToolsUsageIntegrationTest.launch (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.test/JBossToolsUsageIntegrationTest.launch 2010-09-02 14:35:43 UTC (rev 24649)
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<launchConfiguration type="org.eclipse.pde.ui.JunitLaunchConfig">
+<booleanAttribute key="append.args" value="true"/>
+<stringAttribute key="application" value="org.eclipse.pde.junit.runtime.coretestapplication"/>
+<booleanAttribute key="askclear" value="false"/>
+<booleanAttribute key="automaticAdd" value="true"/>
+<booleanAttribute key="automaticValidate" value="false"/>
+<stringAttribute key="bootstrap" value=""/>
+<stringAttribute key="checked" value="[NONE]"/>
+<booleanAttribute key="clearConfig" value="false"/>
+<booleanAttribute key="clearws" value="false"/>
+<booleanAttribute key="clearwslog" value="false"/>
+<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/JBossToolsUsageTest"/>
+<booleanAttribute key="default" value="false"/>
+<booleanAttribute key="includeOptional" value="true"/>
+<stringAttribute key="location" value="${workspace_loc}/../junit-workspace"/>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
+<listEntry value="/org.jboss.tools.usage.test/src/org/jboss/tools/usage/test/JBossToolsUsageIntegrationTest.java"/>
+</listAttribute>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
+<listEntry value="1"/>
+</listAttribute>
+<listAttribute key="org.eclipse.debug.ui.favoriteGroups">
+<listEntry value="org.eclipse.debug.ui.launchGroup.debug"/>
+<listEntry value="org.eclipse.debug.ui.launchGroup.run"/>
+</listAttribute>
+<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value=""/>
+<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
+<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
+<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit4"/>
+<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.jboss.tools.usage.test.JBossToolsUsageIntegrationTest"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -consolelog"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.jboss.tools.usage.test"/>
+<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
+<stringAttribute key="pde.version" value="3.3"/>
+<stringAttribute key="product" value="com.jboss.jbds.product.product"/>
+<booleanAttribute key="run_in_ui_thread" value="true"/>
+<stringAttribute key="selected_target_plugins" value="org.eclipse.datatools.connectivity.doc.user@default:default,org.eclipse.jdt.compiler.tool@default:false,org.eclipse.jst.servlet.ui@default:default,org.eclipse.datatools.sqltools.sqleditor@default:default,com.springsource.javax.jms@default:default,org.eclipse.jdt.apt.core@default:default,org.springframework.ide.eclipse.integration@default:default,org.eclipse.datatools.enablement.mysql.dbdefinition@default:default,org.springframework.aop@default:default,org.eclipse.ecf.provider.filetransfer.httpclient.ssl@default:false,org.hibernate.eclipse.jdt.apt.ui@default:default,org.eclipse.jst.ws.axis2.creation.core@default:default,org.eclipse.datatools.modelbase.derby@default:default,org.eclipse.persistence.jpa@default:default,org.eclipse.jdt.doc.isv@default:default,org.eclipse.emf.mapping.ui@default:default,org.springframework.integration.jms@default:default,org.eclipse.jst.j2ee.ejb.annotations.emitter@default:default,org.eclipse.e!
mf.ant@default:default,org.eclipse.wst.xml.ui@default:default,org.eclipse.jst.ws.axis2.creation.ui@default:default,org.eclipse.datatools.connectivity.dbdefinition.genericJDBC@default:default,org.eclipse.datatools.help@default:default,org.eclipse.team.cvs.ui@default:default,org.eclipse.platform@default:default,org.eclipse.datatools.sqltools.debugger.core.ui@default:default,org.eclipse.emf.databinding@default:default,org.eclipse.team.ui@default:default,org.springframework.web.servlet@default:default,org.eclipse.datatools.intro@default:default,org.jboss.tools.esb.ui@default:default,org.eclipse.swt@default:default,org.eclipse.datatools.connectivity.apache.derby.dbdefinition@default:default,org.eclipse.equinox.registry@default:default,org.hibernate.eclipse.console@default:default,org.eclipse.jst.jsf.facesconfig.ui@default:default,javax.mail@default:default,org.eclipse.wst.server.http.ui@default:default,org.eclipse.emf.exporter@default:default,org.apache.ant@default:default,org.e!
clipse.datatools.enablement.sybase.ui@default:default,org.test!
ng.eclip
se@default:default,org.eclipse.wst.xml.xpath.ui@default:default,org.springframework.ide.eclipse.aop.core@default:default,org.eclipse.equinox.p2.publisher@default:default,org.eclipse.core.commands@default:default,org.eclipse.emf.edit.ui@default:default,com.jboss.jbds.project.examples@default:default,org.eclipse.datatools.modelbase.sql.xml.query@default:default,org.jboss.tools.jsf.text.ext@default:default,org.eclipse.xsd.mapping.editor@default:default,org.eclipse.datatools.enablement.ibm.db2.luw.dbdefinition@default:default,org.eclipse.datatools.connectivity.oda.consumer@default:default,org.jboss.tools.xulrunner@default:default,org.jboss.tools.jsf.vpe.jstl@default:default,org.eclipse.wst.xml.ui.infopop@default:default,org.springframework.orm@default:default,org.jboss.tools.seam.pages.xml@default:default,org.eclipse.jst.ejb.doc.user@default:default,org.junit@default:default,org.eclipse.datatools.enablement.ibm.db2.luw@default:default,org.eclipse.jpt.ui@default:default,org.eclip!
se.wst.jsdt.core@default:default,org.eclipse.osgi.util@default:default,org.eclipse.datatools.sqltools.parsers.sql@default:default,org.jboss.tools.seam.xml.ui@default:default,org.eclipse.wst.xsl.launching@default:default,org.eclipse.datatools.enablement.sybase.asa@default:default,org.eclipse.jst.jsf.apache.trinidad.tagsupport@default:default,org.eclipse.rcp@default:default,net.sf.jautodoc.velocity@default:default,org.jboss.tools.hibernate.ui@default:default,org.eclipse.ui.browser@default:default,org.eclipse.datatools.oda.cshelp@default:default,org.eclipse.datatools.connectivity.sqm.core.ui@default:default,org.eclipse.datatools.sqltools.routineeditor@default:default,org.eclipse.wst.xsl.doc@default:default,org.eclipse.emf.codegen.ecore.ui@default:default,org.jboss.tools.jst.web.kb@default:default,org.jboss.tools.cdi.xml@default:default,org.eclipse.core.variables@default:default,org.eclipse.wst.jsdt.support.ie@default:default,org.jboss.tools.vpe.docbook@default:default,org.ecli!
pse.wst.html.ui.infopop@default:default,com.springsource.org.a!
pache.co
mmons.collections@default:default,org.eclipse.update.scheduler@default:default,org.eclipse.datatools.connectivity@default:default,org.eclipse.emf.mapping.xsd2ecore.editor@default:default,net.sourceforge.lpg.lpgjavaruntime@default:default,org.eclipse.help.base@default:default,org.eclipse.jst.server.generic.ui@default:default,org.jboss.tools.jmx.core@default:default,org.springframework.ide.eclipse.osgi.targetdefinition@default:default,org.eclipse.wst.xml.core@default:default,org.eclipse.jpt.eclipselink.ui@default:default,javax.transaction@default:false,org.jdom@default:default,org.eclipse.jst.common.annotations.ui@default:default,org.eclipse.datatools.sqltools.db.derby@default:default,org.eclipse.datatools.sqltools.sql.ui@default:default,org.eclipse.jst.server.generic.jonas@default:default,org.eclipse.datatools.connectivity.oda.profile@default:default,org.eclipse.datatools.connectivity.oda.flatfile@default:default,org.eclipse.datatools.sqltools.editor.core.ui@default:default,o!
rg.eclipse.datatools.enablement.ingres@default:default,org.springframework.ide.eclipse.core@default:default,org.jbpm.gd.jpdl@default:default,org.springframework.core@default:default,org.eclipse.jst.jsp.ui.infopop@default:default,org.eclipse.emf.mapping.ecore2xml@default:default,org.jboss.tools.common.projecttemplates@default:default,org.eclipse.team.svn@default:default,org.hibernate.eclipse.help@default:default,org.eclipse.jst.ejb.ui.infopop@default:default,org.eclipse.equinox.p2.repository@default:default,org.eclipse.jst.jsf.standard.tagsupport@default:default,org.eclipse.equinox.p2.repository.tools@default:default,org.jboss.tools.common.el.core@default:default,org.eclipse.datatools.connectivity.oda.flatfile.ui@default:default,org.eclipse.core.filebuffers@default:default,org.eclipse.wst.dtd.ui@default:default,javax.xml.rpc@default:default,org.eclipse.jst.pagedesigner.jsf.ui@default:default,org.eclipse.wst.webtools.doc.user@default:default,org.eclipse.jst.jee@default:defaul!
t,org.eclipse.jpt.gen@default:default,org.jboss.tools.ws.core@!
default:
default,org.mozilla.xulrunner.cocoa.macosx@default:default,org.eclipse.jst.j2ee.webservice@default:default,org.jboss.tools.jsf.vpe.jsf@default:default,org.springframework.integration.http@default:default,org.apache.oro@default:default,org.springframework.ide.eclipse.ui@default:default,org.eclipse.datatools.enablement.ibm.informix@default:default,org.eclipse.jsch.core@default:default,org.eclipse.equinox.launcher.cocoa.macosx@default:false,org.eclipse.equinox.p2.director.app@default:default,org.eclipse.equinox.ds@default:true,org.springframework.ide.eclipse.beans.ui.search@default:default,org.eclipse.datatools.enablement.ibm.db2.zseries.dbdefinition@default:default,org.eclipse.wst.common.frameworks.ui@default:default,org.apache.bcel@default:default,org.eclipse.datatools.sqltools.db.derby.ui@default:default,org.eclipse.jst.ws.infopop@default:default,org.eclipse.ecf@default:default,org.eclipse.datatools.enablement.sybase.ase.dbdefinition@default:default,org.eclipse.team.svn.ui@d!
efault:default,org.eclipse.wst.css.core@default:default,org.eclipse.wst.xsl@default:default,org.eclipse.jst.server.core@default:default,org.apache.commons.jxpath@default:default,org.jboss.tools.jsf.text.ext.facelets@default:default,org.eclipse.datatools.enablement.mysql.ui@default:default,org.eclipse.wst.common.project.facet.ui@default:default,org.eclipse.equinox.concurrent@default:default,org.eclipse.equinox.p2.jarprocessor@default:default,org.hibernate.eclipse@default:default,org.eclipse.core.runtime.compatibility.auth@default:default,org.eclipse.equinox.frameworkadmin@default:default,org.jboss.tools.esb.project.ui@default:default,org.apache.commons.collections@default:default,org.eclipse.datatools.enablement.oda.xml@default:default,org.hibernate.eclipse.mapper@default:default,org.eclipse.equinox.p2.exemplarysetup@default:default,org.eclipse.wst.xmleditor.doc.user@default:default,org.jboss.tools.seam.ui@default:default,org.eclipse.ui.net@default:default,org.eclipse.jst.j2!
ee.webservice.ui@default:default,org.eclipse.jst.jsf.common@de!
fault:de
fault,org.eclipse.help.ui@default:default,org.eclipse.wst.command.env.ui@default:default,org.eclipse.emf.ecore.editor@default:default,org.eclipse.wst.jsdt.web.support.jsp@default:default,org.springframework.ide.eclipse.webflow.ui.graph@default:default,org.eclipse.equinox.transforms.hook@default:false,org.eclipse.draw2d@default:default,org.eclipse.datatools.enablement.finfo@default:default,org.eclipse.wst.wsdl.validation@default:default,org.eclipse.datatools.connectivity.apache.derby@default:default,org.eclipse.jst.server.websphere.core@default:default,org.eclipse.wst.dtd.ui.infopop@default:default,org.jboss.tools.jsf.verification@default:default,org.eclipse.equinox.security.ui@default:default,org.eclipse.emf.mapping.ecore2ecore.editor@default:default,org.eclipse.jst.servlet.ui.infopop@default:default,net.sf.jautodoc@default:default,org.eclipse.datatools.enablement.jdt.classpath@default:default,org.eclipse.jdt.debug@default:default,org.eclipse.jst.server.tomcat.core@default:d!
efault,org.eclipse.ui.intro.universal@default:default,com.springsource.javax.xml.stream@default:default,org.eclipse.equinox.p2.directorywatcher@default:default,org.jboss.tools.hibernate.xml.ui@default:default,org.eclipse.jst.ws.creation.ui@default:default,org.eclipse.emf.codegen.ecore@default:default,org.eclipse.datatools.enablement.oda.ws.ui@default:default,org.jboss.tools.seam.ui.pages@default:default,org.eclipse.ant.core@default:default,org.eclipse.equinox.app@default:default,org.eclipse.wst.ws.service.policy@default:default,org.uddi4j@default:default,org.eclipse.datatools.enablement.ibm.ui@default:default,org.eclipse.wst.sse.ui@default:default,org.apache.commons.logging@default:default,org.jboss.tools.cdi.core@default:default,org.eclipse.ui.workbench.compatibility@default:false,org.eclipse.jst.ws.axis2.ui@default:default,org.eclipse.jem.beaninfo.vm@default:default,org.eclipse.datatools.enablement.ibm.db2.luw.ui@default:default,org.eclipse.jst.server.generic.oc4j@default!
:default,org.eclipse.emf.edit@default:default,org.eclipse.data!
tools.en
ablement.sybase@default:default,org.jboss.tools.struts.text.ext@default:default,org.eclipse.datatools.connectivity.db.generic.ui@default:default,org.eclipse.datatools.enablement.sybase.asa.models@default:default,org.eclipse.datatools.connectivity.doc.user.contexts@default:default,org.eclipse.equinox.common@2:true,org.eclipse.jst.jsf.ui@default:default,org.eclipse.jst.jsf.common.ui@default:default,org.eclipse.jst.standard.schemas@default:default,org.eclipse.equinox.p2.garbagecollector@default:default,org.eclipse.wst.wsi@default:default,org.eclipse.wst.command.env.core@default:default,org.springframework.oxm@default:default,org.eclipse.equinox.p2.metadata.generator@default:default,org.eclipse.jst.ws.axis2.core@default:default,org.eclipse.datatools.connectivity.oda@default:default,org.eclipse.jst.j2ee.ejb.annotations.ui@default:default,org.eclipse.equinox.http.jetty@default:default,org.eclipse.jst.ws@default:default,org.eclipse.datatools.connectivity.sqm.server.ui@default:defau!
lt,org.eclipse.datatools.modelbase.sql.query@default:default,org.eclipse.wst.common.environment@default:default,org.eclipse.datatools.enablement.sap.maxdb.ui@default:default,org.eclipse.ecf.provider.filetransfer.ssl@default:false,org.apache.commons.el@default:default,org.jboss.ide.eclipse.as.core@default:default,org.eclipse.swt.cocoa.macosx@default:false,org.springframework.ide.eclipse.aop.ui@default:default,org.eclipse.jpt.eclipselink.core@default:default,org.eclipse.datatools.connectivity.console.profile@default:default,org.springframework.jms@default:default,org.eclipse.equinox.preferences@default:default,org.eclipse.ui.ide.application@default:default,org.springframework.integration.adapter@default:default,org.eclipse.datatools.sdk@default:default,org.eclipse.emf.databinding.edit@default:default,org.eclipse.jst.j2ee.xdoclet.runtime@default:default,org.eclipse.emf.ecore.xmi@default:default,org.eclipse.persistence.antlr@default:default,org.hamcrest.core@default:default,org!
.eclipse.jst.server.ui@default:default,org.jboss.tools.jsf.vpe!
.richfac
es@default:default,org.springframework.ide.eclipse.beans.core.autowire@default:default,com.springsource.javax.servlet.jsp@default:default,org.eclipse.xsd.ecore.exporter@default:default,org.eclipse.platform.doc.isv@default:default,org.eclipse.jst.jee.ejb@default:default,org.eclipse.wst.ws.ui@default:default,org.eclipse.jst.server.tomcat.ui@default:default,com.springsource.org.antlr@default:default,org.eclipse.wst.jsdt.doc@default:default,org.eclipse.datatools.sqltools.sqlscrapbook@default:default,org.jboss.tools.equinox.transforms.xslt@default:default,org.eclipse.ui.cheatsheets@default:default,org.eclipse.wst.wsdl.ui.doc.user@default:default,org.junit4@default:default,org.jboss.tools.common.resref.ui@default:default,org.eclipse.jdt.debug.ui@default:default,org.jboss.tools.cdi.xml.ui@default:default,org.eclipse.persistence.asm@default:default,org.eclipse.datatools.common.doc.user@default:default,org.springframework.ide.eclipse.doc@default:default,org.eclipse.jst.ws.ui@default:!
default,org.eclipse.wst.xml.xpath.core@default:default,org.eclipse.jst.j2ee.jca.ui@default:default,org.springframework.ide.eclipse.webflow.ui@default:default,org.eclipse.ui.views.log@default:default,com.jcraft.jsch@default:default,org.springframework.ide.eclipse.beans.ui.editor@default:default,org.eclipse.equinox.transforms.xslt@default:default,org.eclipse.ui.presentations.r21@default:default,org.eclipse.ui.ide@default:default,org.eclipse.jst.ws.consumption.infopop@default:default,org.springframework.ide.eclipse.beans.core@default:default,org.jboss.tools.common.el.ui@default:default,org.eclipse.wst.ws.parser@default:default,org.springframework.ide.eclipse.beans.ui@default:default,org.jboss.tools.esb.core@default:default,org.apache.xerces@default:default,org.eclipse.datatools.sqltools.doc.user@default:default,org.eclipse.datatools.enablement.sybase.ase.models@default:default,org.eclipse.jst.ws.creation.ejb.ui@default:default,org.jboss.tools.hibernate.jpt.core@default:default!
,org.springframework.faces@default:default,org.eclipse.datatoo!
ls.sqlto
ols.routineeditor.ui@default:default,org.jboss.tools.vpe.html@default:default,org.eclipse.datatools.sqltools.db.generic.ui@default:default,org.eclipse.jdt@default:default,org.eclipse.jst.server.preview.adapter@default:default,org.eclipse.jst.ws.axis2.consumption.ui@default:default,org.eclipse.datatools.modelbase.sql.edit@default:default,org.eclipse.equinox.security.macosx@default:false,org.jboss.tools.jsf.vpe.facelets@default:default,org.eclipse.wst.css.ui@default:default,org.eclipse.wst.command.env.doc.user@default:default,org.eclipse.jdt.launching.ui.macosx@default:default,org.jboss.tools.common.model@default:default,org.jboss.tools.seam.xml@default:default,org.eclipse.jst.j2ee.ejb@default:default,org.eclipse.jdt.junit4.runtime@default:default,com.jboss.jbds.product@default:default,org.eclipse.wst.xsl.debug.ui@default:default,org.apache.axis@default:default,org.eclipse.datatools.connectivity.sqm.core@default:default,org.jboss.tools.portlet.ui@default:default,org.eclipse.em!
f.importer.rose@default:default,org.eclipse.jst.j2ee.doc.user@default:default,org.eclipse.equinox.frameworkadmin.equinox@default:default,org.eclipse.osgi.services@default:default,org.eclipse.jst.jee.web@default:default,org.eclipse.equinox.p2.engine@default:default,org.jboss.tools.jsf@default:default,org.eclipse.jst.jee.ui@default:default,org.springframework.integration.mail@default:default,org.eclipse.datatools.enablement.ibm.informix.ui@default:default,org.eclipse.datatools.enablement.mysql@default:default,org.eclipse.wst.server.ui.doc.user@default:default,com.springsource.javax.el@default:default,org.eclipse.core.jobs@default:default,org.eclipse.jdt.core.manipulation@default:default,org.eclipse.wst.jsdt.manipulation@default:default,org.springframework.jdbc@default:default,com.springsource.org.objectweb.asm.commons@default:default,org.jboss.ide.eclipse.as.wtp.ui@default:default,org.eclipse.datatools.connectivity.ui@default:default,org.guvnor.tools@default:default,com.sprin!
gsource.edu.emory.mathcs.backport@default:default,org.eclipse.!
wst.serv
er.core@default:default,org.springframework.ide.eclipse.beans.ui.refactoring@default:default,org.eclipse.osgi@-1:true,org.jboss.tools.jbpm.convert@default:default,org.jboss.tools.smooks.runtime@default:default,org.eclipse.wst.xsl.jaxp.debug@default:default,org.eclipse.core.databinding.property@default:default,org.jboss.tools.jst.firstrun@default:default,org.eclipse.datatools.enablement.oracle@default:default,org.eclipse.jpt.eclipselink.branding@default:default,org.jboss.ide.eclipse.as.classpath.core@default:default,org.eclipse.ui.views@default:default,org.eclipse.wst.validation@default:default,org.springframework.transaction@default:default,org.jboss.tools.common.verification@default:default,org.jboss.tools.runtime@default:default,org.apache.lucene@default:default,org.jboss.tools.vpe.resref@default:default,org.eclipse.jst.ws.uddiregistry@default:default,org.jboss.tools.jst.web.ui@default:default,org.jboss.tools.jsf.ui@default:default,org.eclipse.jst.ws.axis.creation.ui@defau!
lt:default,org.jboss.tools.jst.text.ext@default:default,org.eclipse.datatools.enablement.sqlite.ui@default:default,org.eclipse.datatools.sqltools.sqlbuilder@default:default,org.eclipse.wst.server.preview.adapter@default:default,org.eclipse.pde.api.tools.ui@default:default,org.eclipse.ecf.identity@default:default,org.eclipse.core.databinding.beans@default:default,org.eclipse.wst.common.core@default:default,org.eclipse.wst.ws.infopop@default:default,org.eclipse.update.ui@default:default,org.eclipse.wst.common.infopop@default:default,org.eclipse.datatools.enablement.msft.sqlserver@default:default,org.jboss.tools.jst.web.tiles.ui@default:default,org.eclipse.core.net@default:default,org.eclipse.datatools.connectivity.apache.derby.ui@default:default,org.springframework.asm@default:default,org.springframework.js@default:default,org.eclipse.datatools.sqltools.common.ui@default:default,org.jboss.tools.hibernate.xml@default:default,org.eclipse.jdt.junit@default:default,org.jboss.tool!
s.jsf.text.ext.richfaces@default:default,org.springframework.w!
eb@defau
lt:default,org.eclipse.help.webapp@default:default,org.jboss.tools.jst.web.verification@default:default,org.eclipse.jst.j2ee.ejb.annotation.model@default:default,org.jboss.tools.cdi.text.ext@default:default,org.eclipse.pde.ds.ui@default:default,org.eclipse.wst.jsdt.web.ui@default:default,org.eclipse.jst.server.generic.core@default:default,com.springsource.org.apache.commons.codec@default:default,java_cup.runtime@default:default,org.springframework.binding@default:default,org.eclipse.jst.server.ui.infopop@default:default,org.eclipse.ecf.provider.filetransfer@default:default,org.eclipse.pde@default:default,org.eclipse.emf.mapping.ecore2xml.ui@default:default,org.jboss.tools.jst.jsp@default:default,org.jboss.tools.common.model.ui@default:default,org.eclipse.compare.core@default:default,org.eclipse.jst.jsf.core@default:default,org.eclipse.sdk@default:default,org.jboss.ide.eclipse.archives.core@default:default,org.eclipse.gef@default:default,org.jboss.tools.ws.creation.ui@default!
:default,org.eclipse.wst.common.snippets@default:default,org.eclipse.wst.xml.xpath2.processor@default:default,org.jboss.ide.eclipse.archives.webtools@default:default,org.eclipse.jst.jsp.core@default:default,org.springframework.ide.eclipse.aop.ui.matcher@default:default,org.eclipse.jface.text@default:default,javax.xml@default:default,org.eclipse.xsd.mapping@default:default,org.springframework.ide.eclipse.batch@default:default,org.eclipse.wst.standard.schemas@default:default,org.eclipse.jst.ws.axis.consumption.ui@default:default,org.eclipse.equinox.p2.updatechecker@default:default,org.eclipse.datatools.enablement.ibm.db2.iseries@default:default,com.springsource.javax.servlet.jsp.jstl@default:default,org.eclipse.datatools.enablement.msft.sqlserver.dbdefinition@default:default,org.eclipse.wst.command.env@default:default,org.eclipse.datatools.enablement.msft.sqlserver.ui@default:default,org.eclipse.datatools.enablement.oda.ws@default:default,org.eclipse.wst.sse.doc.user@default:!
default,org.jboss.tools.ws.creation.core@default:default,org.e!
clipse.x
sd.ecore.converter@default:default,org.eclipse.jst.j2ee.navigator.ui@default:default,org.eclipse.datatools.enablement.ibm.informix.dbdefinition@default:default,org.eclipse.ui.editors@default:default,org.eclipse.compare@default:default,org.springframework.integration.event@default:default,org.eclipse.datatools.sqltools.data.ui@default:default,org.eclipse.equinox.p2.ui.sdk@default:default,org.jboss.tools.xulrunner.initializer@default:false,org.eclipse.datatools.enablement.postgresql@default:default,org.eclipse.emf.ecore.edit@default:default,org.springframework.ide.eclipse.webflow.ui.editor@default:default,org.eclipse.ui.forms@default:default,org.eclipse.wst.internet.monitor.ui@default:default,org.eclipse.jem.beaninfo@default:default,org.eclipse.pde.ui.templates@default:default,org.eclipse.emf@default:default,org.jboss.ide.eclipse.freemarker@default:default,org.eclipse.emf.importer@default:default,org.eclipse.ecf.ssl@default:false,org.eclipse.datatools.sqltools.result.ui@defaul!
t:default,org.eclipse.datatools.enablement.hsqldb.ui@default:default,org.eclipse.wst.validation.infopop@default:default,org.springframework.context.support@default:default,com.springsource.javax.servlet@default:default,org.eclipse.wst.server.http.core@default:default,org.jboss.ide.eclipse.as.ssh@default:default,org.eclipse.ui.navigator.resources@default:default,org.apache.xml.serializer@default:default,org.jboss.tools.jsf.vpe.seam@default:default,org.eclipse.datatools.sqltools.tabledataeditor@default:default,org.eclipse.xsd.ecore.importer@default:default,org.eclipse.jdt.junit.runtime@default:default,org.eclipse.jdt.apt.pluggable.core@default:default,org.springframework.integration.httpinvoker@default:default,org.eclipse.jst.ws.axis.infopop@default:default,org.eclipse.ltk.core.refactoring@default:default,org.springframework.ide.eclipse.osgi@default:default,org.springframework.integration.rmi@default:default,org.eclipse.datatools.connectivity.ui.dse@default:default,org.eclips!
e.wst.wsdl.ui@default:default,org.eclipse.wst.xsl.core@default!
:default
,org.eclipse.datatools.sqltools.editor.core@default:default,org.eclipse.update.configurator@3:true,org.eclipse.wst.dtdeditor.doc.user@default:default,org.jboss.tools.jmx.source.feature@default:default,org.eclipse.ui.workbench@default:default,org.eclipse.core.runtime@default:true,org.apache.ws.commons.schema@default:default,org.polarion.eclipse.team.svn.connector.svnkit16@default:default,org.jboss.tools.hibernate.jpt.ui@default:default,org.eclipse.jst.j2ee.ui@default:default,org.eclipse.jem.util@default:default,org.eclipse.pde.ui@default:default,org.springframework.osgi.io@default:default,org.eclipse.wst.command.env.infopop@default:default,org.eclipse.ui.cocoa@default:false,org.eclipse.wst.server.discovery@default:default,org.eclipse.ant.ui@default:default,org.eclipse.wst.validation.ui@default:default,org.springframework.integration.udp@default:default,javax.xml.soap*1.2.0.v200905122109@default:default,org.springframework.integration.file@default:default,org.eclipse.zest.core!
@default:default,org.jboss.tools.project.examples@default:default,org.eclipse.emf.mapping.xsd2ecore@default:default,org.eclipse.datatools.enablement.sap.maxdb.dbdefinition@default:default,org.eclipse.datatools.sqltools.sql@default:default,org.eclipse.core.resources@default:default,org.mortbay.jetty.util@default:default,org.eclipse.equinox.p2.artifact.repository@default:default,org.eclipse.wst.common.uriresolver@default:default,org.jboss.ide.eclipse.archives.ui@default:default,org.eclipse.wst.dtd.core@default:default,org.polarion.eclipse.team.svn.connector@default:default,org.eclipse.team.core@default:default,org.eclipse.wst.web@default:default,org.eclipse.help@default:default,org.eclipse.equinox.http.servlet@default:default,org.eclipse.team.cvs.core@default:default,org.eclipse.core.boot@default:default,org.eclipse.cvs@default:default,org.eclipse.jface.databinding@default:default,org.eclipse.equinox.p2.console@default:default,org.eclipse.jst.common.annotations.controller@def!
ault:default,org.eclipse.jst.ws.consumption@default:default,or!
g.eclips
e.jst.jsf.common.runtime@default:default,org.eclipse.wst.wsi.ui@default:default,org.hibernate.eclipse.jdt.ui@default:default,org.eclipse.datatools.sqltools.schemaobjecteditor.ui.pages@default:default,org.eclipse.wst.xsd.ui@default:default,javax.wsdl@default:default,org.eclipse.jdt.launching.macosx@default:default,org.eclipse.wst.server.ui.infopop@default:default,org.eclipse.core.expressions@default:default,org.jboss.tools.ws.ui@default:default,org.eclipse.wst.common.project.facet.core@default:default,org.eclipse.wst.web.ui@default:default,org.apache.commons.httpclient@default:default,org.eclipse.team.svn.help@default:default,org.eclipse.ecf.filetransfer@default:default,org.apache.log4j@default:default,org.springframework.batch.core@default:default,org.eclipse.pde.junit.runtime@default:default,org.jboss.tools.smooks.templating@default:default,org.eclipse.wst.ws.explorer@default:default,org.eclipse.emf.converter@default:default,org.eclipse.jst.j2ee@default:default,org.eclipse.!
pde.ds.core@default:default,org.eclipse.equinox.util@default:default,org.eclipse.equinox.p2.director@default:default,org.eclipse.wst.wsi.ui.doc.user@default:default,org.eclipse.team.cvs.ssh2@default:default,org.eclipse.datatools.sqltools.schemaobjecteditor.ui@default:default,org.eclipse.jst.ws.consumption.ui@default:default,org.eclipse.datatools.sqltools.parsers.sql.lexer@default:default,org.eclipse.jst.common.project.facet.ui@default:default,org.jboss.tools.jsf.vpe.ajax4jsf@default:default,org.eclipse.platform.doc.user@default:default,org.eclipse.emf.ecore.change.edit@default:default,org.eclipse.equinox.p2.ui.sdk.scheduler@default:default,org.eclipse.equinox.http.registry@default:default,javax.xml.soap*1.3.0.v200904281458@default:default,org.eclipse.wst.server.ui@default:default,org.jboss.tools.struts.verification@default:default,org.eclipse.jst.j2ee.infopop@default:default,org.eclipse.emf.mapping@default:default,org.jboss.ide.eclipse.archives.jdt.integration@default:defau!
lt,org.jboss.tools.common.resref.core@default:default,com.spri!
ngsource
.org.apache.myfaces.javax.faces@default:default,org.eclipse.emf.common@default:default,org.eclipse.pde.core@default:default,org.eclipse.jst.pagedesigner@default:default,org.eclipse.datatools.enablement.sap.maxdb@default:default,org.eclipse.jst.ws.axis2.ui.doc.user@default:default,com.springsource.org.aspectj.runtime@default:default,org.mortbay.jetty.server@default:default,org.eclipse.core.databinding@default:default,org.eclipse.debug.ui@default:default,org.eclipse.datatools.connectivity.oda.design@default:default,org.springframework.integration.stream@default:default,org.apache.commons.codec@default:default,org.eclipse.jst.jsf.doc.user@default:default,org.eclipse.datatools.enablement.oda.xml.ui@default:default,org.eclipse.debug.core@default:default,org.eclipse.jst.common.frameworks@default:default,org.sat4j.pb@default:default,org.eclipse.xsd.editor@default:default,org.eclipse.datatools.modelbase.sql.query.edit@default:default,org.objectweb.asm@default:default,org.eclipse.ui.!
workbench.texteditor@default:default,org.jboss.ide.eclipse.freemarker.source.feature@default:default,org.jboss.tools.vpe@default:default,org.jboss.tools.common.gef@default:default,org.springframework.context@default:default,javax.servlet.jsp@default:default,org.eclipse.datatools.doc.user@default:default,org.eclipse.jst.server.ui.doc.user@default:default,javax.persistence@default:default,org.eclipse.jst.common.annotations.core@default:default,org.jboss.tools.smooks.core@default:default,org.eclipse.datatools.enablement.sybase.asa.dbdefinition@default:default,org.springframework.integration.ws@default:default,com.ibm.icu@default:default,org.eclipse.pde.runtime@default:default,org.apache.lucene.analysis@default:default,org.eclipse.equinox.p2.updatesite@default:default,org.springframework.expression@default:default,org.eclipse.datatools.enablement.ibm.db2.zseries.ui@default:default,org.eclipse.jsch.ui@default:default,org.eclipse.datatools.connectivity.oda.template.ui@default:def!
ault,org.eclipse.datatools.sqltools.parsers.sql.query@default:!
default,
org.eclipse.jem.proxy@default:default,org.eclipse.datatools.enablement.ibm.db2.zseries@default:default,org.eclipse.wst.xsdeditor.doc.user@default:default,org.eclipse.datatools.enablement.oracle.ui@default:default,org.springframework.integration.osgi@default:default,org.eclipse.help.appserver@default:default,org.eclipse.equinox.simpleconfigurator@1:true,org.eclipse.wst.jsdt.ui@default:default,org.jboss.ide.eclipse.as.classpath.ui@default:default,org.jboss.tools.esb.project.core@default:default,org.eclipse.datatools.enablement.sybase.asa.schemaobjecteditor.examples@default:default,org.springframework.xml@default:default,org.eclipse.datatools.enablement.ibm.db2.iseries.dbdefinition@default:default,com.springsource.org.aspectj.weaver@default:default,org.springframework.webflow@default:default,org.eclipse.wst.ws@default:default,org.apache.commons.lang@default:default,org.eclipse.jpt.utility@default:default,org.jboss.tools.cdi.ui@default:default,org.jboss.tools.seam.core@default:d!
efault,org.jboss.tools.jst.css@default:default,org.eclipse.equinox.p2.metadata.repository@default:default,org.eclipse.wst.web.ui.infopop@default:default,org.eclipse.emf.mapping.ecore@default:default,org.eclipse.datatools.sqltools.result@default:default,org.springframework.ide.eclipse.webflow.core@default:default,org.eclipse.datatools.connectivity.oda.design.ui@default:default,org.eclipse.datatools.enablement.sybase.ase@default:default,org.eclipse.wst.xsl.saxon@default:default,org.jboss.tools.struts.validator.ui@default:default,org.eclipse.emf.importer.ecore@default:default,org.eclipse.ecf.provider.filetransfer.httpclient@default:default,org.eclipse.datatools.sqltools.plan@default:default,org.jboss.ide.eclipse.as.ui.mbeans@default:default,org.eclipse.wst.xsl.jaxp.launching@default:default,org.eclipse.datatools.connectivity.db.generic@default:default,org.eclipse.wst.html.core@default:default,org.eclipse.pde.build@default:default,org.eclipse.ui.intro@default:default,org.eclips!
e.wst.sse.ui.infopop@default:default,org.eclipse.datatools.sql!
tools.pa
rsers.sql.xml.query@default:default,org.springframework.osgi.core@default:default,org.eclipse.persistence.core@default:default,org.eclipse.wst.xsd.core@default:default,org.jboss.tools.vpe.ui.palette@default:default,org.eclipse.datatools.enablement.sybase.asa.ui@default:default,org.eclipse.jst.ws.consumption.ui.doc.user@default:default,org.eclipse.jst.pagedesigner.jsp.core@default:default,org.eclipse.equinox.p2.touchpoint.eclipse@default:default,org.eclipse.ui.navigator@default:default,org.eclipse.wst.ws.service.policy.ui@default:default,org.eclipse.wst.common.frameworks@default:default,org.eclipse.jst.j2ee.core@default:default,org.eclipse.emf.mapping.ecore.editor@default:default,org.eclipse.jst.j2ee.web@default:default,org.eclipse.equinox.simpleconfigurator.manipulator@default:default,org.eclipse.equinox.launcher@default:default,org.jboss.tools.jsf.vpe.myfaces@default:default,org.eclipse.datatools.sqltools.schemaobjecteditor@default:default,org.eclipse.jface@default:default,!
org.jboss.tools.project.examples.cheatsheet@default:default,org.eclipse.jpt.db.ui@default:default,org.eclipse.core.contenttype@default:default,org.eclipse.wst.internet.cache@default:default,org.eclipse.wst.doc.user@default:default,org.jboss.tools.common.ui@default:default,com.springsource.javax.mail@default:default,org.eclipse.wst.common.emfworkbench.integration@default:default,org.jboss.ide.eclipse.as.ui@default:default,org.eclipse.jst.ws.axis.consumption.core@default:default,org.eclipse.pde.ua.ui@default:default,org.eclipse.jem@default:default,org.eclipse.wst.xsl.jaxp.debug.ui@default:default,org.springframework.integration@default:default,com.springsource.org.aopalliance@default:default,javax.servlet@default:default,org.eclipse.jpt.branding@default:default,org.jboss.tools.jbpm.common@default:default,org.eclipse.equinox.p2.extensionlocation@default:default,org.eclipse.jpt.core@default:default,org.eclipse.datatools.enablement.ingres.ui@default:default,org.eclipse.webdav@de!
fault:default,org.eclipse.wst.common.emf@default:default,org.e!
clipse.x
sd@default:default,org.eclipse.jpt.doc.user@default:default,org.eclipse.jdt.launching@default:default,org.eclipse.datatools.sqltools.db.generic@default:default,org.jboss.tools.jmx.ui@default:default,org.eclipse.team.cvs.ssh@default:default,org.eclipse.datatools.sqltools.debugger.core@default:default,org.jboss.tools.jst.web@default:default,org.eclipse.jpt.eclipselink.core.ddlgen@default:default,org.eclipse.team.svn.core@default:default,org.eclipse.wst.html.ui@default:default,org.apache.commons.discovery@default:default,org.sat4j.core@default:default,org.eclipse.ltk.ui.refactoring@default:default,org.apache.xml.resolver@default:default,org.eclipse.datatools.modelbase.sql@default:default,org.eclipse.core.filesystem.macosx@default:false,com.springsource.org.apache.commons.logging@default:default,javax.activation@default:default,org.springframework.ide.eclipse.beans.ui.autowire@default:default,org.eclipse.datatools.enablement.oracle.dbdefinition@default:default,org.jboss.tools.po!
rtlet.core@default:default,org.eclipse.jst.server.generic.jboss@default:default,org.springframework.beans@default:default,org.eclipse.equinox.security@default:default,org.eclipse.datatools.enablement.sqlite.dbdefinition@default:default,org.eclipse.xsd.edit@default:default,org.springframework.integration.xml@default:default,org.eclipse.search@default:default,org.eclipse.datatools.enablement.postgresql.dbdefinition@default:default,org.eclipse.jst.jsf.facesconfig@default:default,org.eclipse.wst.jsdt.web.core@default:default,org.eclipse.wst.internet.monitor.core@default:default,org.eclipse.wst.jsdt.support.firefox@default:default,org.mozilla.xpcom@default:default,org.eclipse.datatools.enablement.ingres.dbdefinition@default:default,jd.ide.eclipse@default:default,org.eclipse.jst.ejb.ui@default:default,org.eclipse.datatools.enablement.sqlite@default:default,org.springframework.ide.eclipse@default:default,org.eclipse.jdt.doc.user@default:default,org.eclipse.pde.doc.user@default:def!
ault,org.eclipse.jst.ws.doc.user@default:default,org.eclipse.p!
de.ua.co
re@default:default,org.eclipse.core.runtime.compatibility.registry@default:false,org.eclipse.equinox.p2.touchpoint.natives@default:default,org.eclipse.datatools.modelbase.dbdefinition@default:default,org.eclipse.wst.common.modulecore@default:default,org.apache.velocity@default:default,org.eclipse.equinox.p2.metadata@default:default,org.eclipse.datatools.sqltools.ddlgen.ui@default:default,org.eclipse.jst.ws.axis2.consumption.core@default:default,org.eclipse.ui.views.properties.tabbed@default:default,org.eclipse.wst.common.ui@default:default,org.eclipse.jst.ws.axis.ui.doc.user@default:default,org.eclipse.jst.j2ee.jca@default:default,org.jboss.tools.common.verification.ui@default:default,org.eclipse.update.core@default:default,org.eclipse.emf.codegen.ui@default:default,org.eclipse.datatools.sqltools.doc.user.contexts@default:default,org.eclipse.emf.mapping.ecore2ecore@default:default,org.springframework.ide.eclipse.beans.ui.graph@default:default,org.eclipse.emf.codegen@default:!
default,org.eclipse.text@default:default,org.eclipse.jem.beaninfo.vm.common@default:default,org.apache.jasper@default:default,org.eclipse.datatools.enablement.sybase.models@default:default,org.eclipse.emf.ecore.change@default:default,org.eclipse.emf.importer.java@default:default,org.eclipse.wst.sse.core@default:default,org.eclipse.wst.xsl.xalan@default:default,org.eclipse.jst.jsp.ui@default:default,org.eclipse.datatools.enablement.hsqldb.dbdefinition@default:default,org.eclipse.core.filesystem@default:default,org.eclipse.datatools.enablement.ibm.db2.iseries.ui@default:default,org.eclipse.datatools.enablement.sybase.ase.ui@default:default,org.eclipse.jpt.db@default:default,org.eclipse.datatools.enablement.postgresql.ui@default:default,org.jboss.tools.common.text.ext@default:default,com.springsource.javax.annotation@default:default,org.jboss.tools.struts.ui@default:default,org.eclipse.ui.externaltools@default:default,org.apache.wsil4j@default:default,org.eclipse.ui.console@de!
fault:default,org.jboss.tools.vpe.jsp@default:default,org.ecli!
pse.equi
nox.p2.core@default:default,jd.ide.eclipse.macosx.x86@default:false,org.eclipse.jst.common.project.facet.core@default:default,org.eclipse.jdt.ui@default:default,org.eclipse.jdt.apt.ui@default:default,org.eclipse.equinox.p2.reconciler.dropins@default:default,org.apache.xalan@default:default,org.jboss.tools.vpe.xulrunner@default:default,org.eclipse.wst.server.preview@default:default,org.eclipse.jst.j2ee.ejb.annotations.xdoclet@default:default,org.drools.eclipse@default:default,org.jboss.tools.jst.web.tiles@default:default,org.jboss.tools.struts.vpe.struts@default:default,org.eclipse.emf.common.ui@default:default,org.eclipse.zest.layouts@default:default,org.eclipse.pde.api.tools@default:default,org.eclipse.core.resources.compatibility@default:false,org.jboss.tools.struts@default:default,org.eclipse.wst.wsdl@default:default,org.eclipse.jdt.compiler.apt@default:false,org.springframework.ws@default:default,org.eclipse.emf.ecore@default:default,org.eclipse.datatools.sqltools.data.c!
ore@default:default,org.jboss.tools.common.text.xml@default:default,org.eclipse.equinox.jsp.jasper@default:default,org.eclipse.equinox.jsp.jasper.registry@default:default,org.springframework.integration.jdbc@default:default,org.eclipse.jdt.core@default:default,org.eclipse.wst.xsl.ui@default:default,org.jboss.tools.common@default:default,org.eclipse.equinox.p2.ui@default:default,org.eclipse.ui@default:default,org.eclipse.jem.workbench@default:default,org.eclipse.core.runtime.compatibility@default:default,org.eclipse.datatools.enablement.hsqldb@default:default,org.jboss.tools.seam.text.ext@default:default,com.springsource.org.objectweb.asm@default:default,org.jboss.tools.smooks.ui@default:default,org.jboss.ide.eclipse.as.wtp.core@default:default,org.eclipse.core.databinding.observable@default:default"/>
+<stringAttribute key="selected_workspace_plugins" value="org.jboss.tools.usage.test@default:default,org.jboss.tools.usage@default:default"/>
+<booleanAttribute key="show_selected_only" value="false"/>
+<booleanAttribute key="tracing" value="false"/>
+<booleanAttribute key="useCustomFeatures" value="false"/>
+<booleanAttribute key="useDefaultConfig" value="true"/>
+<booleanAttribute key="useDefaultConfigArea" value="true"/>
+<booleanAttribute key="useProduct" value="false"/>
+</launchConfiguration>
Property changes on: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.test/JBossToolsUsageIntegrationTest.launch
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.test/JBossToolsUsageRequestsTest.launch
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.test/JBossToolsUsageRequestsTest.launch (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.test/JBossToolsUsageRequestsTest.launch 2010-09-02 14:35:43 UTC (rev 24649)
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<launchConfiguration type="org.eclipse.pde.ui.JunitLaunchConfig">
+<booleanAttribute key="append.args" value="true"/>
+<stringAttribute key="application" value="org.eclipse.pde.junit.runtime.coretestapplication"/>
+<booleanAttribute key="askclear" value="false"/>
+<booleanAttribute key="automaticAdd" value="true"/>
+<booleanAttribute key="automaticValidate" value="false"/>
+<stringAttribute key="bootstrap" value=""/>
+<stringAttribute key="checked" value="[NONE]"/>
+<booleanAttribute key="clearConfig" value="true"/>
+<booleanAttribute key="clearws" value="true"/>
+<booleanAttribute key="clearwslog" value="false"/>
+<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/JBossToolsUsageRequestsTest"/>
+<booleanAttribute key="default" value="false"/>
+<booleanAttribute key="includeOptional" value="true"/>
+<stringAttribute key="location" value="${workspace_loc}/../junit-workspace"/>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
+<listEntry value="/org.jboss.tools.usage.test/src/org/jboss/tools/usage/test/JBossToolsUsageRequestsTest.java"/>
+</listAttribute>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
+<listEntry value="1"/>
+</listAttribute>
+<listAttribute key="org.eclipse.debug.ui.favoriteGroups">
+<listEntry value="org.eclipse.debug.ui.launchGroup.debug"/>
+<listEntry value="org.eclipse.debug.ui.launchGroup.run"/>
+</listAttribute>
+<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value=""/>
+<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
+<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
+<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit4"/>
+<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.jboss.tools.usage.test.JBossToolsUsageRequestsTest"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl}"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.jboss.tools.usage.test"/>
+<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
+<stringAttribute key="pde.version" value="3.3"/>
+<stringAttribute key="product" value="com.jboss.jbds.product.product"/>
+<booleanAttribute key="run_in_ui_thread" value="true"/>
+<stringAttribute key="selected_target_plugins" value="javax.transaction@default:false,org.eclipse.equinox.registry@default:default,org.eclipse.equinox.p2.jarprocessor@default:default,org.hamcrest.core@default:default,org.eclipse.ecf.provider.filetransfer.ssl@default:false,org.eclipse.equinox.p2.metadata@default:default,org.eclipse.equinox.common@default:default,org.eclipse.text@default:default,org.eclipse.core.databinding.observable@default:default,org.eclipse.core.runtime@default:true,org.eclipse.core.contenttype@default:default,org.eclipse.core.commands@default:default,org.eclipse.equinox.p2.repository@default:default,org.eclipse.ui.cocoa@default:false,org.eclipse.jface.databinding@default:default,org.eclipse.core.runtime.compatibility.auth@default:default,org.eclipse.ui.forms@default:default,org.eclipse.ecf.filetransfer@default:default,org.eclipse.core.expressions@default:default,org.junit4@default:default,org.eclipse.ecf.provider.filetransfer@default:default,org.eclipse!
.ui.workbench@default:default,org.eclipse.jface.text@default:default,org.eclipse.ecf.identity@default:default,org.eclipse.equinox.app@default:default,org.eclipse.ecf.ssl@default:false,org.eclipse.core.runtime.compatibility.registry@default:false,org.eclipse.equinox.preferences@default:default,org.eclipse.core.resources@default:default,org.eclipse.core.databinding.property@default:default,org.eclipse.equinox.transforms.hook@default:false,com.ibm.icu@default:default,org.eclipse.core.variables@default:default,org.eclipse.equinox.p2.artifact.repository@default:default,org.eclipse.ui.views@default:default,org.eclipse.core.resources.compatibility@default:false,org.eclipse.equinox.security.macosx@default:false,org.eclipse.swt@default:default,org.eclipse.equinox.p2.core@default:default,org.eclipse.equinox.p2.engine@default:default,org.eclipse.help@default:default,org.eclipse.osgi,org.eclipse.equinox.p2.metadata.repository@default:default,org.eclipse.core.filesystem@default:default,!
org.eclipse.ecf@default:default,org.eclipse.core.databinding@d!
efault:d
efault,org.eclipse.core.jobs@default:default,org.eclipse.ant.core@default:default,org.jboss.tools.xulrunner.initializer@default:false,org.eclipse.equinox.concurrent@default:default,org.eclipse.core.filesystem.macosx@default:false,org.eclipse.swt.cocoa.macosx@default:false,org.eclipse.ui@default:default,org.eclipse.core.net@default:default,org.eclipse.equinox.security@default:default,org.eclipse.ui.ide@default:default,org.eclipse.jface@default:default,javax.servlet@default:default,org.eclipse.osgi.services@default:default"/>
+<stringAttribute key="selected_workspace_plugins" value="org.jboss.tools.usage.test@default:default,org.jboss.tools.usage@default:default"/>
+<booleanAttribute key="show_selected_only" value="false"/>
+<booleanAttribute key="tracing" value="false"/>
+<booleanAttribute key="useCustomFeatures" value="false"/>
+<booleanAttribute key="useDefaultConfig" value="true"/>
+<booleanAttribute key="useDefaultConfigArea" value="true"/>
+<booleanAttribute key="useProduct" value="false"/>
+</launchConfiguration>
Property changes on: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.test/JBossToolsUsageRequestsTest.launch
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.test/META-INF/MANIFEST.MF
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.test/META-INF/MANIFEST.MF (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.test/META-INF/MANIFEST.MF 2010-09-02 14:35:43 UTC (rev 24649)
@@ -0,0 +1,12 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Tests for JBoss Tools Usage Reporting
+Bundle-SymbolicName: org.jboss.tools.usage.test
+Bundle-Version: 1.0.0.qualifier
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Require-Bundle: org.jboss.tools.usage;bundle-version="1.0.0",
+ org.eclipse.osgi;bundle-version="3.5.2",
+ org.eclipse.core.runtime;bundle-version="3.5.0",
+ org.junit4;bundle-version="4.0.0"
+Bundle-Activator: org.jboss.tools.usage.test.JBossToolsUsageTestActivator
+Bundle-ActivationPolicy: lazy
Property changes on: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.test/META-INF/MANIFEST.MF
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.test/UsageTestSuite.launch
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.test/UsageTestSuite.launch (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.test/UsageTestSuite.launch 2010-09-02 14:35:43 UTC (rev 24649)
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<launchConfiguration type="org.eclipse.pde.ui.JunitLaunchConfig">
+<booleanAttribute key="append.args" value="true"/>
+<stringAttribute key="application" value="org.eclipse.pde.junit.runtime.coretestapplication"/>
+<booleanAttribute key="askclear" value="false"/>
+<booleanAttribute key="automaticAdd" value="true"/>
+<booleanAttribute key="automaticValidate" value="false"/>
+<stringAttribute key="bootstrap" value=""/>
+<stringAttribute key="checked" value="[NONE]"/>
+<booleanAttribute key="clearConfig" value="true"/>
+<booleanAttribute key="clearws" value="true"/>
+<booleanAttribute key="clearwslog" value="false"/>
+<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/pde-junit"/>
+<booleanAttribute key="default" value="false"/>
+<booleanAttribute key="includeOptional" value="true"/>
+<stringAttribute key="location" value="${workspace_loc}/../junit-workspace"/>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
+<listEntry value="/org.jboss.tools.usage.test/src/org/jboss/tools/usage/test/UsageTestSuite.java"/>
+</listAttribute>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
+<listEntry value="1"/>
+</listAttribute>
+<listAttribute key="org.eclipse.debug.ui.favoriteGroups">
+<listEntry value="org.eclipse.debug.ui.launchGroup.debug"/>
+<listEntry value="org.eclipse.debug.ui.launchGroup.run"/>
+</listAttribute>
+<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value=""/>
+<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
+<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
+<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit4"/>
+<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.launching.macosx.MacOSXType/JVM 1.5"/>
+<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.jboss.tools.usage.test.UsageTestSuite"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl}"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.jboss.tools.usage.test"/>
+<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
+<stringAttribute key="pde.version" value="3.3"/>
+<stringAttribute key="product" value="com.jboss.jbds.product.product"/>
+<booleanAttribute key="run_in_ui_thread" value="true"/>
+<stringAttribute key="selected_target_plugins" value="org.eclipse.ui.workbench.texteditor@default:default,com.springsource.javax.servlet.jsp@default:default,org.eclipse.ui.cheatsheets@default:default,org.eclipse.equinox.registry@default:default,org.eclipse.core.databinding@default:default,org.apache.lucene@default:default,org.eclipse.core.filesystem.macosx@default:false,org.eclipse.ecf@default:default,org.eclipse.equinox.security.macosx@default:false,org.apache.lucene.analysis@default:default,org.eclipse.ui.ide@default:default,com.ibm.icu@default:default,org.eclipse.equinox.preferences@default:default,org.eclipse.equinox.transforms.hook@default:false,org.eclipse.equinox.p2.repository@default:default,org.eclipse.equinox.p2.artifact.repository@default:default,org.junit4@default:default,org.eclipse.core.net@default:default,org.eclipse.ecf.identity@default:default,org.eclipse.osgi@-1:true,org.eclipse.equinox.common@2:true,org.eclipse.core.databinding.property@default:default,or!
g.eclipse.swt@default:default,javax.transaction@default:false,org.eclipse.compare.core@default:default,org.eclipse.osgi.services@default:default,org.eclipse.ui.navigator.resources@default:default,org.eclipse.ecf.ssl@default:false,org.eclipse.text@default:default,org.eclipse.core.variables@default:default,javax.servlet@default:default,org.eclipse.core.jobs@default:default,org.eclipse.ui.ide.application@default:default,org.eclipse.core.resources@default:default,org.eclipse.ui.views@default:default,org.eclipse.core.expressions@default:default,org.eclipse.ui.workbench@default:default,org.eclipse.equinox.http.servlet@default:default,org.eclipse.equinox.app@default:default,org.eclipse.core.resources.compatibility@default:false,org.eclipse.help.base@default:default,org.eclipse.ui.navigator@default:default,org.eclipse.equinox.p2.metadata@default:default,org.apache.jasper@default:default,org.mortbay.jetty.util@default:default,org.eclipse.ecf.provider.filetransfer.ssl@default:false,o!
rg.eclipse.core.databinding.observable@default:default,org.ecl!
ipse.ecf
.provider.filetransfer@default:default,org.eclipse.swt.cocoa.macosx@default:false,org.apache.commons.el@default:default,org.eclipse.ant.core@default:default,org.eclipse.jface.databinding@default:default,org.eclipse.core.runtime.compatibility.auth@default:default,com.springsource.org.apache.commons.logging@default:default,org.jboss.tools.xulrunner.initializer@default:false,com.springsource.javax.el@default:default,org.eclipse.equinox.concurrent@default:default,org.eclipse.ui.views.properties.tabbed@default:default,org.eclipse.equinox.security@default:default,org.mortbay.jetty.server@default:default,org.eclipse.ui.cocoa@default:false,org.eclipse.equinox.p2.engine@default:default,org.eclipse.jface.text@default:default,org.eclipse.ui.intro.universal@default:default,org.eclipse.equinox.p2.metadata.repository@default:default,org.eclipse.ecf.filetransfer@default:default,org.eclipse.core.contenttype@default:default,org.eclipse.help.ui@default:default,org.eclipse.equinox.http.jetty@d!
efault:default,org.eclipse.ui.forms@default:default,org.hamcrest.core@default:default,org.eclipse.core.runtime@default:true,org.apache.ant@default:default,com.springsource.javax.servlet@default:default,org.eclipse.equinox.p2.jarprocessor@default:default,org.eclipse.core.filesystem@default:default,org.eclipse.ui@default:default,org.eclipse.core.commands@default:default,org.eclipse.equinox.p2.core@default:default,org.eclipse.jface@default:default,org.eclipse.help@default:default,org.eclipse.core.runtime.compatibility.registry@default:false,org.eclipse.ui.intro@default:default,com.jboss.jbds.product@default:default"/>
+<stringAttribute key="selected_workspace_plugins" value="org.jboss.tools.usage.test@default:default,org.jboss.tools.usage@default:default"/>
+<booleanAttribute key="show_selected_only" value="false"/>
+<booleanAttribute key="tracing" value="false"/>
+<booleanAttribute key="useDefaultConfig" value="true"/>
+<booleanAttribute key="useDefaultConfigArea" value="false"/>
+<booleanAttribute key="useProduct" value="false"/>
+</launchConfiguration>
Property changes on: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.test/UsageTestSuite.launch
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.test/about.html
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.test/about.html (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.test/about.html 2010-09-02 14:35:43 UTC (rev 24649)
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
+<title>Smooks Core</title>
+<style type="text/css" media="screen">
+<!--
+ body {
+ font-family: Sans-serif, Arial, Helvetica;
+ }
+
+-->
+</style>
+</head>
+<body>
+<h1>JBoss Usage Reporting</h1>
+
+<p>
+This plugin is part of the JBoss Tools developed by the <a href="http://www.jboss.com">JBoss Inc.</a>
+</p>
+
+<p>Information about this plugin is available at <a href="http://www.jboss.org/tools">JBoss Tools project page</a></p>
+
+<p>
+This software is distributed under the terms of the Eclipse Public License - v 1.0
+(see <a href="www.eclipse.org/legal/epl-v10.html">Eclipse Public License - Version 1.0</a>).
+</p>
+</body>
+</html>
\ No newline at end of file
Property changes on: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.test/about.html
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.test/build.properties
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.test/build.properties (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.test/build.properties 2010-09-02 14:35:43 UTC (rev 24649)
@@ -0,0 +1,18 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ about.html,\
+ bin/
+src.includes = .settings/,\
+ .project,\
+ .classpath,\
+ EclipseEnvironmentTest.launch,\
+ FocusPointTest.launch,\
+ GoogleAnalyticsUrlStrategyTest.launch,\
+ JBossToolsUsageTest.launch,\
+ JBossToolsUsageRequestsTest.launch,\
+ META-INF/,\
+ about.html,\
+ build.properties,\
+ src/
Property changes on: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.test/build.properties
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.test/pom.xml
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.test/pom.xml (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.test/pom.xml 2010-09-02 14:35:43 UTC (rev 24649)
@@ -0,0 +1,17 @@
+<project
+xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.jboss.tools</groupId>
+ <artifactId>org.jboss.tools.parent.pom</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ </parent>
+ <groupId>org.jboss.tools.usage.tests</groupId>
+ <artifactId>org.jboss.tools.usage.test</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <packaging>eclipse-plugin</packaging>
+ <properties>
+ <emma.filter/>
+ <emma.instrument.bundles/>
+ </properties>
+</project>
Property changes on: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.test/pom.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.test/src/org/jboss/tools/usage/test/EclipseEnvironmenTest.java
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.test/src/org/jboss/tools/usage/test/EclipseEnvironmenTest.java (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.test/src/org/jboss/tools/usage/test/EclipseEnvironmenTest.java 2010-09-02 14:35:43 UTC (rev 24649)
@@ -0,0 +1,278 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is 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:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.usage.test;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.URL;
+import java.util.Dictionary;
+import java.util.Enumeration;
+import java.util.Map;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import org.eclipse.core.runtime.Platform;
+import org.jboss.tools.usage.reporting.EclipseEnvironment;
+import org.jboss.tools.usage.reporting.JBossBundleGroups;
+import org.junit.Test;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.BundleException;
+import org.osgi.framework.ServiceReference;
+import org.osgi.framework.Version;
+
+/**
+ * @author Andre Dietisheim
+ */
+public class EclipseEnvironmenTest {
+
+ @Test
+ public void testMacOs() {
+ EclipseEnvironment eclipseEnvironment = new EclipseEnvironmentFake(Platform.OS_MACOSX);
+ String userAgent = eclipseEnvironment.getUserAgent();
+ assertApplicationNameAndVersion("com.jboss.jbds.product", "3.0.1", userAgent);
+ assertOs("Macintosh", "Intel Mac OS X 10.5", userAgent);
+ assertLanguage("en-US", userAgent);
+ }
+
+ @Test
+ public void testLinux() {
+ EclipseEnvironment eclipseEnvironment = new EclipseEnvironmentFake(Platform.OS_LINUX);
+ String userAgent = eclipseEnvironment.getUserAgent();
+ assertApplicationNameAndVersion("com.jboss.jbds.product", "3.0.1", userAgent);
+ assertOs("X11", "Linux i686", userAgent);
+ assertLanguage("en-US", userAgent);
+ }
+
+ @Test
+ public void testWindows() {
+ EclipseEnvironment eclipseEnvironment = new EclipseEnvironmentFake(Platform.OS_WIN32);
+ String userAgent = eclipseEnvironment.getUserAgent();
+ assertApplicationNameAndVersion("com.jboss.jbds.product", "3.0.1", userAgent);
+ assertOs("Windows", "Windows NT 6.1", userAgent);
+ assertLanguage("en-US", userAgent);
+ }
+
+ @Test
+ public void testKeyword() {
+ EclipseEnvironment eclipseEnvironment = new EclipseEnvironmentFake() {
+ @Override
+ protected Bundle[] getBundles() {
+ return new Bundle[] {
+ new BundleSymbolicNameFake("org.jboss.tools.seam.ui"),
+ new BundleSymbolicNameFake("org.jboss.tools.seam.core"),
+ new BundleSymbolicNameFake("org.jboss.tools.gwt.ui"),
+ new BundleSymbolicNameFake("org.jboss.tools.gwt.core"),
+ new BundleSymbolicNameFake("org.jboss.tools.smooks.core"),
+ new BundleSymbolicNameFake("org.eclipse.core.runtime"),
+ };
+ }
+ };
+ String keyword = eclipseEnvironment.getKeyword();
+
+ Matcher matcher = Pattern.compile("(([A-Z]+)-){3}").matcher(keyword);
+ assertTrue(matcher.matches());
+ assertTrue(keyword.indexOf(JBossBundleGroups.BundleGroup.GWT.name()) >= 0);
+ assertTrue(keyword.indexOf(JBossBundleGroups.BundleGroup.SEAM.name()) >= 0);
+ assertTrue(keyword.indexOf(JBossBundleGroups.BundleGroup.SMOOKS.name()) >= 0);
+ }
+
+ private void assertApplicationNameAndVersion(String applicationName, String applicationVersion, String userAgent) {
+ Matcher matcher = Pattern.compile("([a-zA-Z\\.]+)/([0-9\\.]+).+").matcher(userAgent);
+ assertTrue(matcher.matches());
+ assertEquals(2, matcher.groupCount());
+ assertEquals(applicationName, matcher.group(1));
+ assertEquals(applicationVersion, matcher.group(2));
+ }
+
+ private void assertOs(String platform, String os, String userAgent) {
+ Matcher matcher = Pattern.compile(".+ \\((.+); U; (.+); .+\\)").matcher(userAgent);
+ assertTrue(matcher.matches());
+ assertEquals(2, matcher.groupCount());
+ assertEquals(platform, matcher.group(1));
+ assertEquals(os, matcher.group(2));
+ }
+
+ private void assertLanguage(String language, String userAgent) {
+ Matcher matcher = Pattern.compile(".+ \\(.+; U; .+ .+; (.+)\\)").matcher(userAgent);
+ assertTrue(matcher.matches());
+ assertEquals(1, matcher.groupCount());
+ assertEquals(language, matcher.group(1));
+ }
+
+ private class BundleSymbolicNameFake implements Bundle {
+
+ private String symbolicName;
+
+ public BundleSymbolicNameFake(String symbolicName) {
+ this.symbolicName = symbolicName;
+ }
+
+ @SuppressWarnings("unchecked")
+ public Enumeration findEntries(String path, String filePattern, boolean recurse) {
+ throw new UnsupportedOperationException();
+ }
+
+ public BundleContext getBundleContext() {
+ throw new UnsupportedOperationException();
+ }
+
+ public long getBundleId() {
+ throw new UnsupportedOperationException();
+ }
+
+ public URL getEntry(String path) {
+ throw new UnsupportedOperationException();
+ }
+
+ @SuppressWarnings("unchecked")
+ public Enumeration getEntryPaths(String path) {
+ throw new UnsupportedOperationException();
+ }
+
+ @SuppressWarnings("unchecked")
+ public Dictionary getHeaders() {
+ throw new UnsupportedOperationException();
+ }
+
+ @SuppressWarnings("unchecked")
+ public Dictionary getHeaders(String locale) {
+ throw new UnsupportedOperationException();
+ }
+
+ public long getLastModified() {
+ throw new UnsupportedOperationException();
+ }
+
+ public String getLocation() {
+ throw new UnsupportedOperationException();
+ }
+
+ public ServiceReference[] getRegisteredServices() {
+ throw new UnsupportedOperationException();
+ }
+
+ public URL getResource(String name) {
+ throw new UnsupportedOperationException();
+ }
+
+ @SuppressWarnings("unchecked")
+ public Enumeration getResources(String name) throws IOException {
+ throw new UnsupportedOperationException();
+ }
+
+ public ServiceReference[] getServicesInUse() {
+ throw new UnsupportedOperationException();
+ }
+
+ @SuppressWarnings("unchecked")
+ public Map getSignerCertificates(int signersType) {
+ throw new UnsupportedOperationException();
+ }
+
+ public int getState() {
+ throw new UnsupportedOperationException();
+ }
+
+ public String getSymbolicName() {
+ return this.symbolicName;
+ }
+
+ public Version getVersion() {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public boolean hasPermission(Object permission) {
+ throw new UnsupportedOperationException();
+
+ }
+
+ @SuppressWarnings("unchecked")
+ public Class loadClass(String name) throws ClassNotFoundException {
+ throw new UnsupportedOperationException();
+ }
+
+ public void start() throws BundleException {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public void start(int options) throws BundleException {
+ throw new UnsupportedOperationException();
+ }
+
+ public void stop() throws BundleException {
+ throw new UnsupportedOperationException();
+ }
+
+ public void stop(int options) throws BundleException {
+ throw new UnsupportedOperationException();
+ }
+
+ public void uninstall() throws BundleException {
+ throw new UnsupportedOperationException();
+ }
+
+ public void update() throws BundleException {
+ throw new UnsupportedOperationException();
+ }
+
+ public void update(InputStream input) throws BundleException {
+ throw new UnsupportedOperationException();
+ }
+ }
+
+ @Test
+ public void testVisitsOnFirstVisit() {
+ EclipsePreferencesFake preferences = new EclipsePreferencesFake();
+ EclipseEnvironment eclipseEnvironment = new EclipseEnvironmentFake(preferences);
+ String firstVisit = eclipseEnvironment.getFirstVisit();
+ assertEquals(1, eclipseEnvironment.getVisitCount());
+ assertEquals(firstVisit, eclipseEnvironment.getLastVisit());
+ assertEquals(firstVisit, eclipseEnvironment.getLastVisit());
+ assertEquals(firstVisit, eclipseEnvironment.getCurrentVisit());
+ }
+
+ @Test
+ public void testVisitsOnSecondVisit() throws InterruptedException {
+ EclipsePreferencesFake preferences = new EclipsePreferencesFake();
+ EclipseEnvironment eclipseEnvironment = new EclipseEnvironmentFake(preferences);
+ String firstVisit = eclipseEnvironment.getFirstVisit();
+ Thread.sleep(10);
+ eclipseEnvironment.visit();
+
+ assertEquals(2, eclipseEnvironment.getVisitCount());
+ assertEquals(firstVisit, eclipseEnvironment.getFirstVisit());
+ assertEquals(firstVisit, eclipseEnvironment.getLastVisit());
+ assertTrue(!firstVisit.equals(eclipseEnvironment.getCurrentVisit()));
+ }
+
+ @Test
+ public void testVisitsOnThirdVisit() throws InterruptedException {
+ EclipsePreferencesFake preferences = new EclipsePreferencesFake();
+ EclipseEnvironment eclipseEnvironment = new EclipseEnvironmentFake(preferences);
+ String firstVisit = eclipseEnvironment.getFirstVisit();
+ Thread.sleep(10);
+ eclipseEnvironment.visit();
+
+ String currentVisit = eclipseEnvironment.getCurrentVisit();
+ Thread.sleep(10);
+ eclipseEnvironment.visit();
+
+ assertEquals(3, eclipseEnvironment.getVisitCount());
+ assertEquals(currentVisit, eclipseEnvironment.getLastVisit());
+ assertTrue(!firstVisit.equals(eclipseEnvironment.getCurrentVisit()));
+ }
+}
Property changes on: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.test/src/org/jboss/tools/usage/test/EclipseEnvironmenTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.test/src/org/jboss/tools/usage/test/EclipseEnvironmentFake.java
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.test/src/org/jboss/tools/usage/test/EclipseEnvironmentFake.java (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.test/src/org/jboss/tools/usage/test/EclipseEnvironmentFake.java 2010-09-02 14:35:43 UTC (rev 24649)
@@ -0,0 +1,87 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is 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:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.usage.test;
+
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.preferences.IEclipsePreferences;
+import org.jboss.tools.usage.reporting.EclipseEnvironment;
+
+/**
+ * @author Andre Dietisheim
+ */
+public class EclipseEnvironmentFake extends EclipseEnvironment {
+
+ public static final String GANALYTICS_ACCOUNTNAME = "UA-17645367-1";
+ public static final String HOSTNAME = "jboss.org";
+ public static final String REFERRAL = "0";
+ public static final String LOCALE_US = "en_US";
+
+ private String locale;
+ private String os;
+
+ public EclipseEnvironmentFake() {
+ this(GANALYTICS_ACCOUNTNAME, HOSTNAME, REFERRAL, Platform.OS_LINUX, LOCALE_US);
+ }
+
+ public EclipseEnvironmentFake(String platform) {
+ this(GANALYTICS_ACCOUNTNAME, HOSTNAME, REFERRAL, platform, LOCALE_US);
+ }
+
+ public EclipseEnvironmentFake(IEclipsePreferences preferences) {
+ this(GANALYTICS_ACCOUNTNAME, HOSTNAME, REFERRAL, Platform.OS_LINUX, LOCALE_US, preferences);
+ }
+
+ public EclipseEnvironmentFake(String accountName, String hostName, String referral, String os, String locale,
+ IEclipsePreferences preferences) {
+ super(accountName, hostName, referral, preferences);
+ this.os = os;
+ this.locale = locale;
+ }
+
+ public EclipseEnvironmentFake(String accountName, String hostName, String referral, String os, String locale) {
+ this(accountName, hostName, referral, os, locale, new EclipsePreferencesFake());
+ }
+
+ @Override
+ protected void initScreenSettings() {
+ // do not access swt/display
+ }
+
+ @Override
+ public String getScreenResolution() {
+ return 1920 + SCREERESOLUTION_DELIMITER + 1080;
+ }
+
+ @Override
+ public String getScreenColorDepth() {
+ return 24 + SCREENCOLORDEPTH_POSTFIX;
+ }
+
+ @Override
+ protected String getApplicationName() {
+ return "com.jboss.jbds.product";
+ }
+
+ @Override
+ protected String getNL() {
+ return locale;
+ }
+
+ @Override
+ protected String getOS() {
+ return os;
+ }
+
+ @Override
+ protected String getApplicationVersion() {
+ return "3.0.1";
+ }
+}
Property changes on: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.test/src/org/jboss/tools/usage/test/EclipseEnvironmentFake.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.test/src/org/jboss/tools/usage/test/EclipsePreferencesFake.java
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.test/src/org/jboss/tools/usage/test/EclipsePreferencesFake.java (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.test/src/org/jboss/tools/usage/test/EclipsePreferencesFake.java 2010-09-02 14:35:43 UTC (rev 24649)
@@ -0,0 +1,160 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is 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:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.usage.test;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.core.runtime.preferences.IEclipsePreferences;
+import org.eclipse.core.runtime.preferences.IPreferenceNodeVisitor;
+import org.osgi.service.prefs.BackingStoreException;
+import org.osgi.service.prefs.Preferences;
+
+public class EclipsePreferencesFake implements IEclipsePreferences {
+
+ private Map<String, String> preferences;
+
+ public EclipsePreferencesFake() {
+ this.preferences = new HashMap<String, String>();
+ }
+
+ public void accept(IPreferenceNodeVisitor visitor) throws BackingStoreException {
+ throw new UnsupportedOperationException();
+ }
+
+ public void addNodeChangeListener(INodeChangeListener listener) {
+ throw new UnsupportedOperationException();
+ }
+
+ public void addPreferenceChangeListener(IPreferenceChangeListener listener) {
+ throw new UnsupportedOperationException();
+ }
+
+ public Preferences node(String path) {
+ throw new UnsupportedOperationException();
+ }
+
+ public void removeNode() throws BackingStoreException {
+ throw new UnsupportedOperationException();
+ }
+
+ public void removeNodeChangeListener(INodeChangeListener listener) {
+ throw new UnsupportedOperationException();
+ }
+
+ public void removePreferenceChangeListener(IPreferenceChangeListener listener) {
+ throw new UnsupportedOperationException();
+ }
+
+ public String absolutePath() {
+ throw new UnsupportedOperationException();
+ }
+
+ public String[] childrenNames() throws BackingStoreException {
+ throw new UnsupportedOperationException();
+ }
+
+ public void clear() throws BackingStoreException {
+ this.preferences.clear();
+ }
+
+ public void flush() throws BackingStoreException {
+ }
+
+ public String get(String key, String defaultValue) {
+ String value = preferences.get(key);
+ if (value == null) {
+ value = defaultValue;
+ }
+ return value;
+ }
+
+ public boolean getBoolean(String key, boolean defaultValue) {
+ throw new UnsupportedOperationException();
+ }
+
+ public byte[] getByteArray(String key, byte[] defaultValue) {
+ throw new UnsupportedOperationException();
+ }
+
+ public double getDouble(String key, double defaultValue) {
+ throw new UnsupportedOperationException();
+ }
+
+ public float getFloat(String key, float defaultValue) {
+ throw new UnsupportedOperationException();
+ }
+
+ public int getInt(String key, int defaultValue) {
+ throw new UnsupportedOperationException();
+ }
+
+ public long getLong(String key, long defaultValue) {
+ String value = preferences.get(key);
+ if (value != null) {
+ return Long.valueOf(value);
+ } else {
+ return defaultValue;
+ }
+ }
+
+ public String[] keys() throws BackingStoreException {
+ throw new UnsupportedOperationException();
+ }
+
+ public String name() {
+ throw new UnsupportedOperationException();
+ }
+
+ public boolean nodeExists(String pathName) throws BackingStoreException {
+ throw new UnsupportedOperationException();
+ }
+
+ public Preferences parent() {
+ throw new UnsupportedOperationException();
+ }
+
+ public void put(String key, String value) {
+ preferences.put(key, value);
+ }
+
+ public void putBoolean(String key, boolean value) {
+ throw new UnsupportedOperationException();
+ }
+
+ public void putByteArray(String key, byte[] value) {
+ throw new UnsupportedOperationException();
+ }
+
+ public void putDouble(String key, double value) {
+ throw new UnsupportedOperationException();
+ }
+
+ public void putFloat(String key, float value) {
+ throw new UnsupportedOperationException();
+ }
+
+ public void putInt(String key, int value) {
+ throw new UnsupportedOperationException();
+ }
+
+ public void putLong(String key, long value) {
+ preferences.put(key, String.valueOf(value));
+ }
+
+ public void remove(String key) {
+ throw new UnsupportedOperationException();
+ }
+
+ public void sync() throws BackingStoreException {
+ // ignore
+ }
+}
\ No newline at end of file
Property changes on: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.test/src/org/jboss/tools/usage/test/EclipsePreferencesFake.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.test/src/org/jboss/tools/usage/test/FocusPointTest.java
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.test/src/org/jboss/tools/usage/test/FocusPointTest.java (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.test/src/org/jboss/tools/usage/test/FocusPointTest.java 2010-09-02 14:35:43 UTC (rev 24649)
@@ -0,0 +1,58 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is 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:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.usage.test;
+
+import org.jboss.tools.usage.FocusPoint;
+import org.jboss.tools.usage.util.HttpEncodingUtils;
+
+import junit.framework.TestCase;
+
+/**
+ * @author Andre Dietisheim
+ */
+public class FocusPointTest extends TestCase {
+
+ private static final String root = "root";
+
+ private static final String child1 = "child1";
+
+ private static final String URI_SEPARATOR_ENCODED = HttpEncodingUtils.checkedEncodeUtf8(FocusPoint.URI_SEPARATOR);
+
+ private static final String TITLE_SEPARATOR_ENCODED = HttpEncodingUtils.checkedEncodeUtf8(FocusPoint.TITLE_SEPARATOR);
+
+ public void testGetContentURI_Simple() throws Exception {
+ FocusPoint focusPoint = new FocusPoint(root);
+ String contentURI = focusPoint.getContentURI();
+ assertNotNull(contentURI);
+ assertEquals(URI_SEPARATOR_ENCODED + root, contentURI);
+ }
+
+ public void testGetContentURI_OneLevel() throws Exception {
+ FocusPoint focusPoint = new FocusPoint(root).setChild(new FocusPoint(child1));
+ String contentURI = focusPoint.getContentURI();
+ assertNotNull(contentURI);
+ assertEquals(URI_SEPARATOR_ENCODED + root + URI_SEPARATOR_ENCODED + child1, contentURI);
+ }
+
+ public void testGetContentTitle_Simple() throws Exception {
+ FocusPoint focusPoint = new FocusPoint(root);
+ String contentTitle = focusPoint.getContentTitle();
+ assertNotNull(contentTitle);
+ assertEquals(root, contentTitle);
+ }
+
+ public void testGetContentTitle_OneLevel() throws Exception {
+ FocusPoint focusPoint = new FocusPoint(root).setChild(new FocusPoint(child1));
+ String contentTitle = focusPoint.getContentTitle();
+ assertNotNull(contentTitle);
+ assertEquals(root + TITLE_SEPARATOR_ENCODED + child1, contentTitle);
+ }
+}
Property changes on: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.test/src/org/jboss/tools/usage/test/FocusPointTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.test/src/org/jboss/tools/usage/test/GlobalUsageReportingSettingsTest.java
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.test/src/org/jboss/tools/usage/test/GlobalUsageReportingSettingsTest.java (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.test/src/org/jboss/tools/usage/test/GlobalUsageReportingSettingsTest.java 2010-09-02 14:35:43 UTC (rev 24649)
@@ -0,0 +1,87 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is 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:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.usage.test;
+
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
+import java.io.ByteArrayInputStream;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.io.UnsupportedEncodingException;
+import java.net.HttpURLConnection;
+
+import org.jboss.tools.usage.preferences.GlobalUsageReportingSettings;
+import org.junit.Test;
+
+/**
+ * Test for the global usage report settings. All tests are disabled yet,
+ * implementation's unfortunately still buggy.
+ */
+public class GlobalUsageReportingSettingsTest {
+
+ @Test
+ public void canExtractEnabledValue() throws IOException {
+ GlobalReportingSettingsFake reportSettings = new GlobalReportingSettingsFake("true", "", "");
+ assertTrue(reportSettings.isEnabled());
+ }
+
+ @Test
+ public void canExtractDisabledValue() throws IOException {
+ GlobalReportingSettingsFake reportSettings = new GlobalReportingSettingsFake("false", "", "");
+ assertFalse(reportSettings.isEnabled());
+ }
+
+ @Test
+ public void canExtractDisabledOutUndefinedValue() throws IOException {
+ GlobalReportingSettingsFake reportEnablement = new GlobalReportingSettingsFake("Rubbish", "", "");
+ assertFalse(reportEnablement.isEnabled());
+ }
+
+ private class GlobalReportingSettingsFake extends GlobalUsageReportingSettings {
+
+ private String enablementValue;
+ private String integerValue;
+ private String stringValue;
+
+ public GlobalReportingSettingsFake(String enablementValue, String dummyValue, String anotherValue)
+ throws IOException {
+ super(JBossToolsUsageTestActivator.getDefault());
+ this.enablementValue = enablementValue;
+ this.stringValue = dummyValue;
+ this.integerValue = anotherValue;
+ }
+
+ @Override
+ protected InputStreamReader request(HttpURLConnection urlConnection) throws UnsupportedEncodingException {
+ return new InputStreamReader(new ByteArrayInputStream(getEnablementPageContent(enablementValue,
+ stringValue, integerValue).getBytes()), "UTF-8");
+ }
+ }
+
+ private String getEnablementPageContent(String enablementValue, String dummyValue, String integerValue) {
+
+ return "some rubbish at the beginning..."
+ + GlobalUsageReportingSettings.REPORT_ENABLEMENT_KEY
+ + enablementValue
+ + "\n"
+ + "#"
+ + "some rubbish at the end";
+
+ }
+
+ @Test
+ public void isPageAccessible() throws IOException {
+ GlobalUsageReportingSettings reportEnablement = new GlobalUsageReportingSettings(JBossToolsUsageTestActivator
+ .getDefault());
+ System.err.println("Usage reporting is globally \"" + reportEnablement.isEnabled() + "\"");
+ }
+}
Property changes on: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.test/src/org/jboss/tools/usage/test/GlobalUsageReportingSettingsTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.test/src/org/jboss/tools/usage/test/GoogleAnalyticsUrlStrategyTest.java
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.test/src/org/jboss/tools/usage/test/GoogleAnalyticsUrlStrategyTest.java (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.test/src/org/jboss/tools/usage/test/GoogleAnalyticsUrlStrategyTest.java 2010-09-02 14:35:43 UTC (rev 24649)
@@ -0,0 +1,114 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is 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:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.usage.test;
+
+import static org.junit.Assert.assertTrue;
+
+import java.io.UnsupportedEncodingException;
+
+import org.jboss.tools.usage.FocusPoint;
+import org.jboss.tools.usage.googleanalytics.GoogleAnalyticsUrlStrategy;
+import org.jboss.tools.usage.googleanalytics.IGoogleAnalyticsParameters;
+import org.junit.Before;
+import org.junit.Test;
+
+/**
+ * @author Andre Dietisheim
+ */
+public class GoogleAnalyticsUrlStrategyTest {
+
+// private static final String COOKIE_DELIMITER = EncodingUtils.checkedEncodeUtf8(String
+// .valueOf(IGoogleAnalyticsParameters.PLUS_SIGN));
+
+ private GoogleAnalyticsUrlStrategy urlStrategy;
+
+ @Before
+ public void setUp() {
+ this.urlStrategy = new GoogleAnalyticsUrlStrategy(new EclipseEnvironmentFake());
+ }
+
+ @Test
+ public void testUrlIsCorrect() throws UnsupportedEncodingException {
+ FocusPoint focusPoint = new FocusPoint("testing").setChild(new FocusPoint("strategy"));
+ String url = urlStrategy.build(focusPoint);
+ String targetUrl = "http://www.google-analytics.com/__utm.gif?"
+ + "utmwv=4.7.2"
+ + "&utmn=33832126513"
+ + "&utmhn=jboss.org"
+ + "&utmcs=UTF-8"
+ + "&utmsr=1920x1080"
+ + "&utmsc=24-bit"
+ + "&utmul=en-us"
+ + "&utmdt=testing-strategy"
+ + "&utmhid=1087431432"
+ + "&utmr=0"
+ + "&utmp=%2Ftesting%2Fstrategy"
+ + "&utmac=UA-17645367-1"
+ + "&utmcc=__utma%3D156030503.195542053.1281528584.1281528584.1281528584.1%3B%2B__utmz%3D156030500.1281528584.1.1.utmcsr%3D(direct)%7Cutmccn%3D(direct)%7Cutmcmd%3D(none)%3B"
+ + "&gaq=1";
+ assertTrue(areEqualParameterValues(IGoogleAnalyticsParameters.PARAM_TRACKING_CODE_VERSION, url, targetUrl));
+ assertTrue(areEqualParameterValues(IGoogleAnalyticsParameters.PARAM_HOST_NAME, url, targetUrl));
+ assertTrue(areEqualParameterValues(IGoogleAnalyticsParameters.PARAM_LANGUAGE_ENCODING, url, targetUrl));
+ assertTrue(areEqualParameterValues(IGoogleAnalyticsParameters.PARAM_SCREEN_RESOLUTION, url, targetUrl));
+ assertTrue(areEqualParameterValues(IGoogleAnalyticsParameters.PARAM_SCREEN_COLOR_DEPTH, url, targetUrl));
+ assertTrue(areEqualParameterValues(IGoogleAnalyticsParameters.PARAM_PAGE_TITLE, url, targetUrl));
+ assertTrue(areEqualParameterValues(IGoogleAnalyticsParameters.PARAM_REFERRAL, url, targetUrl));
+ assertTrue(areEqualParameterValues(IGoogleAnalyticsParameters.PARAM_PAGE_REQUEST, url, targetUrl));
+ assertTrue(areEqualParameterValues(IGoogleAnalyticsParameters.PARAM_ACCOUNT_NAME, url, targetUrl));
+
+ assertTrue(hasCookieValue("__utma", url));
+ assertTrue(hasCookieValue("__utmz", url));
+ assertTrue(hasCookieValue("utmcsr", url));
+ assertTrue(hasCookieValue("utmccn", url));
+ assertTrue(hasCookieValue("utmcmd", url));
+
+ assertTrue(areEqualParameterValues(IGoogleAnalyticsParameters.PARAM_GAQ, url, targetUrl));
+ }
+
+ private boolean areEqualParameterValues(String paramName, String url, String targetUrl) {
+ return areEqualParameterValues(paramName, url, targetUrl, String.valueOf(IGoogleAnalyticsParameters.AMPERSAND));
+ }
+
+ private boolean areEqualParameterValues(String paramName, String url, String targetUrl, String delimiters) {
+ String targetValue = getParameterValue(paramName, targetUrl, delimiters);
+ String value = getParameterValue(paramName, url, delimiters);
+ return targetValue != null && targetValue.equals(value);
+ }
+
+ private boolean hasCookieValue(String cookieName, String url) {
+ String cookieValues = getParameterValue(IGoogleAnalyticsParameters.PARAM_COOKIES, url,
+ String.valueOf(IGoogleAnalyticsParameters.AMPERSAND));
+ return cookieValues != null && cookieValues.indexOf(cookieName) >= 0;
+ }
+
+// private void assertEqualCookieParameterValues(String paramName, String url, String targetUrl) {
+// String targetCookieValues = getParameterValue(IGoogleAnalyticsParameters.PARAM_COOKIES, targetUrl,
+// IGoogleAnalyticsParameters.AMPERSAND);
+// String cookieValues = getParameterValue(IGoogleAnalyticsParameters.PARAM_COOKIES, url,
+// IGoogleAnalyticsParameters.AMPERSAND);
+// assertEqualParameterValues(paramName, cookieValues, targetCookieValues, COOKIE_DELIMITER.toCharArray());
+// }
+
+ private String getParameterValue(String parameterName, String url, String delimiters) {
+ String value = null;
+ int parameterNameStart = url.indexOf(parameterName);
+ if (parameterNameStart >= 0) {
+ int valueStart = parameterNameStart + parameterName.length() + 1;
+ int valueEnd = url.indexOf(delimiters, parameterNameStart + parameterName.length());
+ if (valueEnd < 0) {
+ value = url.substring(valueStart);
+ } else {
+ value = url.substring(valueStart, valueEnd);
+ }
+ }
+ return value;
+ }
+}
Property changes on: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.test/src/org/jboss/tools/usage/test/GoogleAnalyticsUrlStrategyTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.test/src/org/jboss/tools/usage/test/JBossToolsUsageIntegrationTest.java
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.test/src/org/jboss/tools/usage/test/JBossToolsUsageIntegrationTest.java (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.test/src/org/jboss/tools/usage/test/JBossToolsUsageIntegrationTest.java 2010-09-02 14:35:43 UTC (rev 24649)
@@ -0,0 +1,169 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is 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:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.usage.test;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+import java.io.UnsupportedEncodingException;
+import java.util.concurrent.locks.Lock;
+import java.util.concurrent.locks.ReentrantLock;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import org.eclipse.core.runtime.Platform;
+import org.jboss.tools.usage.FocusPoint;
+import org.jboss.tools.usage.HttpGetRequest;
+import org.jboss.tools.usage.IHttpGetRequest;
+import org.jboss.tools.usage.ILoggingAdapter;
+import org.jboss.tools.usage.IURLBuildingStrategy;
+import org.jboss.tools.usage.PluginLogger;
+import org.jboss.tools.usage.Tracker;
+import org.jboss.tools.usage.googleanalytics.GoogleAnalyticsUrlStrategy;
+import org.jboss.tools.usage.googleanalytics.IGoogleAnalyticsParameters;
+import org.junit.Test;
+
+/**
+ * @author Andre Dietisheim
+ */
+public class JBossToolsUsageIntegrationTest {
+
+ private static final String HOST_NAME = "www.jboss.org";
+ private static final String LOCALE_US = "en_US";
+
+ private IGoogleAnalyticsParameters eclipseEnvironment;
+
+ private static final String GANALYTICS_ACCOUNTNAME = "UA-17645367-1";
+
+ @Test
+ public void sameUserIdOnSametEclipseInstance() throws Exception {
+ UrlRevealingTracker tracker = getTracker(getEclipseEnvironmentInstance());
+ FocusPoint focusPoint = createFocusPoint("testSameUserIdOnSametEclipseInstance" + System.currentTimeMillis());
+ tracker.trackSynchronously(focusPoint);
+ String userId = getUserId(tracker.getTrackingUrl());
+ assertTrue(userId != null);
+
+ tracker = getTracker(getEclipseEnvironmentInstance());
+ tracker.trackSynchronously(focusPoint);
+ String newUserId = getUserId(tracker.getTrackingUrl());
+
+ assertTrue(newUserId != null);
+ assertEquals(userId, newUserId);
+ }
+
+ @Test
+ public void differentUserIdOnDifferentEclipseInstance() throws Exception {
+ String focusPointName = "testDifferentUserIdOnDifferentEclipseInstance"
+ + System.currentTimeMillis();
+ UrlRevealingTracker tracker = getTracker(createEclipseEnvironment());
+ tracker.trackSynchronously(createFocusPoint(focusPointName));
+ String userId = getUserId(tracker.getTrackingUrl());
+ assertTrue(userId != null);
+
+ tracker = getTracker(createEclipseEnvironment());
+ FocusPoint focusPoint = createFocusPoint(focusPointName);
+ tracker.trackSynchronously(focusPoint);
+ String newUserId = getUserId(tracker.getTrackingUrl());
+
+ assertTrue(newUserId != null);
+ assertTrue(!userId.equals(newUserId));
+ }
+
+ @Test
+ public void visitCountIncreases() throws Exception {
+ IGoogleAnalyticsParameters eclipseEnvironment = createEclipseEnvironment();
+ assertEquals(1, eclipseEnvironment.getVisitCount());
+ UrlRevealingTracker tracker = getTracker(eclipseEnvironment);
+ tracker.trackSynchronously(createFocusPoint("testVisitCount"));
+ assertEquals(2, eclipseEnvironment.getVisitCount());
+ tracker.trackSynchronously(createFocusPoint("testVisitCount"));
+ assertEquals(3, eclipseEnvironment.getVisitCount());
+ }
+
+ private String getUserId(String trackingUrl) {
+ Pattern pattern = Pattern.compile(".+" + IGoogleAnalyticsParameters.PARAM_COOKIES_UNIQUE_VISITOR_ID
+ + "%3D([0-9]+\\.[0-9]+)\\..+");
+ Matcher matcher = pattern.matcher(trackingUrl);
+ if (matcher.matches()) {
+ return matcher.group(1);
+ } else {
+ return null;
+ }
+ }
+
+ private UrlRevealingTracker getTracker(IGoogleAnalyticsParameters environment) {
+ ILoggingAdapter loggingAdapter = new PluginLogger(JBossToolsUsageTestActivator.getDefault());
+ IURLBuildingStrategy urlStrategy = new GoogleAnalyticsUrlStrategy(environment);
+ IHttpGetRequest httpGetRequest = new HttpGetRequest(environment.getUserAgent(), loggingAdapter);
+ return new UrlRevealingTracker(urlStrategy, httpGetRequest, loggingAdapter);
+ }
+
+ private IGoogleAnalyticsParameters getEclipseEnvironmentInstance() {
+ if (eclipseEnvironment == null) {
+ eclipseEnvironment = createEclipseEnvironment();
+ }
+ return eclipseEnvironment;
+ }
+
+ private IGoogleAnalyticsParameters createEclipseEnvironment() {
+ IGoogleAnalyticsParameters eclipseSettings = new EclipseEnvironmentFake(
+ GANALYTICS_ACCOUNTNAME
+ , HOST_NAME
+ , IGoogleAnalyticsParameters.VALUE_NO_REFERRAL
+ , Platform.OS_LINUX,
+ LOCALE_US);
+ return eclipseSettings;
+ }
+
+ private FocusPoint createFocusPoint(String childFocusPoint) {
+ return new FocusPoint("tools")
+ .setChild(new FocusPoint("usage")
+ .setChild(new FocusPoint(childFocusPoint)));
+ }
+
+ private class UrlRevealingTracker extends Tracker {
+
+ private String trackingUrl;
+ private Lock lock;
+
+ public UrlRevealingTracker(IURLBuildingStrategy urlBuildingStrategy, IHttpGetRequest httpGetRequest,
+ ILoggingAdapter loggingAdapter) {
+ super(urlBuildingStrategy, httpGetRequest, loggingAdapter);
+ lock = new ReentrantLock();
+ }
+
+ @Override
+ public void trackAsynchronously(FocusPoint focusPoint) {
+ try {
+ lock.lock();
+ super.trackAsynchronously(focusPoint);
+ lock.unlock();
+ } catch (Exception e) {
+ lock.unlock();
+ throw new RuntimeException(e);
+ }
+ }
+
+ @Override
+ protected String getTrackingUrl(FocusPoint focusPoint) throws UnsupportedEncodingException {
+ return trackingUrl = super.getTrackingUrl(focusPoint);
+ }
+
+ private String getTrackingUrl() {
+ try {
+ lock.lock();
+ return trackingUrl;
+ } finally {
+ lock.unlock();
+ }
+ }
+ }
+}
Property changes on: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.test/src/org/jboss/tools/usage/test/JBossToolsUsageIntegrationTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.test/src/org/jboss/tools/usage/test/JBossToolsUsageRequestsTest.java
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.test/src/org/jboss/tools/usage/test/JBossToolsUsageRequestsTest.java (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.test/src/org/jboss/tools/usage/test/JBossToolsUsageRequestsTest.java 2010-09-02 14:35:43 UTC (rev 24649)
@@ -0,0 +1,886 @@
+/*******************************************************************************
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is 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:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.usage.test;
+
+import static org.junit.Assert.assertEquals;
+
+import java.io.IOException;
+import java.net.HttpURLConnection;
+
+import org.jboss.tools.usage.HttpGetRequest;
+import org.jboss.tools.usage.ILoggingAdapter;
+import org.junit.Before;
+import org.junit.Test;
+
+/**
+ * @author Andre Dietisheim
+ */
+public class JBossToolsUsageRequestsTest {
+
+ private ILoggingAdapter loggingAdapter;
+
+ @Before
+ public void setUp() {
+ this.loggingAdapter = new SystemOutLogger();
+ }
+
+// @Ignore
+// @Test
+// public void testUrl0() throws IOException {
+// String userAgent = "Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.4) Gecko/20100614 Ubuntu/10.04 (lucid) Firefox/10.0.0";
+// TestHttpGetMethod method = new TestHttpGetMethod(userAgent, loggingAdapter);
+// String url = "http://www.google-analytics.com/__utm.gif?"
+// + "utmwv=4.7.2"
+// + "&utmn=338321265"
+// + "&utmhn=jboss.org"
+// + "&utmcs=UTF-8"
+// + "&utmsr=1920x1080"
+// + "&utmsc=24-bit"
+// + "&utmul=en-us"
+// + "&utmje=1"
+// + "&utmfl=10.1%20r53"
+// + "&utmdt=-%20JBoss%20Community"
+// + "&utmhid=1087431432"
+// + "&utmr=0"
+// + "&utmp=%2Ftools%2Fusage%2FtestUrl0"
+// + "&utmac=UA-17645367-1"
+// + "&utmcc=__utma%3D156030507.1285760711.1281430767.1281430767.1281430767.1%3B%2B__utmz%3D156030500.1281430767.1.1.utmcsr%3D(direct)%7Cutmccn%3D(direct)%7Cutmcmd%3D(none)%3B"
+// + "&gaq=1";
+// method.request(url);
+// assertEquals(HttpURLConnection.HTTP_OK, method.getResponseCode());
+// }
+//
+// @Ignore
+// @Test
+// public void testUrl0_0() throws IOException {
+// String userAgent = "com.jboss.jbds.product/3.0.1 (X11; U; Linux x86_64; en-US)";
+// TestHttpGetMethod method = new TestHttpGetMethod(userAgent, loggingAdapter);
+// String url = "http://www.google-analytics.com/__utm.gif?"
+// + "utmwv=4.7.2"
+// + "&utmn=338321288"
+// + "&utmhn=jboss.org"
+// + "&utmcs=UTF-8"
+// + "&utmsr=1920x1080"
+// + "&utmsc=24-bit"
+// + "&utmul=en-us"
+// + "&utmje=1"
+// + "&utmfl=10.1%20r53"
+// + "&utmdt=-%20JBoss%20Community"
+// + "&utmhid=1087431432"
+// + "&utmr=0"
+// + "&utmp=%2Ftools%2Fusage%2FtestUrl0_0"
+// + "&utmac=UA-17645367-1"
+// + "&utmcc=__utma%3D156032507.1285760711.1281430767.1281430767.1281430767.1%3B%2B__utmz%3D156030500.1281430767.1.1.utmcsr%3D(direct)%7Cutmccn%3D(direct)%7Cutmcmd%3D(none)%3B"
+// + "&gaq=1";
+// method.request(url);
+// assertEquals(HttpURLConnection.HTTP_OK, method.getResponseCode());
+// }
+//
+// @Ignore
+// @Test
+// public void testUrl0_1() throws IOException {
+// String userAgent = "com.jboss.jbds.product/3.0.1 (X11; U; Linux x86_64; en-US; rv:1.9.2.4) Gecko/20100614 Ubuntu/10.04 (lucid) v201006010437R-H98-GA";
+// TestHttpGetMethod method = new TestHttpGetMethod(userAgent, loggingAdapter);
+// String url = "http://www.google-analytics.com/__utm.gif?"
+// + "utmwv=4.7.2"
+// + "&utmn=3383212651"
+// + "&utmhn=jboss.org"
+// + "&utmcs=UTF-8"
+// + "&utmsr=1920x1080"
+// + "&utmsc=24-bit"
+// + "&utmul=en-us"
+// + "&utmje=1"
+// + "&utmfl=10.1%20r53"
+// + "&utmdt=-%20JBoss%20Community"
+// + "&utmhid=1087431432"
+// + "&utmr=0"
+// + "&utmp=%2Ftools%2Fusage%2FtestUrl0_1"
+// + "&utmac=UA-17645367-1"
+// + "&utmcc=__utma%3D156030508.195542053.1281528584.1281528584.1281528584.1%3B%2B__utmz%3D156030500.1281528584.1.1.utmcsr%3D(direct)%7Cutmccn%3D(direct)%7Cutmcmd%3D(none)%3B"
+// + "&gaq=1";
+// method.request(url);
+// assertEquals(HttpURLConnection.HTTP_OK, method.getResponseCode());
+// }
+//
+// @Ignore
+// @Test
+// public void testUrl0_2() throws IOException {
+// String userAgent = "com.jboss.jbds.product/3.0.1 (X11; U; Linux x86_64; en-US; rv:1.9.2.4) Gecko/20100614 Ubuntu/10.04 (lucid) Eclipse/3.5.0";
+// TestHttpGetMethod method = new TestHttpGetMethod(userAgent, loggingAdapter);
+// String url = "http://www.google-analytics.com/__utm.gif?"
+// + "utmwv=4.7.2"
+// + "&utmn=3383212652"
+// + "&utmhn=jboss.org"
+// + "&utmcs=UTF-8"
+// + "&utmsr=1920x1080"
+// + "&utmsc=24-bit"
+// + "&utmul=en-us"
+// + "&utmje=1"
+// + "&utmfl=10.1%20r53"
+// + "&utmdt=-%20JBoss%20Community"
+// + "&utmhid=1087431432"
+// + "&utmr=0"
+// + "&utmp=%2Ftools%2Fusage%2FtestUrl0_2"
+// + "&utmac=UA-17645367-1"
+// + "&utmcc=__utma%3D156030509.1285760712.1281430767.1281430767.1281430767.1%3B%2B__utmz%3D156030500.1281430767.1.1.utmcsr%3D(direct)%7Cutmccn%3D(direct)%7Cutmcmd%3D(none)%3B"
+// + "&gaq=1";
+// method.request(url);
+// assertEquals(HttpURLConnection.HTTP_OK, method.getResponseCode());
+// }
+//
+// @Ignore
+// @Test
+// public void testUrl0_3() throws IOException {
+// String userAgent = "com.jboss.jbds.product/3.0.1 (X11; U; Linux x86_64; en-US;) Eclipse/3.5.0";
+// TestHttpGetMethod method = new TestHttpGetMethod(userAgent, loggingAdapter);
+// String url = "http://www.google-analytics.com/__utm.gif?"
+// + "utmwv=4.7.2"
+// + "&utmn=3383212651"
+// + "&utmhn=jboss.org"
+// + "&utmcs=UTF-8"
+// + "&utmsr=1920x1080"
+// + "&utmsc=24-bit"
+// + "&utmul=en-us"
+// + "&utmje=1"
+// + "&utmfl=10.1%20r53"
+// + "&utmdt=-%20JBoss%20Community"
+// + "&utmhid=1087431432"
+// + "&utmr=0"
+// + "&utmp=%2Ftools%2Fusage%2FtestUrl0_3"
+// + "&utmac=UA-17645367-1"
+// + "&utmcc=__utma%3D156030501.1285760711.1281430767.1281430767.1281430767.1%3B%2B__utmz%3D156030500.1281430767.1.1.utmcsr%3D(direct)%7Cutmccn%3D(direct)%7Cutmcmd%3D(none)%3B"
+// + "&gaq=1";
+// method.request(url);
+// assertEquals(HttpURLConnection.HTTP_OK, method.getResponseCode());
+// }
+//
+// @Ignore
+// @Test
+// public void testUrl0_4() throws IOException {
+// String userAgent = "com.jboss.jbds.product/3.0.1";
+// TestHttpGetMethod method = new TestHttpGetMethod(userAgent, loggingAdapter);
+// String url = "http://www.google-analytics.com/__utm.gif?"
+// + "utmwv=4.7.2"
+// + "&utmn=3383212651"
+// + "&utmhn=jboss.org"
+// + "&utmcs=UTF-8"
+// + "&utmsr=1920x1080"
+// + "&utmsc=24-bit"
+// + "&utmul=en-us"
+// + "&utmje=1"
+// + "&utmfl=10.1%20r53"
+// + "&utmdt=-%20JBoss%20Community"
+// + "&utmhid=1087431432"
+// + "&utmr=0"
+// + "&utmp=%2Ftools%2Fusage%2FtestUrl0_4"
+// + "&utmac=UA-17645367-1"
+// + "&utmcc=__utma%3D156030502.195542053.1281528584.1281528584.1281528584.1%3B%2B__utmz%3D156030500.1281528584.1.1.utmcsr%3D(direct)%7Cutmccn%3D(direct)%7Cutmcmd%3D(none)%3B"
+// + "&gaq=1";
+// method.request(url);
+// assertEquals(HttpURLConnection.HTTP_OK, method.getResponseCode());
+// }
+//
+// @Ignore
+// @Test
+// public void testUrl0_5() throws IOException {
+// String userAgent = "com.jboss.jbds.product/3.0.1 (Linux x86_64)";
+// TestHttpGetMethod method = new TestHttpGetMethod(userAgent, loggingAdapter);
+// String url = "http://www.google-analytics.com/__utm.gif?"
+// + "utmwv=4.7.2"
+// + "&utmn=33832126513"
+// + "&utmhn=jboss.org"
+// + "&utmcs=UTF-8"
+// + "&utmsr=1920x1080"
+// + "&utmsc=24-bit"
+// + "&utmul=en-us"
+// + "&utmje=1"
+// + "&utmfl=10.1%20r53"
+// + "&utmdt=-%20JBoss%20Community"
+// + "&utmhid=1087431432"
+// + "&utmr=0"
+// + "&utmp=%2Ftools%2Fusage%2FtestUrl0_5"
+// + "&utmac=UA-17645367-1"
+// + "&__utma%3D156030503.195542053.1281528584.1281528584.1281528584.1%3B%2B__utmz%3D156030500.1281528584.1.1.utmcsr%3D(direct)%7Cutmccn%3D(direct)%7Cutmcmd%3D(none)%3B"
+// + "&gaq=1";
+// method.request(url);
+// assertEquals(HttpURLConnection.HTTP_OK, method.getResponseCode());
+// }
+//
+// @Ignore
+// @Test
+// public void testUrl0_6() throws IOException {
+// String userAgent = "Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.4) Gecko/20100614 Ubuntu/10.04 (lucid) com.jboss.jbds.product/3.0.1";
+// TestHttpGetMethod method = new TestHttpGetMethod(userAgent, loggingAdapter);
+// String url = "http://www.google-analytics.com/__utm.gif?"
+// + "utmwv=4.7.2"
+// + "&utmn=338321265"
+// + "&utmhn=jboss.org"
+// + "&utmcs=UTF-8"
+// + "&utmsr=1920x1080"
+// + "&utmsc=24-bit"
+// + "&utmul=en-us"
+// + "&utmje=1"
+// + "&utmfl=10.1%20r53"
+// + "&utmdt=-%20JBoss%20Community"
+// + "&utmhid=1087431432"
+// + "&utmr=0"
+// + "&utmp=%2Ftools%2Fusage%2FtestUrl0_6"
+// + "&utmac=UA-17645367-1"
+// + "&utmcc=__utma%3D156030507.1285760711.1281430767.1281430767.1281430767.1%3B%2B__utmz%3D156030500.1281430767.1.1.utmcsr%3D(direct)%7Cutmccn%3D(direct)%7Cutmcmd%3D(none)%3B"
+// + "&gaq=1";
+// method.request(url);
+// assertEquals(HttpURLConnection.HTTP_OK, method.getResponseCode());
+// }
+//
+// @Ignore
+// @Test
+// public void testUrl0_7() throws IOException {
+// String userAgent = "com.jboss.jbds.product/3.0.1 (X11; U; Linux x86_64; en-US)";
+// TestHttpGetMethod method = new TestHttpGetMethod(userAgent, loggingAdapter);
+// String url = "http://www.google-analytics.com/__utm.gif?"
+// + "utmwv=4.7.2"
+// + "&utmn=338321268"
+// + "&utmhn=jboss.org"
+// + "&utmcs=UTF-8"
+// + "&utmsr=1920x1080"
+// + "&utmsc=24-bit"
+// + "&utmul=en-us"
+// + "&utmje=1"
+// + "&utmfl=10.1%20r53"
+// + "&utmdt=-%20JBoss%20Community"
+// + "&utmhid=1087431432"
+// + "&utmr=0"
+// + "&utmp=%2Ftools%2Fusage%2FtestUrl0_7"
+// + "&utmac=UA-17645367-1"
+// + "&utmcc=__utma%3D156030507.1285760711.1281430767.1281430767.1281430767.1%3B%2B__utmz%3D156030500.1281430767.1.1.utmcsr%3D(direct)%7Cutmccn%3D(direct)%7Cutmcmd%3D(none)%3B"
+// + "&gaq=1";
+// method.request(url);
+// assertEquals(HttpURLConnection.HTTP_OK, method.getResponseCode());
+// }
+//
+// @Ignore
+// @Test
+// public void testUrl0_7_1() throws IOException {
+// String userAgent = "com.jboss.jbds.product/3.0.1 (X11; U; Linux x86_64; en-us)";
+// TestHttpGetMethod method = new TestHttpGetMethod(userAgent, loggingAdapter);
+// String url = "http://www.google-analytics.com/__utm.gif?"
+// + "utmwv=4.7.2"
+// + "&utmn=338321068"
+// + "&utmhn=jboss.org"
+// + "&utmcs=UTF-8"
+// + "&utmsr=1920x1080"
+// + "&utmsc=24-bit"
+// + "&utmje=1"
+// + "&utmfl=10.1%20r53"
+// + "&utmdt=-%20JBoss%20Community"
+// + "&utmhid=1087431432"
+// + "&utmr=0"
+// + "&utmp=%2Ftools%2Fusage%2FtestUrl0_7_1"
+// + "&utmac=UA-17645367-1"
+// + "&utmcc=__utma%3D156030507.1285760711.1281430767.1281430767.1281430767.1%3B%2B__utmz%3D156030500.1281430767.1.1.utmcsr%3D(direct)%7Cutmccn%3D(direct)%7Cutmcmd%3D(none)%3B"
+// + "&gaq=1";
+// method.request(url);
+// assertEquals(HttpURLConnection.HTTP_OK, method.getResponseCode());
+// }
+//
+// @Ignore
+// @Test
+// public void testUrl0_7_2() throws IOException {
+// String userAgent = "com.jboss.jbds.product/3.0.1 (X11; U; Linux x86_64; en-US)";
+// TestHttpGetMethod method = new TestHttpGetMethod(userAgent, loggingAdapter);
+// String url = "http://www.google-analytics.com/__utm.gif?"
+// + "utmwv=4.7.2"
+// + "&utmn=338333268"
+// + "&utmhn=jboss.org"
+// + "&utmcs=UTF-8"
+// + "&utmsr=1920x1080"
+// + "&utmsc=24-bit"
+// + "&utmul=en-us"
+// + "&utmdt=-%20JBoss%20Community"
+// + "&utmhid=1087431432"
+// + "&utmr=0"
+// + "&utmp=%2Ftools%2Fusage%2FtestUrl0_7_2"
+// + "&utmac=UA-17645367-1"
+// + "&utmcc=__utma%3D156620507.1285760111.1281430767.1281430767.1281430767.1%3B%2B__utmz%3D156030500.1281430767.1.1.utmcsr%3D(direct)%7Cutmccn%3D(direct)%7Cutmcmd%3D(none)%3B"
+// + "&gaq=1";
+// method.request(url);
+// assertEquals(HttpURLConnection.HTTP_OK, method.getResponseCode());
+// }
+//
+// @Ignore
+// @Test
+// public void testUrl0_7_3() throws IOException {
+// String userAgent = "com.jboss.jbds.product/3.0.1 (X11; U; Linux x86_64; en-US)";
+// TestHttpGetMethod method = new TestHttpGetMethod(userAgent, loggingAdapter);
+// String url = "http://www.google-analytics.com/__utm.gif?"
+// + "utmwv=4.7.2"
+// + "&utmn=311333268"
+// + "&utmhn=jboss.org"
+// + "&utmcs=UTF-8"
+// + "&utmsr=1920x1080"
+// + "&utmsc=24-bit"
+// + "&utmul=en-us"
+// + "&utmdt=tools-usage-test_0_7_3"
+// + "&utmhid=1087431432"
+// + "&utmr=0"
+// + "&utmp=%2Ftools%2Fusage%2FtestUrl0_7_3"
+// + "&utmac=UA-17645367-1"
+// + "&utmcc=__utma%3D112660507.1285760711.1281430767.1281430767.1281430767.1%3B%2B__utmz%3D156030500.1281430767.1.1.utmcsr%3D(direct)%7Cutmccn%3D(direct)%7Cutmcmd%3D(none)%3B"
+// + "&gaq=1";
+// method.request(url);
+// assertEquals(HttpURLConnection.HTTP_OK, method.getResponseCode());
+// }
+//
+// @Ignore
+// @Test
+// public void testUrl0_7_3_mac() throws IOException {
+// String userAgent = "com.jboss.jbds.product/3.0.1 (Macintosh; U; Intel Mac OS X 10.5; fr)";
+// TestHttpGetMethod method = new TestHttpGetMethod(userAgent, loggingAdapter);
+// String url = "http://www.google-analytics.com/__utm.gif?"
+// + "utmwv=4.7.2"
+// + "&utmn=351333268"
+// + "&utmhn=jboss.org"
+// + "&utmcs=UTF-8"
+// + "&utmsr=1920x1080"
+// + "&utmsc=24-bit"
+// + "&utmul=en-us"
+// + "&utmdt=tools-usage-test_0_7_3"
+// + "&utmhid=1087431432"
+// + "&utmr=0"
+// + "&utmp=%2Ftools%2Fusage%2FtestUrl0_7_3_mac"
+// + "&utmac=UA-17645367-1"
+// + "&utmcc=__utma%3D133660507.1285760711.1281430767.1281430767.1281430767.1%3B%2B__utmz%3D156030500.1281430767.1.1.utmcsr%3D(direct)%7Cutmccn%3D(direct)%7Cutmcmd%3D(none)%3B"
+// + "&gaq=1";
+// method.request(url);
+// assertEquals(HttpURLConnection.HTTP_OK, method.getResponseCode());
+// }
+//
+// @Ignore
+// @Test
+// public void testUrl0_7_3_win() throws IOException {
+// String userAgent = "com.jboss.jbds.product/3.0.1 (Windows; U; Windows NT 6.1; en-US)";
+// TestHttpGetMethod method = new TestHttpGetMethod(userAgent, loggingAdapter);
+// String url = "http://www.google-analytics.com/__utm.gif?"
+// + "utmwv=4.7.2"
+// + "&utmn=351333254"
+// + "&utmhn=jboss.org"
+// + "&utmcs=UTF-8"
+// + "&utmsr=1920x1080"
+// + "&utmsc=24-bit"
+// + "&utmul=en-us"
+// + "&utmdt=tools-usage-test_0_7_3_win"
+// + "&utmhid=1087431432"
+// + "&utmr=0"
+// + "&utmp=%2Ftools%2Fusage%2FtestUrl0_7_3_win"
+// + "&utmac=UA-17645367-1"
+// + "&utmcc=__utma%3D133660522.1285760711.1281430767.1281430767.1281430767.1%3B%2B__utmz%3D156030500.1281430767.1.1.utmcsr%3D(direct)%7Cutmccn%3D(direct)%7Cutmcmd%3D(none)%3B"
+// + "&gaq=1";
+// method.request(url);
+// assertEquals(HttpURLConnection.HTTP_OK, method.getResponseCode());
+// }
+//
+// @Ignore
+// @Test
+// public void testUrl0_7_3_1() throws IOException {
+// String userAgent = "com.jboss.jbds.product/3.0.1 (Windows; U; Windows NT 6.1; en-US)";
+// TestHttpGetMethod method = new TestHttpGetMethod(userAgent, loggingAdapter);
+// String url = "http://www.google-analytics.com/__utm.gif?"
+// + "utmwv=4.7.2"
+// + "&utmn=358333254"
+// + "&utmhn=jboss.org"
+// + "&utmcs=UTF-8"
+// + "&utmsr=1920x1080"
+// + "&utmsc=24-bit"
+// + "&utmul=en-us"
+// + "&utmdt=tools-usage-test_0_7_3_1"
+// + "&utmhid=1087431432"
+// + "&utmr=smooks|seam|drools|esb"
+// + "&utmp=%2Ftools%2Fusage%2FtestUrl0_7_3_1"
+// + "&utmac=UA-17645367-1"
+// + "&utmcc=__utma%3D133860522.1285760711.1281430767.1281430767.1281430767.1%3B%2B__utmz%3D156030500.1281430767.1.1.utmcsr%3D(direct)%7Cutmccn%3D(direct)%7Cutmcmd%3D(none)%3B"
+// + "&gaq=1";
+// method.request(url);
+// assertEquals(HttpURLConnection.HTTP_OK, method.getResponseCode());
+// }
+//
+// @Ignore
+// @Test
+// public void testUrl8() throws IOException {
+// String userAgent = "com.jboss.jbds.product/3.0.1 (Windows; U; Windows NT 6.1; en-US)";
+// TestHttpGetMethod method = new TestHttpGetMethod(userAgent, loggingAdapter);
+// String url = "http://www.google-analytics.com/__utm.gif?"
+// + "utmwv=4.7.2"
+// + "&utmn=453325272"
+// + "&utmhn=jboss.org"
+// + "&utmcs=UTF-8"
+// + "&utmsr=1920x1080"
+// + "&utmsc=24-bit"
+// + "&utmul=en-US"
+// + "&utmdt=jboss.org-tools-usage-instance"
+// + "&utmhid=1722580305"
+// + "&utmr=org.jboss.tools.usage.tests"
+// + "&utmp=%2Fjboss.org%2Ftools%2Fusage%2FtestUrl8"
+// + "&utmac=UA-17645367-1"
+// + "&utmcc=__utma%3D999.69517276658961975851281943564260.1281943564259.1281943564259.1281943564259.-1%3B%2B__utmz%3D999.1281943564259.1.1.utmcsr%3D%28direct%29%7Cutmccn%3D%28direct%29%7Cutmcmd%3D%28none%29%3B"
+// + "&gaq=1";
+// method.request(url);
+// assertEquals(HttpURLConnection.HTTP_OK, method.getResponseCode());
+// }
+//
+// @Ignore
+// @Test
+// public void testUrl0_7_3_win_referral() throws IOException {
+// String userAgent = "com.jboss.jbds.product/3.0.1 (Windows; U; Windows NT 6.1; en-US)";
+// TestHttpGetMethod method = new TestHttpGetMethod(userAgent, loggingAdapter);
+// String url = "http://www.google-analytics.com/__utm.gif?"
+// + "utmwv=4.7.2"
+// + "&utmn=351334444"
+// + "&utmhn=jboss.org"
+// + "&utmcs=UTF-8"
+// + "&utmsr=1920x1080"
+// + "&utmsc=24-bit"
+// + "&utmul=en-us"
+// + "&utmdt=tools-usage-test_0_7_3_win_referral"
+// + "&utmhid=1087431432"
+// + "&utmr=seam|esb|smooks|birt|bpel|cdi|deltacloud|drools"
+// + "&utm_content=test1%7Ctest2%7Ctest3"
+// + "&utmp=%2Ftools%2Fusage%2FtestUrl0_7_3_win_referral"
+// + "&utmac=UA-17645367-1"
+// + "&utmcc=__utma%3D133663892.1285760711.1281430767.1281430767.1281430767.1%3B%2B__utmz%3D156030500.1281430767.1.1.utmcsr%3D(direct)%7Cutmccn%3D(direct)%7Cutmcmd%3D(none)%3B"
+// + "&gaq=1";
+// method.request(url);
+// assertEquals(HttpURLConnection.HTTP_OK, method.getResponseCode());
+// }
+//
+// @Ignore
+// @Test
+// public void testUrl0_7_3_win_adcontent() throws IOException {
+// String userAgent = "com.jboss.jbds.product/3.0.1 (Windows; U; Windows NT 6.1; en-US)";
+// TestHttpGetMethod method = new TestHttpGetMethod(userAgent, loggingAdapter);
+// String url = "http://www.google-analytics.com/__utm.gif?"
+// + "utmwv=4.7.2"
+// + "&utmn=378334444"
+// + "&utmhn=jboss.org"
+// + "&utmcs=UTF-8"
+// + "&utmsr=1920x1080"
+// + "&utmsc=24-bit"
+// + "&utmul=en-us"
+// + "&utmdt=tools-usage-test_0_7_3_win_adcontent"
+// + "&utmhid=1087431432"
+// + "&utmr=seam|esb|smooks|birt|bpel|cdi|deltacloud|drools"
+// + "&utm_content=test1%7Ctest2%7Ctest3%7test4"
+// + "&utmp=%2Ftools%2Fusage%2FtestUrl0_7_3_win_adcontent"
+// + "&utmac=UA-17645367-1"
+// + "&utmcc=__utma%3D455663892.1285760711.1281430767.1281430767.1281430767.1%3B%2B__utmz%3D156030500.1281430767.1.1.utmcsr%3D(direct)%7Cutmccn%3D(direct)%7Cutmcmd%3D(none)%3B"
+// + "&gaq=1";
+// method.request(url);
+// assertEquals(HttpURLConnection.HTTP_OK, method.getResponseCode());
+// }
+//
+// @Ignore
+// @Test
+// public void testUrl0_7_3_win_keyword() throws IOException {
+// String userAgent = "com.jboss.jbds.product/3.0.1 (Windows; U; Windows NT 6.1; en-US)";
+// TestHttpGetMethod method = new TestHttpGetMethod(userAgent, loggingAdapter);
+// String url = "http://www.google-analytics.com/__utm.gif?"
+// + "utmwv=4.7.2"
+// + "&utmn=378334354"
+// + "&utmhn=jboss.org"
+// + "&utmcs=UTF-8"
+// + "&utmsr=1920x1080"
+// + "&utmsc=24-bit"
+// + "&utmul=en-us"
+// + "&utmdt=tools-usage-test_0_7_3_win_keyword"
+// + "&utmhid=1087431432"
+// + "&utmr=seam|esb|smooks|birt|bpel|cdi|deltacloud|drools"
+// + "&term=test1%7Ctest2%7Ctest3%7test4"
+// + "&utm_term=test1a%7Ctest2a%7Ctest3a%7test4a"
+// + "&utmp=%2Ftools%2Fusage%2FtestUrl0_7_3_win_keyword"
+// + "&utmac=UA-17645367-1"
+// + "&utmcc=__utma%3D887463892.1285760711.1281430767.1281430767.1281430767.1%3B%2B__utmz%3D156030500.1281430767.1.1.utmcsr%3D(direct)%7Cutmccn%3D(direct)%7Cutmcmd%3D(none)%3B"
+// + "&gaq=1";
+// method.request(url);
+// assertEquals(HttpURLConnection.HTTP_OK, method.getResponseCode());
+// }
+//
+// @Ignore
+// @Test
+// public void testUrl0_7_3_win_utmz() throws IOException {
+// String userAgent = "com.jboss.jbds.product/3.0.1 (Windows; U; Windows NT 6.1; en-US)";
+// TestHttpGetMethod method = new TestHttpGetMethod(userAgent, loggingAdapter);
+// String url = "http://www.google-analytics.com/__utm.gif?"
+// + "utmwv=4.7.2"
+// + "&utmn=351334444"
+// + "&utmhn=jboss.org"
+// + "&utmcs=UTF-8"
+// + "&utmsr=1920x1080"
+// + "&utmsc=24-bit"
+// + "&utmul=en-us"
+// + "&utmdt=tools-usage-test_0_7_3_win__utmz"
+// + "&utmhid=1087431432"
+// + "&utmr=seam|esb|smooks|birt|bpel|cdi|deltacloud|drools"
+// + "&utm_content=test1%7Ctest2%7Ctest3"
+// + "&utmp=%2Ftools%2Fusage%2FtestUrl0_7_3_win__utmz"
+// + "&utmac=UA-17645367-1"
+// + "&utmz=test1%7Ctest2%7Ctest3"
+// + "&utmcc=__utma%3D133663892.1285760711.1281430767.1281430767.1281430767.1%3B%2B__utmz%3D156030500.1281430767.1.1.utmcsr%3D(direct)%7Cutmccn%3D(direct)%7Cutmcmd%3D(none)%3B"
+// + "&gaq=1";
+// method.request(url);
+// assertEquals(HttpURLConnection.HTTP_OK, method.getResponseCode());
+// }
+//
+// @Ignore
+// @Test
+// public void testUrl0_7_3_win_utmctr() throws IOException {
+// String userAgent = "com.jboss.jbds.product/3.0.1 (Windows; U; Windows NT 6.1; en-US)";
+// TestHttpGetMethod method = new TestHttpGetMethod(userAgent, loggingAdapter);
+// String url = "http://www.google-analytics.com/__utm.gif?"
+// + "utmwv=4.7.2"
+// + "&utmn=351334444"
+// + "&utmhn=jboss.org"
+// + "&utmcs=UTF-8"
+// + "&utmsr=1920x1080"
+// + "&utmsc=24-bit"
+// + "&utmul=en-us"
+// + "&utmdt=tools-usage-test_0_7_3_win__utmctr"
+// + "&utmhid=1087431432"
+// + "&utmr=seam|esb|smooks|birt|bpel|cdi|deltacloud|drools"
+// + "&utm_content=test1%7Ctest2%7Ctest3"
+// + "&utmp=%2Ftools%2Fusage%2FtestUrl0_7_3_win_utctr"
+// + "&utmac=UA-17645367-1"
+// + "&utmz=test1%7Ctest2%7Ctest3"
+// + "&utmcc=__utma%3D133663892.1285760711.1281430767.1281430767.1281430767.1%3B%2B__utmz%3D156030500.1281430767.1.1.utmcsr%3D(direct)%7Cutmccn%3D(direct)%7Cutmcmd%3D(none)%3D%7Cutmctr%3Dtest1%7Ctest2%7Ctest3%3B"
+// + "&gaq=1";
+// method.request(url);
+// assertEquals(HttpURLConnection.HTTP_OK, method.getResponseCode());
+// }
+//
+// @Ignore
+// @Test
+// public void testUrl0_7_3_win_utmctr_lengthtest() throws IOException {
+// String userAgent = "com.jboss.jbds.product/3.0.1 (Windows; U; Windows NT 6.1; en-US)";
+// TestHttpGetMethod method = new TestHttpGetMethod(userAgent, loggingAdapter);
+// String url = "http://www.google-analytics.com/__utm.gif?"
+// + "utmwv=4.7.2"
+// + "&utmn=351334794"
+// + "&utmhn=jboss.org"
+// + "&utmcs=UTF-8"
+// + "&utmsr=1920x1080"
+// + "&utmsc=24-bit"
+// + "&utmul=en-us"
+// + "&utmdt=tools-usage-test_0_7_3_win_lengthtest"
+// + "&utmhid=1087431432"
+// + "&utmp=%2Ftools%2Fusage%2FtestUrl0_7_3_win_lengthtest"
+// + "&utmac=UA-17645367-1"
+// + "&utmcc="
+// + "__utma%3D133697892.1285760711.1281430767.1281430767.1281430767.1%3B%2B"
+// + "__utmz%3D156030500.1281430767.1.1."
+// + "utmcsr%3D(direct)%7C"
+// + "utmccn%3D(direct)%7C"
+// + "utmcmd%3D(none)%7C"
+// + "utmctr%3Dtest1%7Ctest2%7Ctest3%7Ctest4%7Ctest5%7Ctest6%7Ctest7%7Ctest8%7Ctest8%7Ctest9%7Ctest10%7Ctest11%7Ctest12%7Ctest13%7Ctest514%7Ctest14%7Ctest15%7Ctest16%7Ctest17%7Ctest18%7Ctest19%7Ctest20%7Ctest20%7Ctest21%7Ctest22%7Ctest23%7Ctest514%7Ctest24%7Ctest25%7Ctest26%7Ctest27%7Ctest28%7Ctest29%7Ctest30%7Ctest31%3B"
+// + "&gaq=1";
+// method.request(url);
+// assertEquals(HttpURLConnection.HTTP_OK, method.getResponseCode());
+// }
+
+ @Test
+ public void testUrl_utmaCookies_0() throws IOException {
+ String userAgent = "com.jboss.jbds.product/3.0.1 (Windows; U; Windows NT 6.1; en-US)";
+ TestHttpGetMethod method = new TestHttpGetMethod(userAgent, loggingAdapter);
+ String url = "http://www.google-analytics.com/__utm.gif?"
+ + "utmwv=4.7.2"
+ + "&utmn=351358794"
+ + "&utmhn=jboss.org"
+ + "&utmcs=UTF-8"
+ + "&utmsr=1920x1080"
+ + "&utmsc=24-bit"
+ + "&utmul=en-us"
+ + "&utmdt=tools-usage-testUrl_utmaCookies_0"
+ + "&utmhid=1087431432"
+ + "&utmp=%2Ftools%2Fusage%2FtestUrl_utmaCookies_0"
+ + "&utmac=UA-17645367-1"
+ + "&utmcc="
+ + "__utma%3D133697892.111.1281430767.1281430767.1281430767.1%3B%2B"
+ + "__utmz%3D156030500.1281430767.1.1."
+ + "utmcsr%3D(direct)%7C"
+ + "utmccn%3D(direct)%7C"
+ + "utmcmd%3D(none)%7C"
+ + "utmctr%3Dtest1%7Ctest2%7Ctest3%7Ctest4%7Ctest5%7Ctest6%7Ctest7%7Ctest8%7Ctest8%7Ctest9%7Ctest10%7Ctest11%7Ctest12%7Ctest13%7Ctest514%7Ctest14%7Ctest15%7Ctest16%7Ctest17%7Ctest18%7Ctest19%7Ctest20%7Ctest20%7Ctest21%7Ctest22%7Ctest23%7Ctest514%7Ctest24%7Ctest25%7Ctest26%7Ctest27%7Ctest28%7Ctest29%7Ctest30%7Ctest31%3B"
+ + "&gaq=1";
+ method.request(url);
+ assertEquals(HttpURLConnection.HTTP_OK, method.getResponseCode());
+ }
+
+ /**
+ * this test should create a request to the same url by a different eclipse
+ * instance
+ *
+ * @throws IOException
+ */
+ @Test
+ public void testUrl_utmaCookies_0_otherEclipse() throws IOException {
+ String userAgent = "com.jboss.jbds.product/3.0.1 (Windows; U; Windows NT 6.1; en-US)";
+ TestHttpGetMethod method = new TestHttpGetMethod(userAgent, loggingAdapter);
+ String url = "http://www.google-analytics.com/__utm.gif?"
+ + "utmwv=4.7.2"
+ + "&utmn=351357694"
+ + "&utmhn=jboss.org"
+ + "&utmcs=UTF-8"
+ + "&utmsr=1920x1080"
+ + "&utmsc=24-bit"
+ + "&utmul=en-us"
+ + "&utmdt=tools-usage-testUrl_utmaCookies_0"
+ + "&utmhid=1087431432"
+ + "&utmp=%2Ftools%2Fusage%2FtestUrl_utmaCookies_0"
+ + "&utmac=UA-17645367-1"
+ + "&utmcc="
+ + "__utma%3D133697892.2222.1281430767.1281430767.1281430767.1%3B%2B"
+ + "__utmz%3D156030500.1281430767.1.1."
+ + "utmcsr%3D(direct)%7C"
+ + "utmccn%3D(direct)%7C"
+ + "utmcmd%3D(none)%7C"
+ + "utmctr%3Dtest1%7Ctest2%7Ctest3%7Ctest4%7Ctest5%7Ctest6%7Ctest7%7Ctest8%7Ctest8%7Ctest9%7Ctest10%7Ctest11%7Ctest12%7Ctest13%7Ctest514%7Ctest14%7Ctest15%7Ctest16%7Ctest17%7Ctest18%7Ctest19%7Ctest20%7Ctest20%7Ctest21%7Ctest22%7Ctest23%7Ctest514%7Ctest24%7Ctest25%7Ctest26%7Ctest27%7Ctest28%7Ctest29%7Ctest30%7Ctest31%3B"
+ + "&gaq=1";
+ method.request(url);
+ assertEquals(HttpURLConnection.HTTP_OK, method.getResponseCode());
+ }
+
+ @Test
+ public void testUrl_utmaCookies_1() throws IOException {
+ String userAgent = "com.jboss.jbds.product/3.0.1 (Windows; U; Windows NT 6.1; en-US)";
+ TestHttpGetMethod method = new TestHttpGetMethod(userAgent, loggingAdapter);
+ String url = "http://www.google-analytics.com/__utm.gif?"
+ + "utmwv=4.7.2"
+ + "&utmn=261334794"
+ + "&utmhn=jboss.org"
+ + "&utmcs=UTF-8"
+ + "&utmsr=1920x1080"
+ + "&utmsc=24-bit"
+ + "&utmul=en-us"
+ + "&utmdt=tools-usage-testUrl_utmaCookies_1"
+ + "&utmhid=1087431432"
+ + "&utmp=%2Ftools%2Fusage%2FtestUrl_utmaCookies_1"
+ + "&utmac=UA-17645367-1"
+ + "&utmcc="
+ + "__utma%3D133697892.1285760711.1281430767.1281430767.1281430867.2%3B%2B"
+ + "__utmz%3D156030500.1281430767.1.1."
+ + "utmcsr%3D(direct)%7C"
+ + "utmccn%3D(direct)%7C"
+ + "utmcmd%3D(none)%7C"
+ + "utmctr%3Dtest1%7Ctest2%7Ctest3%7Ctest4%7Ctest5%7Ctest6%7Ctest7%7Ctest8%7Ctest8%7Ctest9%7Ctest10%7Ctest11%7Ctest12%7Ctest13%7Ctest514%7Ctest14%7Ctest15%7Ctest16%7Ctest17%7Ctest18%7Ctest19%7Ctest20%7Ctest20%7Ctest21%7Ctest22%7Ctest23%7Ctest514%7Ctest24%7Ctest25%7Ctest26%7Ctest27%7Ctest28%7Ctest29%7Ctest30%7Ctest31%3B"
+ + "&gaq=1";
+ method.request(url);
+ assertEquals(HttpURLConnection.HTTP_OK, method.getResponseCode());
+ }
+
+// @Test
+// public void testUrl_utmaCookies_1B() throws IOException {
+// String userAgent = "com.jboss.jbds.product/3.0.1 (Windows; U; Windows NT 6.1; en-US)";
+// TestHttpGetMethod method = new TestHttpGetMethod(userAgent, loggingAdapter);
+// String url = "http://www.google-analytics.com/__utm.gif?"
+// + "utmwv=4.7.2"
+// + "&utmn=261390794"
+// + "&utmhn=jboss.org"
+// + "&utmcs=UTF-8"
+// + "&utmsr=1920x1080"
+// + "&utmsc=24-bit"
+// + "&utmul=en-us"
+// + "&utmdt=tools-usage-testUrl_utmaCookies_1B"
+// + "&utmhid=1087431432"
+// + "&utmp=%2Ftools%2Fusage%2FtestUrl_utmaCookies_1B"
+// + "&utmac=UA-17645367-1"
+// + "&utmcc="
+// + "__utma%3D133697892.1285760711.1281430767.1281430767.1281430867.2%3B%2B"
+// + "__utmz%3D156030500.1281430767.1.1."
+// + "utmcsr%3D(direct)%7C"
+// + "utmccn%3D(direct)%7C"
+// + "utmcmd%3D(none)%7C"
+// + "utmctr%3Dtest1%7Ctest2%7Ctest3%7Ctest4%7Ctest5%7Ctest6%7Ctest7%7Ctest8%7Ctest8%7Ctest9%7Ctest10%7Ctest11%7Ctest12%7Ctest13%7Ctest514%7Ctest14%7Ctest15%7Ctest16%7Ctest17%7Ctest18%7Ctest19%7Ctest20%7Ctest20%7Ctest21%7Ctest22%7Ctest23%7Ctest514%7Ctest24%7Ctest25%7Ctest26%7Ctest27%7Ctest28%7Ctest29%7Ctest30%7Ctest31%3B"
+// + "&gaq=1";
+// method.request(url);
+// assertEquals(HttpURLConnection.HTTP_OK, method.getResponseCode());
+// }
+
+ @Test
+ public void testUrl_utmaCookies_2() throws IOException {
+ String userAgent = "com.jboss.jbds.product/3.0.1 (Windows; U; Windows NT 6.1; en-US)";
+ TestHttpGetMethod method = new TestHttpGetMethod(userAgent, loggingAdapter);
+ String url = "http://www.google-analytics.com/__utm.gif?"
+ + "utmwv=4.7.2"
+ + "&utmn=351784794"
+ + "&utmhn=jboss.org"
+ + "&utmcs=UTF-8"
+ + "&utmsr=1920x1080"
+ + "&utmsc=24-bit"
+ + "&utmul=en-us"
+ + "&utmdt=tools-usage-testUrl_utmaCookies_2"
+ + "&utmhid=1087431432"
+ + "&utmp=%2Ftools%2Fusage%2FtestUrl_utmaCookies_2"
+ + "&utmac=UA-17645367-1"
+ + "&utmcc="
+ + "__utma%3D133697892.1285760711.1281430767.1281430867.1281430967.2%3B%2B"
+ + "__utmz%3D156030500.1281430767.1.1."
+ + "utmcsr%3D(direct)%7C"
+ + "utmccn%3D(direct)%7C"
+ + "utmcmd%3D(none)%7C"
+ + "utmctr%3Dtest1%7Ctest2%7Ctest3%7Ctest4%7Ctest5%7Ctest6%7Ctest7%7Ctest8%7Ctest8%7Ctest9%7Ctest10%7Ctest11%7Ctest12%7Ctest13%7Ctest514%7Ctest14%7Ctest15%7Ctest16%7Ctest17%7Ctest18%7Ctest19%7Ctest20%7Ctest20%7Ctest21%7Ctest22%7Ctest23%7Ctest514%7Ctest24%7Ctest25%7Ctest26%7Ctest27%7Ctest28%7Ctest29%7Ctest30%7Ctest31%3B"
+ + "&gaq=1";
+ method.request(url);
+ assertEquals(HttpURLConnection.HTTP_OK, method.getResponseCode());
+ }
+
+ @Test
+ public void testUrl_utmaCookies_utmb_utmc_1() throws IOException {
+ String userAgent = "com.jboss.jbds.product/3.0.1 (Windows; U; Windows NT 6.1; en-US)";
+ TestHttpGetMethod method = new TestHttpGetMethod(userAgent, loggingAdapter);
+ String url = "http://www.google-analytics.com/__utm.gif?"
+ + "utmwv=4.7.2"
+ + "&utmn=351789994"
+ + "&utmhn=jboss.org"
+ + "&utmcs=UTF-8"
+ + "&utmsr=1920x1080"
+ + "&utmsc=24-bit"
+ + "&utmul=en-us"
+ + "&utmdt=tools-usage-testUrl_utmaCookies_utmb_utmc_1"
+ + "&utmhid=1087431432"
+ + "&utmp=%2Ftools%2Fusage%2FtestUrl_utmaCookies_utmb_utmc_1"
+ + "&utmac=UA-17645367-1"
+ + "&utmcc="
+ + "__utma%3D131297892.1285760711.1281430767.1281430867.1281430967.2%3B%2B"
+ + "__utmb%3D1%3B%2B"
+ + "__utmc%3D1%3B%2B"
+ + "__utmz%3D156030500.1281430767.1.1."
+ + "utmcsr%3D(direct)%7C"
+ + "utmccn%3D(direct)%7C"
+ + "utmcmd%3D(none)%7C"
+ + "utmctr%3Dtest1%7Ctest2%7Ctest3%7Ctest4%7Ctest5%7Ctest6%7Ctest7%7Ctest8%7Ctest8%7Ctest9%7Ctest10%7Ctest11%7Ctest12%7Ctest13%7Ctest514%7Ctest14%7Ctest15%7Ctest16%7Ctest17%7Ctest18%7Ctest19%7Ctest20%7Ctest20%7Ctest21%7Ctest22%7Ctest23%7Ctest514%7Ctest24%7Ctest25%7Ctest26%7Ctest27%7Ctest28%7Ctest29%7Ctest30%7Ctest31%3B"
+ + "&gaq=1";
+ method.request(url);
+ assertEquals(HttpURLConnection.HTTP_OK, method.getResponseCode());
+ }
+
+ /**
+ * this test should create a request from the same eclipse instance later in
+ * time (visit count increased, visit timestamps updated, userId identical)
+ */
+ @Test
+ public void testUrl_utmaCookies_utmb_utmc_1B() throws IOException {
+ String userAgent = "com.jboss.jbds.product/3.0.1 (Windows; U; Windows NT 6.1; en-US)";
+ TestHttpGetMethod method = new TestHttpGetMethod(userAgent, loggingAdapter);
+ String url = "http://www.google-analytics.com/__utm.gif?"
+ + "utmwv=4.7.2"
+ + "&utmn=35176694"
+ + "&utmhn=jboss.org"
+ + "&utmcs=UTF-8"
+ + "&utmsr=1920x1080"
+ + "&utmsc=24-bit"
+ + "&utmul=en-us"
+ + "&utmdt=tools-usage-testUrl_utmaCookies_utmb_utmc_1"
+ + "&utmhid=1087431432"
+ + "&utmp=%2Ftools%2Fusage%2FtestUrl_utmaCookies_utmb_utmc_1"
+ + "&utmac=UA-17645367-1"
+ + "&utmcc="
+ + "__utma%3D131297892.1285760711.1281430767.1281430967.1281430988.3%3B%2B"
+ + "__utmb%3D1%3B%2B"
+ + "__utmc%3D1%3B%2B"
+ + "__utmz%3D156030500.1281430767.1.1."
+ + "utmcsr%3D(direct)%7C"
+ + "utmccn%3D(direct)%7C"
+ + "utmcmd%3D(none)%7C"
+ + "utmctr%3Dtest1%7Ctest2%7Ctest3%7Ctest4%7Ctest5%7Ctest6%7Ctest7%7Ctest8%7Ctest8%7Ctest9%7Ctest10%7Ctest11%7Ctest12%7Ctest13%7Ctest514%7Ctest14%7Ctest15%7Ctest16%7Ctest17%7Ctest18%7Ctest19%7Ctest20%7Ctest20%7Ctest21%7Ctest22%7Ctest23%7Ctest514%7Ctest24%7Ctest25%7Ctest26%7Ctest27%7Ctest28%7Ctest29%7Ctest30%7Ctest31%3B"
+ + "&gaq=1";
+ method.request(url);
+ assertEquals(HttpURLConnection.HTTP_OK, method.getResponseCode());
+ }
+
+ /**
+ * this test should create a request from the same eclipse instance later in
+ * time (visit count increased, visit timestamps updated, userId identical)
+ */
+ @Test
+ public void testUrl_debug_utma() throws IOException {
+ String userAgent = "com.jboss.jbds.product/3.0.1 (Windows; U; Windows NT 6.1; en-US)";
+ TestHttpGetMethod method = new TestHttpGetMethod(userAgent, loggingAdapter);
+ String url = "http://www.google-analytics.com/__utm.gif?"
+ + "utmwv=4.7.2"
+ + "&utmn=15176694"
+ + "&utmhn=jboss.org"
+ + "&utmcs=UTF-8"
+ + "&utmsr=1920x1080"
+ + "&utmsc=24-bit"
+ + "&utmul=en-us"
+ + "&utmdt=tools-usage-testUrl_utmaCookies_utmb_utmc_1"
+ + "&utmhid=1087431432"
+ + "&utmp=%2Ftools%2Fusage%2FtestUrl_utmaCookies_utmb_utmc_1"
+ + "&utmac=UA-17645367-1"
+ + "&utmcc="
+ + "__utma%3D999.5737734690471263281282924103927.1282924103925.1282924103925.1282924103925.1%3B%2B"
+ + "__utmb%3D1%3B%2B"
+ + "__utmc%3D1%3B%2B"
+ + "__utmz%3D156030500.1281430767.1.1."
+ + "utmcsr%3D(direct)%7C"
+ + "utmccn%3D(direct)%7C"
+ + "utmcmd%3D(none)%7C"
+ + "utmctr%3Dtest1%7Ctest2%7Ctest3%7Ctest4%7Ctest5%7Ctest6%7Ctest7%7Ctest8%7Ctest8%7Ctest9%7Ctest10%7Ctest11%7Ctest12%7Ctest13%7Ctest514%7Ctest14%7Ctest15%7Ctest16%7Ctest17%7Ctest18%7Ctest19%7Ctest20%7Ctest20%7Ctest21%7Ctest22%7Ctest23%7Ctest514%7Ctest24%7Ctest25%7Ctest26%7Ctest27%7Ctest28%7Ctest29%7Ctest30%7Ctest31%3B"
+ + "&gaq=1";
+ method.request(url);
+ assertEquals(HttpURLConnection.HTTP_OK, method.getResponseCode());
+ }
+
+ @Test
+ public void testUrl_utma_utmz() throws IOException {
+ String userAgent = "com.jboss.jbds.product/3.0.1 (Windows; U; Windows NT 6.1; en-US)";
+ TestHttpGetMethod method = new TestHttpGetMethod(userAgent, loggingAdapter);
+ String url = "http://www.google-analytics.com/__utm.gif?"
+ + "utmwv=4.7.2"
+ + "&utmn=15176694"
+ + "&utmhn=jboss.org"
+ + "&utmcs=UTF-8"
+ + "&utmsr=1920x1080"
+ + "&utmsc=24-bit"
+ + "&utmul=en-us"
+ + "&utmdt=tools-usage-testUrl_utmaCookies_utmb_utmc_1"
+ + "&utmhid=1087431432"
+ + "&utmp=%2Ftools%2Fusage%2FtestUrl_utmaCookies_utmb_utmc_1"
+ + "&utmac=UA-17645367-1"
+ + "&utmcc="
+ + "__utma%3D999.5737734690471263281282924103927.1282924103925.1282924103925.1282924103925.1%3B%2B"
+ + "__utmb%3D1%3B%2B"
+ + "__utmc%3D1%3B%2B"
+ + "__utmz%3D999.1282924103925.1.1."
+ + "utmcsr%3D(direct)%7C"
+ + "utmccn%3D(direct)%7C"
+ + "utmcmd%3D(none)%7C"
+ + "utmctr%3Dtest1%7Ctest2%7Ctest3%7Ctest4%7Ctest5%7Ctest6%7Ctest7%7Ctest8%7Ctest8%7Ctest9%7Ctest10%7Ctest11%7Ctest12%7Ctest13%7Ctest514%7Ctest14%7Ctest15%7Ctest16%7Ctest17%7Ctest18%7Ctest19%7Ctest20%7Ctest20%7Ctest21%7Ctest22%7Ctest23%7Ctest514%7Ctest24%7Ctest25%7Ctest26%7Ctest27%7Ctest28%7Ctest29%7Ctest30%7Ctest31%3B"
+ + "&gaq=1";
+ method.request(url);
+ assertEquals(HttpURLConnection.HTTP_OK, method.getResponseCode());
+ }
+
+ protected class TestHttpGetMethod extends HttpGetRequest {
+
+ private HttpURLConnection urlConnection;
+
+ public TestHttpGetMethod(String userAgent, ILoggingAdapter loggingAdapter) {
+ super(userAgent, loggingAdapter);
+ }
+
+ @Override
+ protected HttpURLConnection createURLConnection(String urlString,
+ String userAgent) throws IOException {
+ return this.urlConnection = super.createURLConnection(urlString, userAgent);
+ }
+
+ public int getResponseCode() throws IOException {
+ return urlConnection.getResponseCode();
+ }
+ }
+}
Property changes on: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.test/src/org/jboss/tools/usage/test/JBossToolsUsageRequestsTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.test/src/org/jboss/tools/usage/test/JBossToolsUsageTestActivator.java
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.test/src/org/jboss/tools/usage/test/JBossToolsUsageTestActivator.java (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.test/src/org/jboss/tools/usage/test/JBossToolsUsageTestActivator.java 2010-09-02 14:35:43 UTC (rev 24649)
@@ -0,0 +1,32 @@
+package org.jboss.tools.usage.test;
+
+import org.eclipse.core.runtime.Plugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * @author Andre Dietisheim
+ */
+public class JBossToolsUsageTestActivator extends Plugin {
+
+ public static final String PLUGIN_ID = "org.jboss.tools.usage.tests"; //$NON-NLS-1$
+
+ private static JBossToolsUsageTestActivator plugin;
+
+ public JBossToolsUsageTestActivator() {
+ plugin = this;
+ }
+
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ }
+
+ @Override
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+
+ public static JBossToolsUsageTestActivator getDefault() {
+ return plugin;
+ }
+}
\ No newline at end of file
Property changes on: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.test/src/org/jboss/tools/usage/test/JBossToolsUsageTestActivator.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.test/src/org/jboss/tools/usage/test/SystemOutLogger.java
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.test/src/org/jboss/tools/usage/test/SystemOutLogger.java (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.test/src/org/jboss/tools/usage/test/SystemOutLogger.java 2010-09-02 14:35:43 UTC (rev 24649)
@@ -0,0 +1,17 @@
+package org.jboss.tools.usage.test;
+
+import org.jboss.tools.usage.ILoggingAdapter;
+
+/**
+ * @author Andre Dietisheim
+ */
+public class SystemOutLogger implements ILoggingAdapter {
+
+ public void logError(String errorMessage) {
+ System.out.println("[ERROR]: " + errorMessage);
+ }
+
+ public void logMessage(String message) {
+ System.out.println("[INFO]" + message);
+ }
+}
Property changes on: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.test/src/org/jboss/tools/usage/test/SystemOutLogger.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.test/src/org/jboss/tools/usage/test/UsageTestSuite.java
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.test/src/org/jboss/tools/usage/test/UsageTestSuite.java (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.test/src/org/jboss/tools/usage/test/UsageTestSuite.java 2010-09-02 14:35:43 UTC (rev 24649)
@@ -0,0 +1,29 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is 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:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.usage.test;
+
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+
+(a)RunWith(Suite.class)
+(a)Suite.SuiteClasses( {
+ FocusPointTest.class,
+ GoogleAnalyticsUrlStrategyTest.class,
+ JBossToolsUsageIntegrationTest.class,
+ EclipseEnvironmenTest.class,
+ GlobalUsageReportingSettingsTest.class})
+
+/**
+ * @author Andre Dietisheim
+ */
+public class UsageTestSuite {
+
+}
Property changes on: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.test/src/org/jboss/tools/usage/test/UsageTestSuite.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.test.feature/.project
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.test.feature/.project (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.test.feature/.project 2010-09-02 14:35:43 UTC (rev 24649)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.jboss.tools.usage.test.feature</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.pde.FeatureBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.FeatureNature</nature>
+ </natures>
+</projectDescription>
Property changes on: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.test.feature/.project
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.test.feature/build.properties
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.test.feature/build.properties (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.test.feature/build.properties 2010-09-02 14:35:43 UTC (rev 24649)
@@ -0,0 +1 @@
+bin.includes = feature.xml
Property changes on: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.test.feature/build.properties
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.test.feature/feature.properties
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.test.feature/feature.properties (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.test.feature/feature.properties 2010-09-02 14:35:43 UTC (rev 24649)
@@ -0,0 +1,54 @@
+###############################################################################
+# Copyright (c) 2008-2010 JBoss by Red Hat 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:
+# JBoss by Red Hat - Initial implementation.
+##############################################################################
+# feature.properties
+# contains externalized strings for feature.xml
+# "%foo" in feature.xml corresponds to the key "foo" in this file
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# This file should be translated.
+
+# "featureName" property - name of the feature
+featureName=TPTP Profile On JBoss Server
+
+# "providerName" property - name of the company that provides the feature
+providerName=JBoss by Red Hat
+
+# "updateSiteName" property - label for the update site
+updateSiteName=JBossTools Update Site
+
+# "description" property - description of the feature
+description=TPTP Profile On JBoss Server
+
+# "copyright" property - text of the "Feature Update Copyright"
+copyright=Copyright (c) 2008-2010 JBoss by Red Hat and others.\n\
+All rights reserved. This program and the accompanying materials\n\
+are made available under the terms of the Eclipse Public License v1.0\n\
+which accompanies this distribution, and is available at\n\
+http\://www.eclipse.org/legal/epl-v10.html\n\n\
+Contributors\:\n\
+JBoss by Red Hat - Initial implementation.
+ ############### end of copyright property ####################################
+
+# "licenseURL" property - URL of the "Feature License"
+# do not translate value - just change to point to a locale-specific HTML page
+licenseURL=license.html
+
+# START NON-TRANSLATABLE
+# "license" property - text of the "Feature Update License"
+# should be plain text version of license agreement pointed to be "licenseURL"
+license=Red Hat, Inc. licenses these features and plugins to you under \
+certain open source licenses (or aggregations of such licenses), which \
+in a particular case may include the Eclipse Public License, the GNU \
+Lesser General Public License, and/or certain other open source \
+licenses. For precise licensing details, consult the corresponding \
+source code, or contact Red Hat Legal Affairs, 1801 Varsity Drive, \
+Raleigh NC 27606 USA.
+# END NON-TRANSLATABLE
+########### end of license property ##########################################
Property changes on: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.test.feature/feature.properties
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.test.feature/feature.xml
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.test.feature/feature.xml (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.test.feature/feature.xml 2010-09-02 14:35:43 UTC (rev 24649)
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<feature
+ id="org.jboss.tools.usage.test.feature"
+ label="JBoss Tools Usage Reporting Test Feature"
+ version="1.0.0.qualifier">
+
+ <description url="http://www.example.com/description">
+ [Enter Feature Description here.]
+ </description>
+
+ <copyright url="http://www.example.com/copyright">
+ [Enter Copyright Description here.]
+ </copyright>
+
+ <license url="http://www.example.com/license">
+ [Enter License Description here.]
+ </license>
+
+ <plugin
+ id="org.jboss.tools.usage.test"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+</feature>
Property changes on: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.test.feature/feature.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.test.feature/pom.xml
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.test.feature/pom.xml (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.test.feature/pom.xml 2010-09-02 14:35:43 UTC (rev 24649)
@@ -0,0 +1,14 @@
+<project
+xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.jboss.tools</groupId>
+ <artifactId>org.jboss.tools.parent.pom</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ </parent>
+ <groupId>org.jboss.tools.usage.features</groupId>
+ <artifactId>org.jboss.tools.usage.test.feature</artifactId>
+ <name>org.jboss.tools.usage.test.feature</name>
+ <version>1.0.0-SNAPSHOT</version>
+ <packaging>eclipse-feature</packaging>
+</project>
Property changes on: branches/jbosstools-3.2.0.M2/usage/org.jboss.tools.usage.test.feature/pom.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/usage-site/.project
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/usage-site/.project (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/usage-site/.project 2010-09-02 14:35:43 UTC (rev 24649)
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>usage-site</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ </buildSpec>
+ <natures>
+ </natures>
+</projectDescription>
Property changes on: branches/jbosstools-3.2.0.M2/usage/usage-site/.project
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/usage-site/pom.xml
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/usage-site/pom.xml (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/usage-site/pom.xml 2010-09-02 14:35:43 UTC (rev 24649)
@@ -0,0 +1,13 @@
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.jboss.tools</groupId>
+ <artifactId>org.jboss.tools.parent.pom</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ </parent>
+ <groupId>org.jboss.tools.usage</groupId>
+ <artifactId>site</artifactId>
+ <name>usage.site</name>
+ <version>0.0.1-SNAPSHOT</version>
+ <packaging>eclipse-update-site</packaging>
+</project>
Property changes on: branches/jbosstools-3.2.0.M2/usage/usage-site/pom.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.0.M2/usage/usage-site/site.xml
===================================================================
--- branches/jbosstools-3.2.0.M2/usage/usage-site/site.xml (rev 0)
+++ branches/jbosstools-3.2.0.M2/usage/usage-site/site.xml 2010-09-02 14:35:43 UTC (rev 24649)
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<site>
+ <description>To install these features, point Eclipse at this site.</description>
+ <!-- JBoss Tools Usage Reporting Nightly Build Update Site -->
+ <category-def label="JBoss Tools Usage Reporting Nightly Build Update Site" name="JBoss Tools Usage Reporting Nightly Build Update Site">
+ <description>JBoss Tools Usage Reporting Nightly Build Update Site: contains all features in this build.</description>
+ </category-def>
+ <feature url="features/org.jboss.tools.usage.feature_0.0.0.jar" id="org.jboss.tools.usage.feature" version="0.0.0">
+ <category name="JBoss Tools Usage Reporting Nightly Build Update Site"/>
+ </feature>
+
+</site>
Property changes on: branches/jbosstools-3.2.0.M2/usage/usage-site/site.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
15 years, 7 months