Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWim Jongman2018-05-27 10:04:24 +0000
committerWim Jongman2018-05-27 10:04:24 +0000
commiteae294d9835113eba9c70023d9a0d10ccc3bdc8a (patch)
treef5c302bd517e7b1be23a8be5d15c3445e95e7755
parentf7eb96d78f8728628760c1fe5bac7f6de33d7eb4 (diff)
downloadeclipse.platform.ua-eae294d9835113eba9c70023d9a0d10ccc3bdc8a.tar.gz
eclipse.platform.ua-eae294d9835113eba9c70023d9a0d10ccc3bdc8a.tar.xz
eclipse.platform.ua-eae294d9835113eba9c70023d9a0d10ccc3bdc8a.zip
Bug 534989: [Tips] Reduce tips about tips
* Navigation tips are removed * The Extending the Tip Framework tip will only show if people have installed bundle org.eclipse.pde.ui >> EPP Blocker [1] * Removed a "funny" tip action. Change-Id: I07b7542637b37e5b1459960589ba3b7d0424c423 Signed-off-by: Wim Jongman <wim.jongman@remainsoftware.com>
-rw-r--r--org.eclipse.tips.ide/icons/asterisk.pngbin0 -> 743 bytes
-rw-r--r--org.eclipse.tips.ide/icons/clock.pngbin0 -> 882 bytes
-rw-r--r--org.eclipse.tips.ide/images/tips/navigate1.pngbin20209 -> 0 bytes
-rw-r--r--org.eclipse.tips.ide/images/tips/navigate2.pngbin56333 -> 0 bytes
-rw-r--r--org.eclipse.tips.ide/images/tips/tip2.gifbin16442 -> 0 bytes
-rw-r--r--org.eclipse.tips.ide/images/tips/tipsfw.pngbin105366 -> 0 bytes
-rw-r--r--org.eclipse.tips.ide/src/org/eclipse/tips/ide/internal/provider/Tip4_Navigate.java69
-rw-r--r--org.eclipse.tips.ide/src/org/eclipse/tips/ide/internal/provider/Tip5_Navigate.java60
-rw-r--r--org.eclipse.tips.ide/src/org/eclipse/tips/ide/internal/provider/Tip6_ActionsTip.java9
-rw-r--r--org.eclipse.tips.ide/src/org/eclipse/tips/ide/internal/provider/TipsTipProvider.java7
10 files changed, 7 insertions, 138 deletions
diff --git a/org.eclipse.tips.ide/icons/asterisk.png b/org.eclipse.tips.ide/icons/asterisk.png
new file mode 100644
index 000000000..bab7cc9bc
--- /dev/null
+++ b/org.eclipse.tips.ide/icons/asterisk.png
Binary files differ
diff --git a/org.eclipse.tips.ide/icons/clock.png b/org.eclipse.tips.ide/icons/clock.png
new file mode 100644
index 000000000..e2672c206
--- /dev/null
+++ b/org.eclipse.tips.ide/icons/clock.png
Binary files differ
diff --git a/org.eclipse.tips.ide/images/tips/navigate1.png b/org.eclipse.tips.ide/images/tips/navigate1.png
deleted file mode 100644
index cd6c709d5..000000000
--- a/org.eclipse.tips.ide/images/tips/navigate1.png
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.tips.ide/images/tips/navigate2.png b/org.eclipse.tips.ide/images/tips/navigate2.png
deleted file mode 100644
index dcac33c9b..000000000
--- a/org.eclipse.tips.ide/images/tips/navigate2.png
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.tips.ide/images/tips/tip2.gif b/org.eclipse.tips.ide/images/tips/tip2.gif
deleted file mode 100644
index d3850990f..000000000
--- a/org.eclipse.tips.ide/images/tips/tip2.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.tips.ide/images/tips/tipsfw.png b/org.eclipse.tips.ide/images/tips/tipsfw.png
deleted file mode 100644
index 8eeb6009f..000000000
--- a/org.eclipse.tips.ide/images/tips/tipsfw.png
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.tips.ide/src/org/eclipse/tips/ide/internal/provider/Tip4_Navigate.java b/org.eclipse.tips.ide/src/org/eclipse/tips/ide/internal/provider/Tip4_Navigate.java
deleted file mode 100644
index d16793bff..000000000
--- a/org.eclipse.tips.ide/src/org/eclipse/tips/ide/internal/provider/Tip4_Navigate.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*******************************************************************************
- * 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
- *******************************************************************************/
-package org.eclipse.tips.ide.internal.provider;
-
-import java.util.Date;
-
-import org.eclipse.tips.core.IHtmlTip;
-import org.eclipse.tips.core.Tip;
-import org.eclipse.tips.core.TipImage;
-import org.osgi.framework.Bundle;
-import org.osgi.framework.FrameworkUtil;
-
-public class Tip4_Navigate extends Tip implements IHtmlTip {
-
- private TipImage fImage;
-
- @Override
- public TipImage getImage() {
- if (fImage == null) {
- try {
- Bundle bundle = FrameworkUtil.getBundle(getClass());
- fImage = new TipImage(bundle.getEntry("images/tips/navigate1.png")).setAspectRatio(640, 96, true);
- } catch (Exception e) {
- }
- }
- return fImage;
- }
-
- public Tip4_Navigate(String providerId) {
- super(providerId);
- }
-
- @Override
- public Date getCreationDate() {
- return TipsTipProvider.getDateFromYYMMDD("09/01/2019");
- }
-
- @Override
- public String getSubject() {
- return "Navigate Tip 1";
- }
-
- @Override
- public String getHTML() {
- return "<h2>Navigating Tips</h2>You can navigate tips by using the button bar." //
- + "<br><br><b>Startup Options</b>" //
- + "<ul style=\"margin: 5\">" //
- + "<li>Show dialog on new tips - Opens the dialog on every start</li>" //
- + "<li>Indicate new tips in status bar - When new tips arrive an icon appears</li>" //
- + "<li>Disable - Only start tips when requested from the menu</li>" //
- + "</ul>" //
- + "<b>Unread only</b>" //
- + "<ul style=\"margin: 5\"><li>Shows all tips when unchecked or unread tips when checked.</li></ul>" //
- + "<b>Next Tip</b>" //
- + "<ul style=\"margin: 5\"><li>Navigates to the next tip.</li></ul>" //
- + "<b>Previous Tip</b>" //
- + "<ul style=\"margin: 5\"><li>Navigates to the previous tip <i>if reading all tips</i>.</li></ul>" //
- + "<b>Close</b>" //
- + "<ul style=\"margin: 5\"><li>Closes the Dialog (<b>Escape</b> does the same).</i></ul><br>";
- }
-} \ No newline at end of file
diff --git a/org.eclipse.tips.ide/src/org/eclipse/tips/ide/internal/provider/Tip5_Navigate.java b/org.eclipse.tips.ide/src/org/eclipse/tips/ide/internal/provider/Tip5_Navigate.java
deleted file mode 100644
index 05e317620..000000000
--- a/org.eclipse.tips.ide/src/org/eclipse/tips/ide/internal/provider/Tip5_Navigate.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*******************************************************************************
- * 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
- *******************************************************************************/
-package org.eclipse.tips.ide.internal.provider;
-
-import java.util.Date;
-
-import org.eclipse.tips.core.IHtmlTip;
-import org.eclipse.tips.core.Tip;
-import org.eclipse.tips.core.TipImage;
-import org.osgi.framework.Bundle;
-import org.osgi.framework.FrameworkUtil;
-
-public class Tip5_Navigate extends Tip implements IHtmlTip {
-
- private TipImage fImage;
-
- public Tip5_Navigate(String providerId) {
- super(providerId);
- }
-
- @Override
- public Date getCreationDate() {
- return TipsTipProvider.getDateFromYYMMDD("09/01/2019");
- }
-
- @Override
- public String getSubject() {
- return "Navigate Tip 2";
- }
-
- @Override
- public String getHTML() {
- return "<h2>Navigating Tips</h2>You can activate other Tip Providers by clicking on the big icons below."
- + "<br>"
- + "You are currently looking at the Tips tips but as you can see there are other providers. Go ahead and"
- + " select some of the other providers. If you click on the lightbulb below you will return to this tip.<br><br><br><br>";
- }
-
- @Override
- public TipImage getImage() {
- if (fImage == null) {
- try {
- Bundle bundle = FrameworkUtil.getBundle(getClass());
- fImage = new TipImage(bundle.getEntry("images/tips/navigate2.png")).setAspectRatio(650, 220, true);
- } catch (Exception e) {
-// getProvider().getManager().log(LogUtil.info(getClass(), e));
- }
- }
- return fImage;
- }
-
-} \ No newline at end of file
diff --git a/org.eclipse.tips.ide/src/org/eclipse/tips/ide/internal/provider/Tip6_ActionsTip.java b/org.eclipse.tips.ide/src/org/eclipse/tips/ide/internal/provider/Tip6_ActionsTip.java
index 241953e70..aa8e07e26 100644
--- a/org.eclipse.tips.ide/src/org/eclipse/tips/ide/internal/provider/Tip6_ActionsTip.java
+++ b/org.eclipse.tips.ide/src/org/eclipse/tips/ide/internal/provider/Tip6_ActionsTip.java
@@ -51,7 +51,7 @@ public class Tip6_ActionsTip extends Tip implements IHtmlTip {
@Override
public List<TipAction> getActions() {
Runnable runnable = () -> Display.getDefault()
- .syncExec(() -> MessageDialog.openConfirm(null, getSubject(), "We can do anything we want."));
+ .syncExec(() -> MessageDialog.openConfirm(null, getSubject(), "A dialog was opened."));
Runnable clock = () -> Display.getDefault().syncExec(() -> MessageDialog.openConfirm(null, getSubject(),
DateFormat.getTimeInstance().format(Calendar.getInstance().getTime())));
Runnable runner2 = () -> Display.getDefault().syncExec(() -> {
@@ -63,11 +63,8 @@ public class Tip6_ActionsTip extends Tip implements IHtmlTip {
ArrayList<TipAction> actions = new ArrayList<>();
actions.add(new TipAction("Clock", "What is the time?", clock, getImage("icons/clock.png")));
actions.add(
- new TipAction("Open Preferences", "Opens the preferences", runner2, getImage("icons/bug_link.png")));
- actions.add(
- new TipAction("Cut or Paste", "Just another silly action", runnable, getImage("icons/lightbulb.png")));
- actions.add(new TipAction("Eclipse Rocks, Idea Scissors", "Paper", runnable, getImage("icons/cut.png")));
- actions.add(new TipAction("Totally Bonkers", "The quick brown fox", runnable, getImage("icons/notfound.png")));
+ new TipAction("Open Preferences", "Opens the preferences", runner2, null));
+ actions.add(new TipAction("Open Dialog", "Opens a Dialog", runnable, getImage("icons/asterisk.png")));
return actions;
}
diff --git a/org.eclipse.tips.ide/src/org/eclipse/tips/ide/internal/provider/TipsTipProvider.java b/org.eclipse.tips.ide/src/org/eclipse/tips/ide/internal/provider/TipsTipProvider.java
index 98e7ac603..c6f93ea77 100644
--- a/org.eclipse.tips.ide/src/org/eclipse/tips/ide/internal/provider/TipsTipProvider.java
+++ b/org.eclipse.tips.ide/src/org/eclipse/tips/ide/internal/provider/TipsTipProvider.java
@@ -19,6 +19,7 @@ import java.util.List;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.Status;
import org.eclipse.core.runtime.SubMonitor;
import org.eclipse.tips.core.Tip;
@@ -53,10 +54,10 @@ public class TipsTipProvider extends org.eclipse.tips.core.TipProvider {
tips.add(new Tip1_Welcome(getID()));
tips.add(new Tip2_StartingTips(getID()));
tips.add(new Tip3_StartingTips(getID()));
- tips.add(new Tip4_Navigate(getID()));
- tips.add(new Tip5_Navigate(getID()));
tips.add(new Tip6_ActionsTip(getID()));
- tips.add(new Tip7_Extend(getID()));
+ if (Platform.getBundle("org.eclipse.pde.ui") != null) {
+ tips.add(new Tip7_Extend(getID()));
+ }
setTips(tips);
subMonitor.done();
return Status.OK_STATUS;

Back to the top