diff options
author | Brian de Alwis | 2016-03-12 04:34:34 +0000 |
---|---|---|
committer | Brian de Alwis | 2016-03-12 05:55:35 +0000 |
commit | 9a3622632eb9d6be029c58e6f04af17ba259bc33 (patch) | |
tree | 7a45b1a6a6a5ae308fc977bb51a8c345cf72f66d /org.eclipse.ui.intro | |
parent | ad8a47c4bdd332042253f75caa105526cb5d267b (diff) | |
download | eclipse.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.exsd | 68 | ||||
-rw-r--r-- | org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/url/IntroURL.java | 24 |
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<br> <code>org.eclipse.jface.action.IAction</code>, or <code>org.eclipse.ui.IActionDelegate</code><br> <i>pluginId</i> - The id of the plug-in which contains the class.<br> <i>standby (optional) = ("true" - "false") "false"</i> - indicate whether to set the intro into standby mode after executing the action<br> + "false" + "full" + "standby" + "launchbar" + "close") "false"</i> - indicate whether to set the intro into fully visible mode ("false" or "full"), into standby mode ("true" or "standby"), into the launchbar ("launchbar"), or close the intro after executing the action<br> additional parameters - any additional parameters are passed to actions that implement <code>org.eclipse.ui.intro.config.IIntroAction</code><br> <br> <b>execute</b> - executes the specified command. See the <code>serialize()</code> method on <code>org.eclipse.core.command.ParameterizedCommand</code> for details of the command serialization format. Since 3.2.<br> <i>command</i> - a serialized <code>ParameterizedCommand</code><br> <i>standby (optional) = ("true" - "false") "false"</i> - indicate whether to set the intro into standby mode after executing the action<br> + "false" + "full" + "standby" + "launchbar" + "close") "false"</i> - indicate whether to set the intro into fully visible mode ("false" or "full"), into standby mode ("true" or "standby"), into the launchbar ("launchbar"), or close the intro after executing the action<br> <br> <b>setStandbyMode</b> - sets the state of the intro part<br> <i>standby = ("true" - "false")</i> - true to put the intro part in its partially visible standy mode, and false to make it fully visible<br> + "false" + "full" + "standby" + "launchbar" + "close") "false"</i> - indicate whether to set the intro into fully visible mode ("false" or "full"), into standby mode ("true" or "standby"), into the launchbar ("launchbar"), or close the intro after executing the action<br> <br> <b>showHelp</b> - Open the help system.<br> @@ -378,7 +390,12 @@ no parameters required<br> <b>showPage</b> - show the intro page with the given id<br> <i>id</i> - the id of the intro page to show<br> <i>standby (optional) = ("true" - "false") "false"</i> - indicate whether to set the intro into standby mode after showing the page<br><br> + "false" + "full" + "standby" + "launchbar" + "close") "false"</i> - indicate whether to set the intro into fully visible mode ("false" or "full"), into standby mode ("true" or "standby"), into the launchbar ("launchbar"), or close the intro after executing the action<br> +<br> 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, <i>decode = ("true" "false")</i> can be used to force a decode of these parameters when the Intro framework processes them.<br> For example, the following Intro url: <br><i> @@ -388,7 +405,6 @@ whereas<br><i> http://org.eclipse.ui.intro/showMessage?message=This+is+a+message&amp;amp;decode=true</i><br> will process the message parameter as "This is a message".<br> - <br> </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.<br> 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; |