Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian de Alwis2016-03-12 04:34:34 +0000
committerBrian de Alwis2016-03-12 05:55:35 +0000
commit9a3622632eb9d6be029c58e6f04af17ba259bc33 (patch)
tree7a45b1a6a6a5ae308fc977bb51a8c345cf72f66d /org.eclipse.ui.intro
parentad8a47c4bdd332042253f75caa105526cb5d267b (diff)
downloadeclipse.platform.ua-9a3622632eb9d6be029c58e6f04af17ba259bc33.tar.gz
eclipse.platform.ua-9a3622632eb9d6be029c58e6f04af17ba259bc33.tar.xz
eclipse.platform.ua-9a3622632eb9d6be029c58e6f04af17ba259bc33.zip
Bug 466370 - Modify Quicklinks to support URLs and view modes
Add support for URLs, both IntroURLs and normal URLs. Allow post-actions to also put the Welcome/Intro into launchbar or close the intro entirely. Change-Id: I4a1951f6ef58f7134ab67c98c8b34c6d85b7cf22
Diffstat (limited to 'org.eclipse.ui.intro')
-rw-r--r--org.eclipse.ui.intro/schema/IntroContent.exsd68
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/url/IntroURL.java24
2 files changed, 44 insertions, 48 deletions
diff --git a/org.eclipse.ui.intro/schema/IntroContent.exsd b/org.eclipse.ui.intro/schema/IntroContent.exsd
index 35b5de189..dfa1ad12c 100644
--- a/org.eclipse.ui.intro/schema/IntroContent.exsd
+++ b/org.eclipse.ui.intro/schema/IntroContent.exsd
@@ -1,10 +1,10 @@
<?xml version='1.0' encoding='UTF-8'?>
<!-- Schema file written by PDE -->
-<schema targetNamespace="Intro Content File XML Format">
+<schema targetNamespace="Intro Content File XML Format" xmlns="http://www.w3.org/2001/XMLSchema">
<annotation>
- <appInfo>
+ <appinfo>
<meta.schema plugin="Intro Content File XML Format" id="." name="Intro Content File XML Format"/>
- </appInfo>
+ </appinfo>
<documentation>
This document describes the intro content file structure as a series of DTD fragments.
</documentation>
@@ -340,19 +340,31 @@ no parameters required&lt;br&gt;
&lt;code&gt;org.eclipse.jface.action.IAction&lt;/code&gt;, or &lt;code&gt;org.eclipse.ui.IActionDelegate&lt;/code&gt;&lt;br&gt;
&lt;i&gt;pluginId&lt;/i&gt; - The id of the plug-in which contains the class.&lt;br&gt;
&lt;i&gt;standby (optional) = (&quot;true&quot;
- &quot;false&quot;) &quot;false&quot;&lt;/i&gt; - indicate whether to set the intro into standby mode after executing the action&lt;br&gt;
+ &quot;false&quot;
+ &quot;full&quot;
+ &quot;standby&quot;
+ &quot;launchbar&quot;
+ &quot;close&quot;) &quot;false&quot;&lt;/i&gt; - indicate whether to set the intro into fully visible mode (&quot;false&quot; or &quot;full&quot;), into standby mode (&quot;true&quot; or &quot;standby&quot;), into the launchbar (&quot;launchbar&quot;), or close the intro after executing the action&lt;br&gt;
additional parameters - any additional parameters are passed to actions that implement &lt;code&gt;org.eclipse.ui.intro.config.IIntroAction&lt;/code&gt;&lt;br&gt;
&lt;br&gt;
&lt;b&gt;execute&lt;/b&gt; - executes the specified command. See the &lt;code&gt;serialize()&lt;/code&gt; method on &lt;code&gt;org.eclipse.core.command.ParameterizedCommand&lt;/code&gt; for details of the command serialization format. Since 3.2.&lt;br&gt;
&lt;i&gt;command&lt;/i&gt; - a serialized &lt;code&gt;ParameterizedCommand&lt;/code&gt;&lt;br&gt;
&lt;i&gt;standby (optional) = (&quot;true&quot;
- &quot;false&quot;) &quot;false&quot;&lt;/i&gt; - indicate whether to set the intro into standby mode after executing the action&lt;br&gt;
+ &quot;false&quot;
+ &quot;full&quot;
+ &quot;standby&quot;
+ &quot;launchbar&quot;
+ &quot;close&quot;) &quot;false&quot;&lt;/i&gt; - indicate whether to set the intro into fully visible mode (&quot;false&quot; or &quot;full&quot;), into standby mode (&quot;true&quot; or &quot;standby&quot;), into the launchbar (&quot;launchbar&quot;), or close the intro after executing the action&lt;br&gt;
&lt;br&gt;
&lt;b&gt;setStandbyMode&lt;/b&gt; - sets the state of the intro part&lt;br&gt;
&lt;i&gt;standby = (&quot;true&quot;
- &quot;false&quot;)&lt;/i&gt; - true to put the intro part in its partially visible standy mode, and false to make it fully visible&lt;br&gt;
+ &quot;false&quot;
+ &quot;full&quot;
+ &quot;standby&quot;
+ &quot;launchbar&quot;
+ &quot;close&quot;) &quot;false&quot;&lt;/i&gt; - indicate whether to set the intro into fully visible mode (&quot;false&quot; or &quot;full&quot;), into standby mode (&quot;true&quot; or &quot;standby&quot;), into the launchbar (&quot;launchbar&quot;), or close the intro after executing the action&lt;br&gt;
&lt;br&gt;
&lt;b&gt;showHelp&lt;/b&gt; - Open the help system.&lt;br&gt;
@@ -378,7 +390,12 @@ no parameters required&lt;br&gt;
&lt;b&gt;showPage&lt;/b&gt; - show the intro page with the given id&lt;br&gt;
&lt;i&gt;id&lt;/i&gt; - the id of the intro page to show&lt;br&gt;
&lt;i&gt;standby (optional) = (&quot;true&quot;
- &quot;false&quot;) &quot;false&quot;&lt;/i&gt; - indicate whether to set the intro into standby mode after showing the page&lt;br&gt;&lt;br&gt;
+ &quot;false&quot;
+ &quot;full&quot;
+ &quot;standby&quot;
+ &quot;launchbar&quot;
+ &quot;close&quot;) &quot;false&quot;&lt;/i&gt; - indicate whether to set the intro into fully visible mode (&quot;false&quot; or &quot;full&quot;), into standby mode (&quot;true&quot; or &quot;standby&quot;), into the launchbar (&quot;launchbar&quot;), or close the intro after executing the action&lt;br&gt;
+&lt;br&gt;
If any of the parameters passed to these actions have special characters (ie: characters that are illegal in a URL), then they should be encoded using UTF-8 url encoding. To receive these parametrs in there decoded state a special parameter, &lt;i&gt;decode = (&quot;true&quot; &quot;false&quot;)&lt;/i&gt; can be used to force a decode of these parameters when the Intro framework processes them.&lt;br&gt;
For example, the following Intro url: &lt;br&gt;&lt;i&gt;
@@ -388,7 +405,6 @@ whereas&lt;br&gt;&lt;i&gt;
http://org.eclipse.ui.intro/showMessage?message=This+is+a+message&amp;amp;amp;decode=true&lt;/i&gt;&lt;br&gt;
will process the message parameter as &quot;This is a message&quot;.&lt;br&gt;
-
&lt;br&gt;
</documentation>
</annotation>
@@ -836,46 +852,14 @@ Another difference between the tags is that the html tag is only supported for t
</complexType>
</element>
- <annotation>
- <appInfo>
- <meta.section type="since"/>
- </appInfo>
- <documentation>
-
- </documentation>
- </annotation>
- <annotation>
- <appInfo>
- <meta.section type="examples"/>
- </appInfo>
- <documentation>
-
- </documentation>
- </annotation>
- <annotation>
- <appInfo>
- <meta.section type="apiInfo"/>
- </appInfo>
- <documentation>
-
- </documentation>
- </annotation>
- <annotation>
- <appInfo>
- <meta.section type="implementation"/>
- </appInfo>
- <documentation>
-
- </documentation>
- </annotation>
<annotation>
- <appInfo>
+ <appinfo>
<meta.section type="copyright"/>
- </appInfo>
+ </appinfo>
<documentation>
Copyright (c) 2004, 2006 IBM Corporation and others.&lt;br&gt;
All rights reserved. This program and the accompanying materials are made
diff --git a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/url/IntroURL.java b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/url/IntroURL.java
index 526c02344..389133a9e 100644
--- a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/url/IntroURL.java
+++ b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/url/IntroURL.java
@@ -112,6 +112,9 @@ public class IntroURL implements IIntroURL {
public static final String VALUE_HOME = "home"; //$NON-NLS-1$
public static final String VALUE_TRUE = "true"; //$NON-NLS-1$
public static final String VALUE_FALSE = "false"; //$NON-NLS-1$
+ public static final String VALUE_CLOSE = "close"; //$NON-NLS-1$
+ public static final String VALUE_STANDBY = "standby"; //$NON-NLS-1$
+ public static final String VALUE_LAUNCHBAR = "launchbar"; //$NON-NLS-1$
@@ -249,15 +252,24 @@ public class IntroURL implements IIntroURL {
}
/**
- * Set the Workbench Intro Part state. Forces the Intro view to open, if not
- * yet created.
- *
- * @param state
- */
+ * Set the Workbench Intro Part state. Forces the Intro view to open, if not yet created.
+ *
+ * Historically this value was "true" (show standby) or "false" (show normal). In Neon we add
+ * "close", "standby" and "launchbar".
+ *
+ * @param state
+ * @return true if the intro was shown, or false if the intro could not be shown
+ */
private boolean setStandbyState(String state) {
if (state == null)
return false;
- boolean standby = state.equals(VALUE_TRUE) ? true : false;
+ if (state.equals(VALUE_CLOSE)) {
+ return IntroPlugin.closeIntro();
+ } else if (state.equals(VALUE_LAUNCHBAR)) {
+ return switchToLaunchBar();
+ }
+ boolean standby = state.equals(VALUE_TRUE) || state.equals(VALUE_STANDBY);
+
IIntroPart introPart = IntroPlugin.showIntro(standby);
if (introPart == null)
return false;

Back to the top