Skip to content

Commit

Permalink
Fixes eclipsesource#327: Adds support for tracking services like Goog…
Browse files Browse the repository at this point in the history
…le Analytics

Adds a new bundle called com.eclipsesource.tabris.tracking. This bundle
provides an API for registering a "Tracker" into a "TabrisTracking"
instance. The tracking can be started by calling "start" with a
UIConfiguration.

One tracker was also implemented. The "GoogleAnalyticsTracker" which
hooks Google Analytics.

The actual tracking happens asynchronously with a scheduled executor
that dispatches "TrackingEvents" to the responsible "Trackers" every 5
seconds.

Change-Id: Ib33724acf5d7f1a3264dad22a169d6ec5b9f2d41
  • Loading branch information
hstaudacher committed Apr 16, 2014
1 parent 767d8ea commit 3a9fc0d
Show file tree
Hide file tree
Showing 76 changed files with 9,879 additions and 2 deletions.
1 change: 1 addition & 0 deletions com.eclipsesource.tabris.all.test/.classpath
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@
<classpathentry combineaccessrules="false" kind="src" path="/com.eclipsesource.tabris.test"/>
<classpathentry combineaccessrules="false" kind="src" path="/com.eclipsesource.tabris"/>
<classpathentry combineaccessrules="false" kind="src" path="/com.eclipsesource.tabris.passepartout"/>
<classpathentry combineaccessrules="false" kind="src" path="/com.eclipsesource.tabris.tracking.test"/>
<classpathentry kind="output" path="bin"/>
</classpath>
2 changes: 2 additions & 0 deletions com.eclipsesource.tabris.build/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,11 @@
<modules>
<!-- Bundles -->
<module>../com.eclipsesource.tabris</module>
<module>../com.eclipsesource.tabris.tracking</module>
<module>../com.eclipsesource.tabris.passepartout</module>
<!-- Tests -->
<module>../com.eclipsesource.tabris.test</module>
<module>../com.eclipsesource.tabris.tracking.test</module>
<module>../com.eclipsesource.tabris.passepartout.test</module>
<!-- Features -->
<module>../com.eclipsesource.tabris.feature</module>
Expand Down
7 changes: 7 additions & 0 deletions com.eclipsesource.tabris.feature/feature.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,11 @@
version="0.0.0"
unpack="false"/>

<plugin
id="com.eclipsesource.tabris.tracking"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>

</feature>
4 changes: 2 additions & 2 deletions com.eclipsesource.tabris.target/tabris.target
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?pde version="3.8"?><target name="Tabris Target" sequenceNumber="46">
<?pde version="3.8"?><target name="Tabris Target" sequenceNumber="49">
<locations>
<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="slicer" includeSource="true" type="InstallableUnit">
<unit id="org.eclipse.rap.sdk.feature.feature.group" version="2.2.0.20131204-0942"/>
Expand All @@ -8,7 +8,7 @@
<repository location="http://download.eclipse.org/rt/rap/2.2/"/>
</location>
<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="slicer" includeSource="true" type="InstallableUnit">
<unit id="com.eclipsesource.osgi.additionals.feature.group" version="1.21.0.201310171706"/>
<unit id="com.eclipsesource.osgi.additionals.feature.group" version="1.24.0.201404161640"/>
<repository location="http://hstaudacher.github.io/osgi-additionals"/>
</location>
</locations>
Expand Down
7 changes: 7 additions & 0 deletions com.eclipsesource.tabris.tracking.test/.classpath
Original file line number Diff line number Diff line change
@@ -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>
28 changes: 28 additions & 0 deletions com.eclipsesource.tabris.tracking.test/.project
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>com.eclipsesource.tabris.tracking.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>
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
eclipse.preferences.version=1
encoding/<project>=UTF-8

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#Mon Sep 19 22:12:05 CEST 2011
eclipse.preferences.version=1
formatter_profile=_RAP
formatter_settings_version=12
org.eclipse.jdt.ui.ignorelowercasenames=true
org.eclipse.jdt.ui.importorder=java;javax;org;com;
org.eclipse.jdt.ui.javadoc=false
org.eclipse.jdt.ui.ondemandthreshold=99
org.eclipse.jdt.ui.staticondemandthreshold=99
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"/><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"/><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"/><template autoinsert\="true" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/**\n * \n */</template><template autoinsert\="true" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n * @author ${user} */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment"/><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"/><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"/><template autoinsert\="true" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${tags}\n * ${see_to_target}\n */</template><template autoinsert\="false" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">/*******************************************************************************\n * Copyright (c) ${year} EclipseSource 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 * EclipseSource - initial API and implementation\n ******************************************************************************/\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\n</template><template autoinsert\="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">${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}</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates>
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
eclipse.preferences.version=1
pluginProject.equinox=false
pluginProject.extensions=false
resolve.requirebundle=false
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
compilers.f.unresolved-features=1
compilers.f.unresolved-plugins=1
compilers.incompatible-environment=1
compilers.p.build=1
compilers.p.build.bin.includes=1
compilers.p.build.encodings=2
compilers.p.build.java.compiler=2
compilers.p.build.java.compliance=1
compilers.p.build.missing.output=2
compilers.p.build.output.library=1
compilers.p.build.source.library=1
compilers.p.build.src.includes=1
compilers.p.deprecated=1
compilers.p.discouraged-class=1
compilers.p.internal=1
compilers.p.missing-packages=2
compilers.p.missing-version-export-package=2
compilers.p.missing-version-import-package=2
compilers.p.missing-version-require-bundle=1
compilers.p.no-required-att=0
compilers.p.not-externalized-att=2
compilers.p.unknown-attribute=1
compilers.p.unknown-class=1
compilers.p.unknown-element=1
compilers.p.unknown-identifier=1
compilers.p.unknown-resource=1
compilers.p.unresolved-ex-points=0
compilers.p.unresolved-import=0
compilers.s.create-docs=false
compilers.s.doc-folder=doc
compilers.s.open-tags=1
eclipse.preferences.version=1
12 changes: 12 additions & 0 deletions com.eclipsesource.tabris.tracking.test/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Tabris Tracking Tests
Bundle-SymbolicName: com.eclipsesource.tabris.tracking.test
Bundle-Version: 1.4.0.qualifier
Bundle-Vendor: EclipseSource
Fragment-Host: com.eclipsesource.tabris.tracking;bundle-version="1.4.0"
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Require-Bundle: org.junit;bundle-version="[4.10.0,5.0.0)",
org.mockito.mockito-all;bundle-version="1.9.5",
org.eclipse.rap.rwt.testfixture;bundle-version="2.2.0",
com.eclipsesource.rest.client.driver;bundle-version="1.0.0"
5 changes: 5 additions & 0 deletions com.eclipsesource.tabris.tracking.test/build.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
source.. = src/
output.. = bin/
bin.includes = META-INF/,\
.,\
epl-v10.html
Loading

0 comments on commit 3a9fc0d

Please sign in to comment.