diff options
| author | Wim Jongman | 2018-04-30 20:14:58 +0000 |
|---|---|---|
| committer | Wim Jongman | 2018-04-30 20:14:58 +0000 |
| commit | 830eb3dca4095f0c7c3cb58ecc91cff10bc4c3fb (patch) | |
| tree | cad6d837c8a75e9ce3f54f0759a311a4162f9b9d | |
| parent | dee48561896e7d5b805aff2eec184bea9718b10c (diff) | |
| download | eclipse.platform.common-830eb3dca4095f0c7c3cb58ecc91cff10bc4c3fb.tar.gz eclipse.platform.common-830eb3dca4095f0c7c3cb58ecc91cff10bc4c3fb.tar.xz eclipse.platform.common-830eb3dca4095f0c7c3cb58ecc91cff10bc4c3fb.zip | |
Bug 534073: [Tips] Create JSon based Tip ProvidersI20180503-0740I20180502-2000
* Created jdt provider
Change-Id: If96cdd13ba4f11e990e8fd2fa5c5e2dbb45fe275
Signed-off-by: Wim Jongman <wim.jongman@remainsoftware.com>
| -rw-r--r-- | bundles/org.eclipse.jdt.tips.user/.classpath | 7 | ||||
| -rw-r--r-- | bundles/org.eclipse.jdt.tips.user/.project | 28 | ||||
| -rw-r--r-- | bundles/org.eclipse.jdt.tips.user/.settings/org.eclipse.jdt.core.prefs | 8 | ||||
| -rw-r--r-- | bundles/org.eclipse.jdt.tips.user/META-INF/MANIFEST.MF | 11 | ||||
| -rw-r--r-- | bundles/org.eclipse.jdt.tips.user/build.properties | 5 | ||||
| -rw-r--r-- | bundles/org.eclipse.jdt.tips.user/content/content/855062302655209472/855062302655209472.html (renamed from bundles/org.eclipse.jdt.doc.user/tipOfTheDay/content/855062302655209472/855062302655209472.html) | 0 | ||||
| -rw-r--r-- | bundles/org.eclipse.jdt.tips.user/content/content/855062302655209472/C93Kg1sXsAAJuGu.mp4 (renamed from bundles/org.eclipse.jdt.doc.user/tipOfTheDay/content/855062302655209472/C93Kg1sXsAAJuGu.mp4) | bin | 139650 -> 139650 bytes | |||
| -rw-r--r-- | bundles/org.eclipse.jdt.tips.user/content/content/856867463409041410/856867463409041410.html (renamed from bundles/org.eclipse.jdt.doc.user/tipOfTheDay/content/856867463409041410/856867463409041410.html) | 0 | ||||
| -rw-r--r-- | bundles/org.eclipse.jdt.tips.user/content/content/856867463409041410/C-Q0ThlXcAQpVvX.mp4 (renamed from bundles/org.eclipse.jdt.doc.user/tipOfTheDay/content/856867463409041410/C-Q0ThlXcAQpVvX.mp4) | bin | 314160 -> 314160 bytes | |||
| -rw-r--r-- | bundles/org.eclipse.jdt.tips.user/content/content/860125970556223489/860125970556223489.html (renamed from bundles/org.eclipse.jdt.doc.user/tipOfTheDay/content/860125970556223489/860125970556223489.html) | 0 | ||||
| -rw-r--r-- | bundles/org.eclipse.jdt.tips.user/content/content/860125970556223489/C-_HuR4XkAMj9oJ.mp4 (renamed from bundles/org.eclipse.jdt.doc.user/tipOfTheDay/content/860125970556223489/C-_HuR4XkAMj9oJ.mp4) | bin | 86634 -> 86634 bytes | |||
| -rw-r--r-- | bundles/org.eclipse.jdt.tips.user/content/content/864423629697822720/864423629697822720.html (renamed from bundles/org.eclipse.jdt.doc.user/tipOfTheDay/content/864423629697822720/864423629697822720.html) | 0 | ||||
| -rw-r--r-- | bundles/org.eclipse.jdt.tips.user/content/content/864423629697822720/C_8MakOVwAAyGbU.mp4 (renamed from bundles/org.eclipse.jdt.doc.user/tipOfTheDay/content/864423629697822720/C_8MakOVwAAyGbU.mp4) | bin | 62030 -> 62030 bytes | |||
| -rw-r--r-- | bundles/org.eclipse.jdt.tips.user/content/content/870170548722184192/870170548722184192.html (renamed from bundles/org.eclipse.jdt.doc.user/tipOfTheDay/content/870170548722184192/870170548722184192.html) | 0 | ||||
| -rw-r--r-- | bundles/org.eclipse.jdt.tips.user/content/content/870170548722184192/DBNlR-jXkAAnqvd.mp4 (renamed from bundles/org.eclipse.jdt.doc.user/tipOfTheDay/content/870170548722184192/DBNlR-jXkAAnqvd.mp4) | bin | 80175 -> 80175 bytes | |||
| -rw-r--r-- | bundles/org.eclipse.jdt.tips.user/content/content/874600197195796482/874600197195796482.html (renamed from bundles/org.eclipse.jdt.doc.user/tipOfTheDay/content/874600197195796482/874600197195796482.html) | 0 | ||||
| -rw-r--r-- | bundles/org.eclipse.jdt.tips.user/content/content/874600197195796482/DCM0FlMXgAE4Zi0.mp4 (renamed from bundles/org.eclipse.jdt.doc.user/tipOfTheDay/content/874600197195796482/DCM0FlMXgAE4Zi0.mp4) | bin | 433262 -> 433262 bytes | |||
| -rw-r--r-- | bundles/org.eclipse.jdt.tips.user/content/content/884689449917050880/884689449917050880.html (renamed from bundles/org.eclipse.jdt.doc.user/tipOfTheDay/content/884689449917050880/884689449917050880.html) | 0 | ||||
| -rw-r--r-- | bundles/org.eclipse.jdt.tips.user/content/content/884689449917050880/DEcLzIkXkAA7Ehm.mp4 (renamed from bundles/org.eclipse.jdt.doc.user/tipOfTheDay/content/884689449917050880/DEcLzIkXkAA7Ehm.mp4) | bin | 70000 -> 70000 bytes | |||
| -rw-r--r-- | bundles/org.eclipse.jdt.tips.user/content/content/888360858119745536/888360858119745536.html (renamed from bundles/org.eclipse.jdt.doc.user/tipOfTheDay/content/888360858119745536/888360858119745536.html) | 0 | ||||
| -rw-r--r-- | bundles/org.eclipse.jdt.tips.user/content/content/888360858119745536/DFQXckeXYAEYvWH.mp4 (renamed from bundles/org.eclipse.jdt.doc.user/tipOfTheDay/content/888360858119745536/DFQXckeXYAEYvWH.mp4) | bin | 72820 -> 72820 bytes | |||
| -rw-r--r-- | bundles/org.eclipse.jdt.tips.user/content/content/889435990976323584/889435990976323584.html (renamed from bundles/org.eclipse.jdt.doc.user/tipOfTheDay/content/889435990976323584/889435990976323584.html) | 0 | ||||
| -rw-r--r-- | bundles/org.eclipse.jdt.tips.user/content/content/889435990976323584/DFfpOZ1XkAAODhc.mp4 (renamed from bundles/org.eclipse.jdt.doc.user/tipOfTheDay/content/889435990976323584/DFfpOZ1XkAAODhc.mp4) | bin | 105132 -> 105132 bytes | |||
| -rw-r--r-- | bundles/org.eclipse.jdt.tips.user/content/content/902851499503607808/902851499503607808.html (renamed from bundles/org.eclipse.jdt.doc.user/tipOfTheDay/content/902851499503607808/902851499503607808.html) | 0 | ||||
| -rw-r--r-- | bundles/org.eclipse.jdt.tips.user/content/content/902851499503607808/DIeSlFiUwAAWjcg.mp4 (renamed from bundles/org.eclipse.jdt.doc.user/tipOfTheDay/content/902851499503607808/DIeSlFiUwAAWjcg.mp4) | bin | 459521 -> 459521 bytes | |||
| -rw-r--r-- | bundles/org.eclipse.jdt.tips.user/content/content/910089046600425472/910089046600425472.html (renamed from bundles/org.eclipse.jdt.doc.user/tipOfTheDay/content/910089046600425472/910089046600425472.html) | 0 | ||||
| -rw-r--r-- | bundles/org.eclipse.jdt.tips.user/content/content/910089046600425472/DKFJClMW4AAK2pR.mp4 (renamed from bundles/org.eclipse.jdt.doc.user/tipOfTheDay/content/910089046600425472/DKFJClMW4AAK2pR.mp4) | bin | 238061 -> 238061 bytes | |||
| -rw-r--r-- | bundles/org.eclipse.jdt.tips.user/content/content/920608130274381825/920608130274381825.html (renamed from bundles/org.eclipse.jdt.doc.user/tipOfTheDay/content/920608130274381825/920608130274381825.html) | 0 | ||||
| -rw-r--r-- | bundles/org.eclipse.jdt.tips.user/content/content/920608130274381825/DMaoGYlXUAMDRFF.mp4 (renamed from bundles/org.eclipse.jdt.doc.user/tipOfTheDay/content/920608130274381825/DMaoGYlXUAMDRFF.mp4) | bin | 231141 -> 231141 bytes | |||
| -rw-r--r-- | bundles/org.eclipse.jdt.tips.user/content/content/927527210772258816/927527210772258816.html (renamed from bundles/org.eclipse.jdt.doc.user/tipOfTheDay/content/927527210772258816/927527210772258816.html) | 0 | ||||
| -rw-r--r-- | bundles/org.eclipse.jdt.tips.user/content/content/927527210772258816/DN88_JCXcAAJaaX.mp4 (renamed from bundles/org.eclipse.jdt.doc.user/tipOfTheDay/content/927527210772258816/DN88_JCXcAAJaaX.mp4) | bin | 261504 -> 261504 bytes | |||
| -rw-r--r-- | bundles/org.eclipse.jdt.tips.user/content/content/931124796502536192/931124796502536192.html (renamed from bundles/org.eclipse.jdt.doc.user/tipOfTheDay/content/931124796502536192/931124796502536192.html) | 0 | ||||
| -rw-r--r-- | bundles/org.eclipse.jdt.tips.user/content/content/931124796502536192/DOwE-C_X0AA6bb5.mp4 (renamed from bundles/org.eclipse.jdt.doc.user/tipOfTheDay/content/931124796502536192/DOwE-C_X0AA6bb5.mp4) | bin | 47684 -> 47684 bytes | |||
| -rw-r--r-- | bundles/org.eclipse.jdt.tips.user/content/content/941264226940850177/941264226940850177.html (renamed from bundles/org.eclipse.jdt.doc.user/tipOfTheDay/content/941264226940850177/941264226940850177.html) | 0 | ||||
| -rw-r--r-- | bundles/org.eclipse.jdt.tips.user/content/content/941264226940850177/DRAKxCrWkAEMkEm.mp4 (renamed from bundles/org.eclipse.jdt.doc.user/tipOfTheDay/content/941264226940850177/DRAKxCrWkAEMkEm.mp4) | bin | 107735 -> 107735 bytes | |||
| -rw-r--r-- | bundles/org.eclipse.jdt.tips.user/content/content/941624342282108929/941624342282108929.html (renamed from bundles/org.eclipse.jdt.doc.user/tipOfTheDay/content/941624342282108929/941624342282108929.html) | 0 | ||||
| -rw-r--r-- | bundles/org.eclipse.jdt.tips.user/content/content/941624342282108929/DRFSS0sWsAEDJb-.mp4 (renamed from bundles/org.eclipse.jdt.doc.user/tipOfTheDay/content/941624342282108929/DRFSS0sWsAEDJb-.mp4) | bin | 179218 -> 179218 bytes | |||
| -rw-r--r-- | bundles/org.eclipse.jdt.tips.user/content/content/949238007051235328/949238007051235328.html (renamed from bundles/org.eclipse.jdt.doc.user/tipOfTheDay/content/949238007051235328/949238007051235328.html) | 0 | ||||
| -rw-r--r-- | bundles/org.eclipse.jdt.tips.user/content/content/949238007051235328/DSxe5wyW4AAebyT.mp4 (renamed from bundles/org.eclipse.jdt.doc.user/tipOfTheDay/content/949238007051235328/DSxe5wyW4AAebyT.mp4) | bin | 454883 -> 454883 bytes | |||
| -rw-r--r-- | bundles/org.eclipse.jdt.tips.user/content/content/950773930775793664/950773930775793664.html (renamed from bundles/org.eclipse.jdt.doc.user/tipOfTheDay/content/950773930775793664/950773930775793664.html) | 0 | ||||
| -rw-r--r-- | bundles/org.eclipse.jdt.tips.user/content/content/950773930775793664/DTHT0RbXUAAnGoJ.mp4 (renamed from bundles/org.eclipse.jdt.doc.user/tipOfTheDay/content/950773930775793664/DTHT0RbXUAAnGoJ.mp4) | bin | 80416 -> 80416 bytes | |||
| -rw-r--r-- | bundles/org.eclipse.jdt.tips.user/content/content/976836214857740288/976836214857740288.html (renamed from bundles/org.eclipse.jdt.doc.user/tipOfTheDay/content/976836214857740288/976836214857740288.html) | 0 | ||||
| -rw-r--r-- | bundles/org.eclipse.jdt.tips.user/content/content/976836214857740288/DY5qzHEXkAAc-7O.mp4 (renamed from bundles/org.eclipse.jdt.doc.user/tipOfTheDay/content/976836214857740288/DY5qzHEXkAAc-7O.mp4) | bin | 142322 -> 142322 bytes | |||
| -rw-r--r-- | bundles/org.eclipse.jdt.tips.user/content/jdttips.json (renamed from bundles/org.eclipse.jdt.doc.user/tipOfTheDay/jdttips.json) | 2 | ||||
| -rw-r--r-- | bundles/org.eclipse.jdt.tips.user/plugin.xml | 26 | ||||
| -rw-r--r-- | bundles/org.eclipse.jdt.tips.user/pom.xml | 25 | ||||
| -rw-r--r-- | bundles/org.eclipse.jdt.tips.user/src/org/eclipse/jdt/tips/user/internal/JDTTipProvider.java | 147 |
47 files changed, 258 insertions, 1 deletions
diff --git a/bundles/org.eclipse.jdt.tips.user/.classpath b/bundles/org.eclipse.jdt.tips.user/.classpath new file mode 100644 index 000000000..eca7bdba8 --- /dev/null +++ b/bundles/org.eclipse.jdt.tips.user/.classpath @@ -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.8"/> + <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> + <classpathentry kind="src" path="src"/> + <classpathentry kind="output" path="bin"/> +</classpath> diff --git a/bundles/org.eclipse.jdt.tips.user/.project b/bundles/org.eclipse.jdt.tips.user/.project new file mode 100644 index 000000000..53a82df76 --- /dev/null +++ b/bundles/org.eclipse.jdt.tips.user/.project @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="UTF-8"?> +<projectDescription> + <name>org.eclipse.jdt.tips.user</name> + <comment></comment> + <projects> + </projects> + <buildSpec> + <buildCommand> + <name>org.eclipse.jdt.core.javabuilder</name> + <arguments> + </arguments> + </buildCommand> + <buildCommand> + <name>org.eclipse.pde.ManifestBuilder</name> + <arguments> + </arguments> + </buildCommand> + <buildCommand> + <name>org.eclipse.pde.SchemaBuilder</name> + <arguments> + </arguments> + </buildCommand> + </buildSpec> + <natures> + <nature>org.eclipse.pde.PluginNature</nature> + <nature>org.eclipse.jdt.core.javanature</nature> + </natures> +</projectDescription> diff --git a/bundles/org.eclipse.jdt.tips.user/.settings/org.eclipse.jdt.core.prefs b/bundles/org.eclipse.jdt.tips.user/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 000000000..fb1077bce --- /dev/null +++ b/bundles/org.eclipse.jdt.tips.user/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,8 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.release=enabled +org.eclipse.jdt.core.compiler.source=1.8 diff --git a/bundles/org.eclipse.jdt.tips.user/META-INF/MANIFEST.MF b/bundles/org.eclipse.jdt.tips.user/META-INF/MANIFEST.MF new file mode 100644 index 000000000..a931efa60 --- /dev/null +++ b/bundles/org.eclipse.jdt.tips.user/META-INF/MANIFEST.MF @@ -0,0 +1,11 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: JDT Tip of the Day Provider +Bundle-SymbolicName: org.eclipse.jdt.tips.user;singleton:=true +Bundle-Version: 0.1.0.qualifier +Bundle-Vendor: Eclipse.org +Automatic-Module-Name: org.eclipse.jdt.tips.user +Bundle-RequiredExecutionEnvironment: JavaSE-1.8 +Require-Bundle: org.eclipse.tips.core;bundle-version="0.1.0", + org.eclipse.tips.json;bundle-version="0.1.0", + org.eclipse.core.runtime;bundle-version="3.14.0" diff --git a/bundles/org.eclipse.jdt.tips.user/build.properties b/bundles/org.eclipse.jdt.tips.user/build.properties new file mode 100644 index 000000000..e9863e281 --- /dev/null +++ b/bundles/org.eclipse.jdt.tips.user/build.properties @@ -0,0 +1,5 @@ +source.. = src/ +output.. = bin/ +bin.includes = META-INF/,\ + .,\ + plugin.xml diff --git a/bundles/org.eclipse.jdt.doc.user/tipOfTheDay/content/855062302655209472/855062302655209472.html b/bundles/org.eclipse.jdt.tips.user/content/content/855062302655209472/855062302655209472.html index 28eac18f8..28eac18f8 100644 --- a/bundles/org.eclipse.jdt.doc.user/tipOfTheDay/content/855062302655209472/855062302655209472.html +++ b/bundles/org.eclipse.jdt.tips.user/content/content/855062302655209472/855062302655209472.html diff --git a/bundles/org.eclipse.jdt.doc.user/tipOfTheDay/content/855062302655209472/C93Kg1sXsAAJuGu.mp4 b/bundles/org.eclipse.jdt.tips.user/content/content/855062302655209472/C93Kg1sXsAAJuGu.mp4 Binary files differindex 8ba886c6f..8ba886c6f 100644 --- a/bundles/org.eclipse.jdt.doc.user/tipOfTheDay/content/855062302655209472/C93Kg1sXsAAJuGu.mp4 +++ b/bundles/org.eclipse.jdt.tips.user/content/content/855062302655209472/C93Kg1sXsAAJuGu.mp4 diff --git a/bundles/org.eclipse.jdt.doc.user/tipOfTheDay/content/856867463409041410/856867463409041410.html b/bundles/org.eclipse.jdt.tips.user/content/content/856867463409041410/856867463409041410.html index 17516f1a9..17516f1a9 100644 --- a/bundles/org.eclipse.jdt.doc.user/tipOfTheDay/content/856867463409041410/856867463409041410.html +++ b/bundles/org.eclipse.jdt.tips.user/content/content/856867463409041410/856867463409041410.html diff --git a/bundles/org.eclipse.jdt.doc.user/tipOfTheDay/content/856867463409041410/C-Q0ThlXcAQpVvX.mp4 b/bundles/org.eclipse.jdt.tips.user/content/content/856867463409041410/C-Q0ThlXcAQpVvX.mp4 Binary files differindex 813a53c21..813a53c21 100644 --- a/bundles/org.eclipse.jdt.doc.user/tipOfTheDay/content/856867463409041410/C-Q0ThlXcAQpVvX.mp4 +++ b/bundles/org.eclipse.jdt.tips.user/content/content/856867463409041410/C-Q0ThlXcAQpVvX.mp4 diff --git a/bundles/org.eclipse.jdt.doc.user/tipOfTheDay/content/860125970556223489/860125970556223489.html b/bundles/org.eclipse.jdt.tips.user/content/content/860125970556223489/860125970556223489.html index 7dbfe57f2..7dbfe57f2 100644 --- a/bundles/org.eclipse.jdt.doc.user/tipOfTheDay/content/860125970556223489/860125970556223489.html +++ b/bundles/org.eclipse.jdt.tips.user/content/content/860125970556223489/860125970556223489.html diff --git a/bundles/org.eclipse.jdt.doc.user/tipOfTheDay/content/860125970556223489/C-_HuR4XkAMj9oJ.mp4 b/bundles/org.eclipse.jdt.tips.user/content/content/860125970556223489/C-_HuR4XkAMj9oJ.mp4 Binary files differindex b59dbf276..b59dbf276 100644 --- a/bundles/org.eclipse.jdt.doc.user/tipOfTheDay/content/860125970556223489/C-_HuR4XkAMj9oJ.mp4 +++ b/bundles/org.eclipse.jdt.tips.user/content/content/860125970556223489/C-_HuR4XkAMj9oJ.mp4 diff --git a/bundles/org.eclipse.jdt.doc.user/tipOfTheDay/content/864423629697822720/864423629697822720.html b/bundles/org.eclipse.jdt.tips.user/content/content/864423629697822720/864423629697822720.html index ad5f17067..ad5f17067 100644 --- a/bundles/org.eclipse.jdt.doc.user/tipOfTheDay/content/864423629697822720/864423629697822720.html +++ b/bundles/org.eclipse.jdt.tips.user/content/content/864423629697822720/864423629697822720.html diff --git a/bundles/org.eclipse.jdt.doc.user/tipOfTheDay/content/864423629697822720/C_8MakOVwAAyGbU.mp4 b/bundles/org.eclipse.jdt.tips.user/content/content/864423629697822720/C_8MakOVwAAyGbU.mp4 Binary files differindex b345160d5..b345160d5 100644 --- a/bundles/org.eclipse.jdt.doc.user/tipOfTheDay/content/864423629697822720/C_8MakOVwAAyGbU.mp4 +++ b/bundles/org.eclipse.jdt.tips.user/content/content/864423629697822720/C_8MakOVwAAyGbU.mp4 diff --git a/bundles/org.eclipse.jdt.doc.user/tipOfTheDay/content/870170548722184192/870170548722184192.html b/bundles/org.eclipse.jdt.tips.user/content/content/870170548722184192/870170548722184192.html index bdcb0e4ef..bdcb0e4ef 100644 --- a/bundles/org.eclipse.jdt.doc.user/tipOfTheDay/content/870170548722184192/870170548722184192.html +++ b/bundles/org.eclipse.jdt.tips.user/content/content/870170548722184192/870170548722184192.html diff --git a/bundles/org.eclipse.jdt.doc.user/tipOfTheDay/content/870170548722184192/DBNlR-jXkAAnqvd.mp4 b/bundles/org.eclipse.jdt.tips.user/content/content/870170548722184192/DBNlR-jXkAAnqvd.mp4 Binary files differindex 897ee722e..897ee722e 100644 --- a/bundles/org.eclipse.jdt.doc.user/tipOfTheDay/content/870170548722184192/DBNlR-jXkAAnqvd.mp4 +++ b/bundles/org.eclipse.jdt.tips.user/content/content/870170548722184192/DBNlR-jXkAAnqvd.mp4 diff --git a/bundles/org.eclipse.jdt.doc.user/tipOfTheDay/content/874600197195796482/874600197195796482.html b/bundles/org.eclipse.jdt.tips.user/content/content/874600197195796482/874600197195796482.html index 3450419eb..3450419eb 100644 --- a/bundles/org.eclipse.jdt.doc.user/tipOfTheDay/content/874600197195796482/874600197195796482.html +++ b/bundles/org.eclipse.jdt.tips.user/content/content/874600197195796482/874600197195796482.html diff --git a/bundles/org.eclipse.jdt.doc.user/tipOfTheDay/content/874600197195796482/DCM0FlMXgAE4Zi0.mp4 b/bundles/org.eclipse.jdt.tips.user/content/content/874600197195796482/DCM0FlMXgAE4Zi0.mp4 Binary files differindex 3af72bdd0..3af72bdd0 100644 --- a/bundles/org.eclipse.jdt.doc.user/tipOfTheDay/content/874600197195796482/DCM0FlMXgAE4Zi0.mp4 +++ b/bundles/org.eclipse.jdt.tips.user/content/content/874600197195796482/DCM0FlMXgAE4Zi0.mp4 diff --git a/bundles/org.eclipse.jdt.doc.user/tipOfTheDay/content/884689449917050880/884689449917050880.html b/bundles/org.eclipse.jdt.tips.user/content/content/884689449917050880/884689449917050880.html index ab8199641..ab8199641 100644 --- a/bundles/org.eclipse.jdt.doc.user/tipOfTheDay/content/884689449917050880/884689449917050880.html +++ b/bundles/org.eclipse.jdt.tips.user/content/content/884689449917050880/884689449917050880.html diff --git a/bundles/org.eclipse.jdt.doc.user/tipOfTheDay/content/884689449917050880/DEcLzIkXkAA7Ehm.mp4 b/bundles/org.eclipse.jdt.tips.user/content/content/884689449917050880/DEcLzIkXkAA7Ehm.mp4 Binary files differindex f436f1b36..f436f1b36 100644 --- a/bundles/org.eclipse.jdt.doc.user/tipOfTheDay/content/884689449917050880/DEcLzIkXkAA7Ehm.mp4 +++ b/bundles/org.eclipse.jdt.tips.user/content/content/884689449917050880/DEcLzIkXkAA7Ehm.mp4 diff --git a/bundles/org.eclipse.jdt.doc.user/tipOfTheDay/content/888360858119745536/888360858119745536.html b/bundles/org.eclipse.jdt.tips.user/content/content/888360858119745536/888360858119745536.html index 13fa5c04f..13fa5c04f 100644 --- a/bundles/org.eclipse.jdt.doc.user/tipOfTheDay/content/888360858119745536/888360858119745536.html +++ b/bundles/org.eclipse.jdt.tips.user/content/content/888360858119745536/888360858119745536.html diff --git a/bundles/org.eclipse.jdt.doc.user/tipOfTheDay/content/888360858119745536/DFQXckeXYAEYvWH.mp4 b/bundles/org.eclipse.jdt.tips.user/content/content/888360858119745536/DFQXckeXYAEYvWH.mp4 Binary files differindex 268f48712..268f48712 100644 --- a/bundles/org.eclipse.jdt.doc.user/tipOfTheDay/content/888360858119745536/DFQXckeXYAEYvWH.mp4 +++ b/bundles/org.eclipse.jdt.tips.user/content/content/888360858119745536/DFQXckeXYAEYvWH.mp4 diff --git a/bundles/org.eclipse.jdt.doc.user/tipOfTheDay/content/889435990976323584/889435990976323584.html b/bundles/org.eclipse.jdt.tips.user/content/content/889435990976323584/889435990976323584.html index e7512d423..e7512d423 100644 --- a/bundles/org.eclipse.jdt.doc.user/tipOfTheDay/content/889435990976323584/889435990976323584.html +++ b/bundles/org.eclipse.jdt.tips.user/content/content/889435990976323584/889435990976323584.html diff --git a/bundles/org.eclipse.jdt.doc.user/tipOfTheDay/content/889435990976323584/DFfpOZ1XkAAODhc.mp4 b/bundles/org.eclipse.jdt.tips.user/content/content/889435990976323584/DFfpOZ1XkAAODhc.mp4 Binary files differindex 5632c3252..5632c3252 100644 --- a/bundles/org.eclipse.jdt.doc.user/tipOfTheDay/content/889435990976323584/DFfpOZ1XkAAODhc.mp4 +++ b/bundles/org.eclipse.jdt.tips.user/content/content/889435990976323584/DFfpOZ1XkAAODhc.mp4 diff --git a/bundles/org.eclipse.jdt.doc.user/tipOfTheDay/content/902851499503607808/902851499503607808.html b/bundles/org.eclipse.jdt.tips.user/content/content/902851499503607808/902851499503607808.html index 9db2fafdd..9db2fafdd 100644 --- a/bundles/org.eclipse.jdt.doc.user/tipOfTheDay/content/902851499503607808/902851499503607808.html +++ b/bundles/org.eclipse.jdt.tips.user/content/content/902851499503607808/902851499503607808.html diff --git a/bundles/org.eclipse.jdt.doc.user/tipOfTheDay/content/902851499503607808/DIeSlFiUwAAWjcg.mp4 b/bundles/org.eclipse.jdt.tips.user/content/content/902851499503607808/DIeSlFiUwAAWjcg.mp4 Binary files differindex a4b4dfe1b..a4b4dfe1b 100644 --- a/bundles/org.eclipse.jdt.doc.user/tipOfTheDay/content/902851499503607808/DIeSlFiUwAAWjcg.mp4 +++ b/bundles/org.eclipse.jdt.tips.user/content/content/902851499503607808/DIeSlFiUwAAWjcg.mp4 diff --git a/bundles/org.eclipse.jdt.doc.user/tipOfTheDay/content/910089046600425472/910089046600425472.html b/bundles/org.eclipse.jdt.tips.user/content/content/910089046600425472/910089046600425472.html index 546a7f5c5..546a7f5c5 100644 --- a/bundles/org.eclipse.jdt.doc.user/tipOfTheDay/content/910089046600425472/910089046600425472.html +++ b/bundles/org.eclipse.jdt.tips.user/content/content/910089046600425472/910089046600425472.html diff --git a/bundles/org.eclipse.jdt.doc.user/tipOfTheDay/content/910089046600425472/DKFJClMW4AAK2pR.mp4 b/bundles/org.eclipse.jdt.tips.user/content/content/910089046600425472/DKFJClMW4AAK2pR.mp4 Binary files differindex 8445eae2d..8445eae2d 100644 --- a/bundles/org.eclipse.jdt.doc.user/tipOfTheDay/content/910089046600425472/DKFJClMW4AAK2pR.mp4 +++ b/bundles/org.eclipse.jdt.tips.user/content/content/910089046600425472/DKFJClMW4AAK2pR.mp4 diff --git a/bundles/org.eclipse.jdt.doc.user/tipOfTheDay/content/920608130274381825/920608130274381825.html b/bundles/org.eclipse.jdt.tips.user/content/content/920608130274381825/920608130274381825.html index 6daf77ad5..6daf77ad5 100644 --- a/bundles/org.eclipse.jdt.doc.user/tipOfTheDay/content/920608130274381825/920608130274381825.html +++ b/bundles/org.eclipse.jdt.tips.user/content/content/920608130274381825/920608130274381825.html diff --git a/bundles/org.eclipse.jdt.doc.user/tipOfTheDay/content/920608130274381825/DMaoGYlXUAMDRFF.mp4 b/bundles/org.eclipse.jdt.tips.user/content/content/920608130274381825/DMaoGYlXUAMDRFF.mp4 Binary files differindex 963f496d6..963f496d6 100644 --- a/bundles/org.eclipse.jdt.doc.user/tipOfTheDay/content/920608130274381825/DMaoGYlXUAMDRFF.mp4 +++ b/bundles/org.eclipse.jdt.tips.user/content/content/920608130274381825/DMaoGYlXUAMDRFF.mp4 diff --git a/bundles/org.eclipse.jdt.doc.user/tipOfTheDay/content/927527210772258816/927527210772258816.html b/bundles/org.eclipse.jdt.tips.user/content/content/927527210772258816/927527210772258816.html index 2823b8b8f..2823b8b8f 100644 --- a/bundles/org.eclipse.jdt.doc.user/tipOfTheDay/content/927527210772258816/927527210772258816.html +++ b/bundles/org.eclipse.jdt.tips.user/content/content/927527210772258816/927527210772258816.html diff --git a/bundles/org.eclipse.jdt.doc.user/tipOfTheDay/content/927527210772258816/DN88_JCXcAAJaaX.mp4 b/bundles/org.eclipse.jdt.tips.user/content/content/927527210772258816/DN88_JCXcAAJaaX.mp4 Binary files differindex 2c15aa6a5..2c15aa6a5 100644 --- a/bundles/org.eclipse.jdt.doc.user/tipOfTheDay/content/927527210772258816/DN88_JCXcAAJaaX.mp4 +++ b/bundles/org.eclipse.jdt.tips.user/content/content/927527210772258816/DN88_JCXcAAJaaX.mp4 diff --git a/bundles/org.eclipse.jdt.doc.user/tipOfTheDay/content/931124796502536192/931124796502536192.html b/bundles/org.eclipse.jdt.tips.user/content/content/931124796502536192/931124796502536192.html index 0c56747d4..0c56747d4 100644 --- a/bundles/org.eclipse.jdt.doc.user/tipOfTheDay/content/931124796502536192/931124796502536192.html +++ b/bundles/org.eclipse.jdt.tips.user/content/content/931124796502536192/931124796502536192.html diff --git a/bundles/org.eclipse.jdt.doc.user/tipOfTheDay/content/931124796502536192/DOwE-C_X0AA6bb5.mp4 b/bundles/org.eclipse.jdt.tips.user/content/content/931124796502536192/DOwE-C_X0AA6bb5.mp4 Binary files differindex 0d0178d0e..0d0178d0e 100644 --- a/bundles/org.eclipse.jdt.doc.user/tipOfTheDay/content/931124796502536192/DOwE-C_X0AA6bb5.mp4 +++ b/bundles/org.eclipse.jdt.tips.user/content/content/931124796502536192/DOwE-C_X0AA6bb5.mp4 diff --git a/bundles/org.eclipse.jdt.doc.user/tipOfTheDay/content/941264226940850177/941264226940850177.html b/bundles/org.eclipse.jdt.tips.user/content/content/941264226940850177/941264226940850177.html index 45de9f41c..45de9f41c 100644 --- a/bundles/org.eclipse.jdt.doc.user/tipOfTheDay/content/941264226940850177/941264226940850177.html +++ b/bundles/org.eclipse.jdt.tips.user/content/content/941264226940850177/941264226940850177.html diff --git a/bundles/org.eclipse.jdt.doc.user/tipOfTheDay/content/941264226940850177/DRAKxCrWkAEMkEm.mp4 b/bundles/org.eclipse.jdt.tips.user/content/content/941264226940850177/DRAKxCrWkAEMkEm.mp4 Binary files differindex cb85ef9b2..cb85ef9b2 100644 --- a/bundles/org.eclipse.jdt.doc.user/tipOfTheDay/content/941264226940850177/DRAKxCrWkAEMkEm.mp4 +++ b/bundles/org.eclipse.jdt.tips.user/content/content/941264226940850177/DRAKxCrWkAEMkEm.mp4 diff --git a/bundles/org.eclipse.jdt.doc.user/tipOfTheDay/content/941624342282108929/941624342282108929.html b/bundles/org.eclipse.jdt.tips.user/content/content/941624342282108929/941624342282108929.html index 88f32ecfd..88f32ecfd 100644 --- a/bundles/org.eclipse.jdt.doc.user/tipOfTheDay/content/941624342282108929/941624342282108929.html +++ b/bundles/org.eclipse.jdt.tips.user/content/content/941624342282108929/941624342282108929.html diff --git a/bundles/org.eclipse.jdt.doc.user/tipOfTheDay/content/941624342282108929/DRFSS0sWsAEDJb-.mp4 b/bundles/org.eclipse.jdt.tips.user/content/content/941624342282108929/DRFSS0sWsAEDJb-.mp4 Binary files differindex 648bf5dd7..648bf5dd7 100644 --- a/bundles/org.eclipse.jdt.doc.user/tipOfTheDay/content/941624342282108929/DRFSS0sWsAEDJb-.mp4 +++ b/bundles/org.eclipse.jdt.tips.user/content/content/941624342282108929/DRFSS0sWsAEDJb-.mp4 diff --git a/bundles/org.eclipse.jdt.doc.user/tipOfTheDay/content/949238007051235328/949238007051235328.html b/bundles/org.eclipse.jdt.tips.user/content/content/949238007051235328/949238007051235328.html index 2ec93333c..2ec93333c 100644 --- a/bundles/org.eclipse.jdt.doc.user/tipOfTheDay/content/949238007051235328/949238007051235328.html +++ b/bundles/org.eclipse.jdt.tips.user/content/content/949238007051235328/949238007051235328.html diff --git a/bundles/org.eclipse.jdt.doc.user/tipOfTheDay/content/949238007051235328/DSxe5wyW4AAebyT.mp4 b/bundles/org.eclipse.jdt.tips.user/content/content/949238007051235328/DSxe5wyW4AAebyT.mp4 Binary files differindex dc34bd3d3..dc34bd3d3 100644 --- a/bundles/org.eclipse.jdt.doc.user/tipOfTheDay/content/949238007051235328/DSxe5wyW4AAebyT.mp4 +++ b/bundles/org.eclipse.jdt.tips.user/content/content/949238007051235328/DSxe5wyW4AAebyT.mp4 diff --git a/bundles/org.eclipse.jdt.doc.user/tipOfTheDay/content/950773930775793664/950773930775793664.html b/bundles/org.eclipse.jdt.tips.user/content/content/950773930775793664/950773930775793664.html index 49f3eabc8..49f3eabc8 100644 --- a/bundles/org.eclipse.jdt.doc.user/tipOfTheDay/content/950773930775793664/950773930775793664.html +++ b/bundles/org.eclipse.jdt.tips.user/content/content/950773930775793664/950773930775793664.html diff --git a/bundles/org.eclipse.jdt.doc.user/tipOfTheDay/content/950773930775793664/DTHT0RbXUAAnGoJ.mp4 b/bundles/org.eclipse.jdt.tips.user/content/content/950773930775793664/DTHT0RbXUAAnGoJ.mp4 Binary files differindex ba1eab6f1..ba1eab6f1 100644 --- a/bundles/org.eclipse.jdt.doc.user/tipOfTheDay/content/950773930775793664/DTHT0RbXUAAnGoJ.mp4 +++ b/bundles/org.eclipse.jdt.tips.user/content/content/950773930775793664/DTHT0RbXUAAnGoJ.mp4 diff --git a/bundles/org.eclipse.jdt.doc.user/tipOfTheDay/content/976836214857740288/976836214857740288.html b/bundles/org.eclipse.jdt.tips.user/content/content/976836214857740288/976836214857740288.html index 3864c82f6..3864c82f6 100644 --- a/bundles/org.eclipse.jdt.doc.user/tipOfTheDay/content/976836214857740288/976836214857740288.html +++ b/bundles/org.eclipse.jdt.tips.user/content/content/976836214857740288/976836214857740288.html diff --git a/bundles/org.eclipse.jdt.doc.user/tipOfTheDay/content/976836214857740288/DY5qzHEXkAAc-7O.mp4 b/bundles/org.eclipse.jdt.tips.user/content/content/976836214857740288/DY5qzHEXkAAc-7O.mp4 Binary files differindex 4bedd0ef7..4bedd0ef7 100644 --- a/bundles/org.eclipse.jdt.doc.user/tipOfTheDay/content/976836214857740288/DY5qzHEXkAAc-7O.mp4 +++ b/bundles/org.eclipse.jdt.tips.user/content/content/976836214857740288/DY5qzHEXkAAc-7O.mp4 diff --git a/bundles/org.eclipse.jdt.doc.user/tipOfTheDay/jdttips.json b/bundles/org.eclipse.jdt.tips.user/content/jdttips.json index 1f3d431d0..989e6a6ae 100644 --- a/bundles/org.eclipse.jdt.doc.user/tipOfTheDay/jdttips.json +++ b/bundles/org.eclipse.jdt.tips.user/content/jdttips.json @@ -5,7 +5,7 @@ "expression": "<with variable=\"activeWorkbenchWindow.activePerspective\"><equals value=\"org.eclipse.jdt.ui.JavaPerspective\"></equals></with>", "variables": { "baseUrlx": "file:///C:/Users/jongw/git/eclipse.platform.common/tips/org.eclipse.jdt.ui", - "baseUrl": "http://www.eclipse.org/downloads/download.php?r=1&file=/e4/tips/org.eclipse.jdt.ui" + "baseUrl": "http://www.eclipse.org/downloads/download.php?r=1&file=/e4/tips/org.eclipse.jdt.tips.user" }, "tips": [{ "date": "2018-01-05", diff --git a/bundles/org.eclipse.jdt.tips.user/plugin.xml b/bundles/org.eclipse.jdt.tips.user/plugin.xml new file mode 100644 index 000000000..11a26ef4b --- /dev/null +++ b/bundles/org.eclipse.jdt.tips.user/plugin.xml @@ -0,0 +1,26 @@ +<?xml version="1.0" encoding="UTF-8"?> +<?eclipse version="3.4"?> +<plugin> + <extension + point="org.eclipse.tips.core.tips"> + <provider + category="org.eclipse.jdt.tips.user.category" + class="org.eclipse.jdt.tips.user.internal.JDTTipProvider" + description="JDT Tips Provider" + id="org.eclipse.jdt.tips.user"> + <enablement> + <with + variable="activeWorkbenchWindow.activePerspective"> + <equals + value="org.eclipse.jdt.ui.JavaPerspective"> + </equals> + </with> + </enablement> + </provider> + <category + id="org.eclipse.jdt.tips.user.category" + name="JDT Related Tips"> + </category> + </extension> + +</plugin> diff --git a/bundles/org.eclipse.jdt.tips.user/pom.xml b/bundles/org.eclipse.jdt.tips.user/pom.xml new file mode 100644 index 000000000..173ccf367 --- /dev/null +++ b/bundles/org.eclipse.jdt.tips.user/pom.xml @@ -0,0 +1,25 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + Copyright (c) 2018 Remain Software + 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: + wim.jongman@remainsoftware.com - initial API and implementation + --> + +<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>eclipse.platform.ua</groupId> + <artifactId>eclipse.platform.ua</artifactId> + <version>4.8.0-SNAPSHOT</version> + </parent> + <groupId>org.eclipse.ui</groupId> + <artifactId>org.eclipse.tips.core</artifactId> + <version>0.1.0-SNAPSHOT</version> + <packaging>eclipse-plugin</packaging> +</project> diff --git a/bundles/org.eclipse.jdt.tips.user/src/org/eclipse/jdt/tips/user/internal/JDTTipProvider.java b/bundles/org.eclipse.jdt.tips.user/src/org/eclipse/jdt/tips/user/internal/JDTTipProvider.java new file mode 100644 index 000000000..cd91ea1e3 --- /dev/null +++ b/bundles/org.eclipse.jdt.tips.user/src/org/eclipse/jdt/tips/user/internal/JDTTipProvider.java @@ -0,0 +1,147 @@ +package org.eclipse.jdt.tips.user.internal; + +import java.io.BufferedReader; +import java.io.File; +import java.io.FileInputStream; +import java.io.FileNotFoundException; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.net.HttpURLConnection; +import java.net.MalformedURLException; +import java.net.URL; +import java.nio.file.Files; +import java.nio.file.StandardCopyOption; +import java.text.MessageFormat; +import java.util.Date; + +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.core.runtime.IStatus; +import org.eclipse.core.runtime.Status; +import org.eclipse.core.runtime.SubMonitor; +import org.eclipse.tips.json.JsonTipProvider; + +public class JDTTipProvider extends JsonTipProvider { + + private static final String EMPTY = ""; + private static final String FILENAME = "jdttips.json"; //$NON-NLS-1$ + private String fUrl; + private File fStateLocation; + + public JDTTipProvider() throws MalformedURLException { + fUrl = System.getProperty(getID() + ".url"); //$NON-NLS-1$ + if (fUrl != null) { + setJsonUrl(fUrl); + } else { + fUrl = "http://www.eclipse.org/downloads/download.php?r=1&file=/eclipse/tips/" + FILENAME; //$NON-NLS-1$ + setJsonUrl(fUrl); + } + } + + @Override + public synchronized IStatus loadNewTips(IProgressMonitor pMonitor) { + try { + + SubMonitor monitor = SubMonitor.convert(pMonitor, 1); + monitor.setTaskName("Fetching content.."); + File localFile = fetchContent(); + try { + setJsonUrl(localFile.toURI().toURL().toString()); + } catch (MalformedURLException e) { + getManager().log(getStatus("Could not get local URL", e)); + } + monitor.worked(1); + return super.loadNewTips(pMonitor); + } catch (Exception e) { + return getStatus("Could not load new Tips", e); + } + } + + private IStatus getStatus(String message, Exception pException) { + return new Status(IStatus.ERROR, "org.eclipse.jdt.tips.user", message, pException); + } + + private File fetchContent() throws IOException { + String lastModified = getLastModifiedDate(); + File timeStampFile = new File(getStateLocation(), "lastModified.txt"); //$NON-NLS-1$ + String existingVersion = getFileContent(timeStampFile); + File contentFile = new File(getStateLocation(), FILENAME); + if (existingVersion.equals(lastModified) && contentFile.exists()) { + return contentFile; + } + storeContentLocally(contentFile); + saveLastModifiedDate(lastModified, timeStampFile); + return contentFile; + } + + private void saveLastModifiedDate(String lastModified, File timeStampFile) + throws IOException, FileNotFoundException { + try (FileOutputStream fos = new FileOutputStream(timeStampFile)) { + fos.write(lastModified.getBytes()); + } + } + + private void storeContentLocally(File contentFile) throws MalformedURLException, IOException { + URL webFile = new URL(fUrl); + try (InputStream in = webFile.openStream()) { + Files.copy(in, contentFile.toPath(), StandardCopyOption.REPLACE_EXISTING); + } + } + + public static String getFileContent(File input) throws IOException { + if (!input.exists()) { + input.createNewFile(); + return EMPTY; + } + try (FileInputStream fis = new FileInputStream(input)) { + try (BufferedReader br = new BufferedReader(new InputStreamReader(fis))) { + String result = br.readLine(); + return result == null ? EMPTY : result; + } + } + } + + @Override + public String getID() { + return "org.eclipse.jdt.tips.user"; //$NON-NLS-1$ + } + + /** + * Returns the state location of the IDE tips. First the property + * "org.eclipse.tips.statelocation" is read. If it does not exist then the state + * location will be <b>${user.home}/.eclipse/org.eclipse.tips.state</b> + * + * @return the state location file + * @throws IOException if something went wrong + */ + private File getStateLocation() throws IOException { + + if (fStateLocation != null) { + return fStateLocation; + } + + String stateLocation = System.getProperty(getID() + ".statelocation"); //$NON-NLS-1$ + if (stateLocation == null) { + stateLocation = System.getProperty("user.home") + File.separator + ".eclipse" + File.separator //$NON-NLS-1$ //$NON-NLS-2$ + + getID() + ".state"; //$NON-NLS-1$ + } + fStateLocation = new File(stateLocation); + if (!fStateLocation.exists()) { + fStateLocation.mkdirs(); + } + + if (!fStateLocation.canRead() || !fStateLocation.canWrite()) { + throw new IOException( + MessageFormat.format("Statelocation {0} not accessible.", fStateLocation.getAbsolutePath())); + } + return fStateLocation; + } + + private String getLastModifiedDate() throws IOException { + URL url = new URL(fUrl); + HttpURLConnection httpCon = (HttpURLConnection) url.openConnection(); + long date = httpCon.getLastModified(); + return new Date(date).toString(); + } +} |
