Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--org.eclipse.ui.intro.quicklinks.examples/.classpath7
-rw-r--r--org.eclipse.ui.intro.quicklinks.examples/.project28
-rw-r--r--org.eclipse.ui.intro.quicklinks.examples/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--org.eclipse.ui.intro.quicklinks.examples/META-INF/MANIFEST.MF10
-rw-r--r--org.eclipse.ui.intro.quicklinks.examples/build.properties5
-rw-r--r--org.eclipse.ui.intro.quicklinks.examples/plugin.xml61
-rw-r--r--org.eclipse.ui.intro.quicklinks.examples/pom.xml24
-rw-r--r--org.eclipse.ui.intro.quicklinks/.classpath7
-rw-r--r--org.eclipse.ui.intro.quicklinks/.project28
-rw-r--r--org.eclipse.ui.intro.quicklinks/.settings/org.eclipse.jdt.core.prefs22
-rw-r--r--org.eclipse.ui.intro.quicklinks/.settings/org.eclipse.jdt.ui.prefs5
-rw-r--r--org.eclipse.ui.intro.quicklinks/META-INF/MANIFEST.MF16
-rw-r--r--org.eclipse.ui.intro.quicklinks/build.properties6
-rw-r--r--org.eclipse.ui.intro.quicklinks/plugin.properties13
-rw-r--r--org.eclipse.ui.intro.quicklinks/plugin.xml15
-rw-r--r--org.eclipse.ui.intro.quicklinks/pom.xml24
-rw-r--r--org.eclipse.ui.intro.quicklinks/schema/quicklinks.exsd257
-rw-r--r--org.eclipse.ui.intro.quicklinks/src/org/eclipse/ui/intro/quicklinks/FilteringContentProvider.java51
-rw-r--r--org.eclipse.ui.intro.quicklinks/src/org/eclipse/ui/intro/quicklinks/QuicklinksViewer.java394
-rw-r--r--org.eclipse.ui.intro.quicklinks/src/org/eclipse/ui/intro/quicklinks/URLLabelProvider.java60
-rw-r--r--pom.xml2
21 files changed, 1042 insertions, 0 deletions
diff --git a/org.eclipse.ui.intro.quicklinks.examples/.classpath b/org.eclipse.ui.intro.quicklinks.examples/.classpath
new file mode 100644
index 000000000..eca7bdba8
--- /dev/null
+++ b/org.eclipse.ui.intro.quicklinks.examples/.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/org.eclipse.ui.intro.quicklinks.examples/.project b/org.eclipse.ui.intro.quicklinks.examples/.project
new file mode 100644
index 000000000..e58cb1036
--- /dev/null
+++ b/org.eclipse.ui.intro.quicklinks.examples/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.ui.intro.quicklinks.examples</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/org.eclipse.ui.intro.quicklinks.examples/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.ui.intro.quicklinks.examples/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..0c68a61dc
--- /dev/null
+++ b/org.eclipse.ui.intro.quicklinks.examples/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,7 @@
+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.source=1.8
diff --git a/org.eclipse.ui.intro.quicklinks.examples/META-INF/MANIFEST.MF b/org.eclipse.ui.intro.quicklinks.examples/META-INF/MANIFEST.MF
new file mode 100644
index 000000000..79c0fd0c6
--- /dev/null
+++ b/org.eclipse.ui.intro.quicklinks.examples/META-INF/MANIFEST.MF
@@ -0,0 +1,10 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Examples of Welcome/Intro Quicklinks
+Bundle-SymbolicName: org.eclipse.ui.intro.quicklinks.examples;singleton:=true
+Bundle-Version: 1.0.0.qualifier
+Bundle-Vendor: Eclipse.org
+Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Require-Bundle: org.eclipse.ui.intro;bundle-version="3.4.300",
+ org.eclipse.ui.intro.universal;bundle-version="3.2.800",
+ org.eclipse.ui.intro.quicklinks
diff --git a/org.eclipse.ui.intro.quicklinks.examples/build.properties b/org.eclipse.ui.intro.quicklinks.examples/build.properties
new file mode 100644
index 000000000..e9863e281
--- /dev/null
+++ b/org.eclipse.ui.intro.quicklinks.examples/build.properties
@@ -0,0 +1,5 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ plugin.xml
diff --git a/org.eclipse.ui.intro.quicklinks.examples/plugin.xml b/org.eclipse.ui.intro.quicklinks.examples/plugin.xml
new file mode 100644
index 000000000..e5a43d796
--- /dev/null
+++ b/org.eclipse.ui.intro.quicklinks.examples/plugin.xml
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<!--
+ Copyright (c) 2016 Manumitting Technologies Inc and others.
+ 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:
+ Manumitting Technologies Inc - initial API and implementation
+ -->
+<plugin>
+ <extension
+ point="org.eclipse.ui.intro.quicklinks">
+ <!-- Invoke a simple command -->
+ <quicklink
+ command="org.eclipse.ui.edit.text.openLocalFile"
+ description="Open a single file"
+ label="Open an existing file"
+ standby="true">
+ </quicklink>
+
+ <!--
+ Open the New Java Project wizard; note that icon is provided by <override> below;
+ want to override label and description as the command description is generic
+ -->
+ <quicklink
+ command="org.eclipse.ui.newWizard(newWizardId=org.eclipse.jdt.ui.wizards.JavaProjectWizard)"
+ description="Create a new Java Eclipse project"
+ label="Create a new Java project"
+ standby="true">
+ </quicklink>
+
+ <!-- Open the Import Existing Project -->
+ <quicklink
+ command="org.eclipse.ui.file.import(importWizardId=org.eclipse.ui.wizards.import.ExternalProject)"
+ description="Import an already existing project into Eclipse"
+ icon="platform:/plugin/org.eclipse.ui/icons/full/wizban/import_wiz.png"
+ label="Import an existing project"
+ standby="true">
+ </quicklink>
+
+ <!-- Cause all New XXX quicklinks to use the wizban/new_wiz image -->
+ <override
+ command="org.eclipse.ui.newWizard*"
+ icon="platform:/plugin/org.eclipse.ui/icons/full/wizban/new_wiz.png"
+ theme="org.eclipse.ui.intro.universal.solstice">
+ </override>
+
+ <!--
+ Use default labelling and icon from showMPC command; importance should
+ cause it to be sorted above other commands
+ -->
+ <quicklink
+ command="org.eclipse.epp.mpc.ui.command.showMarketplaceWizard"
+ importance="high">
+ </quicklink>
+ </extension>
+
+</plugin>
diff --git a/org.eclipse.ui.intro.quicklinks.examples/pom.xml b/org.eclipse.ui.intro.quicklinks.examples/pom.xml
new file mode 100644
index 000000000..5f3a0fd95
--- /dev/null
+++ b/org.eclipse.ui.intro.quicklinks.examples/pom.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (c) 2012, 2016 Eclipse Foundation.
+ All rights reserved. This program and the accompanying materials
+ are made available under the terms of the Eclipse Distribution License v1.0
+ which accompanies this distribution, and is available at
+ http://www.eclipse.org/org/documents/edl-v10.php
+
+ Contributors:
+ Igor Fedorenko - initial implementation
+ Manumitting Technologies Inc - adapted for quicklinks
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <artifactId>eclipse.platform.ua</artifactId>
+ <groupId>eclipse.platform.ua</groupId>
+ <version>4.6.0-SNAPSHOT</version>
+ </parent>
+ <groupId>org.eclipse.ui</groupId>
+ <artifactId>org.eclipse.ui.intro.quicklinks.examples</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <packaging>eclipse-plugin</packaging>
+</project>
diff --git a/org.eclipse.ui.intro.quicklinks/.classpath b/org.eclipse.ui.intro.quicklinks/.classpath
new file mode 100644
index 000000000..eca7bdba8
--- /dev/null
+++ b/org.eclipse.ui.intro.quicklinks/.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/org.eclipse.ui.intro.quicklinks/.project b/org.eclipse.ui.intro.quicklinks/.project
new file mode 100644
index 000000000..3e4abee87
--- /dev/null
+++ b/org.eclipse.ui.intro.quicklinks/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.ui.intro.quicklinks</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/org.eclipse.ui.intro.quicklinks/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.ui.intro.quicklinks/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3eec395cc
--- /dev/null
+++ b/org.eclipse.ui.intro.quicklinks/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,22 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.codeComplete.argumentPrefixes=
+org.eclipse.jdt.core.codeComplete.argumentSuffixes=
+org.eclipse.jdt.core.codeComplete.fieldPrefixes=_
+org.eclipse.jdt.core.codeComplete.fieldSuffixes=
+org.eclipse.jdt.core.codeComplete.localPrefixes=
+org.eclipse.jdt.core.codeComplete.localSuffixes=
+org.eclipse.jdt.core.codeComplete.staticFieldPrefixes=
+org.eclipse.jdt.core.codeComplete.staticFieldSuffixes=
+org.eclipse.jdt.core.codeComplete.staticFinalFieldPrefixes=
+org.eclipse.jdt.core.codeComplete.staticFinalFieldSuffixes=
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/org.eclipse.ui.intro.quicklinks/.settings/org.eclipse.jdt.ui.prefs b/org.eclipse.ui.intro.quicklinks/.settings/org.eclipse.jdt.ui.prefs
new file mode 100644
index 000000000..86a7add84
--- /dev/null
+++ b/org.eclipse.ui.intro.quicklinks/.settings/org.eclipse.jdt.ui.prefs
@@ -0,0 +1,5 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.ui.exception.name=e
+org.eclipse.jdt.ui.gettersetter.use.is=true
+org.eclipse.jdt.ui.keywordthis=false
+org.eclipse.jdt.ui.overrideannotation=true
diff --git a/org.eclipse.ui.intro.quicklinks/META-INF/MANIFEST.MF b/org.eclipse.ui.intro.quicklinks/META-INF/MANIFEST.MF
new file mode 100644
index 000000000..b2af4eabf
--- /dev/null
+++ b/org.eclipse.ui.intro.quicklinks/META-INF/MANIFEST.MF
@@ -0,0 +1,16 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %plugin_name
+Bundle-SymbolicName: org.eclipse.ui.intro.quicklinks;singleton:=true
+Bundle-Version: 1.0.0.qualifier
+Bundle-Vendor: %provider_name
+Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Require-Bundle: org.eclipse.ui.intro;bundle-version="3.4.0",
+ org.eclipse.ui.intro.universal;bundle-version="3.2.0",
+ org.eclipse.ui.workbench,
+ org.eclipse.jface,
+ org.eclipse.ui.forms,
+ org.eclipse.equinox.registry;bundle-version="3.6.100"
+Import-Package: org.osgi.framework;version="1.8.0"
+Bundle-Localization: plugin
+Bundle-ActivationPolicy: lazy
diff --git a/org.eclipse.ui.intro.quicklinks/build.properties b/org.eclipse.ui.intro.quicklinks/build.properties
new file mode 100644
index 000000000..0dc34f783
--- /dev/null
+++ b/org.eclipse.ui.intro.quicklinks/build.properties
@@ -0,0 +1,6 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ plugin.xml,\
+ plugin.properties
diff --git a/org.eclipse.ui.intro.quicklinks/plugin.properties b/org.eclipse.ui.intro.quicklinks/plugin.properties
new file mode 100644
index 000000000..d367388f4
--- /dev/null
+++ b/org.eclipse.ui.intro.quicklinks/plugin.properties
@@ -0,0 +1,13 @@
+###############################################################################
+# Copyright (c) 2016 Manumitting Technologies Inc and others.
+# 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:
+# Manumitting Technologies Inc - initial API and implementation
+###############################################################################
+
+plugin_name = Quicklinks for the Welcome Framework
+provider_name = Eclipse.org
diff --git a/org.eclipse.ui.intro.quicklinks/plugin.xml b/org.eclipse.ui.intro.quicklinks/plugin.xml
new file mode 100644
index 000000000..e7dc842c1
--- /dev/null
+++ b/org.eclipse.ui.intro.quicklinks/plugin.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<!--
+ Copyright (c) 2016 Manumitting Technologies Inc and others.
+ 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:
+ Manumitting Technologies Inc - initial API and implementation
+ -->
+<plugin>
+ <extension-point id="org.eclipse.ui.intro.quicklinks" name="Configure Quicklinks" schema="schema/quicklinks.exsd"/>
+</plugin>
diff --git a/org.eclipse.ui.intro.quicklinks/pom.xml b/org.eclipse.ui.intro.quicklinks/pom.xml
new file mode 100644
index 000000000..f0229a97f
--- /dev/null
+++ b/org.eclipse.ui.intro.quicklinks/pom.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (c) 2012, 2016 Eclipse Foundation.
+ All rights reserved. This program and the accompanying materials
+ are made available under the terms of the Eclipse Distribution License v1.0
+ which accompanies this distribution, and is available at
+ http://www.eclipse.org/org/documents/edl-v10.php
+
+ Contributors:
+ Igor Fedorenko - initial implementation
+ Manumitting Technologies Inc - adapted for quicklinks
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <artifactId>eclipse.platform.ua</artifactId>
+ <groupId>eclipse.platform.ua</groupId>
+ <version>4.6.0-SNAPSHOT</version>
+ </parent>
+ <groupId>org.eclipse.ui</groupId>
+ <artifactId>org.eclipse.ui.intro.quicklinks</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <packaging>eclipse-plugin</packaging>
+</project>
diff --git a/org.eclipse.ui.intro.quicklinks/schema/quicklinks.exsd b/org.eclipse.ui.intro.quicklinks/schema/quicklinks.exsd
new file mode 100644
index 000000000..cf14b5327
--- /dev/null
+++ b/org.eclipse.ui.intro.quicklinks/schema/quicklinks.exsd
@@ -0,0 +1,257 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- Schema file written by PDE -->
+<schema targetNamespace="org.eclipse.ui.intro.quicklinks" xmlns="http://www.w3.org/2001/XMLSchema">
+<annotation>
+ <appinfo>
+ <meta.schema plugin="org.eclipse.ui.intro.quicklinks" id="org.eclipse.ui.intro.quicklinks" name="Quicklinks Configuration"/>
+ </appinfo>
+ <documentation>
+ This extension point is used to configure the Quicklinks Welcome/Intro viewer component. Quicklinks are useful actions to be shown to a user in the Intro/Welcome. The Quicklinks use the Eclipse Core Commands framework (see the &lt;tt&gt;org.eclipse.ui.commands&lt;/tt&gt; extension point), but supports overriding the icon and text to be used for an item.
+
+The Quicklinks is experimental component and is not yet considered API.
+ </documentation>
+ </annotation>
+
+ <element name="extension">
+ <annotation>
+ <appinfo>
+ <meta.element />
+ </appinfo>
+ </annotation>
+ <complexType>
+ <choice minOccurs="1" maxOccurs="unbounded">
+ <element ref="quicklink"/>
+ <element ref="override"/>
+ </choice>
+ <attribute name="point" type="string" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="id" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="name" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ <appinfo>
+ <meta.attribute translatable="true"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="quicklink">
+ <annotation>
+ <documentation>
+ Defines a Quicklink component
+ </documentation>
+ </annotation>
+ <complexType>
+ <attribute name="command" type="string" use="required">
+ <annotation>
+ <documentation>
+ The command identifier to be invoked. The command can also be a serialized command to encode command parameters (see ParameterizedCommand#serialize() for details).
+ </documentation>
+ <appinfo>
+ <meta.attribute kind="identifier" basedOn="org.eclipse.ui.commands/command/@id"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ <attribute name="label" type="string">
+ <annotation>
+ <documentation>
+ The label to be displayed. If unspecified, the command name is used instead.
+ </documentation>
+ <appinfo>
+ <meta.attribute translatable="true"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ <attribute name="description" type="string">
+ <annotation>
+ <documentation>
+ A description for the quicklink. If unspecified, use the command&apos;s description.
+ </documentation>
+ <appinfo>
+ <meta.attribute translatable="true"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ <attribute name="icon" type="string">
+ <annotation>
+ <documentation>
+ The icon to be used for the quicklink. If unspecified, the command&apos;s associated image is used instead.
+ </documentation>
+ <appinfo>
+ <meta.attribute kind="resource"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ <attribute name="importance">
+ <annotation>
+ <documentation>
+ Define the level of importance of this item. If unspecified, defaults to &quot;low&quot;.
+ </documentation>
+ </annotation>
+ <simpleType>
+ <restriction base="string">
+ <enumeration value="high">
+ </enumeration>
+ <enumeration value="medium">
+ </enumeration>
+ <enumeration value="low">
+ </enumeration>
+ </restriction>
+ </simpleType>
+ </attribute>
+ <attribute name="standby" type="boolean">
+ <annotation>
+ <documentation>
+ If true (the default), the Welcome/Intro part should be put into standby mode after executing the command.
+If false, the Welcome/Intro will remain open.
+ </documentation>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="override">
+ <annotation>
+ <documentation>
+ Provide a mechanism for a theme to override the icons used to represent a command in a quicklink.
+ </documentation>
+ </annotation>
+ <complexType>
+ <attribute name="command" type="string" use="required">
+ <annotation>
+ <documentation>
+ The command identifier as referenced in a &amp;lt;quicklink&amp;gt; element. The command can also be a serialized command to encode command parameters (see ParameterizedCommand#serialize() for details). The command may include simple &apos;*&apos; wildcards to match any substring. For example, &lt;code&gt;org.eclipse.ui.newWizard*&lt;/code&gt; will match any &quot;New&quot; wizard definitions.
+ </documentation>
+ <appinfo>
+ <meta.attribute kind="identifier" basedOn="org.eclipse.ui.commands/command/@id"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ <attribute name="theme" type="string" use="required">
+ <annotation>
+ <documentation>
+ The theme identifier. May be a comma-separated set of values.
+ </documentation>
+ <appinfo>
+ <meta.attribute kind="identifier" basedOn="org.eclipse.ui.intro.configExtension/theme/@id"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ <attribute name="icon" type="string" use="required">
+ <annotation>
+ <documentation>
+ The icon to be used for representing this command.
+ </documentation>
+ <appinfo>
+ <meta.attribute kind="resource"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="since"/>
+ </appinfo>
+ <documentation>
+ Quicklinks first appeared in the Eclipse Platform 4.6, part of the Neon release train.
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="examples"/>
+ </appinfo>
+ <documentation>
+ Here is an example of configuring a Quicklink:
+&lt;pre&gt;
+ &lt;extension
+ point=&quot;org.eclipse.ui.intro.quicklinks&quot;&gt;
+ &lt;!-- Reuses command definition label and icons --&gt;
+ &lt;quicklink
+ command=&quot;org.eclipse.epp.mpc.ui.command.showMarketplaceWizard&quot;
+ icon=&quot;icons/mpcdrag.png&quot;&gt;
+ &lt;/quicklink&gt;
+
+ &lt;!-- Invoke a particular new wizard; place the Welcome/Intro in Standby mode on success --&gt;
+ &lt;quicklink
+ command=&quot;org.eclipse.ui.newWizard(newWizardId=org.eclipse.jdt.ui.wizards.JavaProjectWizard)&quot;
+ description=&quot;Create a new Java Eclipse project&quot;
+ label=&quot;Create a new Java project&quot;
+ standby=&quot;true&quot;&gt;
+ &lt;/quicklink&gt;
+
+ &lt;!-- Allow overriding theme and icons for all newWizard-related commands --&gt;
+ &lt;override
+ command=&quot;org.eclipse.ui.newWizard*&quot;
+ icon=&quot;icons/solstice/new-project.png&quot;
+ theme=&quot;org.eclipse.ui.intro.universal.solstice&quot;&gt;
+ &lt;/override&gt;
+ &lt;/extension&gt;
+&lt;/pre&gt;
+&lt;p&gt;
+Quicklinks are shown using the Quicklinks Viewer Component in a &lt;tt&gt;introContent.xml&lt;/tt&gt; definition.
+&lt;/p&gt;
+&lt;pre&gt;
+ &lt;extensionContent id=&quot;quicklinks&quot; name=&quot;Quick Actions&quot; path=&quot;root/extra-group2/anchor&quot;&gt;
+ &lt;contentProvider
+ pluginId=&quot;org.eclipse.ui.intro.quicklinks&quot;
+ class=&quot;org.eclipse.ui.intro.quicklinks.QuicklinksViewer&quot;
+ id=&quot;quick-links&quot;&gt;
+ &lt;/contentProvider&gt;
+ &lt;/extensionContent&gt;
+&lt;/pre&gt;
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="apiinfo"/>
+ </appinfo>
+ <documentation>
+ Quicklinks are still experimental and not yet considered API.
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="implementation"/>
+ </appinfo>
+ <documentation>
+ Quicklinks are still experimental and not yet considered API.
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="copyright"/>
+ </appinfo>
+ <documentation>
+ Copyright (c) 2016 Manumitting Technologies Inc and others.
+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:
+ Manumitting Technologies Inc - initial API and implementation
+ </documentation>
+ </annotation>
+
+</schema>
diff --git a/org.eclipse.ui.intro.quicklinks/src/org/eclipse/ui/intro/quicklinks/FilteringContentProvider.java b/org.eclipse.ui.intro.quicklinks/src/org/eclipse/ui/intro/quicklinks/FilteringContentProvider.java
new file mode 100644
index 000000000..f1c40cde4
--- /dev/null
+++ b/org.eclipse.ui.intro.quicklinks/src/org/eclipse/ui/intro/quicklinks/FilteringContentProvider.java
@@ -0,0 +1,51 @@
+/*******************************************************************************
+ * Copyright (c) 2016 Manumitting Technologies Inc and others.
+ * 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:
+ * Manumitting Technologies Inc - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.ui.intro.quicklinks;
+
+import java.util.Collection;
+import java.util.function.Function;
+import java.util.stream.Stream;
+
+import org.eclipse.jface.viewers.IStructuredContentProvider;
+import org.eclipse.jface.viewers.Viewer;
+
+/**
+ * A structured content provider that first transforms elements with a function.
+ *
+ * @param <O>
+ * the object type
+ */
+public class FilteringContentProvider<O> implements IStructuredContentProvider {
+
+ private Function<Object, O> function;
+
+ public FilteringContentProvider(Function<Object, O> f) {
+ this.function = f;
+ }
+
+ @Override
+ public void dispose() {
+ }
+
+ @Override
+ public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
+ }
+
+ @Override
+ public Object[] getElements(Object inputElement) {
+ if (inputElement instanceof Object[]) {
+ return Stream.of((Object[]) inputElement).map(function).toArray();
+ } else if (inputElement instanceof Collection) {
+ return ((Collection<?>) inputElement).stream().map(function).toArray();
+ }
+ return Stream.of(inputElement).map(function).toArray();
+ }
+}
diff --git a/org.eclipse.ui.intro.quicklinks/src/org/eclipse/ui/intro/quicklinks/QuicklinksViewer.java b/org.eclipse.ui.intro.quicklinks/src/org/eclipse/ui/intro/quicklinks/QuicklinksViewer.java
new file mode 100644
index 000000000..12a3edc19
--- /dev/null
+++ b/org.eclipse.ui.intro.quicklinks/src/org/eclipse/ui/intro/quicklinks/QuicklinksViewer.java
@@ -0,0 +1,394 @@
+/*******************************************************************************
+ * Copyright (c) 2016 Manumitting Technologies Inc and others.
+ * 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:
+ * Manumitting Technologies Inc - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.ui.intro.quicklinks;
+
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.io.UnsupportedEncodingException;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.net.URLEncoder;
+import java.util.ArrayList;
+import java.util.Base64;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Objects;
+import java.util.Optional;
+import java.util.function.Supplier;
+import java.util.regex.Pattern;
+import java.util.stream.Stream;
+
+import org.eclipse.core.commands.CommandManager;
+import org.eclipse.core.commands.ParameterizedCommand;
+import org.eclipse.core.commands.SerializationException;
+import org.eclipse.core.commands.common.NotDefinedException;
+import org.eclipse.core.runtime.FileLocator;
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.IExtensionRegistry;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.viewers.ArrayContentProvider;
+import org.eclipse.jface.viewers.TableViewer;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.graphics.ImageData;
+import org.eclipse.swt.graphics.ImageLoader;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.commands.ICommandImageService;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+import org.eclipse.ui.forms.widgets.Section;
+import org.eclipse.ui.internal.intro.impl.model.AbstractIntroPartImplementation;
+import org.eclipse.ui.internal.intro.impl.model.IntroTheme;
+import org.eclipse.ui.internal.menus.MenuHelper;
+import org.eclipse.ui.intro.config.IIntroContentProvider;
+import org.eclipse.ui.intro.config.IIntroContentProviderSite;
+import org.eclipse.ui.services.IServiceLocator;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.FrameworkUtil;
+
+/**
+ * An Intro content provider that populates a list of frequently-used commands
+ * from an extension point. The appearance of these quicklinks is normally taken
+ * from the command metadata, including the image icon, but can be tailored.
+ * These tailorings can be made optional depending on the current theme.
+ *
+ * This is still experimental and subject to change.
+ */
+public class QuicklinksViewer implements IIntroContentProvider {
+
+ /** Represents the importance of an element */
+ enum Importance {
+ HIGH("high", 0), MEDIUM("medium", 1), LOW("low", 2);
+
+ String id;
+ int level;
+
+ Importance(String text, int importance) {
+ this.id = text;
+ this.level = importance;
+ }
+
+ public static Importance forId(String id) {
+ for (Importance i : values()) {
+ if (i.id.equals(id)) {
+ return i;
+ }
+ }
+ return LOW;
+ }
+ }
+
+ /** Model holding the relevant attributes of a Quicklink element */
+ class Quicklink {
+ String commandSpec;
+ String label;
+ String description;
+ String iconUrl;
+ boolean standby = true;
+ Importance importance = Importance.LOW;
+
+ String bundleSymbolicName;
+ }
+
+ /**
+ * Responsible for retrieving Quicklinks and applying any icon overrides
+ */
+ class ModelReader implements Supplier<Stream<Quicklink>> {
+ private static final String QL_EXT_PT = "org.eclipse.ui.intro.quicklinks"; //$NON-NLS-1$
+ private static final String ELMT_QUICKLINK = "quicklink"; //$NON-NLS-1$
+ private static final String ATT_COMMAND = "command"; //$NON-NLS-1$
+ private static final String ATT_LABEL = "label"; //$NON-NLS-1$
+ private static final String ATT_DESCRIPTION = "description"; //$NON-NLS-1$
+ private static final String ATT_ICON = "icon"; //$NON-NLS-1$
+ private static final String ATT_IMPORTANCE = "importance"; //$NON-NLS-1$
+ private static final String ATT_STANDBY = "standby"; //$NON-NLS-1$
+ private static final String ELMT_OVERRIDE = "override"; //$NON-NLS-1$
+ private static final String ATT_THEME = "theme"; //$NON-NLS-1$
+
+ private List<Quicklink> quicklinks = new ArrayList<>();
+
+ public Stream<Quicklink> get() {
+ CommandManager manager = locator.getService(CommandManager.class);
+
+ for (IConfigurationElement ce : getExtensionRegistry().getConfigurationElementsFor(QL_EXT_PT)) {
+ if (!ELMT_QUICKLINK.equals(ce.getName())) {
+ continue;
+ }
+ String commandSpec = ce.getAttribute(ATT_COMMAND);
+ try {
+ ParameterizedCommand pc = manager.deserialize(commandSpec);
+ if (pc != null && pc.getCommand().isDefined()) {
+ Quicklink ql = new Quicklink();
+ ql.bundleSymbolicName = ce.getContributor().getName();
+ ql.commandSpec = commandSpec;
+ ql.label = Optional.ofNullable(ce.getAttribute(ATT_LABEL)).orElse(pc.getCommand().getName());
+ ql.description = Optional.ofNullable(ce.getAttribute(ATT_DESCRIPTION))
+ .orElse(pc.getCommand().getDescription());
+ ql.iconUrl = QuicklinksViewer.this.getImageURL(ce, ATT_ICON, commandSpec);
+ if (ce.getAttribute(ATT_IMPORTANCE) != null) {
+ ql.importance = Importance.forId(ce.getAttribute(ATT_IMPORTANCE));
+ }
+ if (ce.getAttribute(ATT_STANDBY) != null) {
+ ql.standby = Boolean.valueOf(ce.getAttribute(ATT_STANDBY));
+ }
+ quicklinks.add(ql);
+ }
+ } catch (NotDefinedException | SerializationException e) {
+ /* skip */
+ System.err.printf("Skipping '%s': %s\n", commandSpec, e);
+ }
+ }
+
+ for (IConfigurationElement ce : getExtensionRegistry().getConfigurationElementsFor(QL_EXT_PT)) {
+ if (!ELMT_OVERRIDE.equals(ce.getName())) {
+ continue;
+ }
+ String theme = ce.getAttribute(ATT_THEME);
+ String commandSpecPattern = ce.getAttribute(ATT_COMMAND);
+ String icon = ce.getAttribute(ATT_ICON);
+ if (theme != null && icon != null && Objects.equals(theme, getCurrentThemeId()) && commandSpecPattern != null) {
+ findMatchingQuicklinks(commandSpecPattern)
+ .forEach(ql -> ql.iconUrl = QuicklinksViewer.this.getImageURL(ce, ATT_ICON, null));
+ }
+ }
+ return quicklinks.stream();
+ }
+
+ private Stream<Quicklink> findMatchingQuicklinks(String commandSpecPattern) {
+ commandSpecPattern = commandSpecPattern.replace(".", "\\.").replace("(", "\\(").replace(")", "\\)")
+ .replace("*", ".*");
+ final Pattern pattern = Pattern.compile(commandSpecPattern);
+ return quicklinks.stream().filter(ql -> pattern.matcher(ql.commandSpec).matches());
+ }
+ }
+
+ /** Source: http://stackoverflow.com/a/417184 */
+ private static final int MAX_URL_LENGTH = 2083;
+
+ private IIntroContentProviderSite site;
+ private IServiceLocator locator;
+ private Map<String, Long> bundleIds;
+ private Bundle[] bundles;
+
+ public void init(IIntroContentProviderSite site) {
+ this.site = site;
+ // IIntroContentProviderSite should provide services.
+ if (site instanceof AbstractIntroPartImplementation) {
+ this.locator = ((AbstractIntroPartImplementation) site).getIntroPart().getIntroSite();
+ } else {
+ this.locator = PlatformUI.getWorkbench();
+ }
+ }
+
+ public String getCurrentThemeId() {
+ if (site instanceof AbstractIntroPartImplementation) {
+ IntroTheme theme = ((AbstractIntroPartImplementation) site).getModel().getTheme();
+ return theme.getId();
+ }
+ return null;
+ }
+
+ public IExtensionRegistry getExtensionRegistry() {
+ return locator.getService(IExtensionRegistry.class);
+ }
+
+ public void createContent(String id, PrintWriter out) {
+ // Content is already embedded within a <div id="...">
+ getQuicklinks().forEach(ql -> {
+ try {
+ // ah how lovely to embed HTML in code
+ String urlEncodedCommand = URLEncoder.encode(ql.commandSpec, "UTF-8");
+ out.append("<a class='content-link' id='");
+ out.append(asCSSId(ql.commandSpec));
+ out.append("' ");
+ out.append(" href='http://org.eclipse.ui.intro/execute?command=");
+ out.append(urlEncodedCommand);
+ out.append("&standby=");
+ out.append(Boolean.toString(ql.standby));
+ out.append("'>");
+ if (ql.iconUrl != null) {
+ out.append("<img class='background-image' src='").append(ql.iconUrl).append("'>");
+ }
+ out.append("\n<div class='link-extra-div'></div>\n"); // UNKNOWN
+ out.append("<span class='link-label'>");
+ out.append(ql.label);
+ out.append("</span>");
+ if (ql.description != null) {
+ out.append("\n<p><span class='text'>");
+ out.append(ql.description);
+ out.append("</span></p>");
+ }
+ out.append("</a>");
+ } catch (UnsupportedEncodingException e) {
+ e.printStackTrace();
+ }
+ });
+ }
+
+ private String asCSSId(String commandSpec) {
+ int indexOf = commandSpec.indexOf('(');
+ if (indexOf > 0) {
+ commandSpec = commandSpec.substring(0, indexOf);
+ }
+ return commandSpec.replace('.', '_');
+ }
+
+ /**
+ * @return URL to image, suitable for using in an external browser; may be a
+ * <code>data:</code> URL; may be null
+ */
+ private String getImageURL(IConfigurationElement ce, String attr, String commandId) {
+ String iconURL = MenuHelper.getIconURI(ce, attr);
+ if (iconURL != null) {
+ return asBrowserURL(iconURL);
+ }
+
+ if (commandId == null) {
+ return null;
+ }
+ ICommandImageService images = locator.getService(ICommandImageService.class);
+ if (images == null) {
+ return null;
+ }
+ ImageDescriptor descriptor = images.getImageDescriptor(commandId);
+ iconURL = MenuHelper.getImageUrl(descriptor);
+ if (iconURL != null) {
+ return asBrowserURL(iconURL);
+ }
+ return asDataURL(descriptor);
+ }
+
+ private String asBrowserURL(String iconURL) {
+ if (iconURL.startsWith("file:") || iconURL.startsWith("http:")) {
+ return iconURL;
+ }
+ try {
+ URL original = new URL(iconURL);
+ URL toLocal = FileLocator.toFileURL(original);
+ if (!toLocal.sameFile(original)) {
+ return toLocal.toString();
+ }
+ } catch (IOException e1) {
+ /* ignore */
+ }
+
+ // extract content
+ try {
+ return asDataURL(ImageDescriptor.createFromURL(new URL(iconURL)));
+ } catch (MalformedURLException e) {
+ // should probably log this
+ return iconURL;
+ }
+ }
+
+ /**
+ * Write out the image as a data: URL if possible or to the file-system.
+ *
+ * @param descriptor
+ * @return URL with the resulting image
+ */
+ private String asDataURL(ImageDescriptor descriptor) {
+ if (descriptor == null) {
+ return null;
+ }
+ ImageData data = descriptor.getImageData();
+ if (data == null) {
+ return null;
+ }
+ ImageLoader loader = new ImageLoader();
+ loader.data = new ImageData[] { data };
+
+ ByteArrayOutputStream output = new ByteArrayOutputStream();
+ loader.save(output, SWT.IMAGE_PNG);
+ if (output.size() * 4 / 3 < MAX_URL_LENGTH) {
+ // You'd think there was a more efficient way to do this...
+ return "data:image/png;base64," + Base64.getUrlEncoder().encodeToString(output.toByteArray());
+ }
+ try {
+ File tempFile = File.createTempFile("qlink", "png");
+ FileOutputStream fos = new FileOutputStream(tempFile);
+ fos.write(output.toByteArray());
+ fos.close();
+ tempFile.deleteOnExit();
+ return tempFile.toURI().toString();
+ } catch (IOException e) {
+ e.printStackTrace();
+ return null;
+ }
+ }
+
+ public void createContent(String id, Composite parent, FormToolkit toolkit) {
+ Section section = toolkit.createSection(parent, Section.EXPANDED);
+ TableViewer tableViewer = new TableViewer(toolkit.createTable(section, SWT.FULL_SELECTION));
+ tableViewer.setLabelProvider(new URLLabelProvider() {
+ @Override
+ public String getText(Object element) {
+ if (element instanceof Quicklink) {
+ return ((Quicklink) element).label;
+ }
+ return super.getText(element);
+ }
+
+ @Override
+ public Image getImage(Object element) {
+ if (element instanceof Quicklink) {
+ return super.getImage(((Quicklink) element).iconUrl);
+ }
+ return super.getImage(element);
+ }
+ });
+ tableViewer.setContentProvider(new ArrayContentProvider());
+ tableViewer.setInput(getQuicklinks().toArray());
+ }
+
+ private Stream<Quicklink> getQuicklinks() {
+ return new ModelReader().get().sorted(this::compareQuicklinks);
+ }
+
+ public void dispose() {
+ }
+
+ private int compareQuicklinks(Quicklink a, Quicklink b) {
+ int impA = a.importance.level;
+ int impB = b.importance.level;
+ if (impA != impB) {
+ return impA - impB;
+ }
+ long diff = getRank(a) - getRank(b);
+ if (diff > 0) {
+ return 1;
+ }
+ if (diff < 0) {
+ return -1;
+ }
+ return 0;
+ }
+
+ private long getRank(Quicklink ql) {
+ if (bundleIds == null) {
+ Bundle bundle = FrameworkUtil.getBundle(getClass());
+ bundleIds = new HashMap<>();
+ bundles = bundle.getBundleContext().getBundles();
+ }
+ return bundleIds.computeIfAbsent(ql.bundleSymbolicName, bsn -> {
+ for (Bundle b : bundles) {
+ if (bsn.equals(b.getSymbolicName()) && (b.getState() & (Bundle.INSTALLED | Bundle.UNINSTALLED)) == 0) {
+ return b.getBundleId();
+ }
+ }
+ return Long.MAX_VALUE;
+ });
+ }
+}
diff --git a/org.eclipse.ui.intro.quicklinks/src/org/eclipse/ui/intro/quicklinks/URLLabelProvider.java b/org.eclipse.ui.intro.quicklinks/src/org/eclipse/ui/intro/quicklinks/URLLabelProvider.java
new file mode 100644
index 000000000..20ec3abd1
--- /dev/null
+++ b/org.eclipse.ui.intro.quicklinks/src/org/eclipse/ui/intro/quicklinks/URLLabelProvider.java
@@ -0,0 +1,60 @@
+/*******************************************************************************
+ * Copyright (c) 2016 Manumitting Technologies Inc and others.
+ * 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:
+ * Manumitting Technologies Inc - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.ui.intro.quicklinks;
+
+import java.net.MalformedURLException;
+import java.net.URL;
+
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.resource.JFaceResources;
+import org.eclipse.jface.resource.LocalResourceManager;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.swt.graphics.Image;
+
+/**
+ * Simple label provider that knows how to load images from a URL.
+ */
+public class URLLabelProvider extends LabelProvider {
+ private LocalResourceManager registry;
+
+ public URLLabelProvider() {
+ this.registry = new LocalResourceManager(JFaceResources.getResources());
+ }
+
+ @Override
+ public Image getImage(Object element) {
+ try {
+ ImageDescriptor descriptor = null;
+ if (element instanceof String) {
+ descriptor = ImageDescriptor.createFromURL(new URL((String) element));
+ } else if (element instanceof URL) {
+ descriptor = ImageDescriptor.createFromURL((URL) element);
+ }
+ if (descriptor == null) {
+ return null;
+ }
+ return registry.createImage(descriptor);
+ } catch (MalformedURLException e) {
+ return null;
+ }
+ }
+
+ @Override
+ public String getText(Object element) {
+ return (String) element;
+ }
+
+ @Override
+ public void dispose() {
+ registry.dispose();
+ super.dispose();
+ }
+}
diff --git a/pom.xml b/pom.xml
index f25fa89a4..0b3133a3d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -61,5 +61,7 @@
<module>org.eclipse.ui.cheatsheets</module>
<module>org.eclipse.ui.intro</module>
<module>org.eclipse.ui.intro.universal</module>
+ <module>org.eclipse.ui.intro.quicklinks</module>
+ <module>org.eclipse.ui.intro.quicklinks.examples</module>
</modules>
</project>

Back to the top