Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrschnekenbu2012-05-30 08:05:37 +0000
committerrschnekenbu2012-05-30 08:05:37 +0000
commit971904701eeeaf445213a56daa1e34d91c4daa47 (patch)
treefb17d0526a0a2513ec19854348954f8e4703a8f9 /plugins/infra/discovery
parent4d4b7caf44a8e0a587a2f8b3f34594d693d70660 (diff)
downloadorg.eclipse.papyrus-971904701eeeaf445213a56daa1e34d91c4daa47.tar.gz
org.eclipse.papyrus-971904701eeeaf445213a56daa1e34d91c4daa47.tar.xz
org.eclipse.papyrus-971904701eeeaf445213a56daa1e34d91c4daa47.zip
379570: [General] Papyrus shall provide an interface to easily install additional components
https://bugs.eclipse.org/bugs/show_bug.cgi?id=379570 - Move from 'incoming' to target layer: 'infra/discovery'
Diffstat (limited to 'plugins/infra/discovery')
-rw-r--r--plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui.menu/.classpath7
-rw-r--r--plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui.menu/.project34
-rw-r--r--plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui.menu/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui.menu/META-INF/MANIFEST.MF15
-rw-r--r--plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui.menu/about.html106
-rw-r--r--plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui.menu/build.properties12
-rw-r--r--plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui.menu/doc/ToDo.txt7
-rw-r--r--plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui.menu/icons/Papyrus_16x16.gifbin0 -> 561 bytes
-rw-r--r--plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui.menu/icons/Papyrus_32x32_t.gifbin0 -> 1264 bytes
-rw-r--r--plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui.menu/intro/css/overview.css2
-rw-r--r--plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui.menu/intro/css/overview.properties13
-rw-r--r--plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui.menu/intro/images/banner-discovery-papyrus.pngbin0 -> 5682 bytes
-rw-r--r--plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui.menu/intro/images/banner-discovery.pngbin0 -> 4291 bytes
-rw-r--r--plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui.menu/intro/papyrusDiscovery.xml11
-rw-r--r--plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui.menu/plugin.pdoc4
-rw-r--r--plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui.menu/plugin.properties12
-rw-r--r--plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui.menu/plugin.xml59
-rw-r--r--plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui.menu/src/org/eclipse/papyrus/infra/discovery/ui/menu/Activator.java50
-rw-r--r--plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui.menu/src/org/eclipse/papyrus/infra/discovery/ui/menu/handler/PapyrusDiscoveryAction.java33
-rw-r--r--plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui.menu/src/org/eclipse/papyrus/infra/discovery/ui/menu/handler/PapyrusDiscoveryHandler.java38
-rw-r--r--plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/.classpath7
-rw-r--r--plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/.project28
-rw-r--r--plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/.settings/org.eclipse.jdt.core.prefs8
-rw-r--r--plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/META-INF/MANIFEST.MF31
-rw-r--r--plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/about.html106
-rw-r--r--plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/build.properties16
-rw-r--r--plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/icons/full/etool16/find-clear-disabled.gifbin0 -> 314 bytes
-rw-r--r--plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/icons/full/etool16/find-clear.gifbin0 -> 322 bytes
-rw-r--r--plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/icons/full/obj16/message_info.gifbin0 -> 267 bytes
-rw-r--r--plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/icons/full/ovr32/incubation.gifbin0 -> 1034 bytes
-rw-r--r--plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/icons/full/ovr32/message_warning.gifbin0 -> 591 bytes
-rw-r--r--plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/icons/full/wizban/banner-discovery-papyrus.pngbin0 -> 5682 bytes
-rw-r--r--plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/icons/full/wizban/banner-discovery.pngbin0 -> 4291 bytes
-rw-r--r--plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/plugin.pdoc4
-rw-r--r--plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/plugin.properties12
-rw-r--r--plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/src/org/eclipse/papyrus/infra/discovery/ui/Activator.java65
-rw-r--r--plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/src/org/eclipse/papyrus/infra/discovery/ui/internal/common/CommonImages.java89
-rw-r--r--plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/src/org/eclipse/papyrus/infra/discovery/ui/internal/common/CommonThemes.java26
-rw-r--r--plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/src/org/eclipse/papyrus/infra/discovery/ui/internal/common/DiscoveryImages.java62
-rw-r--r--plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/src/org/eclipse/papyrus/infra/discovery/ui/internal/common/DiscoveryUiUtil.java132
-rw-r--r--plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/src/org/eclipse/papyrus/infra/discovery/ui/internal/common/GradientCanvas.java351
-rw-r--r--plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/src/org/eclipse/papyrus/infra/discovery/ui/internal/common/GradientToolTip.java89
-rw-r--r--plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/src/org/eclipse/papyrus/infra/discovery/ui/internal/common/Installer.java41
-rw-r--r--plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/src/org/eclipse/papyrus/infra/discovery/ui/internal/common/NotificationPopupColors.java190
-rw-r--r--plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/src/org/eclipse/papyrus/infra/discovery/ui/internal/common/OverviewToolTip.java217
-rw-r--r--plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/src/org/eclipse/papyrus/infra/discovery/ui/internal/common/PrepareInstallProfileJob.java382
-rw-r--r--plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/src/org/eclipse/papyrus/infra/discovery/ui/internal/common/SelectionProviderAdapter.java80
-rw-r--r--plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/src/org/eclipse/papyrus/infra/discovery/ui/internal/common/WorkbenchUtil.java71
-rw-r--r--plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/src/org/eclipse/papyrus/infra/discovery/ui/internal/viewer/DiscoveryCategoryComparator.java55
-rw-r--r--plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/src/org/eclipse/papyrus/infra/discovery/ui/internal/wizards/DiscoveryWizardMainPage.java103
-rw-r--r--plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/src/org/eclipse/papyrus/infra/discovery/ui/internal/wizards/Messages.java109
-rw-r--r--plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/src/org/eclipse/papyrus/infra/discovery/ui/internal/wizards/messages.properties51
-rw-r--r--plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/src/org/eclipse/papyrus/infra/discovery/ui/viewer/AvailabilityUpdater.java181
-rw-r--r--plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/src/org/eclipse/papyrus/infra/discovery/ui/viewer/DiscoveryContentProvider.java43
-rw-r--r--plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/src/org/eclipse/papyrus/infra/discovery/ui/viewer/DiscoveryDefinitionBrowser.java47
-rw-r--r--plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/src/org/eclipse/papyrus/infra/discovery/ui/viewer/DiscoveryViewer.java1505
-rw-r--r--plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/src/org/eclipse/papyrus/infra/discovery/ui/viewer/InstallationStatusUpdater.java78
-rw-r--r--plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/src/org/eclipse/papyrus/infra/discovery/ui/wizards/DiscoveryComponent.java86
-rw-r--r--plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/src/org/eclipse/papyrus/infra/discovery/ui/wizards/DiscoveryWizard.java90
-rw-r--r--plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/src/org/eclipse/papyrus/infra/discovery/ui/wizards/Messages.java38
-rw-r--r--plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/src/org/eclipse/papyrus/infra/discovery/ui/wizards/messages.properties14
-rw-r--r--plugins/infra/discovery/org.eclipse.papyrus.infra.discovery/.classpath7
-rw-r--r--plugins/infra/discovery/org.eclipse.papyrus.infra.discovery/.project34
-rw-r--r--plugins/infra/discovery/org.eclipse.papyrus.infra.discovery/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--plugins/infra/discovery/org.eclipse.papyrus.infra.discovery/META-INF/MANIFEST.MF16
-rw-r--r--plugins/infra/discovery/org.eclipse.papyrus.infra.discovery/about.html106
-rw-r--r--plugins/infra/discovery/org.eclipse.papyrus.infra.discovery/build.properties22
-rw-r--r--plugins/infra/discovery/org.eclipse.papyrus.infra.discovery/model/discovery.ecore81
-rw-r--r--plugins/infra/discovery/org.eclipse.papyrus.infra.discovery/model/discovery.genmodel64
-rw-r--r--plugins/infra/discovery/org.eclipse.papyrus.infra.discovery/plugin.pdoc4
-rw-r--r--plugins/infra/discovery/org.eclipse.papyrus.infra.discovery/plugin.properties12
-rw-r--r--plugins/infra/discovery/org.eclipse.papyrus.infra.discovery/plugin.xml26
-rw-r--r--plugins/infra/discovery/org.eclipse.papyrus.infra.discovery/src-gen/org/eclipse/papyrus/infra/discovery/Activator.java97
-rw-r--r--plugins/infra/discovery/org.eclipse.papyrus.infra.discovery/src-gen/org/eclipse/papyrus/infra/discovery/Category.java190
-rw-r--r--plugins/infra/discovery/org.eclipse.papyrus.infra.discovery/src-gen/org/eclipse/papyrus/infra/discovery/DiscoveryDefinition.java69
-rw-r--r--plugins/infra/discovery/org.eclipse.papyrus.infra.discovery/src-gen/org/eclipse/papyrus/infra/discovery/DiscoveryFactory.java97
-rw-r--r--plugins/infra/discovery/org.eclipse.papyrus.infra.discovery/src-gen/org/eclipse/papyrus/infra/discovery/DiscoveryPackage.java1254
-rw-r--r--plugins/infra/discovery/org.eclipse.papyrus.infra.discovery/src-gen/org/eclipse/papyrus/infra/discovery/Group.java60
-rw-r--r--plugins/infra/discovery/org.eclipse.papyrus.infra.discovery/src-gen/org/eclipse/papyrus/infra/discovery/InstallableComponent.java451
-rw-r--r--plugins/infra/discovery/org.eclipse.papyrus.infra.discovery/src-gen/org/eclipse/papyrus/infra/discovery/Message.java117
-rw-r--r--plugins/infra/discovery/org.eclipse.papyrus.infra.discovery/src-gen/org/eclipse/papyrus/infra/discovery/Overview.java115
-rw-r--r--plugins/infra/discovery/org.eclipse.papyrus.infra.discovery/src-gen/org/eclipse/papyrus/infra/discovery/Severity.java218
-rw-r--r--plugins/infra/discovery/org.eclipse.papyrus.infra.discovery/src-gen/org/eclipse/papyrus/infra/discovery/impl/CategoryImpl.java476
-rw-r--r--plugins/infra/discovery/org.eclipse.papyrus.infra.discovery/src-gen/org/eclipse/papyrus/infra/discovery/impl/DiscoveryDefinitionImpl.java199
-rw-r--r--plugins/infra/discovery/org.eclipse.papyrus.infra.discovery/src-gen/org/eclipse/papyrus/infra/discovery/impl/DiscoveryFactoryImpl.java211
-rw-r--r--plugins/infra/discovery/org.eclipse.papyrus.infra.discovery/src-gen/org/eclipse/papyrus/infra/discovery/impl/DiscoveryPackageImpl.java662
-rw-r--r--plugins/infra/discovery/org.eclipse.papyrus.infra.discovery/src-gen/org/eclipse/papyrus/infra/discovery/impl/GroupImpl.java173
-rw-r--r--plugins/infra/discovery/org.eclipse.papyrus.infra.discovery/src-gen/org/eclipse/papyrus/infra/discovery/impl/InstallableComponentImpl.java1016
-rw-r--r--plugins/infra/discovery/org.eclipse.papyrus.infra.discovery/src-gen/org/eclipse/papyrus/infra/discovery/impl/MessageImpl.java282
-rw-r--r--plugins/infra/discovery/org.eclipse.papyrus.infra.discovery/src-gen/org/eclipse/papyrus/infra/discovery/impl/OverviewImpl.java281
-rw-r--r--plugins/infra/discovery/org.eclipse.papyrus.infra.discovery/src-gen/org/eclipse/papyrus/infra/discovery/util/DiscoveryAdapterFactory.java220
-rw-r--r--plugins/infra/discovery/org.eclipse.papyrus.infra.discovery/src-gen/org/eclipse/papyrus/infra/discovery/util/DiscoverySwitch.java225
92 files changed, 11609 insertions, 0 deletions
diff --git a/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui.menu/.classpath b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui.menu/.classpath
new file mode 100644
index 00000000000..2d1a4302f04
--- /dev/null
+++ b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui.menu/.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/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui.menu/.project b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui.menu/.project
new file mode 100644
index 00000000000..09edef3d28e
--- /dev/null
+++ b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui.menu/.project
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.infra.discovery.ui.menu</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>
+ <buildCommand>
+ <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
+ </natures>
+</projectDescription>
diff --git a/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui.menu/.settings/org.eclipse.jdt.core.prefs b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui.menu/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 00000000000..44217f8c068
--- /dev/null
+++ b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui.menu/.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.5
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.5
diff --git a/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui.menu/META-INF/MANIFEST.MF b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui.menu/META-INF/MANIFEST.MF
new file mode 100644
index 00000000000..875f7284e04
--- /dev/null
+++ b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui.menu/META-INF/MANIFEST.MF
@@ -0,0 +1,15 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.papyrus.infra.discovery.ui.menu;singleton:=true
+Bundle-Version: 0.9.0.qualifier
+Bundle-Activator: org.eclipse.papyrus.infra.discovery.ui.menu.Activator
+Bundle-Vendor: %providerName
+Require-Bundle: org.eclipse.ui;bundle-version="3.8.0",
+ org.eclipse.core.runtime;bundle-version="3.8.0",
+ org.eclipse.papyrus.infra.discovery.ui;bundle-version="0.9.0"
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Bundle-ActivationPolicy: lazy
+Bundle-Localization: plugin
+Export-Package: org.eclipse.papyrus.infra.discovery.ui.menu,
+ org.eclipse.papyrus.infra.discovery.ui.menu.handler
diff --git a/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui.menu/about.html b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui.menu/about.html
new file mode 100644
index 00000000000..670d10856a8
--- /dev/null
+++ b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui.menu/about.html
@@ -0,0 +1,106 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
+<title>Eclipse Foundation Software User Agreement</title>
+</head>
+
+<body lang="EN-US">
+<h2>Eclipse Foundation Software User Agreement</h2>
+<p>April 14, 2010</p>
+
+<h3>Usage Of Content</h3>
+
+<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
+ (COLLECTIVELY &quot;CONTENT&quot;). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
+ CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
+ OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
+ NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
+ CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
+
+<h3>Applicable Licenses</h3>
+
+<p>Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0
+ (&quot;EPL&quot;). A copy of the EPL is provided with this Content and is also available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+ For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse Foundation source code
+ repository (&quot;Repository&quot;) in software modules (&quot;Modules&quot;) and made available as downloadable archives (&quot;Downloads&quot;).</p>
+
+<ul>
+ <li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content. Typical modules may include plug-ins (&quot;Plug-ins&quot;), plug-in fragments (&quot;Fragments&quot;), and features (&quot;Features&quot;).</li>
+ <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java&trade; ARchive) in a directory named &quot;plugins&quot;.</li>
+ <li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material. Each Feature may be packaged as a sub-directory in a directory named &quot;features&quot;. Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of the Plug-ins
+ and/or Fragments associated with that Feature.</li>
+ <li>Features may also include other Features (&quot;Included Features&quot;). Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of Included Features.</li>
+</ul>
+
+<p>The terms and conditions governing Plug-ins and Fragments should be contained in files named &quot;about.html&quot; (&quot;Abouts&quot;). The terms and conditions governing Features and
+Included Features should be contained in files named &quot;license.html&quot; (&quot;Feature Licenses&quot;). Abouts and Feature Licenses may be located in any directory of a Download or Module
+including, but not limited to the following locations:</p>
+
+<ul>
+ <li>The top-level (root) directory</li>
+ <li>Plug-in and Fragment directories</li>
+ <li>Inside Plug-ins and Fragments packaged as JARs</li>
+ <li>Sub-directories of the directory named &quot;src&quot; of certain Plug-ins</li>
+ <li>Feature directories</li>
+</ul>
+
+<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Provisioning Technology (as defined below), you must agree to a license (&quot;Feature Update License&quot;) during the
+installation process. If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or
+inform you where you can locate them. Feature Update Licenses may be found in the &quot;license&quot; property of files named &quot;feature.properties&quot; found within a Feature.
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
+that directory.</p>
+
+<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE
+OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
+
+<ul>
+ <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
+ <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
+ <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
+ <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
+ <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
+</ul>
+
+<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License is provided, please
+contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
+
+
+<h3>Use of Provisioning Technology</h3>
+
+<p>The Eclipse Foundation makes available provisioning software, examples of which include, but are not limited to, p2 and the Eclipse
+ Update Manager (&quot;Provisioning Technology&quot;) for the purpose of allowing users to install software, documentation, information and/or
+ other materials (collectively &quot;Installable Software&quot;). This capability is provided with the intent of allowing such users to
+ install, extend and update Eclipse-based products. Information about packaging Installable Software is available at <a
+ href="http://eclipse.org/equinox/p2/repository_packaging.html">http://eclipse.org/equinox/p2/repository_packaging.html</a>
+ (&quot;Specification&quot;).</p>
+
+<p>You may use Provisioning Technology to allow other parties to install Installable Software. You shall be responsible for enabling the
+ applicable license agreements relating to the Installable Software to be presented to, and accepted by, the users of the Provisioning Technology
+ in accordance with the Specification. By using Provisioning Technology in such a manner and making it available in accordance with the
+ Specification, you further acknowledge your agreement to, and the acquisition of all necessary rights to permit the following:</p>
+
+<ol>
+ <li>A series of actions may occur (&quot;Provisioning Process&quot;) in which a user may execute the Provisioning Technology
+ on a machine (&quot;Target Machine&quot;) with the intent of installing, extending or updating the functionality of an Eclipse-based
+ product.</li>
+ <li>During the Provisioning Process, the Provisioning Technology may cause third party Installable Software or a portion thereof to be
+ accessed and copied to the Target Machine.</li>
+ <li>Pursuant to the Specification, you will provide to the user the terms and conditions that govern the use of the Installable
+ Software (&quot;Installable Software Agreement&quot;) and such Installable Software Agreement shall be accessed from the Target
+ Machine in accordance with the Specification. Such Installable Software Agreement must inform the user of the terms and conditions that govern
+ the Installable Software and must solicit acceptance by the end user in the manner prescribed in such Installable Software Agreement. Upon such
+ indication of agreement by the user, the provisioning Technology will complete installation of the Installable Software.</li>
+</ol>
+
+<h3>Cryptography</h3>
+
+<p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
+ another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
+ possession, or use, and re-export of encryption software, to see if this is permitted.</p>
+
+<p><small>Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.</small></p>
+</body>
+</html> \ No newline at end of file
diff --git a/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui.menu/build.properties b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui.menu/build.properties
new file mode 100644
index 00000000000..765e4128239
--- /dev/null
+++ b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui.menu/build.properties
@@ -0,0 +1,12 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ about.html,\
+ doc/,\
+ icons/,\
+ intro/,\
+ plugin.xml,\
+ plugin.properties
+src.includes = about.html,\
+ plugin.pdoc
diff --git a/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui.menu/doc/ToDo.txt b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui.menu/doc/ToDo.txt
new file mode 100644
index 00000000000..5bd6c72e769
--- /dev/null
+++ b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui.menu/doc/ToDo.txt
@@ -0,0 +1,7 @@
+Trucs a faire:
+- voir comment chaque feature additionnelle peut proposer un petit texte, une petite doc à cet endroit :
+- - cela devrait permettre de faire de facon séparée la construction de chaque external composant
+ - - il faut donc un point d'entrée unique pour ces sous paragraphes :
+ - - une icone
+ - - un texte descriptif
+ - - what else ? \ No newline at end of file
diff --git a/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui.menu/icons/Papyrus_16x16.gif b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui.menu/icons/Papyrus_16x16.gif
new file mode 100644
index 00000000000..8a31f458379
--- /dev/null
+++ b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui.menu/icons/Papyrus_16x16.gif
Binary files differ
diff --git a/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui.menu/icons/Papyrus_32x32_t.gif b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui.menu/icons/Papyrus_32x32_t.gif
new file mode 100644
index 00000000000..50cd9a142ee
--- /dev/null
+++ b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui.menu/icons/Papyrus_32x32_t.gif
Binary files differ
diff --git a/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui.menu/intro/css/overview.css b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui.menu/intro/css/overview.css
new file mode 100644
index 00000000000..92b79909e0c
--- /dev/null
+++ b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui.menu/intro/css/overview.css
@@ -0,0 +1,2 @@
+a#discovery img { background-image : url(../images/banner-discovery.png); }
+a#discovery:hover img { background-image : url(../images/banner-discovery.png); } \ No newline at end of file
diff --git a/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui.menu/intro/css/overview.properties b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui.menu/intro/css/overview.properties
new file mode 100644
index 00000000000..074fa3c591f
--- /dev/null
+++ b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui.menu/intro/css/overview.properties
@@ -0,0 +1,13 @@
+###############################################################################
+# Copyright (c) 2010 Obeo 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:
+# Obeo Corporation - initial API and implementation
+# CEA LIST - adaptation to papyrus components
+###############################################################################
+overview.discovery.link-icon = intro/images/banner-discovery-papyrus.png
+overview.discovery.hover-icon = intro/images/banner-discovery-papyrus.png
diff --git a/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui.menu/intro/images/banner-discovery-papyrus.png b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui.menu/intro/images/banner-discovery-papyrus.png
new file mode 100644
index 00000000000..05a928b7939
--- /dev/null
+++ b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui.menu/intro/images/banner-discovery-papyrus.png
Binary files differ
diff --git a/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui.menu/intro/images/banner-discovery.png b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui.menu/intro/images/banner-discovery.png
new file mode 100644
index 00000000000..cc4b2cfd737
--- /dev/null
+++ b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui.menu/intro/images/banner-discovery.png
Binary files differ
diff --git a/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui.menu/intro/papyrusDiscovery.xml b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui.menu/intro/papyrusDiscovery.xml
new file mode 100644
index 00000000000..d1ba28d69db
--- /dev/null
+++ b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui.menu/intro/papyrusDiscovery.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<introContent>
+ <!-- Extension to the SDK Overview Page. -->
+ <extensionContent id="org.eclipse.papyrus.infra.discovery" name="Install Papyrus Additional Components" alt-style="css/overview.properties" style="css/overview.css" path="overview/@">
+ <group id="papyrus-group" style-id="content-group">
+ <link style-id="content-link" label="Install More Papyrus Components" url="http://org.eclipse.ui.intro/runAction?pluginId=org.eclipse.papyrus.infra.discovery.ui.menu&amp;class=org.eclipse.papyrus.infra.discovery.ui.menu.handler.PapyrusDiscoveryAction" id="papyrusDiscovery">
+ <text>Select here if you wish to install additional components for Papyrus (new languages, new capabilities, etc.)</text>
+ </link>
+ </group>
+ </extensionContent>
+</introContent>
diff --git a/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui.menu/plugin.pdoc b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui.menu/plugin.pdoc
new file mode 100644
index 00000000000..e43e88a21c6
--- /dev/null
+++ b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui.menu/plugin.pdoc
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<doc:Documentation xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:doc="http://www.eclipse.org/papyrus/documentation/plugin/documentation" description="This plugin contributes to the workbench, in order to have access to the papyrus discovery interface.">
+ <referent firstName="remi" lastName="schnekenburger" eMail="remi.schnekenburger@cea.fr" currentCompany="CEA-LIST"/>
+</doc:Documentation>
diff --git a/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui.menu/plugin.properties b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui.menu/plugin.properties
new file mode 100644
index 00000000000..8ce9efc1b79
--- /dev/null
+++ b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui.menu/plugin.properties
@@ -0,0 +1,12 @@
+#
+# Copyright (c) 2012 CEA LIST.
+# 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:
+# CEA LIST - initial API and implementation
+#
+pluginName = Papyrus Discovery UI Contributions (Incubation)
+providerName = Eclipse Modeling Project
diff --git a/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui.menu/plugin.xml b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui.menu/plugin.xml
new file mode 100644
index 00000000000..04576c0ca7d
--- /dev/null
+++ b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui.menu/plugin.xml
@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+ <extension
+ point="org.eclipse.ui.commands">
+ <category
+ id="org.eclipse.papyrus.infra.discovery.ui.menu.commands.category"
+ name="Papyrus Discovery">
+ </category>
+ <command
+ categoryId="org.eclipse.papyrus.infra.discovery.ui.menu.commands.category"
+ id="org.eclipse.papyrus.infra.discovery.ui.menu.commands.discoveryCommand"
+ name="Install Papyrus Additional Components">
+ </command>
+ </extension>
+ <extension
+ point="org.eclipse.ui.handlers">
+ <handler
+ class="org.eclipse.papyrus.infra.discovery.ui.menu.handler.PapyrusDiscoveryHandler"
+ commandId="org.eclipse.papyrus.infra.discovery.ui.menu.commands.discoveryCommand">
+ </handler>
+ </extension>
+ <extension
+ point="org.eclipse.ui.menus">
+ <menuContribution
+ locationURI="toolbar:org.eclipse.ui.main.toolbar?after=additions">
+ <toolbar
+ id="org.eclipse.papyrus.infra.discovery.ui.menu.toolbars.sampleToolbar">
+ <command
+ commandId="org.eclipse.papyrus.infra.discovery.ui.menu.commands.discoveryCommand"
+ icon="icons/Papyrus_16x16.gif"
+ id="org.eclipse.papyrus.infra.discovery.ui.menu.toolbars.discoveryCommand"
+ tooltip="Install Papyrus Additional Components">
+ </command>
+ </toolbar>
+ </menuContribution>
+ </extension>
+
+ <extension
+ point="org.eclipse.ui.menus">
+ <menuContribution
+ locationURI="menu:help?after=org.eclipse.equinox.p2.ui.sdk.install">
+ <command
+ commandId="org.eclipse.papyrus.infra.discovery.ui.menu.commands.discoveryCommand"
+ icon="icons/Papyrus_16x16.gif"
+ id="org.eclipse.papyrus.infra.discovery.ui.menu.toolbars.discoveryCommand"
+ tooltip="Install Papyrus Additional Components">
+ </command>
+ </menuContribution>
+ </extension>
+
+ <extension
+ point="org.eclipse.ui.intro.configExtension">
+ <configExtension
+ configId="org.eclipse.ui.intro.universalConfig"
+ content="intro/papyrusDiscovery.xml"/>
+ </extension>
+
+</plugin>
diff --git a/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui.menu/src/org/eclipse/papyrus/infra/discovery/ui/menu/Activator.java b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui.menu/src/org/eclipse/papyrus/infra/discovery/ui/menu/Activator.java
new file mode 100644
index 00000000000..82b8a7b1291
--- /dev/null
+++ b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui.menu/src/org/eclipse/papyrus/infra/discovery/ui/menu/Activator.java
@@ -0,0 +1,50 @@
+package org.eclipse.papyrus.infra.discovery.ui.menu;
+
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator extends AbstractUIPlugin {
+
+ // The plug-in ID
+ public static final String PLUGIN_ID = "org.eclipse.papyrus.infra.discovery.ui.menu"; //$NON-NLS-1$
+
+ // The shared instance
+ private static Activator plugin;
+
+ /**
+ * The constructor
+ */
+ public Activator() {
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ */
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+ */
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static Activator getDefault() {
+ return plugin;
+ }
+
+}
diff --git a/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui.menu/src/org/eclipse/papyrus/infra/discovery/ui/menu/handler/PapyrusDiscoveryAction.java b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui.menu/src/org/eclipse/papyrus/infra/discovery/ui/menu/handler/PapyrusDiscoveryAction.java
new file mode 100644
index 00000000000..c7ac35a5b25
--- /dev/null
+++ b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui.menu/src/org/eclipse/papyrus/infra/discovery/ui/menu/handler/PapyrusDiscoveryAction.java
@@ -0,0 +1,33 @@
+/*******************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ * 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:
+ * Obeo - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.papyrus.infra.discovery.ui.menu.handler;
+
+import org.eclipse.jface.action.Action;
+import org.eclipse.papyrus.infra.discovery.ui.wizards.DiscoveryComponent;
+
+/**
+ * Action used for discovery
+ */
+public class PapyrusDiscoveryAction extends Action {
+ /**
+ * The constructor.
+ */
+ public PapyrusDiscoveryAction() {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void run() {
+ DiscoveryComponent.execute();
+ }
+}
diff --git a/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui.menu/src/org/eclipse/papyrus/infra/discovery/ui/menu/handler/PapyrusDiscoveryHandler.java b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui.menu/src/org/eclipse/papyrus/infra/discovery/ui/menu/handler/PapyrusDiscoveryHandler.java
new file mode 100644
index 00000000000..66a2fc88966
--- /dev/null
+++ b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui.menu/src/org/eclipse/papyrus/infra/discovery/ui/menu/handler/PapyrusDiscoveryHandler.java
@@ -0,0 +1,38 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * 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:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.discovery.ui.menu.handler;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.papyrus.infra.discovery.ui.wizards.DiscoveryComponent;
+
+/**
+ * Handler for the papyrus discovery action
+ */
+public class PapyrusDiscoveryHandler extends AbstractHandler {
+ /**
+ * The constructor.
+ */
+ public PapyrusDiscoveryHandler() {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Object execute(ExecutionEvent event) throws ExecutionException {
+ DiscoveryComponent.execute();
+ return null;
+ }
+}
diff --git a/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/.classpath b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/.classpath
new file mode 100644
index 00000000000..64c5e31b7a2
--- /dev/null
+++ b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/.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/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/.project b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/.project
new file mode 100644
index 00000000000..07c066b7b71
--- /dev/null
+++ b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.infra.discovery.ui</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/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/.settings/org.eclipse.jdt.core.prefs b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 00000000000..2a5211d1549
--- /dev/null
+++ b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,8 @@
+#Fri Oct 30 10:52:39 CET 2009
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.5
diff --git a/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/META-INF/MANIFEST.MF b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/META-INF/MANIFEST.MF
new file mode 100644
index 00000000000..21655fb82d7
--- /dev/null
+++ b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/META-INF/MANIFEST.MF
@@ -0,0 +1,31 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.papyrus.infra.discovery.ui;singleton:=true
+Bundle-Version: 0.9.0.qualifier
+Bundle-ClassPath: .
+Bundle-Activator: org.eclipse.papyrus.infra.discovery.ui.Activator
+Bundle-Vendor: %providerName
+Bundle-Localization: plugin
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Export-Package: org.eclipse.papyrus.infra.discovery.ui,
+ org.eclipse.papyrus.infra.discovery.ui.viewer,
+ org.eclipse.papyrus.infra.discovery.ui.wizards
+Require-Bundle: org.eclipse.core.runtime,
+ org.eclipse.core.resources;visibility:=reexport,
+ org.eclipse.equinox.p2.core,
+ org.eclipse.equinox.p2.ui,
+ org.eclipse.equinox.p2.metadata,
+ org.eclipse.equinox.p2.metadata.repository,
+ org.eclipse.equinox.p2.repository,
+ org.eclipse.equinox.p2.engine,
+ org.eclipse.equinox.p2.director,
+ org.eclipse.equinox.p2.operations;resolution:=optional,
+ org.eclipse.emf.edit;visibility:=reexport,
+ org.eclipse.emf.ecore.xmi;visibility:=reexport,
+ org.eclipse.emf.edit.ui;visibility:=reexport,
+ org.eclipse.ui,
+ org.eclipse.ui.forms,
+ org.eclipse.papyrus.infra.discovery;bundle-version="0.9.0",
+ org.eclipse.papyrus.infra.core.log;bundle-version="0.9.0"
+Bundle-ActivationPolicy: lazy
diff --git a/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/about.html b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/about.html
new file mode 100644
index 00000000000..670d10856a8
--- /dev/null
+++ b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/about.html
@@ -0,0 +1,106 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
+<title>Eclipse Foundation Software User Agreement</title>
+</head>
+
+<body lang="EN-US">
+<h2>Eclipse Foundation Software User Agreement</h2>
+<p>April 14, 2010</p>
+
+<h3>Usage Of Content</h3>
+
+<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
+ (COLLECTIVELY &quot;CONTENT&quot;). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
+ CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
+ OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
+ NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
+ CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
+
+<h3>Applicable Licenses</h3>
+
+<p>Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0
+ (&quot;EPL&quot;). A copy of the EPL is provided with this Content and is also available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+ For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse Foundation source code
+ repository (&quot;Repository&quot;) in software modules (&quot;Modules&quot;) and made available as downloadable archives (&quot;Downloads&quot;).</p>
+
+<ul>
+ <li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content. Typical modules may include plug-ins (&quot;Plug-ins&quot;), plug-in fragments (&quot;Fragments&quot;), and features (&quot;Features&quot;).</li>
+ <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java&trade; ARchive) in a directory named &quot;plugins&quot;.</li>
+ <li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material. Each Feature may be packaged as a sub-directory in a directory named &quot;features&quot;. Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of the Plug-ins
+ and/or Fragments associated with that Feature.</li>
+ <li>Features may also include other Features (&quot;Included Features&quot;). Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of Included Features.</li>
+</ul>
+
+<p>The terms and conditions governing Plug-ins and Fragments should be contained in files named &quot;about.html&quot; (&quot;Abouts&quot;). The terms and conditions governing Features and
+Included Features should be contained in files named &quot;license.html&quot; (&quot;Feature Licenses&quot;). Abouts and Feature Licenses may be located in any directory of a Download or Module
+including, but not limited to the following locations:</p>
+
+<ul>
+ <li>The top-level (root) directory</li>
+ <li>Plug-in and Fragment directories</li>
+ <li>Inside Plug-ins and Fragments packaged as JARs</li>
+ <li>Sub-directories of the directory named &quot;src&quot; of certain Plug-ins</li>
+ <li>Feature directories</li>
+</ul>
+
+<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Provisioning Technology (as defined below), you must agree to a license (&quot;Feature Update License&quot;) during the
+installation process. If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or
+inform you where you can locate them. Feature Update Licenses may be found in the &quot;license&quot; property of files named &quot;feature.properties&quot; found within a Feature.
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
+that directory.</p>
+
+<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE
+OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
+
+<ul>
+ <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
+ <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
+ <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
+ <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
+ <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
+</ul>
+
+<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License is provided, please
+contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
+
+
+<h3>Use of Provisioning Technology</h3>
+
+<p>The Eclipse Foundation makes available provisioning software, examples of which include, but are not limited to, p2 and the Eclipse
+ Update Manager (&quot;Provisioning Technology&quot;) for the purpose of allowing users to install software, documentation, information and/or
+ other materials (collectively &quot;Installable Software&quot;). This capability is provided with the intent of allowing such users to
+ install, extend and update Eclipse-based products. Information about packaging Installable Software is available at <a
+ href="http://eclipse.org/equinox/p2/repository_packaging.html">http://eclipse.org/equinox/p2/repository_packaging.html</a>
+ (&quot;Specification&quot;).</p>
+
+<p>You may use Provisioning Technology to allow other parties to install Installable Software. You shall be responsible for enabling the
+ applicable license agreements relating to the Installable Software to be presented to, and accepted by, the users of the Provisioning Technology
+ in accordance with the Specification. By using Provisioning Technology in such a manner and making it available in accordance with the
+ Specification, you further acknowledge your agreement to, and the acquisition of all necessary rights to permit the following:</p>
+
+<ol>
+ <li>A series of actions may occur (&quot;Provisioning Process&quot;) in which a user may execute the Provisioning Technology
+ on a machine (&quot;Target Machine&quot;) with the intent of installing, extending or updating the functionality of an Eclipse-based
+ product.</li>
+ <li>During the Provisioning Process, the Provisioning Technology may cause third party Installable Software or a portion thereof to be
+ accessed and copied to the Target Machine.</li>
+ <li>Pursuant to the Specification, you will provide to the user the terms and conditions that govern the use of the Installable
+ Software (&quot;Installable Software Agreement&quot;) and such Installable Software Agreement shall be accessed from the Target
+ Machine in accordance with the Specification. Such Installable Software Agreement must inform the user of the terms and conditions that govern
+ the Installable Software and must solicit acceptance by the end user in the manner prescribed in such Installable Software Agreement. Upon such
+ indication of agreement by the user, the provisioning Technology will complete installation of the Installable Software.</li>
+</ol>
+
+<h3>Cryptography</h3>
+
+<p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
+ another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
+ possession, or use, and re-export of encryption software, to see if this is permitted.</p>
+
+<p><small>Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.</small></p>
+</body>
+</html> \ No newline at end of file
diff --git a/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/build.properties b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/build.properties
new file mode 100644
index 00000000000..c12cd949b3e
--- /dev/null
+++ b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/build.properties
@@ -0,0 +1,16 @@
+
+# <copyright>
+# </copyright>
+#
+# $Id: build.properties,v 1.2 2010/06/15 07:35:45 cbrun Exp $
+
+bin.includes = .,\
+ icons/,\
+ META-INF/,\
+ plugin.properties,\
+ about.html
+jars.compile.order = .
+source.. = src/
+output.. = bin/
+src.includes = about.html,\
+ plugin.pdoc
diff --git a/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/icons/full/etool16/find-clear-disabled.gif b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/icons/full/etool16/find-clear-disabled.gif
new file mode 100644
index 00000000000..7f3248023c1
--- /dev/null
+++ b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/icons/full/etool16/find-clear-disabled.gif
Binary files differ
diff --git a/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/icons/full/etool16/find-clear.gif b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/icons/full/etool16/find-clear.gif
new file mode 100644
index 00000000000..2d3935a6897
--- /dev/null
+++ b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/icons/full/etool16/find-clear.gif
Binary files differ
diff --git a/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/icons/full/obj16/message_info.gif b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/icons/full/obj16/message_info.gif
new file mode 100644
index 00000000000..b484d9be1e9
--- /dev/null
+++ b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/icons/full/obj16/message_info.gif
Binary files differ
diff --git a/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/icons/full/ovr32/incubation.gif b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/icons/full/ovr32/incubation.gif
new file mode 100644
index 00000000000..e2f43de1701
--- /dev/null
+++ b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/icons/full/ovr32/incubation.gif
Binary files differ
diff --git a/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/icons/full/ovr32/message_warning.gif b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/icons/full/ovr32/message_warning.gif
new file mode 100644
index 00000000000..8e054d07318
--- /dev/null
+++ b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/icons/full/ovr32/message_warning.gif
Binary files differ
diff --git a/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/icons/full/wizban/banner-discovery-papyrus.png b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/icons/full/wizban/banner-discovery-papyrus.png
new file mode 100644
index 00000000000..05a928b7939
--- /dev/null
+++ b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/icons/full/wizban/banner-discovery-papyrus.png
Binary files differ
diff --git a/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/icons/full/wizban/banner-discovery.png b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/icons/full/wizban/banner-discovery.png
new file mode 100644
index 00000000000..cc4b2cfd737
--- /dev/null
+++ b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/icons/full/wizban/banner-discovery.png
Binary files differ
diff --git a/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/plugin.pdoc b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/plugin.pdoc
new file mode 100644
index 00000000000..c1bc786b9ac
--- /dev/null
+++ b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/plugin.pdoc
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<doc:Documentation xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:doc="http://www.eclipse.org/papyrus/documentation/plugin/documentation" description="This plugin provides the user interface components for the papyrus discovery interface. No contribution to the UI is done by this plugin.">
+ <referent firstName="remi" lastName="schnekenburger" eMail="remi.schnekenburger@cea.fr" currentCompany="CEA-LIST"/>
+</doc:Documentation>
diff --git a/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/plugin.properties b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/plugin.properties
new file mode 100644
index 00000000000..a0cf0e4ca21
--- /dev/null
+++ b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/plugin.properties
@@ -0,0 +1,12 @@
+#
+# Copyright (c) 2012 CEA LIST.
+# 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:
+# CEA LIST - initial API and implementation
+#
+pluginName = Papyrus Discovery UI (Incubation)
+providerName = Eclipse Modeling Project
diff --git a/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/src/org/eclipse/papyrus/infra/discovery/ui/Activator.java b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/src/org/eclipse/papyrus/infra/discovery/ui/Activator.java
new file mode 100644
index 00000000000..b5a176e506e
--- /dev/null
+++ b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/src/org/eclipse/papyrus/infra/discovery/ui/Activator.java
@@ -0,0 +1,65 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Obeo.
+ * 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:
+ * Obeo - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.papyrus.infra.discovery.ui;
+
+import org.eclipse.papyrus.infra.core.log.LogHelper;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * Activator of the plugin. (Singleton instance)
+ */
+public class Activator extends AbstractUIPlugin {
+
+ /** ID of the plugin */
+ public static final String PLUGIN_ID = "org.eclipse.papyrus.infra.discovery.ui";
+
+ /** singleton instance of the plugin */
+ private static Activator plugin;
+
+ /** logging system */
+ public static LogHelper logHelper;
+
+ /**
+ * The constructor
+ */
+ public Activator() {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ logHelper = new LogHelper(this);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void stop(BundleContext context) throws Exception {
+ logHelper = null;
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ * @return the shared instance
+ */
+ public static Activator getDefault() {
+ return plugin;
+ }
+
+}
diff --git a/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/src/org/eclipse/papyrus/infra/discovery/ui/internal/common/CommonImages.java b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/src/org/eclipse/papyrus/infra/discovery/ui/internal/common/CommonImages.java
new file mode 100644
index 00000000000..54b0e6a44a1
--- /dev/null
+++ b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/src/org/eclipse/papyrus/infra/discovery/ui/internal/common/CommonImages.java
@@ -0,0 +1,89 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2009 Tasktop Technologies 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:
+ * Tasktop Technologies - initial API and implementation
+ * Obeo - adaptation for Amalgamation, EMF based and no Mylyn dependency
+ * CEA LIST - adaptation to Papyrus
+ *******************************************************************************/
+
+package org.eclipse.papyrus.infra.discovery.ui.internal.common;
+
+import java.net.MalformedURLException;
+import java.net.URL;
+
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.resource.ImageRegistry;
+import org.eclipse.papyrus.infra.discovery.ui.Activator;
+import org.eclipse.swt.graphics.Image;
+
+/**
+ * @author Mik Kersten
+ * @since 3.0
+ */
+public class CommonImages {
+
+ private static final URL baseURL = Activator.getDefault().getBundle().getEntry("/icons/full/"); //$NON-NLS-1$
+
+ private static ImageRegistry imageRegistry;
+
+ private static final String T_TOOL = "etool16"; //$NON-NLS-1$
+
+ private static final String T_WIZBAN = "wizban"; //$NON-NLS-1$
+
+ // Discovery
+
+ public static final ImageDescriptor BANNER_DISCOVERY = create(T_WIZBAN, "banner-discovery-papyrus.png"); //$NON-NLS-1$
+
+ public static final ImageDescriptor FIND_CLEAR = create(T_TOOL, "find-clear.gif"); //$NON-NLS-1$
+
+ public static final ImageDescriptor FIND_CLEAR_DISABLED = create(T_TOOL, "find-clear-disabled.gif"); //$NON-NLS-1$
+
+ private static ImageDescriptor create(String prefix, String name) {
+ try {
+ return ImageDescriptor.createFromURL(makeIconFileURL(prefix, name));
+ } catch (MalformedURLException e) {
+ return ImageDescriptor.getMissingImageDescriptor();
+ }
+ }
+
+ /**
+ * Lazily initializes image map.
+ *
+ * @param imageDescriptor
+ * @return Image
+ */
+ public static Image getImage(ImageDescriptor imageDescriptor) {
+ ImageRegistry imageRegistry = getImageRegistry();
+ Image image = imageRegistry.get("" + imageDescriptor.hashCode()); //$NON-NLS-1$
+ if (image == null) {
+ image = imageDescriptor.createImage(true);
+ imageRegistry.put("" + imageDescriptor.hashCode(), image); //$NON-NLS-1$
+ }
+ return image;
+ }
+
+ private static ImageRegistry getImageRegistry() {
+ if (imageRegistry == null) {
+ imageRegistry = new ImageRegistry();
+ }
+
+ return imageRegistry;
+ }
+
+ private static URL makeIconFileURL(String prefix, String name) throws MalformedURLException {
+ if (baseURL == null) {
+ throw new MalformedURLException();
+ }
+
+ StringBuffer buffer = new StringBuffer(prefix);
+ buffer.append('/');
+ buffer.append(name);
+ return new URL(baseURL, buffer.toString());
+ }
+
+}
diff --git a/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/src/org/eclipse/papyrus/infra/discovery/ui/internal/common/CommonThemes.java b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/src/org/eclipse/papyrus/infra/discovery/ui/internal/common/CommonThemes.java
new file mode 100644
index 00000000000..d6175291d22
--- /dev/null
+++ b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/src/org/eclipse/papyrus/infra/discovery/ui/internal/common/CommonThemes.java
@@ -0,0 +1,26 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2009 Tasktop Technologies 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:
+ * Tasktop Technologies - initial API and implementation
+ * Obeo - adaptation for Amalgamation, EMF based and no Mylyn dependency
+ * CEA LIST - adaptation to Papyrus
+ *******************************************************************************/
+
+package org.eclipse.papyrus.infra.discovery.ui.internal.common;
+
+/**
+ * @author Mik Kersten
+ * @since 3.0
+ */
+public class CommonThemes {
+
+ public static final String COLOR_CATEGORY_GRADIENT_START = "org.eclipse.mylyn.tasks.ui.colors.category.gradient.start"; //$NON-NLS-1$
+
+ public static final String COLOR_CATEGORY_GRADIENT_END = "org.eclipse.mylyn.tasks.ui.colors.category.gradient.end"; //$NON-NLS-1$
+
+}
diff --git a/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/src/org/eclipse/papyrus/infra/discovery/ui/internal/common/DiscoveryImages.java b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/src/org/eclipse/papyrus/infra/discovery/ui/internal/common/DiscoveryImages.java
new file mode 100644
index 00000000000..461acd395a5
--- /dev/null
+++ b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/src/org/eclipse/papyrus/infra/discovery/ui/internal/common/DiscoveryImages.java
@@ -0,0 +1,62 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Tasktop Technologies 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:
+ * Tasktop Technologies - initial API and implementation
+ * Obeo - adaptation for Amalgamation, EMF based and no Mylyn dependency
+ * CEA LIST - adaptation to Papyrus
+ *******************************************************************************/
+
+package org.eclipse.papyrus.infra.discovery.ui.internal.common;
+
+import java.net.MalformedURLException;
+import java.net.URL;
+
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.papyrus.infra.discovery.ui.Activator;
+
+/**
+ * @author David Green
+ */
+public class DiscoveryImages {
+ private static final String T_OVR_32 = "ovr32"; //$NON-NLS-1$
+
+ private static final String T_OBJ_16 = "obj16"; //$NON-NLS-1$
+
+ private static final URL baseURL = Activator.getDefault().getBundle().getEntry("/icons/full/"); //$NON-NLS-1$
+
+ /**
+ * image descriptor for a warning overlay suitable for use with 32x32
+ * images.
+ */
+ public static final ImageDescriptor OVERLAY_WARNING_32 = create(T_OVR_32, "message_warning.gif"); //$NON-NLS-1$
+
+ public static final ImageDescriptor OVERLAY_INCUBATION_32 = create(T_OVR_32, "incubation.gif");
+
+ public static final ImageDescriptor MESSAGE_INFO = create(T_OBJ_16, "message_info.gif"); //$NON-NLS-1$
+
+
+ private static ImageDescriptor create(String prefix, String name) {
+ try {
+ return ImageDescriptor.createFromURL(makeIconFileURL(prefix, name));
+ } catch (MalformedURLException e) {
+ return ImageDescriptor.getMissingImageDescriptor();
+ }
+ }
+
+ private static URL makeIconFileURL(String prefix, String name) throws MalformedURLException {
+ if (baseURL == null) {
+ throw new MalformedURLException();
+ }
+
+ StringBuilder buffer = new StringBuilder(prefix);
+ buffer.append('/');
+ buffer.append(name);
+ return new URL(baseURL, buffer.toString());
+ }
+
+}
diff --git a/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/src/org/eclipse/papyrus/infra/discovery/ui/internal/common/DiscoveryUiUtil.java b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/src/org/eclipse/papyrus/infra/discovery/ui/internal/common/DiscoveryUiUtil.java
new file mode 100644
index 00000000000..0bf3b78ff71
--- /dev/null
+++ b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/src/org/eclipse/papyrus/infra/discovery/ui/internal/common/DiscoveryUiUtil.java
@@ -0,0 +1,132 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Tasktop Technologies 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:
+ * Tasktop Technologies - initial API and implementation
+ * Obeo - adaptation for Amalgamation, EMF based and no Mylyn dependency
+ * CEA LIST - adaptation to Papyrus
+ *******************************************************************************/
+
+package org.eclipse.papyrus.infra.discovery.ui.internal.common;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PlatformUI;
+
+/**
+ * @author David Green
+ * @author Steffen Pingel much of this is copied from TasksUiInternal
+ */
+public abstract class DiscoveryUiUtil {
+ private DiscoveryUiUtil() {
+ }
+
+ /**
+ * Utility method to get the best parenting possible for a dialog. If there
+ * is a modal shell create it so as to avoid two modal dialogs. If not then
+ * return the shell of the active workbench window. If neither can be found
+ * return null.
+ * <p>
+ * <b>Note: Applied from patch on bug 99472.</b>
+ *
+ * @return Shell or <code>null</code>
+ */
+ public static Shell getShell() {
+ if (!PlatformUI.isWorkbenchRunning() || PlatformUI.getWorkbench().isClosing()) {
+ return null;
+ }
+ Shell modal = getModalShellExcluding(null);
+ if (modal != null) {
+ return modal;
+ }
+ return getNonModalShell();
+ }
+
+ /**
+ * Get the active non modal shell. If there isn't one return null.
+ * <p>
+ * <b>Note: Applied from patch on bug 99472.</b>
+ *
+ * @return Shell
+ */
+ public static Shell getNonModalShell() {
+ IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
+ if (window == null) {
+ IWorkbenchWindow[] windows = PlatformUI.getWorkbench().getWorkbenchWindows();
+ if (windows.length > 0) {
+ return windows[0].getShell();
+ }
+ } else {
+ return window.getShell();
+ }
+
+ return null;
+ }
+
+ /**
+ * Return the modal shell that is currently open. If there isn't one then
+ * return null.
+ * <p>
+ * <b>Note: Applied from patch on bug 99472.</b>
+ *
+ * @param shell
+ * A shell to exclude from the search. May be <code>null</code>.
+ * @return Shell or <code>null</code>.
+ */
+ public static Shell getModalShellExcluding(Shell shell) {
+ IWorkbench workbench = PlatformUI.getWorkbench();
+ Shell[] shells = workbench.getDisplay().getShells();
+ int modal = SWT.APPLICATION_MODAL | SWT.SYSTEM_MODAL | SWT.PRIMARY_MODAL;
+ for (Shell shell2 : shells) {
+ if (shell2.equals(shell)) {
+ break;
+ }
+ // Do not worry about shells that will not block the user.
+ if (shell2.isVisible()) {
+ int style = shell2.getStyle();
+ if ((style & modal) != 0) {
+ return shell2;
+ }
+ }
+ }
+ return null;
+ }
+
+ public static void displayStatus(Shell shell, final String title, final IStatus status, boolean showLinkToErrorLog) {
+
+
+ String message = status.getMessage();
+
+ if (showLinkToErrorLog) {
+ message += " \n see error log";
+ }
+ switch (status.getSeverity()) {
+ case IStatus.CANCEL:
+ case IStatus.INFO:
+ createDialog(shell, title, message, MessageDialog.INFORMATION).open();
+ break;
+ case IStatus.WARNING:
+ createDialog(shell, title, message, MessageDialog.WARNING).open();
+ break;
+ case IStatus.ERROR:
+ default:
+ createDialog(shell, title, message, MessageDialog.ERROR).open();
+ break;
+ }
+
+ }
+
+ public static MessageDialog createDialog(Shell shell, String title, String message, int type) {
+ return new MessageDialog(shell, title, null, message, type, new String[] { IDialogConstants.OK_LABEL }, 0);
+ }
+
+}
diff --git a/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/src/org/eclipse/papyrus/infra/discovery/ui/internal/common/GradientCanvas.java b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/src/org/eclipse/papyrus/infra/discovery/ui/internal/common/GradientCanvas.java
new file mode 100644
index 00000000000..8d835923f20
--- /dev/null
+++ b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/src/org/eclipse/papyrus/infra/discovery/ui/internal/common/GradientCanvas.java
@@ -0,0 +1,351 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2009 IBM Corporation 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:
+ * IBM Corporation - initial API and implementation
+ * Tasktop Technologies - extracted FormHeading implementation for Mylyn
+ * Obeo - adaptation for Amalgamation, EMF based and no Mylyn dependency
+ * CEA LIST - adaptation to Papyrus
+ *******************************************************************************/
+package org.eclipse.papyrus.infra.discovery.ui.internal.common;
+
+import java.util.Hashtable;
+import java.util.Map;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.Color;
+import org.eclipse.swt.graphics.GC;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.graphics.Rectangle;
+import org.eclipse.swt.widgets.Canvas;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Event;
+import org.eclipse.swt.widgets.Listener;
+
+/**
+ * Based on {@link org.eclipse.ui.internal.forms.widgets.FormHeading}.
+ */
+@SuppressWarnings("restriction")
+public class GradientCanvas extends Canvas {
+
+ private static final int SEPARATOR = 1 << 1;
+
+ private static final int BOTTOM_SEPARATOR = 1 << 2;
+
+ private static final int BACKGROUND_IMAGE_TILED = 1 << 3;
+
+ public static final String COLOR_BASE_BG = "baseBg"; //$NON-NLS-1$
+
+ static String PREFIX = "org.eclipse.ui.forms."; //$NON-NLS-1$
+
+ static String H_PREFIX = PREFIX + "H_"; //$NON-NLS-1$
+
+ public static String H_BOTTOM_KEYLINE1 = H_PREFIX + "BOTTOM_KEYLINE1"; //$NON-NLS-1$
+
+ /**
+ * Key for the form header bottom keyline 2 color.
+ */
+ public static String H_BOTTOM_KEYLINE2 = H_PREFIX + "BOTTOM_KEYLINE2"; //$NON-NLS-1$
+
+ private Image backgroundImage;
+
+ private Image gradientImage;
+
+ Map<String, Color> colors = new Hashtable<String, Color>();
+
+ private int flags;
+
+ private GradientInfo gradientInfo;
+
+ private class GradientInfo {
+ Color[] gradientColors;
+
+ int[] percents;
+
+ boolean vertical;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.swt.widgets.Control#forceFocus()
+ */
+ @Override
+ public boolean forceFocus() {
+ return false;
+ }
+
+ /**
+ * Creates the form content control as a child of the provided parent.
+ *
+ * @param parent
+ * the parent widget
+ */
+ public GradientCanvas(Composite parent, int style) {
+ super(parent, style);
+ setBackgroundMode(SWT.INHERIT_DEFAULT);
+ setSeparatorAlignment(SWT.BOTTOM);
+ addListener(SWT.Paint, new Listener() {
+ public void handleEvent(Event e) {
+ onPaint(e.gc);
+ }
+ });
+ addListener(SWT.Dispose, new Listener() {
+ public void handleEvent(Event e) {
+ if (gradientImage != null) {
+ // TODO e3.4 FormImages.getInstance().markFinished(gradientImage);
+ gradientImage.dispose();
+ gradientImage = null;
+ }
+ }
+ });
+ addListener(SWT.Resize, new Listener() {
+ public void handleEvent(Event e) {
+ if (gradientInfo != null || (backgroundImage != null && !isBackgroundImageTiled())) {
+ updateGradientImage();
+ }
+ }
+ });
+ }
+
+ /**
+ * Sets the background color of the header.
+ */
+ @Override
+ public void setBackground(Color bg) {
+ super.setBackground(bg);
+ internalSetBackground(bg);
+ }
+
+ private void internalSetBackground(Color bg) {
+ putColor(COLOR_BASE_BG, bg);
+ }
+
+ public void setBackgroundGradient(Color[] gradientColors, int[] percents, boolean vertical) {
+ if (gradientColors != null) {
+ gradientInfo = new GradientInfo();
+ gradientInfo.gradientColors = gradientColors;
+ gradientInfo.percents = percents;
+ gradientInfo.vertical = vertical;
+ setBackground(null);
+ updateGradientImage();
+ } else {
+ // reset
+ gradientInfo = null;
+ if (gradientImage != null) {
+ // TODO e3.4 FormImages.getInstance().markFinished(gradientImage);
+ gradientImage.dispose();
+ gradientImage = null;
+ setBackgroundImage(null);
+ }
+ }
+ }
+
+ public void setHeadingBackgroundImage(Image image) {
+ this.backgroundImage = image;
+ if (image != null) {
+ setBackground(null);
+ }
+ if (isBackgroundImageTiled()) {
+ setBackgroundImage(image);
+ } else {
+ updateGradientImage();
+ }
+ }
+
+ public Image getHeadingBackgroundImage() {
+ return backgroundImage;
+ }
+
+ public void setBackgroundImageTiled(boolean tiled) {
+ if (tiled) {
+ flags |= BACKGROUND_IMAGE_TILED;
+ } else {
+ flags &= ~BACKGROUND_IMAGE_TILED;
+ }
+ setHeadingBackgroundImage(this.backgroundImage);
+ }
+
+ public boolean isBackgroundImageTiled() {
+ return (flags & BACKGROUND_IMAGE_TILED) != 0;
+ }
+
+ @Override
+ public void setBackgroundImage(Image image) {
+ super.setBackgroundImage(image);
+ if (image != null) {
+ internalSetBackground(null);
+ }
+ }
+
+ private void onPaint(GC gc) {
+ if (!isSeparatorVisible() && getBackgroundImage() == null) {
+ return;
+ }
+ Rectangle carea = getClientArea();
+ Image buffer = new Image(getDisplay(), carea.width, carea.height);
+ buffer.setBackground(getBackground());
+ GC igc = new GC(buffer);
+ igc.setBackground(getBackground());
+ igc.fillRectangle(0, 0, carea.width, carea.height);
+ if (getBackgroundImage() != null) {
+ if (gradientInfo != null) {
+ drawBackground(igc, carea.x, carea.y, carea.width, carea.height);
+ } else {
+ Image bgImage = getBackgroundImage();
+ Rectangle ibounds = bgImage.getBounds();
+ drawBackground(igc, carea.x, carea.y, ibounds.width, ibounds.height);
+ }
+ }
+
+ if (isSeparatorVisible()) {
+ drawSeparator(carea, igc);
+ }
+ igc.dispose();
+ gc.drawImage(buffer, carea.x, carea.y);
+ buffer.dispose();
+ }
+
+ private void drawSeparator(Rectangle carea, GC igc) {
+ // bg separator
+ if (hasColor(H_BOTTOM_KEYLINE1)) {
+ igc.setForeground(getColor(H_BOTTOM_KEYLINE1));
+ } else {
+ igc.setForeground(getBackground());
+ }
+ if (getSeparatorAlignment() == SWT.BOTTOM) {
+ igc.drawLine(carea.x, carea.height - 2, carea.x + carea.width - 1, carea.height - 2);
+ } else {
+ igc.drawLine(carea.x, 1, carea.x + carea.width - 1, 1);
+ }
+ if (hasColor(H_BOTTOM_KEYLINE2)) {
+ igc.setForeground(getColor(H_BOTTOM_KEYLINE2));
+ } else {
+ igc.setForeground(getForeground());
+ }
+ if (getSeparatorAlignment() == SWT.BOTTOM) {
+ igc.drawLine(carea.x, carea.height - 1, carea.x + carea.width - 1, carea.height - 1);
+ } else {
+ igc.drawLine(carea.x, 0, carea.x + carea.width - 1, 0);
+ }
+ }
+
+ private void updateGradientImage() {
+ Rectangle rect = getBounds();
+ if (gradientImage != null) {
+ // TODO e3.4 FormImages.getInstance().markFinished(gradientImage);
+ gradientImage.dispose();
+ gradientImage = null;
+ }
+ if (gradientInfo != null) {
+ // TODO e3.4 use FormImages
+// gradientImage = FormImages.getInstance().getGradient(gradientInfo.gradientColors, gradientInfo.percents,
+// gradientInfo.vertical ? rect.height : rect.width, gradientInfo.vertical, getColor(COLOR_BASE_BG));
+ boolean vertical = gradientInfo.vertical;
+ int width = vertical ? 1 : rect.width;
+ int height = vertical ? rect.height : 1;
+ gradientImage = new Image(getDisplay(), Math.max(width, 1), Math.max(height, 1));
+ GC gc = new GC(gradientImage);
+ drawTextGradient(gc, width, height);
+ gc.dispose();
+ } else if (backgroundImage != null && !isBackgroundImageTiled()) {
+ gradientImage = new Image(getDisplay(), Math.max(rect.width, 1), Math.max(rect.height, 1));
+ gradientImage.setBackground(getBackground());
+ GC gc = new GC(gradientImage);
+ gc.drawImage(backgroundImage, 0, 0);
+ gc.dispose();
+ }
+ setBackgroundImage(gradientImage);
+ }
+
+ // TODO e3.4 remove, use FormImages
+ private void drawTextGradient(GC gc, int width, int height) {
+ final Color oldBackground = gc.getBackground();
+ if (gradientInfo.gradientColors.length == 1) {
+ if (gradientInfo.gradientColors[0] != null) {
+ gc.setBackground(gradientInfo.gradientColors[0]);
+ }
+ gc.fillRectangle(0, 0, width, height);
+ } else {
+ final Color oldForeground = gc.getForeground();
+ Color lastColor = gradientInfo.gradientColors[0];
+ if (lastColor == null) {
+ lastColor = oldBackground;
+ }
+ int pos = 0;
+ for (int i = 0; i < gradientInfo.percents.length; ++i) {
+ gc.setForeground(lastColor);
+ lastColor = gradientInfo.gradientColors[i + 1];
+ if (lastColor == null) {
+ lastColor = oldBackground;
+ }
+ gc.setBackground(lastColor);
+ if (gradientInfo.vertical) {
+ final int gradientHeight = (gradientInfo.percents[i] * height / 100) - pos;
+ gc.fillGradientRectangle(0, pos, width, gradientHeight, true);
+ pos += gradientHeight;
+ } else {
+ final int gradientWidth = (gradientInfo.percents[i] * width / 100) - pos;
+ gc.fillGradientRectangle(pos, 0, gradientWidth, height, false);
+ pos += gradientWidth;
+ }
+ }
+ if (gradientInfo.vertical && pos < height) {
+ gc.setBackground(getColor(COLOR_BASE_BG));
+ gc.fillRectangle(0, pos, width, height - pos);
+ }
+ if (!gradientInfo.vertical && pos < width) {
+ gc.setBackground(getColor(COLOR_BASE_BG));
+ gc.fillRectangle(pos, 0, width - pos, height);
+ }
+
+ if (isSeparatorVisible()) {
+ drawSeparator(getClientArea(), gc);
+ }
+ gc.setForeground(oldForeground);
+ }
+ }
+
+ public boolean isSeparatorVisible() {
+ return (flags & SEPARATOR) != 0;
+ }
+
+ public void setSeparatorVisible(boolean addSeparator) {
+ if (addSeparator) {
+ flags |= SEPARATOR;
+ } else {
+ flags &= ~SEPARATOR;
+ }
+ }
+
+ public void setSeparatorAlignment(int alignment) {
+ if (alignment == SWT.BOTTOM) {
+ flags |= BOTTOM_SEPARATOR;
+ } else {
+ flags &= ~BOTTOM_SEPARATOR;
+ }
+ }
+
+ public int getSeparatorAlignment() {
+ return (flags & BOTTOM_SEPARATOR) != 0 ? SWT.BOTTOM : SWT.TOP;
+ }
+
+ public void putColor(String key, Color color) {
+ if (color == null) {
+ colors.remove(key);
+ } else {
+ colors.put(key, color);
+ }
+ }
+
+ public Color getColor(String key) {
+ return (Color) colors.get(key);
+ }
+
+ public boolean hasColor(String key) {
+ return colors.containsKey(key);
+ }
+
+}
diff --git a/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/src/org/eclipse/papyrus/infra/discovery/ui/internal/common/GradientToolTip.java b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/src/org/eclipse/papyrus/infra/discovery/ui/internal/common/GradientToolTip.java
new file mode 100644
index 00000000000..229d98443a0
--- /dev/null
+++ b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/src/org/eclipse/papyrus/infra/discovery/ui/internal/common/GradientToolTip.java
@@ -0,0 +1,89 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2009 Tasktop Technologies 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:
+ * Tasktop Technologies - initial API and implementation
+ * Obeo - adaptation for Amalgamation, EMF based and no Mylyn dependency
+ * CEA LIST - adaptation to Papyrus
+ *******************************************************************************/
+
+package org.eclipse.papyrus.infra.discovery.ui.internal.common;
+
+import org.eclipse.jface.resource.JFaceResources;
+import org.eclipse.jface.resource.LocalResourceManager;
+import org.eclipse.jface.window.ToolTip;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.Color;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Event;
+
+/**
+ * A Custom JFace ToolTip that applies a gradient to the contents
+ *
+ * @author Shawn Minto
+ * @since 3.2
+ */
+public abstract class GradientToolTip extends ToolTip {
+
+ private NotificationPopupColors colors;
+
+ private LocalResourceManager resourceManager;
+
+ public GradientToolTip(Control control, int style, boolean manualActivation) {
+ super(control, style, manualActivation);
+ initResources(control);
+ }
+
+ public GradientToolTip(Control control) {
+ super(control);
+ initResources(control);
+ }
+
+ private void initResources(Control control) {
+ resourceManager = new LocalResourceManager(JFaceResources.getResources());
+ colors = new NotificationPopupColors(control.getDisplay(), resourceManager);
+ }
+
+ @Override
+ protected final Composite createToolTipContentArea(Event event, final Composite parent) {
+ GradientCanvas gradient = new GradientCanvas(parent, SWT.NONE);
+ gradient.setSeparatorVisible(false);
+ GridLayout headLayout = new GridLayout();
+ headLayout.marginHeight = 0;
+ headLayout.marginWidth = 0;
+ headLayout.horizontalSpacing = 0;
+ headLayout.verticalSpacing = 0;
+ headLayout.numColumns = 1;
+ gradient.setLayout(headLayout);
+
+ gradient.setBackgroundGradient(new Color[] { colors.getGradientBegin(), colors.getGradientEnd() },
+ new int[] { 100 }, true);
+
+ createToolTipArea(event, gradient);
+
+ // force a null background so that the gradient shines through
+ for (Control c : gradient.getChildren()) {
+ setNullBackground(c);
+ }
+
+ return gradient;
+ }
+
+ private void setNullBackground(final Control outerCircle) {
+ outerCircle.setBackground(null);
+ if (outerCircle instanceof Composite) {
+ ((Composite) outerCircle).setBackgroundMode(SWT.INHERIT_FORCE);
+ for (Control c : ((Composite) outerCircle).getChildren()) {
+ setNullBackground(c);
+ }
+ }
+ }
+
+ protected abstract Composite createToolTipArea(Event event, Composite parent);
+}
diff --git a/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/src/org/eclipse/papyrus/infra/discovery/ui/internal/common/Installer.java b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/src/org/eclipse/papyrus/infra/discovery/ui/internal/common/Installer.java
new file mode 100644
index 00000000000..9ad3eae2230
--- /dev/null
+++ b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/src/org/eclipse/papyrus/infra/discovery/ui/internal/common/Installer.java
@@ -0,0 +1,41 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Obeo.
+ * 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:
+ * Obeo - initial API and implementation
+ * CEA LIST - adaptation to Papyrus
+ *******************************************************************************/
+package org.eclipse.papyrus.infra.discovery.ui.internal.common;
+
+import java.lang.reflect.InvocationTargetException;
+import java.util.Collection;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jface.operation.IRunnableContext;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.papyrus.infra.discovery.InstallableComponent;
+import org.eclipse.papyrus.infra.discovery.ui.Activator;
+import org.eclipse.papyrus.infra.discovery.ui.internal.wizards.Messages;
+
+public class Installer {
+ public static boolean install(Collection<InstallableComponent> descriptors, IRunnableContext context) {
+ try {
+ final PrepareInstallProfileJob job = new PrepareInstallProfileJob(descriptors);
+ context.run(true, true, job);
+ } catch (InvocationTargetException e) {
+ IStatus status = new Status(IStatus.ERROR, Activator.PLUGIN_ID, NLS.bind(Messages.ConnectorDiscoveryWizard_installProblems, new Object[] { e.getCause().getMessage() }), e.getCause());
+ Activator.getDefault().getLog().log(status);
+ DiscoveryUiUtil.displayStatus(DiscoveryUiUtil.getShell(), Messages.ConnectorDiscoveryWizard_cannotInstall, status, true);
+ return false;
+ } catch (InterruptedException e) {
+ // canceled
+ return false;
+ }
+ return true;
+ }
+}
diff --git a/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/src/org/eclipse/papyrus/infra/discovery/ui/internal/common/NotificationPopupColors.java b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/src/org/eclipse/papyrus/infra/discovery/ui/internal/common/NotificationPopupColors.java
new file mode 100644
index 00000000000..8dd6f76ae7c
--- /dev/null
+++ b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/src/org/eclipse/papyrus/infra/discovery/ui/internal/common/NotificationPopupColors.java
@@ -0,0 +1,190 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2009 Tasktop Technologies 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:
+ * Benjamin Pasero - initial API and implementation
+ * Tasktop Technologies - improvements
+ * Obeo - adaptation for Amalgamation, EMF based and no Mylyn dependency
+ * CEA LIST - adaptation to Papyrus
+ *******************************************************************************/
+
+package org.eclipse.papyrus.infra.discovery.ui.internal.common;
+
+import org.eclipse.jface.resource.DeviceResourceException;
+import org.eclipse.jface.resource.ResourceManager;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.Color;
+import org.eclipse.swt.graphics.RGB;
+import org.eclipse.swt.widgets.Display;
+
+/**
+ * Helper Class to create the colors for the {@link AbstractNotificationPopup}.
+ * <p>
+ * Note: Copied from FormColors of UI Forms.
+ * </p>
+ *
+ * @author Benjamin Pasero (initial contribution from RSSOwl, see bug 177974)
+ * @author Mik Kersten
+ */
+public class NotificationPopupColors {
+
+ private final Display display;
+
+ private Color titleText;
+
+ private Color gradientBegin;
+
+ private Color gradientEnd;
+
+ private Color border;
+
+ private final ResourceManager resourceManager;
+
+ public NotificationPopupColors(Display display, ResourceManager resourceManager) {
+ this.display = display;
+ this.resourceManager = resourceManager;
+
+ createColors();
+ }
+
+ private void createColors() {
+ createBorderColor();
+ createGradientColors();
+ // previously used SWT.COLOR_TITLE_INACTIVE_FOREGROUND, but too light on Windows XP
+ titleText = getColor(resourceManager, getSystemColor(SWT.COLOR_WIDGET_DARK_SHADOW));
+ }
+
+ public Color getGradientBegin() {
+ return gradientBegin;
+ }
+
+ public Color getGradientEnd() {
+ return gradientEnd;
+ }
+
+ public Color getBorder() {
+ return border;
+ }
+
+ public Color getTitleText() {
+ return titleText;
+ }
+
+ private void createBorderColor() {
+ RGB tbBorder = getSystemColor(SWT.COLOR_TITLE_BACKGROUND);
+ RGB bg = getImpliedBackground().getRGB();
+
+ // Group 1
+ // Rule: If at least 2 of the RGB values are equal to or between 180 and
+ // 255, then apply specified opacity for Group 1
+ // Examples: Vista, XP Silver, Wn High Con #2
+ // Keyline = TITLE_BACKGROUND @ 70% Opacity over LIST_BACKGROUND
+ if (testTwoPrimaryColors(tbBorder, 179, 256)) {
+ tbBorder = blend(tbBorder, bg, 70);
+ } else if (testTwoPrimaryColors(tbBorder, 120, 180)) {
+ tbBorder = blend(tbBorder, bg, 50);
+ } else {
+ tbBorder = blend(tbBorder, bg, 30);
+ }
+
+ border = getColor(resourceManager, tbBorder);
+ }
+
+ private void createGradientColors() {
+ RGB titleBg = getSystemColor(SWT.COLOR_TITLE_BACKGROUND);
+ Color bgColor = getImpliedBackground();
+ RGB bg = bgColor.getRGB();
+ RGB bottom, top;
+
+ // Group 1
+ // Rule: If at least 2 of the RGB values are equal to or between 180 and
+ // 255, then apply specified opacity for Group 1
+ // Examples: Vista, XP Silver, Wn High Con #2
+ // Gradient Bottom = TITLE_BACKGROUND @ 30% Opacity over LIST_BACKGROUND
+ // Gradient Top = TITLE BACKGROUND @ 0% Opacity over LIST_BACKGROUND
+ if (testTwoPrimaryColors(titleBg, 179, 256)) {
+ bottom = blend(titleBg, bg, 30);
+ top = bg;
+ }
+
+ // Group 2
+ // Rule: If at least 2 of the RGB values are equal to or between 121 and
+ // 179, then apply specified opacity for Group 2
+ // Examples: XP Olive, OSX Graphite, Linux GTK, Wn High Con Black
+ // Gradient Bottom = TITLE_BACKGROUND @ 20% Opacity over LIST_BACKGROUND
+ // Gradient Top = TITLE BACKGROUND @ 0% Opacity over LIST_BACKGROUND
+ else if (testTwoPrimaryColors(titleBg, 120, 180)) {
+ bottom = blend(titleBg, bg, 20);
+ top = bg;
+ }
+
+ // Group 3
+ // Rule: If at least 2 of the RGB values are equal to or between 0 and
+ // 120, then apply specified opacity for Group 3
+ // Examples: XP Default, Wn Classic Standard, Wn Marine, Wn Plum, OSX
+ // Aqua, Wn High Con White, Wn High Con #1
+ // Gradient Bottom = TITLE_BACKGROUND @ 10% Opacity over LIST_BACKGROUND
+ // Gradient Top = TITLE BACKGROUND @ 0% Opacity over LIST_BACKGROUND
+ else {
+ bottom = blend(titleBg, bg, 10);
+ top = bg;
+ }
+
+ gradientBegin = getColor(resourceManager, top);
+ gradientEnd = getColor(resourceManager, bottom);
+ }
+
+ private RGB blend(RGB c1, RGB c2, int ratio) {
+ int r = blend(c1.red, c2.red, ratio);
+ int g = blend(c1.green, c2.green, ratio);
+ int b = blend(c1.blue, c2.blue, ratio);
+ return new RGB(r, g, b);
+ }
+
+ private int blend(int v1, int v2, int ratio) {
+ int b = (ratio * v1 + (100 - ratio) * v2) / 100;
+ return Math.min(255, b);
+ }
+
+ private boolean testTwoPrimaryColors(RGB rgb, int from, int to) {
+ int total = 0;
+ if (testPrimaryColor(rgb.red, from, to)) {
+ total++;
+ }
+ if (testPrimaryColor(rgb.green, from, to)) {
+ total++;
+ }
+ if (testPrimaryColor(rgb.blue, from, to)) {
+ total++;
+ }
+ return total >= 2;
+ }
+
+ private boolean testPrimaryColor(int value, int from, int to) {
+ return value > from && value < to;
+ }
+
+ private RGB getSystemColor(int code) {
+ return getDisplay().getSystemColor(code).getRGB();
+ }
+
+ private Color getImpliedBackground() {
+ return display.getSystemColor(SWT.COLOR_LIST_BACKGROUND);
+ }
+
+ private Display getDisplay() {
+ return display;
+ }
+
+ private Color getColor(ResourceManager manager, RGB rgb) {
+ try {
+ return manager.createColor(rgb);
+ } catch (DeviceResourceException e) {
+ return manager.getDevice().getSystemColor(SWT.COLOR_BLACK);
+ }
+ }
+} \ No newline at end of file
diff --git a/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/src/org/eclipse/papyrus/infra/discovery/ui/internal/common/OverviewToolTip.java b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/src/org/eclipse/papyrus/infra/discovery/ui/internal/common/OverviewToolTip.java
new file mode 100644
index 00000000000..daddd4cd768
--- /dev/null
+++ b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/src/org/eclipse/papyrus/infra/discovery/ui/internal/common/OverviewToolTip.java
@@ -0,0 +1,217 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Tasktop Technologies 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:
+ * Tasktop Technologies - initial API and implementation
+ * Obeo - adaptation for Amalgamation, EMF based and no Mylyn dependency
+ * CEA LIST - adaptation to Papyrus
+ *******************************************************************************/
+
+package org.eclipse.papyrus.infra.discovery.ui.internal.common;
+
+import java.net.MalformedURLException;
+import java.net.URL;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.jface.layout.GridDataFactory;
+import org.eclipse.jface.layout.GridLayoutFactory;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.window.ToolTip;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.papyrus.infra.discovery.Overview;
+import org.eclipse.papyrus.infra.discovery.ui.internal.wizards.Messages;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.StyledText;
+import org.eclipse.swt.events.DisposeEvent;
+import org.eclipse.swt.events.DisposeListener;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.graphics.Rectangle;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Event;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Link;
+import org.eclipse.ui.browser.IWorkbenchBrowserSupport;
+
+/**
+ * @author David Green
+ */
+public class OverviewToolTip extends GradientToolTip {
+
+ private final Overview overview;
+
+ private final Resource source;
+
+ private final Control parent;
+
+ private final Image leftImage;
+
+ public OverviewToolTip(Control control, Resource source, Overview overview, Image leftImage) {
+ super(control, ToolTip.RECREATE, true);
+ Assert.isNotNull(source);
+ Assert.isNotNull(overview);
+ this.parent = control;
+ this.source = source;
+ this.overview = overview;
+ this.leftImage = leftImage;
+ setHideOnMouseDown(false); // required for links to work
+ }
+
+ @Override
+ protected Composite createToolTipArea(Event event, final Composite parent) {
+ GridLayoutFactory.fillDefaults().applyTo(parent);
+
+ Composite container = new Composite(parent, SWT.NULL);
+ container.setBackground(null);
+
+ Image image = null;
+ if (overview.getScreenshot() != null) {
+ image = computeImage(source, overview.getScreenshot());
+ if (image != null) {
+ final Image fimage = image;
+ container.addDisposeListener(new DisposeListener() {
+ public void widgetDisposed(DisposeEvent e) {
+ fimage.dispose();
+ }
+ });
+ }
+ }
+ final boolean hasLearnMoreLink = overview.getUrl() != null && overview.getUrl().length() > 0;
+
+ final int borderWidth = 1;
+ final int fixedImageHeight = 240;
+ final int fixedImageWidth = 320;
+ final int heightHint = fixedImageHeight + (borderWidth * 2);
+ final int widthHint = fixedImageWidth;
+
+ final int containerWidthHintWithImage = 650;
+ final int containerWidthHintWithoutImage = 500;
+
+ GridDataFactory.fillDefaults().grab(true, true).hint(image == null ? containerWidthHintWithoutImage : containerWidthHintWithImage, SWT.DEFAULT).applyTo(container);
+
+ GridLayoutFactory.fillDefaults().numColumns((leftImage != null) ? 3 : 2).margins(5, 5).spacing(3, 0).applyTo(container);
+
+ if (leftImage != null) {
+ Label imageLabel = new Label(container, SWT.NONE);
+ imageLabel.setImage(leftImage);
+ int imageWidthHint = leftImage.getBounds().width + 5;
+ GridDataFactory.fillDefaults().align(SWT.BEGINNING, SWT.BEGINNING).hint(imageWidthHint, SWT.DEFAULT).applyTo(imageLabel);
+ }
+
+ String summary = overview.getSummary();
+
+ Composite summaryContainer = new Composite(container, SWT.NULL);
+ summaryContainer.setBackground(null);
+ GridLayoutFactory.fillDefaults().applyTo(summaryContainer);
+
+ GridDataFactory gridDataFactory = GridDataFactory.fillDefaults().grab(true, true).span(image == null ? 2 : 1, 1);
+ if (image != null) {
+ gridDataFactory.hint(widthHint, heightHint);
+ }
+ gridDataFactory.applyTo(summaryContainer);
+
+ StyledText summaryLabel = new StyledText(summaryContainer, SWT.WRAP | SWT.READ_ONLY | SWT.NO_FOCUS);
+ summaryLabel.setText(summary);
+ Point size = summaryLabel.computeSize(widthHint, SWT.DEFAULT);
+ if (size.y > heightHint - 20) {
+ summaryLabel.dispose();
+ summaryLabel = new StyledText(summaryContainer, SWT.WRAP | SWT.READ_ONLY | SWT.NO_FOCUS | SWT.V_SCROLL);
+ summaryLabel.setText(summary);
+ }
+ summaryLabel.setBackground(null);
+
+ GridDataFactory.fillDefaults().grab(true, true).align(SWT.BEGINNING, SWT.BEGINNING).applyTo(summaryLabel);
+
+ if (image != null) {
+ final Composite imageContainer = new Composite(container, SWT.BORDER);
+ GridLayoutFactory.fillDefaults().applyTo(imageContainer);
+
+ GridDataFactory.fillDefaults().grab(false, false).align(SWT.CENTER, SWT.BEGINNING).hint(widthHint + (borderWidth * 2), heightHint).applyTo(imageContainer);
+
+ Label imageLabel = new Label(imageContainer, SWT.NULL);
+ GridDataFactory.fillDefaults().hint(widthHint, fixedImageHeight).indent(borderWidth, borderWidth).applyTo(imageLabel);
+ imageLabel.setImage(image);
+ imageLabel.setBackground(null);
+ imageLabel.setSize(widthHint, fixedImageHeight);
+
+ // creates a border
+ imageContainer.setBackground(parent.getDisplay().getSystemColor(SWT.COLOR_BLACK));
+ }
+ if (hasLearnMoreLink) {
+ Link link = new Link(summaryContainer, SWT.NULL);
+ GridDataFactory.fillDefaults().grab(false, false).align(SWT.BEGINNING, SWT.CENTER).applyTo(link);
+ link.setText(Messages.ConnectorDescriptorToolTip_detailsLink);
+ link.setBackground(null);
+ link.setToolTipText(NLS.bind(Messages.ConnectorDescriptorToolTip_detailsLink_tooltip, overview.getUrl()));
+ link.addSelectionListener(new SelectionListener() {
+ public void widgetSelected(SelectionEvent e) {
+ WorkbenchUtil.openUrl(overview.getUrl(), IWorkbenchBrowserSupport.AS_EXTERNAL);
+ }
+
+ public void widgetDefaultSelected(SelectionEvent e) {
+ widgetSelected(e);
+ }
+ });
+ }
+ if (image == null) {
+ // prevent overviews with no image from providing unlimited text.
+ Point optimalSize = summaryContainer.computeSize(SWT.DEFAULT, SWT.DEFAULT, true);
+ if (optimalSize.y > (heightHint + 10)) {
+ ((GridData) summaryContainer.getLayoutData()).heightHint = heightHint;
+ container.layout(true);
+ }
+ }
+ // hack: cause the tooltip to gain focus so that we can capture the
+ // escape key
+ // this must be done async since the tooltip is not yet visible.
+ Display.getCurrent().asyncExec(new Runnable() {
+ public void run() {
+ if (!parent.isDisposed()) {
+ parent.setFocus();
+ }
+ }
+ });
+ return container;
+ }
+
+ private Image computeImage(Resource discoverySource, String imagePath) {
+ URI uri = discoverySource.getURI();
+ URI trimed = uri.trimSegments(1);
+ String urlPath = trimed.toString() + "/" + imagePath;
+ URL resource = null;
+ try {
+ resource = new URL(urlPath);
+ } catch (MalformedURLException e) {
+ // TODO Auto-generated catch block
+ }
+ if (resource != null) {
+ ImageDescriptor descriptor = ImageDescriptor.createFromURL(resource);
+ Image image = descriptor.createImage();
+ return image;
+ }
+ return null;
+ }
+
+ public void show(Control titleControl) {
+ Point titleAbsLocation = titleControl.getParent().toDisplay(titleControl.getLocation());
+ Point containerAbsLocation = parent.getParent().toDisplay(parent.getLocation());
+ Rectangle bounds = titleControl.getBounds();
+ int relativeX = titleAbsLocation.x - containerAbsLocation.x;
+ int relativeY = titleAbsLocation.y - containerAbsLocation.y;
+
+ relativeY += bounds.height + 3;
+ show(new Point(relativeX, relativeY));
+ }
+
+}
diff --git a/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/src/org/eclipse/papyrus/infra/discovery/ui/internal/common/PrepareInstallProfileJob.java b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/src/org/eclipse/papyrus/infra/discovery/ui/internal/common/PrepareInstallProfileJob.java
new file mode 100644
index 00000000000..f7f8a680ea7
--- /dev/null
+++ b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/src/org/eclipse/papyrus/infra/discovery/ui/internal/common/PrepareInstallProfileJob.java
@@ -0,0 +1,382 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Tasktop Technologies 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:
+ * Tasktop Technologies - initial API and implementation
+ * Obeo - adaptation for Amalgamation, EMF based and no Mylyn dependency
+ * CEA LIST - adaptation to Papyrus
+ *******************************************************************************/
+package org.eclipse.papyrus.infra.discovery.ui.internal.common;
+
+import java.lang.reflect.InvocationTargetException;
+import java.net.MalformedURLException;
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.OperationCanceledException;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.SubMonitor;
+import org.eclipse.core.runtime.SubProgressMonitor;
+import org.eclipse.equinox.p2.core.ProvisionException;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.metadata.Version;
+import org.eclipse.equinox.p2.operations.InstallOperation;
+import org.eclipse.equinox.p2.operations.ProvisioningSession;
+import org.eclipse.equinox.p2.operations.RepositoryTracker;
+import org.eclipse.equinox.p2.query.IQuery;
+import org.eclipse.equinox.p2.query.IQueryResult;
+import org.eclipse.equinox.p2.query.QueryUtil;
+import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository;
+import org.eclipse.equinox.p2.repository.metadata.IMetadataRepositoryManager;
+import org.eclipse.equinox.p2.ui.ProvisioningUI;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.operation.IRunnableWithProgress;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.papyrus.infra.discovery.InstallableComponent;
+import org.eclipse.papyrus.infra.discovery.ui.Activator;
+import org.eclipse.papyrus.infra.discovery.ui.internal.wizards.Messages;
+import org.eclipse.swt.widgets.Display;
+
+/**
+ * A job that configures a p2 {@link #getInstallAction() install action} for
+ * installing one or more {@link ConnectorDescriptor connectors}. The bulk of
+ * the installation work is done by p2; this class just sets up the p2
+ * repository metadata and selects the appropriate features to install. After
+ * running the job the {@link #getInstallAction() install action} must be run to
+ * perform the installation.
+ *
+ * @author David Green
+ * @author Steffen Pingel
+ */
+public class PrepareInstallProfileJob implements IRunnableWithProgress {
+
+ private static final String P2_FEATURE_GROUP_SUFFIX = ".feature.group"; //$NON-NLS-1$
+
+ private final List<InstallableComponent> installableConnectors;
+
+ private final ProvisioningUI provisioningUI;
+
+ private Set<URI> repositoryLocations;
+
+ public PrepareInstallProfileJob(
+ Collection<InstallableComponent> installableConnectors) {
+ if (installableConnectors == null || installableConnectors.isEmpty()) {
+ throw new IllegalArgumentException();
+ }
+ this.installableConnectors = new ArrayList<InstallableComponent>(
+ installableConnectors);
+ this.provisioningUI = ProvisioningUI.getDefaultUI();
+ }
+
+ public void run(IProgressMonitor progressMonitor)
+ throws InvocationTargetException, InterruptedException {
+ try {
+ SubMonitor monitor = SubMonitor.convert(progressMonitor,
+ Messages.InstallConnectorsJob_task_configuring, 100);
+ try {
+ final Collection<IInstallableUnit> ius = computeInstallableUnits(monitor
+ .newChild(50));
+
+ checkCancelled(monitor);
+
+ final InstallOperation installOperation = resolve(monitor
+ .newChild(50), ius, repositoryLocations
+ .toArray(new URI[0]));
+
+ checkCancelled(monitor);
+
+ Display.getDefault().asyncExec(new Runnable() {
+ public void run() {
+ provisioningUI.openInstallWizard(ius, installOperation,
+ null);
+ }
+ });
+ } finally {
+ monitor.done();
+ }
+ } catch (OperationCanceledException e) {
+ throw new InterruptedException();
+ } catch (Exception e) {
+ throw new InvocationTargetException(e);
+ }
+ }
+
+ private void checkCancelled(IProgressMonitor monitor) {
+ if (monitor.isCanceled()) {
+ throw new OperationCanceledException();
+ }
+ }
+
+ private InstallOperation resolve(IProgressMonitor monitor,
+ final Collection<IInstallableUnit> ius, URI[] repositories)
+ throws CoreException {
+ final InstallOperation installOperation = provisioningUI
+ .getInstallOperation(ius, repositories);
+ IStatus operationStatus = installOperation
+ .resolveModal(new SubProgressMonitor(monitor,
+ installableConnectors.size()));
+ if (operationStatus.getSeverity() > IStatus.WARNING) {
+ throw new CoreException(operationStatus);
+ }
+ return installOperation;
+ }
+
+ public Collection<IInstallableUnit> computeInstallableUnits(
+ SubMonitor monitor) throws CoreException {
+ try {
+ monitor.setWorkRemaining(100);
+ // add repository urls and load meta data
+ List<IMetadataRepository> repositories = addRepositories(monitor
+ .newChild(50));
+ final List<IInstallableUnit> installableUnits = queryInstallableUnits(
+ monitor.newChild(50), repositories);
+ removeOldVersions(installableUnits);
+ checkForUnavailable(installableUnits);
+ return installableUnits;
+ } catch (URISyntaxException e) {
+ // should never happen, since we already validated URLs.
+ throw new CoreException(new Status(IStatus.ERROR,
+ Activator.PLUGIN_ID,
+ Messages.InstallConnectorsJob_unexpectedError_url, e));
+ } catch (MalformedURLException e) {
+ // should never happen, since we already validated URLs.
+ throw new CoreException(new Status(IStatus.ERROR,
+ Activator.PLUGIN_ID,
+ Messages.InstallConnectorsJob_unexpectedError_url, e));
+ } finally {
+ monitor.done();
+ }
+ }
+
+ /**
+ * Verifies that we found what we were looking for: it's possible that we
+ * have connector descriptors that are no longer available on their
+ * respective sites. In that case we must inform the user. Unfortunately
+ * this is the earliest point at which we can know.
+ */
+ private void checkForUnavailable(
+ final List<IInstallableUnit> installableUnits) throws CoreException {
+ // at least one selected connector could not be found in a repository
+ Set<String> foundIds = new HashSet<String>();
+ for (IInstallableUnit unit : installableUnits) {
+ String id = unit.getId();
+ if (id.endsWith(P2_FEATURE_GROUP_SUFFIX)) {
+ id = id.substring(0, id.indexOf(P2_FEATURE_GROUP_SUFFIX));
+ }
+ foundIds.add(id);
+ }
+
+ String message = ""; //$NON-NLS-1$
+ String detailedMessage = ""; //$NON-NLS-1$
+ for (InstallableComponent descriptor : installableConnectors) {
+ StringBuilder unavailableIds = null;
+ for (String id : descriptor.getId()) {
+ if (!foundIds.contains(id)) {
+ if (unavailableIds == null) {
+ unavailableIds = new StringBuilder();
+ } else {
+ unavailableIds
+ .append(Messages.InstallConnectorsJob_commaSeparator);
+ }
+ unavailableIds.append(id);
+ }
+ }
+ if (unavailableIds != null) {
+ if (message.length() > 0) {
+ message += Messages.InstallConnectorsJob_commaSeparator;
+ }
+ message += descriptor.getName();
+
+ if (detailedMessage.length() > 0) {
+ detailedMessage += Messages.InstallConnectorsJob_commaSeparator;
+ }
+ detailedMessage += NLS
+ .bind(
+ Messages.PrepareInstallProfileJob_notFoundDescriptorDetail,
+ new Object[] { descriptor.getName(),
+ unavailableIds.toString(),
+ descriptor.getSitesURLS() });
+ }
+ }
+
+ if (message.length() > 0) {
+ // instead of aborting here we ask the user if they wish to proceed
+ // anyways
+ final boolean[] okayToProceed = new boolean[1];
+ final String finalMessage = message;
+ Display.getDefault().syncExec(new Runnable() {
+ public void run() {
+ okayToProceed[0] = MessageDialog
+ .openQuestion(
+ DiscoveryUiUtil.getShell(),
+ Messages.InstallConnectorsJob_questionProceed,
+ NLS
+ .bind(
+ Messages.InstallConnectorsJob_questionProceed_long,
+ new Object[] { finalMessage }));
+ }
+ });
+ if (!okayToProceed[0]) {
+ throw new CoreException(
+ new Status(
+ IStatus.ERROR,
+ Activator.PLUGIN_ID,
+ NLS
+ .bind(
+ Messages.InstallConnectorsJob_connectorsNotAvailable,
+ detailedMessage), null));
+ }
+ }
+ }
+
+ /**
+ * Filters those installable units that have a duplicate in the list with a
+ * higher version number. it's possible that some repositories will host
+ * multiple versions of a particular feature. we assume that the user wants
+ * the highest version.
+ */
+ private void removeOldVersions(final List<IInstallableUnit> installableUnits) {
+ Map<String, Version> symbolicNameToVersion = new HashMap<String, Version>();
+ for (IInstallableUnit unit : installableUnits) {
+ Version version = symbolicNameToVersion.get(unit.getId());
+ if (version == null || version.compareTo(unit.getVersion()) == -1) {
+ symbolicNameToVersion.put(unit.getId(), unit.getVersion());
+ }
+ }
+ if (symbolicNameToVersion.size() != installableUnits.size()) {
+ for (IInstallableUnit unit : new ArrayList<IInstallableUnit>(
+ installableUnits)) {
+ Version version = symbolicNameToVersion.get(unit.getId());
+ if (!version.equals(unit.getVersion())) {
+ installableUnits.remove(unit);
+ }
+ }
+ }
+ }
+
+ /**
+ * Perform a query to get the installable units. This causes p2 to determine
+ * what features are available in each repository. We select installable
+ * units by matching both the feature id and the repository; it is possible
+ * though unlikely that the same feature id is available from more than one
+ * of the selected repositories, and we must ensure that the user gets the
+ * one that they asked for.
+ */
+ private List<IInstallableUnit> queryInstallableUnits(SubMonitor monitor,
+ List<IMetadataRepository> repositories) throws URISyntaxException {
+ final List<IInstallableUnit> installableUnits = new ArrayList<IInstallableUnit>();
+
+ monitor.setWorkRemaining(repositories.size());
+ for (final IMetadataRepository repository : repositories) {
+ checkCancelled(monitor);
+ final Set<String> installableUnitIdsThisRepository = getDescriptorIds(repository);
+ IQuery<IInstallableUnit> query = QueryUtil.createMatchQuery( //
+ "id ~= /*.feature.group/ && " + //$NON-NLS-1$
+ "properties['org.eclipse.equinox.p2.type.group'] == true ");//$NON-NLS-1$
+ IQueryResult<IInstallableUnit> result = repository.query(query,
+ monitor.newChild(1));
+ for (Iterator<IInstallableUnit> iter = result.iterator(); iter
+ .hasNext();) {
+ IInstallableUnit iu = iter.next();
+ String id = iu.getId();
+ if (installableUnitIdsThisRepository.contains(id.substring(0,
+ id.indexOf(P2_FEATURE_GROUP_SUFFIX)))) {
+ installableUnits.add(iu);
+ }
+ }
+ }
+ return installableUnits;
+ }
+
+ private List<IMetadataRepository> addRepositories(SubMonitor monitor)
+ throws MalformedURLException, URISyntaxException,
+ ProvisionException {
+ // tell p2 that it's okay to use these repositories
+ ProvisioningSession session = ProvisioningUI.getDefaultUI()
+ .getSession();
+ RepositoryTracker repositoryTracker = ProvisioningUI.getDefaultUI()
+ .getRepositoryTracker();
+ repositoryLocations = new HashSet<URI>();
+ monitor.setWorkRemaining(installableConnectors.size() * 5);
+ for (InstallableComponent descriptor : installableConnectors) {
+ for (String url : descriptor.getSitesURLS()) {
+ addASiteURL(monitor, session, repositoryTracker, url);
+ }
+ }
+
+ // fetch meta-data for these repositories
+ ArrayList<IMetadataRepository> repositories = new ArrayList<IMetadataRepository>();
+ monitor.setWorkRemaining(repositories.size());
+ IMetadataRepositoryManager manager = (IMetadataRepositoryManager) session
+ .getProvisioningAgent().getService(
+ IMetadataRepositoryManager.SERVICE_NAME);
+ for (URI uri : repositoryLocations) {
+ checkCancelled(monitor);
+ IMetadataRepository repository = manager.loadRepository(uri,
+ monitor.newChild(1));
+ repositories.add(repository);
+ }
+ return repositories;
+ }
+
+ private void addASiteURL(SubMonitor monitor, ProvisioningSession session,
+ RepositoryTracker repositoryTracker, String url)
+ throws URISyntaxException, MalformedURLException {
+ URI uri = new URL(url).toURI();
+ if (repositoryLocations.add(uri)) {
+ checkCancelled(monitor);
+ repositoryTracker.addRepository(uri, null, session);
+ // ProvisioningUtil.addMetaDataRepository(url.toURI(), true);
+ // ProvisioningUtil.addArtifactRepository(url.toURI(), true);
+ // ProvisioningUtil.setColocatedRepositoryEnablement(url.toURI(),
+ // true);
+ }
+ monitor.worked(1);
+ }
+
+ private Set<String> getDescriptorIds(final IMetadataRepository repository)
+ throws URISyntaxException {
+ final Set<String> installableUnitIdsThisRepository = new HashSet<String>();
+ // determine all installable units for this repository
+ for (InstallableComponent descriptor : installableConnectors) {
+ try {
+ if (hasThisUpdateSite(repository.getLocation(), descriptor)) {
+ installableUnitIdsThisRepository.addAll(descriptor.getId());
+ }
+
+ } catch (MalformedURLException e) {
+ // will never happen, ignore
+ }
+ }
+ return installableUnitIdsThisRepository;
+ }
+
+ private boolean hasThisUpdateSite(URI location,
+ InstallableComponent descriptor) throws MalformedURLException {
+ boolean found = false;
+ Iterator<String> it = descriptor.getSitesURLS().iterator();
+ while (it.hasNext() && !found) {
+ String url = it.next();
+ if (location.toString().equals(url))
+ found = true;
+ }
+ return found;
+ }
+
+}
diff --git a/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/src/org/eclipse/papyrus/infra/discovery/ui/internal/common/SelectionProviderAdapter.java b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/src/org/eclipse/papyrus/infra/discovery/ui/internal/common/SelectionProviderAdapter.java
new file mode 100644
index 00000000000..c49a757cfcb
--- /dev/null
+++ b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/src/org/eclipse/papyrus/infra/discovery/ui/internal/common/SelectionProviderAdapter.java
@@ -0,0 +1,80 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2009 Tasktop Technologies 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:
+ * Tasktop Technologies - initial API and implementation
+ * Obeo - adaptation for Amalgamation, EMF based and no Mylyn dependency
+ * CEA LIST - adaptation to Papyrus
+ *******************************************************************************/
+
+package org.eclipse.papyrus.infra.discovery.ui.internal.common;
+
+import org.eclipse.core.commands.common.EventManager;
+import org.eclipse.core.runtime.SafeRunner;
+import org.eclipse.jface.util.SafeRunnable;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.ISelectionProvider;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+
+/**
+ * Provides an simple implementation of {@link ISelectionProvider} that propagates selection events to registered
+ * listeners.
+ *
+ * @author Steffen Pingel
+ */
+public class SelectionProviderAdapter extends EventManager implements ISelectionProvider, ISelectionChangedListener {
+
+ private ISelection selection;
+
+ /**
+ * Constructs a <code>SelectionProviderAdapter</code> and initializes the selection to <code>selection</code>.
+ *
+ * @param selection
+ * the initial selection
+ * @see #setSelection(ISelection)
+ */
+ public SelectionProviderAdapter(ISelection selection) {
+ setSelection(selection);
+ }
+
+ /**
+ * Constructs a <code>SelectionProviderAdapter</code> with a <code>null</code> selection.
+ */
+ public SelectionProviderAdapter() {
+ }
+
+ public void addSelectionChangedListener(ISelectionChangedListener listener) {
+ addListenerObject(listener);
+ }
+
+ public ISelection getSelection() {
+ return selection;
+ }
+
+ public void removeSelectionChangedListener(ISelectionChangedListener listener) {
+ removeListenerObject(listener);
+ }
+
+ public void selectionChanged(final SelectionChangedEvent event) {
+ this.selection = event.getSelection();
+ Object[] listeners = getListeners();
+ for (int i = 0; i < listeners.length; ++i) {
+ final ISelectionChangedListener listener = (ISelectionChangedListener) listeners[i];
+ SafeRunner.run(new SafeRunnable() {
+ public void run() {
+ listener.selectionChanged(event);
+ }
+ });
+ }
+ }
+
+ public void setSelection(ISelection selection) {
+ selectionChanged(new SelectionChangedEvent(this, selection));
+ }
+
+}
diff --git a/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/src/org/eclipse/papyrus/infra/discovery/ui/internal/common/WorkbenchUtil.java b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/src/org/eclipse/papyrus/infra/discovery/ui/internal/common/WorkbenchUtil.java
new file mode 100644
index 00000000000..9172c60152f
--- /dev/null
+++ b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/src/org/eclipse/papyrus/infra/discovery/ui/internal/common/WorkbenchUtil.java
@@ -0,0 +1,71 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2009 Tasktop Technologies 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:
+ * Tasktop Technologies - initial API and implementation
+ * IBM Corporation - helper methods from
+ * org.eclipse.wst.common.frameworks.internal.ui.WTPActivityHelper
+ * Obeo - adaptation for Amalgamation, EMF based and no Mylyn dependency
+ * CEA LIST - adaptation to Papyrus
+ *******************************************************************************/
+
+package org.eclipse.papyrus.infra.discovery.ui.internal.common;
+
+import java.net.MalformedURLException;
+import java.net.URL;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.browser.IWorkbenchBrowserSupport;
+
+/**
+ * @author Mik Kersten
+ * @author Steffen Pingel
+ */
+public class WorkbenchUtil {
+
+ /**
+ * Opens <code>location</code> in a web-browser according to the Eclipse
+ * workbench preferences.
+ *
+ * @param location
+ * the url to open
+ * @see #openUrl(String, int)
+ */
+ public static void openUrl(String location) {
+ openUrl(location, SWT.NONE);
+ }
+
+ /**
+ * Opens <code>location</code> in a web-browser according to the Eclipse
+ * workbench preferences.
+ *
+ * @param location
+ * the url to open
+ * @param customFlags
+ * additional flags that are passed to
+ * {@link IWorkbenchBrowserSupport}, pass
+ * {@link IWorkbenchBrowserSupport#AS_EXTERNAL} to force opening
+ * external browser
+ */
+ public static void openUrl(String location, int customFlags) {
+ try {
+ URL url = null;
+ if (location != null) {
+ url = new URL(location);
+ }
+ IWorkbenchBrowserSupport support = PlatformUI.getWorkbench().getBrowserSupport();
+ support.getExternalBrowser().openURL(url);
+
+ } catch (PartInitException e) {
+ } catch (MalformedURLException e) {
+
+ }
+ }
+
+}
diff --git a/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/src/org/eclipse/papyrus/infra/discovery/ui/internal/viewer/DiscoveryCategoryComparator.java b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/src/org/eclipse/papyrus/infra/discovery/ui/internal/viewer/DiscoveryCategoryComparator.java
new file mode 100644
index 00000000000..5eb7d36c511
--- /dev/null
+++ b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/src/org/eclipse/papyrus/infra/discovery/ui/internal/viewer/DiscoveryCategoryComparator.java
@@ -0,0 +1,55 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Tasktop Technologies 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:
+ * Tasktop Technologies - initial API and implementation
+ * Obeo - adaptation for Amalgamation, EMF based and no Mylyn dependency
+ * CEA LIST - adaptation to Papyrus
+ *******************************************************************************/
+package org.eclipse.papyrus.infra.discovery.ui.internal.viewer;
+
+import java.util.Comparator;
+
+import org.eclipse.papyrus.infra.discovery.Category;
+
+
+/**
+ * A comparator that orders categories by relevance and name.
+ *
+ * @author David Green
+ */
+public class DiscoveryCategoryComparator implements Comparator<Category> {
+
+ public int compare(Category o1, Category o2) {
+ if (o1 == o2) {
+ return 0;
+ }
+ Integer r1 = o1.getRelevance();
+ Integer r2 = o2.getRelevance();
+ int i;
+ if (r1 != null && r2 != null) {
+ // don't have to worry about format, since they were already
+ // validated
+ // note that higher relevance appears first, thus the reverse order
+ // of
+ // the comparison.
+ i = new Integer(r2).compareTo(new Integer(r1));
+ } else if (r1 == null) {
+ return 1;
+ } else {
+ return -1;
+ }
+ if (i == 0) {
+ i = o1.getName().compareToIgnoreCase(o2.getName());
+ if (i == 0) {
+ i = o1.getName().compareTo(o2.getName());
+ }
+ }
+ return i;
+ }
+
+} \ No newline at end of file
diff --git a/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/src/org/eclipse/papyrus/infra/discovery/ui/internal/wizards/DiscoveryWizardMainPage.java b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/src/org/eclipse/papyrus/infra/discovery/ui/internal/wizards/DiscoveryWizardMainPage.java
new file mode 100644
index 00000000000..eec14373eab
--- /dev/null
+++ b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/src/org/eclipse/papyrus/infra/discovery/ui/internal/wizards/DiscoveryWizardMainPage.java
@@ -0,0 +1,103 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Tasktop Technologies 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:
+ * Tasktop Technologies - initial API and implementation
+ * David Green
+ * Shawn Minto bug 275513
+ * Steffen Pingel bug 276012 code review, bug 277191 gradient canvas
+ * Obeo - adaptation for Amalgamation, EMF based and no Mylyn dependency
+ * CEA LIST - adaptation to Papyrus
+ *******************************************************************************/
+package org.eclipse.papyrus.infra.discovery.ui.internal.wizards;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.jface.window.IShellProvider;
+import org.eclipse.jface.wizard.WizardPage;
+import org.eclipse.papyrus.infra.discovery.InstallableComponent;
+import org.eclipse.papyrus.infra.discovery.ui.viewer.DiscoveryContentProvider;
+import org.eclipse.papyrus.infra.discovery.ui.viewer.DiscoveryViewer;
+import org.eclipse.papyrus.infra.discovery.ui.wizards.DiscoveryWizard;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Display;
+
+/**
+ * The main wizard page that allows users to select connectors that they wish to
+ * install.
+ *
+ * @author David Green
+ */
+public class DiscoveryWizardMainPage extends WizardPage implements IShellProvider {
+
+ private static final int MINIMUM_HEIGHT = 480;
+
+ private DiscoveryViewer viewer;
+
+ private DiscoveryContentProvider provider;
+
+ public DiscoveryWizardMainPage(DiscoveryContentProvider provider) {
+ super(DiscoveryWizardMainPage.class.getSimpleName());
+ this.provider = provider;
+ setTitle(provider.getTitle());
+ // setImageDescriptor(image);
+ setDescription(provider.getDescription());
+ setPageComplete(false);
+
+ }
+
+ public void createControl(Composite parent) {
+ viewer = new DiscoveryViewer(this, getContainer(), this.provider);
+ viewer.setShowConnectorDescriptorKindFilter(getWizard().isShowConnectorDescriptorKindFilter());
+ viewer.setShowConnectorDescriptorTextFilter(getWizard().isShowConnectorDescriptorTextFilter());
+ viewer.setVerifyUpdateSiteAvailability(true);
+ viewer.setMinimumHeight(MINIMUM_HEIGHT);
+ viewer.addSelectionChangedListener(new ISelectionChangedListener() {
+ public void selectionChanged(SelectionChangedEvent event) {
+ setPageComplete(!viewer.getInstallableConnectors().isEmpty());
+ }
+ });
+ viewer.createControl(parent);
+
+ setControl(viewer.getControl());
+ }
+
+ @Override
+ public DiscoveryWizard getWizard() {
+ return (DiscoveryWizard) super.getWizard();
+ }
+
+ public List<InstallableComponent> getInstallableConnectors() {
+ return viewer.getInstallableConnectors();
+ }
+
+ private void maybeUpdateDiscovery() {
+ if (!getControl().isDisposed() && isCurrentPage()) {
+ viewer.updateDiscovery();
+ }
+ }
+
+ @Override
+ public void setVisible(boolean visible) {
+ super.setVisible(visible);
+ if (visible) {
+ Display.getCurrent().asyncExec(new Runnable() {
+ public void run() {
+ maybeUpdateDiscovery();
+ }
+ });
+ }
+ }
+
+ public void setModelingComponents(Collection<InstallableComponent> components) {
+
+ }
+
+}
diff --git a/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/src/org/eclipse/papyrus/infra/discovery/ui/internal/wizards/Messages.java b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/src/org/eclipse/papyrus/infra/discovery/ui/internal/wizards/Messages.java
new file mode 100644
index 00000000000..3a850f32743
--- /dev/null
+++ b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/src/org/eclipse/papyrus/infra/discovery/ui/internal/wizards/Messages.java
@@ -0,0 +1,109 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Tasktop Technologies 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:
+ * Tasktop Technologies - initial API and implementation
+ * Obeo - adaptation for Amalgamation, EMF based and no Mylyn dependency
+ * CEA LIST - adaptation to Papyrus
+ *******************************************************************************/
+
+package org.eclipse.papyrus.infra.discovery.ui.internal.wizards;
+
+import org.eclipse.osgi.util.NLS;
+
+/**
+ * @author David Green
+ */
+public class Messages extends NLS {
+ private static final String BUNDLE_NAME = "org.eclipse.papyrus.infra.discovery.ui.internal.wizards.messages"; //$NON-NLS-1$
+
+ public static String ConnectorDiscoveryWizardMainPage_filter_tool;
+
+ public static String ConnectorDiscoveryWizardMainPage_filter_standard;
+
+ public static String ConnectorDescriptorToolTip_detailsLink;
+
+ public static String ConnectorDescriptorToolTip_detailsLink_tooltip;
+
+ public static String ConnectorDiscoveryWizard_cannotInstall;
+
+ public static String ConnectorDiscoveryWizard_connectorDiscovery;
+
+ public static String ConnectorDiscoveryWizard_installProblems;
+
+ public static String InstallConnectorsJob_commaSeparator;
+
+ public static String InstallConnectorsJob_connectorsNotAvailable;
+
+ public static String InstallConnectorsJob_profileProblem;
+
+ public static String InstallConnectorsJob_questionProceed;
+
+ public static String InstallConnectorsJob_questionProceed_long;
+
+ public static String InstallConnectorsJob_task_configuring;
+
+ public static String InstallConnectorsJob_unexpectedError_url;
+
+ public static String ConnectorDiscoveryWizardMainPage_clearButton_accessibleListener;
+
+ public static String ConnectorDiscoveryWizardMainPage_clearButton_toolTip;
+
+ public static String ConnectorDiscoveryWizardMainPage_connectorDiscovery;
+
+ public static String ConnectorDiscoveryWizardMainPage_errorTitle;
+
+ public static String ConnectorDiscoveryWizardMainPage_filter_commercial;
+
+ public static String ConnectorDiscoveryWizardMainPage_filter_framework;
+
+ public static String ConnectorDiscoveryWizardMainPage_filter_incubation;
+
+ public static String ConnectorDiscoveryWizardMainPage_filterLabel;
+
+ public static String ConnectorDiscoveryWizardMainPage_message_with_cause;
+
+ public static String ConnectorDiscoveryWizardMainPage_noConnectorsFound;
+
+ public static String ConnectorDiscoveryWizardMainPage_noConnectorsFound_description;
+
+ public static String ConnectorDiscoveryWizardMainPage_noMatchingItems_filteredType;
+
+ public static String ConnectorDiscoveryWizardMainPage_noMatchingItems_noFilter;
+
+ public static String ConnectorDiscoveryWizardMainPage_noMatchingItems_withFilterText;
+
+ public static String ConnectorDiscoveryWizardMainPage_pageDescription;
+
+ public static String ConnectorDiscoveryWizardMainPage_provider_and_license;
+
+ public static String ConnectorDiscoveryWizardMainPage_tooltip_showOverview;
+
+ public static String ConnectorDiscoveryWizardMainPage_unexpectedException;
+
+ public static String ConnectorDiscoveryWizardMainPage_warningMessageConnectorUnavailable;
+
+ public static String ConnectorDiscoveryWizardMainPage_warningTitleConnectorUnavailable;
+
+ public static String PrepareInstallProfileJob_notFoundDescriptorDetail;
+
+ public static String PrepareInstallProfileJob_calculatingRequirements;
+
+ public static String PrepareInstallProfileJob_computeProfileChangeRequestFailed;
+
+ public static String PrepareInstallProfileJob_errorResolvingHostname;
+
+ public static String PrepareInstallProfileJob_ok;
+
+ static {
+ // initialize resource bundle
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+
+ private Messages() {
+ }
+}
diff --git a/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/src/org/eclipse/papyrus/infra/discovery/ui/internal/wizards/messages.properties b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/src/org/eclipse/papyrus/infra/discovery/ui/internal/wizards/messages.properties
new file mode 100644
index 00000000000..ee2b202af15
--- /dev/null
+++ b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/src/org/eclipse/papyrus/infra/discovery/ui/internal/wizards/messages.properties
@@ -0,0 +1,51 @@
+###############################################################################
+# Copyright (c) 2009 Tasktop Technologies 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:
+# Tasktop Technologies - initial API and implementation
+###############################################################################
+ConnectorDescriptorToolTip_detailsLink=<a>Learn More</a>
+ConnectorDescriptorToolTip_detailsLink_tooltip=Open {0} in an external browser
+ConnectorDiscoveryWizard_cannotInstall=Cannot complete installation
+ConnectorDiscoveryWizard_connectorDiscovery=Install Components
+ConnectorDiscoveryWizard_installProblems=Problems occurred while performing installation: {0}
+ConnectorDiscoveryWizardMainPage_clearButton_accessibleListener=Clear filter field
+ConnectorDiscoveryWizardMainPage_clearButton_toolTip=Clear
+ConnectorDiscoveryWizardMainPage_connectorDiscovery= Components Discovery
+ConnectorDiscoveryWizardMainPage_errorTitle=Components Discovery Error
+ConnectorDiscoveryWizardMainPage_filter_commercial=Commercial
+ConnectorDiscoveryWizardMainPage_filter_framework=Framework
+ConnectorDiscoveryWizardMainPage_filter_incubation=Incubation Status
+ConnectorDiscoveryWizardMainPage_filter_standard=Standard Based
+ConnectorDiscoveryWizardMainPage_filter_tool=Tool
+ConnectorDiscoveryWizardMainPage_filterLabel=Find:
+ConnectorDiscoveryWizardMainPage_message_with_cause={0}: {1}
+ConnectorDiscoveryWizardMainPage_noConnectorsFound=No Component Found
+ConnectorDiscoveryWizardMainPage_noConnectorsFound_description=Discovery completed without finding any component. Please check your Internet connection and try again.
+ConnectorDiscoveryWizardMainPage_noMatchingItems_filteredType=There are no component of the selected type. Please select another component type or try again later.
+ConnectorDiscoveryWizardMainPage_noMatchingItems_noFilter=Sorry, there are no available component. Please try again later.
+ConnectorDiscoveryWizardMainPage_noMatchingItems_withFilterText=There are no matching component. Please <a>clear the filter text</a> or try again later.
+ConnectorDiscoveryWizardMainPage_pageDescription=\
+ Select component to install. Press Finish to proceed with installation.\n\
+ Press the information button to see a detailed overview and a link to more information.
+ConnectorDiscoveryWizardMainPage_provider_and_license=by {0}, {1}
+ConnectorDiscoveryWizardMainPage_tooltip_showOverview=Show Overview
+ConnectorDiscoveryWizardMainPage_unexpectedException=Unexpected exception
+ConnectorDiscoveryWizardMainPage_warningMessageConnectorUnavailable=Sorry, {0} is unavailable. Please try again later.
+ConnectorDiscoveryWizardMainPage_warningTitleConnectorUnavailable=Component Unavailable
+InstallConnectorsJob_commaSeparator=,
+InstallConnectorsJob_connectorsNotAvailable=The following components are not available: {0}
+InstallConnectorsJob_profileProblem=Cannot determine p2 profile
+InstallConnectorsJob_questionProceed=Proceed With Installation?
+InstallConnectorsJob_questionProceed_long=The following components are not available: {0}\nProceed with the installation anyways?
+InstallConnectorsJob_task_configuring=Configuring installation selection
+InstallConnectorsJob_unexpectedError_url=Unexpected error handling repository URL
+PrepareInstallProfileJob_notFoundDescriptorDetail={0} (id={1}, site={2})
+PrepareInstallProfileJob_calculatingRequirements=Calculating requirements
+PrepareInstallProfileJob_computeProfileChangeRequestFailed=Cannot compute profile change request
+PrepareInstallProfileJob_errorResolvingHostname=Error resolving hostname {1} for '{0}': please check your Internet connection and try again.
+PrepareInstallProfileJob_ok=OK
diff --git a/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/src/org/eclipse/papyrus/infra/discovery/ui/viewer/AvailabilityUpdater.java b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/src/org/eclipse/papyrus/infra/discovery/ui/viewer/AvailabilityUpdater.java
new file mode 100644
index 00000000000..3bb51335f84
--- /dev/null
+++ b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/src/org/eclipse/papyrus/infra/discovery/ui/viewer/AvailabilityUpdater.java
@@ -0,0 +1,181 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Obeo.
+ * 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:
+ * Obeo - initial API and implementation
+ * CEA LIST - adaptation to Papyrus additional components
+ *******************************************************************************/
+package org.eclipse.papyrus.infra.discovery.ui.viewer;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.concurrent.Callable;
+import java.util.concurrent.ExecutionException;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+import java.util.concurrent.Future;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.TimeoutException;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.OperationCanceledException;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.resource.URIHandler;
+import org.eclipse.emf.ecore.resource.impl.URIHandlerImpl;
+import org.eclipse.papyrus.infra.discovery.DiscoveryDefinition;
+import org.eclipse.papyrus.infra.discovery.InstallableComponent;
+import org.eclipse.papyrus.infra.discovery.ui.Activator;
+
+/**
+ * Updater that checks that features are available for installation
+ */
+public class AvailabilityUpdater {
+
+ private DiscoveryDefinitionBrowser discovery;
+
+ public AvailabilityUpdater(DiscoveryDefinition newdiscovery) {
+ this.discovery = new DiscoveryDefinitionBrowser(newdiscovery);
+ }
+
+ public void update(IProgressMonitor monitor) {
+
+ Collection<InstallableComponent> connectors = discovery
+ .getAllInstallableComponents();
+
+ Map<String, Collection<InstallableComponent>> urlToDescriptors = new HashMap<String, Collection<InstallableComponent>>();
+
+ for (InstallableComponent descriptor : connectors) {
+ for (String url : descriptor.getSitesURLS()) {
+ handleSiteURL(urlToDescriptors, descriptor, url);
+ }
+ }
+ final int totalTicks = urlToDescriptors.size();
+ monitor.beginTask("Checking update sites availability", totalTicks);
+ try {
+ if (!urlToDescriptors.isEmpty()) {
+ ExecutorService executorService = Executors
+ .newFixedThreadPool(Math
+ .min(urlToDescriptors.size(), 4));
+ try {
+ List<Future<VerifyUpdateSiteJob>> futures = new ArrayList<Future<VerifyUpdateSiteJob>>(
+ urlToDescriptors.size());
+ for (String url : urlToDescriptors.keySet()) {
+ futures.add(executorService
+ .submit(new VerifyUpdateSiteJob(url)));
+ }
+ for (Future<VerifyUpdateSiteJob> jobFuture : futures) {
+ try {
+ for (;;) {
+ try {
+ VerifyUpdateSiteJob job = jobFuture.get(1L,
+ TimeUnit.SECONDS);
+
+ Collection<InstallableComponent> descriptors = urlToDescriptors
+ .get(job.url);
+ for (InstallableComponent descriptor : descriptors) {
+ descriptor.setAvailable(job.ok);
+ }
+ break;
+ } catch (TimeoutException e) {
+ if (monitor.isCanceled()) {
+ return;
+ }
+ }
+ }
+ } catch (InterruptedException e) {
+ monitor.setCanceled(true);
+ return;
+ } catch (ExecutionException e) {
+ if (e.getCause() instanceof OperationCanceledException) {
+ monitor.setCanceled(true);
+ return;
+ }
+ IStatus status;
+ if (e.getCause() instanceof CoreException) {
+ status = ((CoreException) e.getCause())
+ .getStatus();
+ } else {
+ status = new Status(
+ IStatus.ERROR,
+ Activator.PLUGIN_ID,
+ "Error while checking update sites availability.",
+ e.getCause());
+ }
+ Activator.logHelper.error(status.getMessage(), status.getException());
+ }
+ monitor.worked(1);
+ }
+ } finally {
+ executorService.shutdownNow();
+ }
+ }
+ } finally {
+ monitor.done();
+ }
+
+ }
+
+ private void handleSiteURL(
+ Map<String, Collection<InstallableComponent>> urlToDescriptors,
+ InstallableComponent descriptor, String url) {
+ if (!url.endsWith("/")) { //$NON-NLS-1$
+ url += "/"; //$NON-NLS-1$
+ }
+ Collection<InstallableComponent> collection = urlToDescriptors.get(url);
+ if (collection == null) {
+ collection = new ArrayList<InstallableComponent>();
+ urlToDescriptors.put(url, collection);
+ }
+ collection.add(descriptor);
+ }
+
+ private static class VerifyUpdateSiteJob implements
+ Callable<VerifyUpdateSiteJob> {
+
+ private final String url;
+
+ private boolean ok = false;
+
+ public VerifyUpdateSiteJob(String url) {
+ this.url = url;
+ }
+
+ public VerifyUpdateSiteJob call() throws Exception {
+ URI baseUrl = URI.createURI(removeTraillingSlash(url));
+ List<URI> locations = new ArrayList<URI>();
+ for (String location : new String[] {
+ "compositeContent.jar","content.jar", "content.xml", "site.xml" }) { //$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$
+ URI locationURI = baseUrl.appendSegment(location);
+ locations.add(locationURI);
+ }
+ URIHandler handler = new URIHandlerImpl();
+ Iterator<URI> it = locations.iterator();
+ while (it.hasNext() && !ok) {
+ URI uri = it.next();
+ if (handler.canHandle(uri)
+ && handler.exists(uri, Collections.EMPTY_MAP))
+ ok = true;
+ }
+ return this;
+ }
+
+ private String removeTraillingSlash(String url2) {
+ if (url2.endsWith("/"))
+ return url2.substring(0, url2.length() - 1);
+ return url2;
+ }
+
+ }
+}
diff --git a/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/src/org/eclipse/papyrus/infra/discovery/ui/viewer/DiscoveryContentProvider.java b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/src/org/eclipse/papyrus/infra/discovery/ui/viewer/DiscoveryContentProvider.java
new file mode 100644
index 00000000000..f784cec3262
--- /dev/null
+++ b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/src/org/eclipse/papyrus/infra/discovery/ui/viewer/DiscoveryContentProvider.java
@@ -0,0 +1,43 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Obeo.
+ * 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:
+ * Obeo - initial API and implementation
+ * CEA LIST - adaptation to Papyrus
+ *******************************************************************************/
+package org.eclipse.papyrus.infra.discovery.ui.viewer;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.papyrus.infra.discovery.DiscoveryDefinition;
+/**
+ *
+ * @author Cedric Brun <cedric.brun@obeo.fr>
+ *
+ */
+public abstract class DiscoveryContentProvider {
+
+ DiscoveryDefinition disco;
+
+ public void update(IProgressMonitor monitor) throws InterruptedException {
+ disco = getDiscovery();
+ InstallationStatusUpdater installedUpdater = new InstallationStatusUpdater(disco);
+ installedUpdater.update(monitor);
+ }
+
+ public DiscoveryDefinition getDiscovery() {
+ if (disco == null)
+ disco = load();
+ return disco;
+ }
+
+ protected abstract DiscoveryDefinition load();
+
+ public abstract String getTitle();
+
+ public abstract String getDescription();
+
+}
diff --git a/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/src/org/eclipse/papyrus/infra/discovery/ui/viewer/DiscoveryDefinitionBrowser.java b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/src/org/eclipse/papyrus/infra/discovery/ui/viewer/DiscoveryDefinitionBrowser.java
new file mode 100644
index 00000000000..d5b5063b8ec
--- /dev/null
+++ b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/src/org/eclipse/papyrus/infra/discovery/ui/viewer/DiscoveryDefinitionBrowser.java
@@ -0,0 +1,47 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Obeo.
+ * 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:
+ * Obeo - initial API and implementation
+ * CEA LIST - adaptation to Papyrus needs
+ *******************************************************************************/
+package org.eclipse.papyrus.infra.discovery.ui.viewer;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.papyrus.infra.discovery.DiscoveryDefinition;
+import org.eclipse.papyrus.infra.discovery.InstallableComponent;
+/**
+ *
+ * @author Cedric Brun <cedric.brun@obeo.fr>
+ * @author Remi Schnekenburger
+ *
+ */
+public class DiscoveryDefinitionBrowser {
+
+ private DiscoveryDefinition definition;
+
+ public DiscoveryDefinitionBrowser(DiscoveryDefinition definition) {
+ this.definition = definition;
+ }
+
+ public Collection<InstallableComponent> getAllInstallableComponents() {
+ List<InstallableComponent> components = new ArrayList<InstallableComponent>();
+ Iterator<EObject> it = definition.eAllContents();
+ while (it.hasNext()) {
+ EObject cur = it.next();
+ if (cur instanceof InstallableComponent)
+ components.add((InstallableComponent) cur);
+ }
+ return components;
+ }
+
+}
diff --git a/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/src/org/eclipse/papyrus/infra/discovery/ui/viewer/DiscoveryViewer.java b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/src/org/eclipse/papyrus/infra/discovery/ui/viewer/DiscoveryViewer.java
new file mode 100644
index 00000000000..1f3c7682216
--- /dev/null
+++ b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/src/org/eclipse/papyrus/infra/discovery/ui/viewer/DiscoveryViewer.java
@@ -0,0 +1,1505 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Tasktop Technologies 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:
+ * Tasktop Technologies - initial API and implementation
+ * Obeo - adaptation for Amalgamation, EMF based and no Mylyn dependency
+ * CEA LIST - adaptation for Papyrus extra components needs
+ *******************************************************************************/
+package org.eclipse.papyrus.infra.discovery.ui.viewer;
+
+import java.lang.reflect.InvocationTargetException;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.regex.Pattern;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.impl.AdapterImpl;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.layout.GridDataFactory;
+import org.eclipse.jface.layout.GridLayoutFactory;
+import org.eclipse.jface.operation.IRunnableContext;
+import org.eclipse.jface.operation.IRunnableWithProgress;
+import org.eclipse.jface.resource.ColorRegistry;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.resource.JFaceResources;
+import org.eclipse.jface.viewers.DecorationOverlayIcon;
+import org.eclipse.jface.viewers.IDecoration;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.jface.window.IShellProvider;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.papyrus.infra.discovery.Category;
+import org.eclipse.papyrus.infra.discovery.DiscoveryDefinition;
+import org.eclipse.papyrus.infra.discovery.Group;
+import org.eclipse.papyrus.infra.discovery.InstallableComponent;
+import org.eclipse.papyrus.infra.discovery.Message;
+import org.eclipse.papyrus.infra.discovery.Overview;
+import org.eclipse.papyrus.infra.discovery.Severity;
+import org.eclipse.papyrus.infra.discovery.ui.Activator;
+import org.eclipse.papyrus.infra.discovery.ui.internal.common.CommonImages;
+import org.eclipse.papyrus.infra.discovery.ui.internal.common.CommonThemes;
+import org.eclipse.papyrus.infra.discovery.ui.internal.common.DiscoveryImages;
+import org.eclipse.papyrus.infra.discovery.ui.internal.common.GradientCanvas;
+import org.eclipse.papyrus.infra.discovery.ui.internal.common.OverviewToolTip;
+import org.eclipse.papyrus.infra.discovery.ui.internal.common.SelectionProviderAdapter;
+import org.eclipse.papyrus.infra.discovery.ui.internal.common.WorkbenchUtil;
+import org.eclipse.papyrus.infra.discovery.ui.internal.viewer.DiscoveryCategoryComparator;
+import org.eclipse.papyrus.infra.discovery.ui.internal.wizards.Messages;
+import org.eclipse.papyrus.infra.discovery.ui.wizards.DiscoveryWizard;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.accessibility.ACC;
+import org.eclipse.swt.accessibility.AccessibleAdapter;
+import org.eclipse.swt.accessibility.AccessibleControlAdapter;
+import org.eclipse.swt.accessibility.AccessibleControlEvent;
+import org.eclipse.swt.accessibility.AccessibleEvent;
+import org.eclipse.swt.custom.ScrolledComposite;
+import org.eclipse.swt.events.ControlAdapter;
+import org.eclipse.swt.events.ControlEvent;
+import org.eclipse.swt.events.DisposeEvent;
+import org.eclipse.swt.events.DisposeListener;
+import org.eclipse.swt.events.FocusAdapter;
+import org.eclipse.swt.events.FocusEvent;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.events.MouseAdapter;
+import org.eclipse.swt.events.MouseEvent;
+import org.eclipse.swt.events.MouseListener;
+import org.eclipse.swt.events.MouseMoveListener;
+import org.eclipse.swt.events.MouseTrackListener;
+import org.eclipse.swt.events.PaintEvent;
+import org.eclipse.swt.events.PaintListener;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.graphics.Color;
+import org.eclipse.swt.graphics.Cursor;
+import org.eclipse.swt.graphics.Font;
+import org.eclipse.swt.graphics.FontData;
+import org.eclipse.swt.graphics.GC;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.graphics.RGB;
+import org.eclipse.swt.graphics.Rectangle;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Event;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Link;
+import org.eclipse.swt.widgets.Listener;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.swt.widgets.ToolBar;
+import org.eclipse.swt.widgets.ToolItem;
+import org.eclipse.swt.widgets.Widget;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.browser.IWorkbenchBrowserSupport;
+import org.eclipse.ui.forms.IFormColors;
+import org.eclipse.ui.progress.WorkbenchJob;
+import org.eclipse.ui.themes.IThemeManager;
+
+/**
+ * The main wizard page that allows users to select connectors that they wish to
+ * install.
+ *
+ * @author David Green
+ * @author Steffen Pingel
+ * @author Cedric Brun
+ * @author Remi Schnekenburger
+ */
+public class DiscoveryViewer {
+
+ public class ConnectorBorderPaintListener implements PaintListener {
+ public void paintControl(PaintEvent e) {
+ Composite composite = (Composite) e.widget;
+ Rectangle bounds = composite.getBounds();
+ GC gc = e.gc;
+ gc.setLineStyle(SWT.LINE_DOT);
+ gc.drawLine(bounds.x, bounds.y, bounds.x + bounds.width, bounds.y);
+ }
+ }
+
+ private class ConnectorDescriptorItemUi extends AdapterImpl implements
+ Runnable {
+
+ private final Button checkbox;
+
+ private final Label iconLabel;
+
+ private final Label nameLabel;
+
+ private ToolItem infoButton;
+
+ private final Link providerLabel;
+
+ private final Label description;
+
+ private final Composite checkboxContainer;
+
+ private final Composite connectorContainer;
+
+ private final Display display;
+
+ private Image iconImage;
+
+ private Image warningIconImage;
+
+ private InstallableComponent connector;
+
+ public ConnectorDescriptorItemUi(final InstallableComponent connector,
+ Composite categoryChildrenContainer, Color background) {
+ display = categoryChildrenContainer.getDisplay();
+ this.connector = connector;
+ connector.eAdapters().add(this);
+
+ connectorContainer = new Composite(categoryChildrenContainer,
+ SWT.NULL);
+
+ configureLook(connectorContainer, background);
+ GridDataFactory.fillDefaults().grab(true, false).applyTo(
+ connectorContainer);
+ GridLayout layout = new GridLayout(4, false);
+ layout.marginLeft = 7;
+ layout.marginTop = 2;
+ layout.marginBottom = 2;
+ connectorContainer.setLayout(layout);
+
+ checkboxContainer = new Composite(connectorContainer, SWT.NULL);
+ configureLook(checkboxContainer, background);
+ GridDataFactory.swtDefaults().align(SWT.CENTER, SWT.BEGINNING)
+ .span(1, 2).applyTo(checkboxContainer);
+ GridLayoutFactory.fillDefaults().spacing(1, 1).numColumns(2)
+ .applyTo(checkboxContainer);
+
+ checkbox = new Button(checkboxContainer, SWT.CHECK);
+ checkbox.setText(" "); //$NON-NLS-1$
+ // help UI tests
+ checkbox.setData("connectorId", connector.getId()); //$NON-NLS-1$
+ configureLook(checkbox, background);
+ checkbox.setSelection(installableConnectors.contains(connector));
+ checkbox.addFocusListener(new FocusAdapter() {
+ @Override
+ public void focusGained(FocusEvent e) {
+ bodyScrolledComposite.showControl(connectorContainer);
+ }
+ });
+
+ GridDataFactory.swtDefaults().align(SWT.CENTER, SWT.CENTER)
+ .applyTo(checkbox);
+
+ iconLabel = new Label(checkboxContainer, SWT.NULL);
+ configureLook(iconLabel, background);
+ GridDataFactory.swtDefaults().align(SWT.CENTER, SWT.CENTER)
+ .applyTo(iconLabel);
+
+ if (connector.getImage32() != null) {
+ iconImage = computeIconImage(connector.eResource(), connector
+ .getImage32(), 32, false);
+ if (iconImage != null) {
+ if (connector.isIncubation()) {
+ iconImage = new DecorationOverlayIcon(iconImage,
+ DiscoveryImages.OVERLAY_INCUBATION_32,
+ IDecoration.BOTTOM_LEFT).createImage();
+ disposables.add(iconImage);
+ }
+ iconLabel.setImage(iconImage);
+ }
+ }
+
+ nameLabel = new Label(connectorContainer, SWT.NULL);
+ configureLook(nameLabel, background);
+ GridDataFactory.fillDefaults().grab(true, false).align(
+ SWT.BEGINNING, SWT.CENTER).applyTo(nameLabel);
+ nameLabel.setFont(h2Font);
+ if (connector.isIncubation())
+ nameLabel.setText(connector.getName() + " (Incubation)");
+ else
+ nameLabel.setText(connector.getName());
+
+ providerLabel = new Link(connectorContainer, SWT.RIGHT);
+ configureLook(providerLabel, background);
+ GridDataFactory.fillDefaults().align(SWT.END, SWT.CENTER).applyTo(
+ providerLabel);
+
+ providerLabel
+ .setText(NLS
+ .bind(
+ Messages.ConnectorDiscoveryWizardMainPage_provider_and_license,
+ connector.getProvider(), connector
+ .getLicense()));
+
+ if (hasTooltip(connector)) {
+ ToolBar toolBar = new ToolBar(connectorContainer, SWT.FLAT);
+ toolBar.setBackground(background);
+
+ infoButton = new ToolItem(toolBar, SWT.PUSH);
+ infoButton.setImage(infoImage);
+ infoButton
+ .setToolTipText(Messages.ConnectorDiscoveryWizardMainPage_tooltip_showOverview);
+ hookTooltip(toolBar, infoButton, connectorContainer, nameLabel,
+ connector.eResource(), connector.getOverview(), null);
+ GridDataFactory.fillDefaults().align(SWT.END, SWT.CENTER)
+ .applyTo(toolBar);
+ } else {
+ Label label = new Label(connectorContainer, SWT.NULL);
+ label.setText(" "); //$NON-NLS-1$
+ configureLook(label, background);
+ }
+
+ description = new Label(connectorContainer, SWT.NULL | SWT.WRAP);
+ configureLook(description, background);
+
+ GridDataFactory.fillDefaults().grab(true, false).span(3, 1).hint(
+ 100, SWT.DEFAULT).applyTo(description);
+ String descriptionText = connector.getDescription();
+ if (descriptionText != null) {
+ int maxDescriptionLength = 162;
+ if (descriptionText.length() > maxDescriptionLength) {
+ descriptionText = descriptionText.substring(0,
+ maxDescriptionLength);
+ }
+ description.setText(descriptionText.replaceAll(
+ "(\\r\\n)|\\n|\\r", " ")); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ // always disabled color to make it less prominent
+ providerLabel.setForeground(colorDisabled);
+
+ checkbox.addSelectionListener(new SelectionListener() {
+ public void widgetDefaultSelected(SelectionEvent e) {
+ widgetSelected(e);
+ }
+
+ public void widgetSelected(SelectionEvent e) {
+ boolean selected = checkbox.getSelection();
+ maybeModifySelection(selected);
+ }
+ });
+ MouseListener connectorItemMouseListener = new MouseAdapter() {
+ @Override
+ public void mouseUp(MouseEvent e) {
+ boolean selected = !checkbox.getSelection();
+ if (maybeModifySelection(selected)) {
+ checkbox.setSelection(selected);
+ }
+ }
+ };
+ checkboxContainer.addMouseListener(connectorItemMouseListener);
+ connectorContainer.addMouseListener(connectorItemMouseListener);
+ iconLabel.addMouseListener(connectorItemMouseListener);
+ nameLabel.addMouseListener(connectorItemMouseListener);
+ // the provider has clickable links
+ // providerLabel.addMouseListener(connectorItemMouseListener);
+ providerLabel.addSelectionListener(new SelectionListener() {
+ public void widgetSelected(SelectionEvent e) {
+ if (e.text != null) {
+ WorkbenchUtil.openUrl(e.text,
+ IWorkbenchBrowserSupport.AS_EXTERNAL);
+ }
+ }
+
+ public void widgetDefaultSelected(SelectionEvent e) {
+ widgetSelected(e);
+ }
+ });
+ description.addMouseListener(connectorItemMouseListener);
+ }
+
+ protected boolean maybeModifySelection(boolean selected) {
+ if (selected) {
+ if (!connector.isAvailable()) {
+ MessageDialog
+ .openWarning(
+ shellProvider.getShell(),
+ Messages.ConnectorDiscoveryWizardMainPage_warningTitleConnectorUnavailable,
+ NLS
+ .bind(
+ Messages.ConnectorDiscoveryWizardMainPage_warningMessageConnectorUnavailable,
+ connector.getName()));
+ return false;
+ }
+ }
+ DiscoveryViewer.this.modifySelection(connector, selected);
+ return true;
+ }
+
+ @Override
+ public void notifyChanged(Notification msg) {
+ super.notifyChanged(msg);
+ display.asyncExec(this);
+ }
+
+ public void run() {
+ if (!connectorContainer.isDisposed()) {
+ updateAvailability();
+ }
+
+ }
+
+ public void updateAvailability() {
+ boolean enabled = connector.isAvailable();
+
+ checkbox.setEnabled(enabled);
+ nameLabel.setEnabled(enabled);
+ providerLabel.setEnabled(enabled);
+ description.setEnabled(enabled);
+ Color foreground;
+ if (enabled) {
+ foreground = connectorContainer.getForeground();
+ } else {
+ foreground = colorDisabled;
+ }
+ nameLabel.setForeground(foreground);
+ description.setForeground(foreground);
+
+ if (iconImage != null) {
+ boolean unavailable = !enabled;
+ if (unavailable) {
+ if (warningIconImage == null) {
+ warningIconImage = new DecorationOverlayIcon(iconImage,
+ DiscoveryImages.OVERLAY_WARNING_32,
+ IDecoration.BOTTOM_RIGHT).createImage();
+ disposables.add(warningIconImage);
+ }
+ iconLabel.setImage(warningIconImage);
+ } else if (warningIconImage != null) {
+ iconLabel.setImage(iconImage);
+ }
+ }
+ }
+ }
+
+ // e3.5 replace with SWT.ICON_CANCEL
+ public static final int ICON_CANCEL = 1 << 8;
+
+ private static final int MINIMUM_HEIGHT = 100;
+
+ private static boolean useNativeSearchField(Composite composite) {
+ if (useNativeSearchField == null) {
+ useNativeSearchField = Boolean.FALSE;
+ Text testText = null;
+ try {
+ testText = new Text(composite, SWT.SEARCH | ICON_CANCEL);
+ useNativeSearchField = new Boolean(
+ (testText.getStyle() & ICON_CANCEL) != 0);
+ } finally {
+ if (testText != null) {
+ testText.dispose();
+ }
+ }
+
+ }
+ return useNativeSearchField;
+ }
+
+ private boolean showConnectorDescriptorKindFilter;
+
+ private boolean showConnectorDescriptorTextFilter;
+
+ private static final String COLOR_WHITE = "white"; //$NON-NLS-1$
+
+ private static final String COLOR_DARK_GRAY = "DarkGray"; //$NON-NLS-1$
+
+ private static Boolean useNativeSearchField;
+
+ private final List<InstallableComponent> installableConnectors = new ArrayList<InstallableComponent>();
+
+ private Composite body;
+
+ private final List<org.eclipse.swt.graphics.Resource> disposables;
+
+ private Font h2Font;
+
+ private Font h1Font;
+
+ private Color colorWhite;
+
+ private Text filterText;
+
+ private WorkbenchJob refreshJob;
+
+ private String previousFilterText = ""; //$NON-NLS-1$
+
+ private Pattern filterPattern;
+
+ private Label clearFilterTextControl;
+
+ private Image infoImage;
+
+ private Cursor handCursor;
+
+ private Color colorCategoryGradientStart;
+
+ private Color colorCategoryGradientEnd;
+
+ private Color colorDisabled;
+
+ private ScrolledComposite bodyScrolledComposite;
+
+ private boolean verifyUpdateSiteAvailability;
+
+ private final Map<Group, Boolean> connectorDescriptorKindToVisibility = new HashMap<Group, Boolean>();
+
+ {
+
+ }
+
+ private boolean complete;
+
+ private final IRunnableContext context;
+
+ private final IShellProvider shellProvider;
+
+ private Control control;
+
+ private final SelectionProviderAdapter selectionProvider;
+
+ private List<InstallableComponent> allConnectors;
+
+ private int minimumHeight;
+
+ private DiscoveryContentProvider provider;
+
+ public DiscoveryViewer(IShellProvider shellProvider,
+ IRunnableContext context, DiscoveryContentProvider provider) {
+ this.shellProvider = shellProvider;
+ this.context = context;
+ this.selectionProvider = new SelectionProviderAdapter();
+ this.allConnectors = Collections.emptyList();
+ this.disposables = new ArrayList<org.eclipse.swt.graphics.Resource>();
+ this.provider = provider;
+ setShowConnectorDescriptorKindFilter(true);
+ setShowConnectorDescriptorTextFilter(true);
+ setMinimumHeight(MINIMUM_HEIGHT);
+ setComplete(false);
+ for (Group kind : getDiscovery().getFilters()) {
+ connectorDescriptorKindToVisibility.put(kind, true);
+ }
+ ;
+ }
+
+ public void addSelectionChangedListener(ISelectionChangedListener listener) {
+ selectionProvider.addSelectionChangedListener(listener);
+ }
+
+ private void clearDisposables() {
+ disposables.clear();
+ h1Font = null;
+ h2Font = null;
+ infoImage = null;
+ handCursor = null;
+ colorCategoryGradientStart = null;
+ colorCategoryGradientEnd = null;
+ }
+
+ private void clearFilterText() {
+ filterText.setText(""); //$NON-NLS-1$
+ filterTextChanged();
+ }
+
+ private Image computeIconImage(Resource discoverySource, String imagePath,
+ int dimension, boolean fallback) {
+ if (imagePath != null && imagePath.length() > 0) {
+ URI uri = discoverySource.getURI();
+ URI trimed = uri.trimSegments(1);
+ String urlPath = trimed.toString() + "/" + imagePath;
+ URL resource = null;
+ try {
+ resource = new URL(urlPath);
+ } catch (MalformedURLException e) {
+ // TODO Auto-generated catch block
+ }
+ if (resource != null) {
+ ImageDescriptor descriptor = ImageDescriptor
+ .createFromURL(resource);
+ Image image = descriptor.createImage();
+ if (image != null) {
+ disposables.add(image);
+ return image;
+ }
+ }
+ }
+ return null;
+ }
+
+ private void configureLook(Control control, Color background) {
+ control.setBackground(background);
+ }
+
+ /**
+ * cause the UI to respond to a change in visibility filters
+ *
+ * @see #setVisibility(ConnectorDescriptorKind, boolean)
+ */
+ public void connectorDescriptorKindVisibilityUpdated() {
+ createBodyContents();
+ }
+
+ public void createBodyContents() {
+ // remove any existing contents
+ for (Control child : body.getChildren()) {
+ child.dispose();
+ }
+ clearDisposables();
+ allConnectors = new ArrayList<InstallableComponent>();
+ initializeCursors();
+ initializeImages();
+ initializeFonts();
+ initializeColors();
+
+ GridLayoutFactory.fillDefaults().applyTo(body);
+
+ bodyScrolledComposite = new ScrolledComposite(body, SWT.H_SCROLL
+ | SWT.V_SCROLL | SWT.BORDER);
+
+ configureLook(bodyScrolledComposite, colorWhite);
+ GridDataFactory.fillDefaults().grab(true, true).applyTo(
+ bodyScrolledComposite);
+
+ final Composite scrolledContents = new Composite(bodyScrolledComposite,
+ SWT.NONE);
+ configureLook(scrolledContents, colorWhite);
+ scrolledContents.setRedraw(false);
+ try {
+ createDiscoveryContents(scrolledContents);
+ } finally {
+ scrolledContents.layout(true);
+ scrolledContents.setRedraw(true);
+ }
+ Point size = scrolledContents.computeSize(body.getSize().x,
+ SWT.DEFAULT, true);
+ scrolledContents.setSize(size);
+
+ bodyScrolledComposite.setExpandHorizontal(true);
+ bodyScrolledComposite.setMinWidth(100);
+ bodyScrolledComposite.setExpandVertical(true);
+ bodyScrolledComposite.setMinHeight(1);
+
+ bodyScrolledComposite.addControlListener(new ControlAdapter() {
+ @Override
+ public void controlResized(ControlEvent e) {
+ // XXX small offset in case list has a scroll bar
+ Point size = scrolledContents.computeSize(
+ body.getSize().x - 20, SWT.DEFAULT, true);
+ scrolledContents.setSize(size);
+ bodyScrolledComposite.setMinHeight(size.y);
+ }
+ });
+
+ bodyScrolledComposite.setContent(scrolledContents);
+
+ Dialog.applyDialogFont(body);
+ // we've changed it so it needs to know
+ body.layout(true);
+ }
+
+ private Label createClearFilterTextControl(Composite filterContainer,
+ final Text filterText) {
+ final Image inactiveImage = CommonImages.FIND_CLEAR_DISABLED
+ .createImage();
+ final Image activeImage = CommonImages.FIND_CLEAR.createImage();
+ final Image pressedImage = new Image(filterContainer.getDisplay(),
+ activeImage, SWT.IMAGE_GRAY);
+
+ final Label clearButton = new Label(filterContainer, SWT.NONE);
+ clearButton.setLayoutData(new GridData(SWT.BEGINNING, SWT.CENTER,
+ false, false));
+ clearButton.setImage(inactiveImage);
+ clearButton
+ .setToolTipText(Messages.ConnectorDiscoveryWizardMainPage_clearButton_toolTip);
+ clearButton.setBackground(filterContainer.getDisplay().getSystemColor(
+ SWT.COLOR_LIST_BACKGROUND));
+ clearButton.addMouseListener(new MouseAdapter() {
+ private MouseMoveListener fMoveListener;
+
+ private boolean isMouseInButton(MouseEvent e) {
+ Point buttonSize = clearButton.getSize();
+ return 0 <= e.x && e.x < buttonSize.x && 0 <= e.y
+ && e.y < buttonSize.y;
+ }
+
+ @Override
+ public void mouseDown(MouseEvent e) {
+ clearButton.setImage(pressedImage);
+ fMoveListener = new MouseMoveListener() {
+ private boolean fMouseInButton = true;
+
+ public void mouseMove(MouseEvent e) {
+ boolean mouseInButton = isMouseInButton(e);
+ if (mouseInButton != fMouseInButton) {
+ fMouseInButton = mouseInButton;
+ clearButton.setImage(mouseInButton ? pressedImage
+ : inactiveImage);
+ }
+ }
+ };
+ clearButton.addMouseMoveListener(fMoveListener);
+ }
+
+ @Override
+ public void mouseUp(MouseEvent e) {
+ if (fMoveListener != null) {
+ clearButton.removeMouseMoveListener(fMoveListener);
+ fMoveListener = null;
+ boolean mouseInButton = isMouseInButton(e);
+ clearButton.setImage(mouseInButton ? activeImage
+ : inactiveImage);
+ if (mouseInButton) {
+ clearFilterText();
+ filterText.setFocus();
+ }
+ }
+ }
+ });
+ clearButton.addMouseTrackListener(new MouseTrackListener() {
+ public void mouseEnter(MouseEvent e) {
+ clearButton.setImage(activeImage);
+ }
+
+ public void mouseExit(MouseEvent e) {
+ clearButton.setImage(inactiveImage);
+ }
+
+ public void mouseHover(MouseEvent e) {
+ }
+ });
+ clearButton.addDisposeListener(new DisposeListener() {
+ public void widgetDisposed(DisposeEvent e) {
+ inactiveImage.dispose();
+ activeImage.dispose();
+ pressedImage.dispose();
+ }
+ });
+ clearButton.getAccessible().addAccessibleListener(
+ new AccessibleAdapter() {
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = Messages.ConnectorDiscoveryWizardMainPage_clearButton_accessibleListener;
+ }
+ });
+ clearButton.getAccessible().addAccessibleControlListener(
+ new AccessibleControlAdapter() {
+ @Override
+ public void getRole(AccessibleControlEvent e) {
+ e.detail = ACC.ROLE_PUSHBUTTON;
+ }
+ });
+ return clearButton;
+ }
+
+ public void createControl(Composite parent) {
+ createRefreshJob();
+
+ Composite container = new Composite(parent, SWT.NULL);
+ container.addDisposeListener(new DisposeListener() {
+ public void widgetDisposed(DisposeEvent e) {
+ refreshJob.cancel();
+ }
+ });
+ GridLayout layout = new GridLayout(1, false);
+ layout.marginHeight = 0;
+ layout.marginWidth = 0;
+ container.setLayout(layout);
+ //
+ { // header
+ Composite header = new Composite(container, SWT.NULL);
+ GridLayoutFactory.fillDefaults().applyTo(header);
+ GridDataFactory.fillDefaults().grab(true, false).applyTo(header);
+
+ // TODO: refresh button?
+ if (isShowConnectorDescriptorKindFilter()
+ || isShowConnectorDescriptorTextFilter()) {
+ Composite filterContainer = new Composite(header, SWT.NULL);
+ GridDataFactory.fillDefaults().grab(true, false).applyTo(
+ filterContainer);
+
+ int numColumns = 1; // 1 for label
+ if (isShowConnectorDescriptorKindFilter()) {
+ numColumns += getDiscovery().getFilters().size();
+ }
+ if (isShowConnectorDescriptorTextFilter()) {
+ ++numColumns;
+ }
+ GridLayoutFactory.fillDefaults().numColumns(numColumns)
+ .applyTo(filterContainer);
+ Label label = new Label(filterContainer, SWT.NULL);
+ label
+ .setText(Messages.ConnectorDiscoveryWizardMainPage_filterLabel);
+
+ if (isShowConnectorDescriptorTextFilter()) {
+ Composite textFilterContainer;
+ boolean nativeSearch = useNativeSearchField(header);
+ if (nativeSearch) {
+ textFilterContainer = new Composite(filterContainer,
+ SWT.NULL);
+ } else {
+ textFilterContainer = new Composite(filterContainer,
+ SWT.BORDER);
+ textFilterContainer.setBackground(header.getDisplay()
+ .getSystemColor(SWT.COLOR_LIST_BACKGROUND));
+ }
+ GridDataFactory.fillDefaults().grab(true, false).applyTo(
+ textFilterContainer);
+ GridLayoutFactory.fillDefaults().numColumns(2).applyTo(
+ textFilterContainer);
+
+ if (nativeSearch) {
+ filterText = new Text(textFilterContainer, SWT.SINGLE
+ | SWT.BORDER | SWT.SEARCH | ICON_CANCEL);
+ } else {
+ filterText = new Text(textFilterContainer, SWT.SINGLE);
+ }
+
+ filterText.addModifyListener(new ModifyListener() {
+ public void modifyText(ModifyEvent e) {
+ filterTextChanged();
+ }
+ });
+ if (nativeSearch) {
+ filterText.addSelectionListener(new SelectionAdapter() {
+ @Override
+ public void widgetDefaultSelected(SelectionEvent e) {
+ if (e.detail == ICON_CANCEL) {
+ clearFilterText();
+ }
+ }
+ });
+ GridDataFactory.fillDefaults().grab(true, false).span(
+ 2, 1).applyTo(filterText);
+ } else {
+ GridDataFactory.fillDefaults().grab(true, false)
+ .applyTo(filterText);
+ clearFilterTextControl = createClearFilterTextControl(
+ textFilterContainer, filterText);
+ clearFilterTextControl.setVisible(false);
+ }
+ }
+
+ if (isShowConnectorDescriptorKindFilter()) { // filter
+ // buttons
+
+ for (final Group kind : getDiscovery().getFilters()) {
+ final Button checkbox = new Button(filterContainer,
+ SWT.CHECK);
+ checkbox.setSelection(isVisible(kind));
+ checkbox.setText(getFilterLabel(kind));
+ checkbox.addSelectionListener(new SelectionListener() {
+ public void widgetDefaultSelected(SelectionEvent e) {
+ widgetSelected(e);
+ }
+
+ public void widgetSelected(SelectionEvent e) {
+ boolean selection = checkbox.getSelection();
+ setVisibility(kind, selection);
+ connectorDescriptorKindVisibilityUpdated();
+ }
+ });
+ }
+ }
+
+ }
+
+ }
+ { // container
+ body = new Composite(container, SWT.NULL);
+ GridDataFactory.fillDefaults().grab(true, true).hint(SWT.DEFAULT,
+ minimumHeight).applyTo(body);
+ }
+ Dialog.applyDialogFont(container);
+ setControl(container);
+ }
+
+ public void setMinimumHeight(int minimumHeight) {
+ this.minimumHeight = minimumHeight;
+ if (body != null) {
+ GridDataFactory.fillDefaults().grab(true, true).hint(SWT.DEFAULT,
+ minimumHeight).applyTo(body);
+ }
+ }
+
+ public static int getMinimumHeight() {
+ return MINIMUM_HEIGHT;
+ }
+
+ private void createDiscoveryContents(Composite container) {
+
+ Color background = container.getBackground();
+
+ if (provider.getDiscovery() == null || isEmpty(provider.getDiscovery())) {
+ GridLayoutFactory.fillDefaults().margins(5, 5).applyTo(container);
+
+ boolean atLeastOneKindFiltered = false;
+ for (Group kind : getDiscovery().getFilters()) {
+ if (!isVisible(kind)) {
+ atLeastOneKindFiltered = true;
+ break;
+ }
+ }
+ Control helpTextControl;
+ if (filterPattern != null) {
+ Link link = new Link(container, SWT.WRAP);
+
+ link.setFont(container.getFont());
+ link
+ .setText(Messages.ConnectorDiscoveryWizardMainPage_noMatchingItems_withFilterText);
+ link.addListener(SWT.Selection, new Listener() {
+ public void handleEvent(Event event) {
+ clearFilterText();
+ filterText.setFocus();
+ }
+ });
+ helpTextControl = link;
+ } else {
+ Label helpText = new Label(container, SWT.WRAP);
+ helpText.setFont(container.getFont());
+ if (atLeastOneKindFiltered) {
+ helpText
+ .setText(Messages.ConnectorDiscoveryWizardMainPage_noMatchingItems_filteredType);
+ } else {
+ helpText
+ .setText(Messages.ConnectorDiscoveryWizardMainPage_noMatchingItems_noFilter);
+ }
+ helpTextControl = helpText;
+ }
+ configureLook(helpTextControl, background);
+ GridDataFactory.fillDefaults().grab(true, false).hint(100,
+ SWT.DEFAULT).applyTo(helpTextControl);
+ } else {
+ GridLayoutFactory.fillDefaults().numColumns(2).spacing(0, 0)
+ .applyTo(container);
+
+ List<Category> categories = new ArrayList<Category>(provider
+ .getDiscovery().getCategories());
+ Collections.sort(categories, new DiscoveryCategoryComparator());
+
+ Composite categoryChildrenContainer = null;
+ for (Category category : categories) {
+ if (isEmpty(category)) {
+ // don't add empty categories
+ continue;
+ }
+ { // category header
+ final GradientCanvas categoryHeaderContainer = new GradientCanvas(
+ container, SWT.NONE);
+ categoryHeaderContainer.setSeparatorVisible(true);
+ categoryHeaderContainer.setSeparatorAlignment(SWT.TOP);
+ categoryHeaderContainer
+ .setBackgroundGradient(new Color[] {
+ colorCategoryGradientStart,
+ colorCategoryGradientEnd },
+ new int[] { 100 }, true);
+ categoryHeaderContainer.putColor(
+ IFormColors.H_BOTTOM_KEYLINE1,
+ colorCategoryGradientStart);
+ categoryHeaderContainer.putColor(
+ IFormColors.H_BOTTOM_KEYLINE2,
+ colorCategoryGradientEnd);
+
+ GridDataFactory.fillDefaults().span(2, 1).applyTo(
+ categoryHeaderContainer);
+ GridLayoutFactory.fillDefaults().numColumns(3)
+ .margins(5, 5).equalWidth(false).applyTo(
+ categoryHeaderContainer);
+
+ Label iconLabel = new Label(categoryHeaderContainer,
+ SWT.NULL);
+ if (category.getImage48() != null) {
+ Image image = computeIconImage(category.eResource(),
+ category.getImage48(), 48, true);
+ if (image != null) {
+ iconLabel.setImage(image);
+ }
+ }
+ iconLabel.setBackground(null);
+ GridDataFactory.swtDefaults().align(SWT.CENTER,
+ SWT.BEGINNING).span(1, 2).applyTo(iconLabel);
+
+ Label nameLabel = new Label(categoryHeaderContainer,
+ SWT.NULL);
+ nameLabel.setFont(h1Font);
+ nameLabel.setText(category.getName());
+ nameLabel.setBackground(null);
+
+ GridDataFactory.fillDefaults().grab(true, false).applyTo(
+ nameLabel);
+ if (hasTooltip(category)) {
+ ToolBar toolBar = new ToolBar(categoryHeaderContainer,
+ SWT.FLAT);
+ toolBar.setBackground(null);
+ ToolItem infoButton = new ToolItem(toolBar, SWT.PUSH);
+ infoButton.setImage(infoImage);
+ infoButton
+ .setToolTipText(Messages.ConnectorDiscoveryWizardMainPage_tooltip_showOverview);
+ hookTooltip(toolBar, infoButton,
+ categoryHeaderContainer, nameLabel, category
+ .eResource(), category.getOverview(),
+ null);
+ GridDataFactory.fillDefaults().align(SWT.END,
+ SWT.CENTER).applyTo(toolBar);
+ } else {
+ new Label(categoryHeaderContainer, SWT.NULL)
+ .setText(" "); //$NON-NLS-1$
+ }
+ Label description = new Label(categoryHeaderContainer,
+ SWT.WRAP);
+ GridDataFactory.fillDefaults().grab(true, false).span(2, 1)
+ .hint(100, SWT.DEFAULT).applyTo(description);
+ description.setBackground(null);
+ if (category.getDescription() != null)
+ description.setText(category.getDescription());
+ }
+
+ categoryChildrenContainer = new Composite(container, SWT.NULL);
+ configureLook(categoryChildrenContainer, background);
+ GridDataFactory.fillDefaults().span(2, 1).grab(true, false)
+ .applyTo(categoryChildrenContainer);
+ GridLayoutFactory.fillDefaults().spacing(0, 0).applyTo(
+ categoryChildrenContainer);
+
+ int numChildren = 0;
+ List<InstallableComponent> connectors = new ArrayList<InstallableComponent>(
+ category.getComponents());
+ for (final InstallableComponent connector : connectors) {
+ if (isFiltered(connector)) {
+ continue;
+ }
+
+ if (++numChildren > 1) {
+ // a separator between connector descriptors
+ Composite border = new Composite(
+ categoryChildrenContainer, SWT.NULL);
+ GridDataFactory.fillDefaults().grab(true, false).hint(
+ SWT.DEFAULT, 1).applyTo(border);
+ GridLayoutFactory.fillDefaults().applyTo(border);
+ border
+ .addPaintListener(new ConnectorBorderPaintListener());
+ }
+
+ ConnectorDescriptorItemUi itemUi = new ConnectorDescriptorItemUi(
+ connector, categoryChildrenContainer, background);
+ itemUi.updateAvailability();
+ allConnectors.add(connector);
+ }
+ }
+ // last one gets a border
+ Composite border = new Composite(categoryChildrenContainer,
+ SWT.NULL);
+ GridDataFactory.fillDefaults().grab(true, false).hint(SWT.DEFAULT,
+ 1).applyTo(border);
+ GridLayoutFactory.fillDefaults().applyTo(border);
+ border.addPaintListener(new ConnectorBorderPaintListener());
+ }
+ container.layout(true);
+ container.redraw();
+ }
+
+ protected Pattern createPattern(String filterText) {
+ if (filterText == null || filterText.length() == 0) {
+ return null;
+ }
+ String regex = filterText;
+ regex.replace("\\", "\\\\").replace("?", ".").replace("*", ".*?"); //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$
+ return Pattern
+ .compile(regex, Pattern.CASE_INSENSITIVE | Pattern.DOTALL);
+ }
+
+ private void createRefreshJob() {
+ refreshJob = new WorkbenchJob("filter") { //$NON-NLS-1$
+
+ @Override
+ public IStatus runInUIThread(IProgressMonitor monitor) {
+ if (filterText.isDisposed()) {
+ return Status.CANCEL_STATUS;
+ }
+ String text = filterText.getText();
+ text = text.trim();
+
+ if (!previousFilterText.equals(text)) {
+ previousFilterText = text;
+ filterPattern = createPattern(previousFilterText);
+ if (clearFilterTextControl != null) {
+ clearFilterTextControl
+ .setVisible(filterPattern != null);
+ }
+ createBodyContents();
+ }
+ return Status.OK_STATUS;
+ }
+ };
+ refreshJob.setSystem(true);
+ }
+
+ private void discoveryUpdated(boolean wasCancelled) {
+ createBodyContents();
+ if (!wasCancelled) {
+ int categoryWithConnectorCount = 0;
+ for (Category category : provider.getDiscovery().getCategories()) {
+ categoryWithConnectorCount += category.getComponents().size();
+ }
+ if (categoryWithConnectorCount == 0) {
+ // nothing was discovered: notify the user
+ MessageDialog
+ .openWarning(
+ getShell(),
+ Messages.ConnectorDiscoveryWizardMainPage_noConnectorsFound,
+ Messages.ConnectorDiscoveryWizardMainPage_noConnectorsFound_description);
+ }
+ }
+ selectionProvider.setSelection(StructuredSelection.EMPTY);
+ }
+
+ public void dispose() {
+ for (org.eclipse.swt.graphics.Resource resource : disposables) {
+ resource.dispose();
+ }
+ clearDisposables();
+
+ }
+
+ private boolean filterMatches(String text) {
+ return text != null && filterPattern.matcher(text).find();
+ }
+
+ private void filterTextChanged() {
+ refreshJob.cancel();
+ refreshJob.schedule(200L);
+ }
+
+ public Control getControl() {
+ return control;
+ }
+
+ public DiscoveryDefinition getDiscovery() {
+ return provider.getDiscovery();
+ }
+
+ private String getFilterLabel(Group kind) {
+ return kind.getName();
+ }
+
+ public List<InstallableComponent> getInstallableConnectors() {
+ return installableConnectors;
+ }
+
+ public IStructuredSelection getSelection() {
+ return (IStructuredSelection) selectionProvider.getSelection();
+ }
+
+ private Shell getShell() {
+ return shellProvider.getShell();
+ }
+
+ public boolean getVerifyUpdateSiteAvailability() {
+ return verifyUpdateSiteAvailability;
+ }
+
+ private boolean hasTooltip(final Category category) {
+ return category.getOverview() != null
+ && category.getOverview().getSummary() != null
+ && category.getOverview().getSummary().length() > 0;
+ }
+
+ private boolean hasTooltip(final InstallableComponent connector) {
+ return connector.getOverview() != null
+ && connector.getOverview().getSummary() != null
+ && connector.getOverview().getSummary().length() > 0;
+ }
+
+ private void hookRecursively(Control control, Listener listener) {
+ control.addListener(SWT.Dispose, listener);
+ control.addListener(SWT.MouseHover, listener);
+ control.addListener(SWT.MouseMove, listener);
+ control.addListener(SWT.MouseExit, listener);
+ control.addListener(SWT.MouseDown, listener);
+ control.addListener(SWT.MouseWheel, listener);
+ if (control instanceof Composite) {
+ for (Control child : ((Composite) control).getChildren()) {
+ hookRecursively(child, listener);
+ }
+ }
+ }
+
+ private void hookTooltip(final Control parent, final Widget tipActivator,
+ final Control exitControl, final Control titleControl,
+ Resource source, Overview overview, Image image) {
+ final OverviewToolTip toolTip = new OverviewToolTip(parent, source,
+ overview, image);
+ Listener listener = new Listener() {
+ public void handleEvent(Event event) {
+ switch (event.type) {
+ case SWT.MouseHover:
+ toolTip.show(titleControl);
+ break;
+ case SWT.Dispose:
+ case SWT.MouseWheel:
+ toolTip.hide();
+ break;
+ }
+
+ }
+ };
+ tipActivator.addListener(SWT.Dispose, listener);
+ tipActivator.addListener(SWT.MouseWheel, listener);
+ if (image != null) {
+ tipActivator.addListener(SWT.MouseHover, listener);
+ }
+ Listener selectionListener = new Listener() {
+ public void handleEvent(Event event) {
+ toolTip.show(titleControl);
+ }
+ };
+ tipActivator.addListener(SWT.Selection, selectionListener);
+ Listener exitListener = new Listener() {
+ public void handleEvent(Event event) {
+ switch (event.type) {
+ case SWT.MouseWheel:
+ toolTip.hide();
+ break;
+ case SWT.MouseExit:
+ /*
+ * Check if the mouse exit happened because we move over the
+ * tooltip
+ */
+ Rectangle containerBounds = exitControl.getBounds();
+ Point displayLocation = exitControl.getParent().toDisplay(
+ containerBounds.x, containerBounds.y);
+ containerBounds.x = displayLocation.x;
+ containerBounds.y = displayLocation.y;
+ if (containerBounds.contains(Display.getCurrent()
+ .getCursorLocation())) {
+ break;
+ }
+ toolTip.hide();
+ break;
+ }
+ }
+ };
+ hookRecursively(exitControl, exitListener);
+ }
+
+ private void initializeColors() {
+ IThemeManager themeManager = PlatformUI.getWorkbench()
+ .getThemeManager();
+ if (colorWhite == null) {
+ ColorRegistry colorRegistry = JFaceResources.getColorRegistry();
+ if (!colorRegistry.hasValueFor(COLOR_WHITE)) {
+ colorRegistry.put(COLOR_WHITE, new RGB(255, 255, 255));
+ }
+ colorWhite = colorRegistry.get(COLOR_WHITE);
+ }
+ if (colorDisabled == null) {
+ ColorRegistry colorRegistry = JFaceResources.getColorRegistry();
+ if (!colorRegistry.hasValueFor(COLOR_DARK_GRAY)) {
+ colorRegistry.put(COLOR_DARK_GRAY, new RGB(0x69, 0x69, 0x69));
+ }
+ colorDisabled = colorRegistry.get(COLOR_DARK_GRAY);
+ }
+ if (colorCategoryGradientStart == null) {
+ colorCategoryGradientStart = themeManager.getCurrentTheme()
+ .getColorRegistry().get(
+ CommonThemes.COLOR_CATEGORY_GRADIENT_START);
+ colorCategoryGradientEnd = themeManager.getCurrentTheme()
+ .getColorRegistry().get(
+ CommonThemes.COLOR_CATEGORY_GRADIENT_END);
+ }
+ }
+
+ private void initializeCursors() {
+ if (handCursor == null) {
+ handCursor = new Cursor(getShell().getDisplay(), SWT.CURSOR_HAND);
+ disposables.add(handCursor);
+ }
+ }
+
+ private void initializeFonts() {
+ // create a level-2 heading font
+ if (h2Font == null) {
+ Font baseFont = JFaceResources.getDialogFont();
+ FontData[] fontData = baseFont.getFontData();
+ for (FontData data : fontData) {
+ data.setStyle(data.getStyle() | SWT.BOLD);
+ data.height = data.height * 1.25f;
+ }
+ h2Font = new Font(Display.getCurrent(), fontData);
+ disposables.add(h2Font);
+ }
+ // create a level-1 heading font
+ if (h1Font == null) {
+ Font baseFont = JFaceResources.getDialogFont();
+ FontData[] fontData = baseFont.getFontData();
+ for (FontData data : fontData) {
+ data.setStyle(data.getStyle() | SWT.BOLD);
+ data.height = data.height * 1.35f;
+ }
+ h1Font = new Font(Display.getCurrent(), fontData);
+ disposables.add(h1Font);
+ }
+ }
+
+ private void initializeImages() {
+ if (infoImage == null) {
+ infoImage = DiscoveryImages.MESSAGE_INFO.createImage();
+ disposables.add(infoImage);
+ }
+ }
+
+ public boolean isComplete() {
+ return complete;
+ }
+
+ /**
+ * indicate if there is nothing to display in the UI, given the current
+ * state of {@link DiscoveryWizard#isVisible(ConnectorDescriptorKind)
+ * filters}.
+ */
+ private boolean isEmpty(DiscoveryDefinition discovery) {
+ for (Category category : discovery.getCategories()) {
+ if (!isEmpty(category)) {
+ return false;
+ }
+ }
+ return true;
+ }
+
+ /**
+ * indicate if the category has nothing to display in the UI, given the
+ * current state of
+ * {@link DiscoveryWizard#isVisible(ConnectorDescriptorKind) filters}.
+ */
+ private boolean isEmpty(Category category) {
+ if (category.getComponents().isEmpty()) {
+ return true;
+ }
+ for (InstallableComponent descriptor : category.getComponents()) {
+ if (!isFiltered(descriptor)) {
+ return false;
+ }
+ }
+ return true;
+ }
+
+ private boolean isFiltered(InstallableComponent descriptor) {
+ if (!descriptor.isVisible())
+ return true;
+ boolean kindFiltered = false;
+ for (Group kind : descriptor.getGroups()) {
+ if (!isVisible(kind)) {
+ kindFiltered = true;
+ break;
+ }
+ }
+ if (kindFiltered) {
+ return true;
+ }
+ if (descriptor.isInstalled()) {
+ // always filter installed features per bug 275777
+ return true;
+ }
+ if (filterPattern != null) {
+ if (!(filterMatches(descriptor.getName())
+ || filterMatches(descriptor.getDescription())
+ || filterMatches(descriptor.getProvider()) || filterMatches(descriptor
+ .getLicense()))) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ /**
+ * indicate if the connector descriptor filters should be shown in the UI.
+ * Changing this setting only has an effect before the UI is presented.
+ */
+ public boolean isShowConnectorDescriptorKindFilter() {
+ return showConnectorDescriptorKindFilter;
+ }
+
+ /**
+ * indicate if a text field should be provided to allow the user to filter
+ * connector descriptors
+ */
+ public boolean isShowConnectorDescriptorTextFilter() {
+ return showConnectorDescriptorTextFilter;
+ }
+
+ /**
+ * indicate if the given kind of connector is currently visible in the
+ * wizard
+ *
+ * @see #setVisibility(ConnectorDescriptorKind, boolean)
+ */
+ public boolean isVisible(Group kind) {
+ if (kind == null) {
+ throw new IllegalArgumentException();
+ }
+ return connectorDescriptorKindToVisibility.get(kind);
+ }
+
+ private void modifySelection(final InstallableComponent connector,
+ boolean selected) {
+ modifySelectionInternal(connector, selected);
+ updateState();
+ }
+
+ private void modifySelectionInternal(final InstallableComponent connector,
+ boolean selected) {
+
+ Iterator<Message> it = connector.getMessages().iterator();
+ while (selected && it.hasNext()) {
+ Message message = it.next();
+ if (message.getIcon() == Severity.WARNING) {
+ MessageDialog.openWarning(getShell(), message.getTitle(),
+ message.getMessage());
+ } else if (message.getIcon() == Severity.INFO) {
+ MessageDialog.openInformation(getShell(), message.getTitle(),
+ message.getMessage());
+ }
+ }
+
+ connector.setSelected(selected);
+ if (selected) {
+ installableConnectors.add(connector);
+ } else {
+ installableConnectors.remove(connector);
+ }
+ }
+
+ public void removeSelectionChangedListener(
+ ISelectionChangedListener listener) {
+ selectionProvider.removeSelectionChangedListener(listener);
+ }
+
+ public void setComplete(boolean complete) {
+ this.complete = complete;
+ }
+
+ protected void setControl(Control control) {
+ this.control = control;
+ }
+
+ public void setSelection(IStructuredSelection selection) {
+ Set<InstallableComponent> selected = new HashSet<InstallableComponent>();
+ for (Object descriptor : selection.toArray()) {
+ if (descriptor instanceof InstallableComponent) {
+ selected.add((InstallableComponent) descriptor);
+ }
+ }
+ for (InstallableComponent connector : allConnectors) {
+ modifySelectionInternal(connector, selected.contains(connector));
+ }
+ updateState();
+ }
+
+ /**
+ * indicate if the connector descriptor filters should be shown in the UI.
+ * Changing this setting only has an effect before the UI is presented.
+ */
+ public void setShowConnectorDescriptorKindFilter(
+ boolean showConnectorDescriptorKindFilter) {
+ this.showConnectorDescriptorKindFilter = showConnectorDescriptorKindFilter;
+ }
+
+ /**
+ * indicate if a text field should be provided to allow the user to filter
+ * connector descriptors
+ */
+ public void setShowConnectorDescriptorTextFilter(
+ boolean showConnectorDescriptorTextFilter) {
+ this.showConnectorDescriptorTextFilter = showConnectorDescriptorTextFilter;
+ }
+
+ public void setVerifyUpdateSiteAvailability(
+ boolean verifyUpdateSiteAvailability) {
+ this.verifyUpdateSiteAvailability = verifyUpdateSiteAvailability;
+ }
+
+ /**
+ * configure the page to show or hide connector descriptors of the given
+ * kind
+ *
+ * @see #connectorDescriptorKindVisibilityUpdated()
+ */
+ public void setVisibility(Group kind, boolean visible) {
+ if (kind == null) {
+ throw new IllegalArgumentException();
+ }
+ connectorDescriptorKindToVisibility.put(kind, visible);
+ }
+
+ public void updateDiscovery() {
+ boolean wasCancelled = false;
+ try {
+ context.run(true, true, new IRunnableWithProgress() {
+ public void run(IProgressMonitor monitor)
+ throws InvocationTargetException, InterruptedException {
+
+ DiscoveryViewer.this.provider.update(monitor);
+ if (monitor.isCanceled()) {
+ throw new InterruptedException();
+ }
+ }
+ });
+ } catch (InvocationTargetException e) {
+ Activator.logHelper.error(Messages.ConnectorDiscoveryWizardMainPage_unexpectedException, e);
+ } catch (InterruptedException e) {
+ // cancelled by user so nothing to do here.
+ wasCancelled = true;
+ }
+ if (provider.getDiscovery() != null) {
+ discoveryUpdated(wasCancelled);
+ if (verifyUpdateSiteAvailability && !allConnectors.isEmpty()) {
+ try {
+ context.run(true, true, new IRunnableWithProgress() {
+ public void run(IProgressMonitor monitor)
+ throws InvocationTargetException,
+ InterruptedException {
+ AvailabilityUpdater availability = new AvailabilityUpdater(
+ provider.getDiscovery());
+ availability.update(monitor);
+ }
+ });
+ } catch (InvocationTargetException e) {
+ Activator.logHelper.error(Messages.ConnectorDiscoveryWizardMainPage_unexpectedException, e);
+ } catch (InterruptedException e) {
+ // cancelled by user so nothing to do here.
+ wasCancelled = true;
+ }
+ }
+
+ // shouldn't be necessary but for some
+ // reason checkboxes don't
+ // regain their enabled state
+ createBodyContents();
+ }
+ // help UI tests
+ body.setData("discoveryComplete", "true"); //$NON-NLS-1$//$NON-NLS-2$
+ }
+
+ private void updateState() {
+ setComplete(!installableConnectors.isEmpty());
+ selectionProvider.setSelection(new StructuredSelection(
+ getInstallableConnectors()));
+ }
+}
diff --git a/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/src/org/eclipse/papyrus/infra/discovery/ui/viewer/InstallationStatusUpdater.java b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/src/org/eclipse/papyrus/infra/discovery/ui/viewer/InstallationStatusUpdater.java
new file mode 100644
index 00000000000..c11f98e0984
--- /dev/null
+++ b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/src/org/eclipse/papyrus/infra/discovery/ui/viewer/InstallationStatusUpdater.java
@@ -0,0 +1,78 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Obeo.
+ * 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:
+ * Obeo - initial API and implementation
+ * CEA LIST - adaptation to Papyrus
+ *******************************************************************************/
+package org.eclipse.papyrus.infra.discovery.ui.viewer;
+
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Set;
+
+import org.eclipse.core.runtime.IBundleGroup;
+import org.eclipse.core.runtime.IBundleGroupProvider;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.papyrus.infra.discovery.DiscoveryDefinition;
+import org.eclipse.papyrus.infra.discovery.InstallableComponent;
+
+/**
+ *
+ * @author Cedric Brun <cedric.brun@obeo.fr>
+ *
+ */
+public class InstallationStatusUpdater {
+
+ private DiscoveryDefinitionBrowser discovery;
+
+ public InstallationStatusUpdater(DiscoveryDefinition newdiscovery) {
+ this.discovery = new DiscoveryDefinitionBrowser(newdiscovery);
+ }
+
+ public void update(IProgressMonitor monitor) throws InterruptedException {
+ Set<String> installedFeatures = new HashSet<String>();
+ IBundleGroupProvider[] bundleGroupProviders = Platform
+ .getBundleGroupProviders();
+ for (IBundleGroupProvider provider : bundleGroupProviders) {
+ if (monitor.isCanceled()) {
+ throw new InterruptedException();
+ }
+ IBundleGroup[] bundleGroups = provider.getBundleGroups();
+ for (IBundleGroup group : bundleGroups) {
+ installedFeatures.add(group.getIdentifier());
+ }
+ }
+ Iterator<InstallableComponent> it = discovery
+ .getAllInstallableComponents().iterator();
+ while (it.hasNext()) {
+ InstallableComponent comp = it.next();
+ if (allFeaturesAreAlreadyInstalled(installedFeatures, comp)
+ || oneOfTheseIsAlreadyInstalled(comp.getHiddingFeatureID(),
+ installedFeatures)) {
+ comp.setInstalled(true);
+ }
+ }
+ }
+
+ private boolean oneOfTheseIsAlreadyInstalled(
+ EList<String> hiddingFeatureID, Set<String> installedFeatures) {
+ boolean oneIsInstalled = false;
+ Iterator<String> it = hiddingFeatureID.iterator();
+ while (it.hasNext() && !oneIsInstalled) {
+ oneIsInstalled = (installedFeatures.contains(it.next()));
+ }
+ return oneIsInstalled;
+ }
+
+ private boolean allFeaturesAreAlreadyInstalled(
+ Set<String> installedFeatures, InstallableComponent comp) {
+ return installedFeatures.containsAll(comp.getId());
+ }
+}
diff --git a/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/src/org/eclipse/papyrus/infra/discovery/ui/wizards/DiscoveryComponent.java b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/src/org/eclipse/papyrus/infra/discovery/ui/wizards/DiscoveryComponent.java
new file mode 100644
index 00000000000..4106231afcc
--- /dev/null
+++ b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/src/org/eclipse/papyrus/infra/discovery/ui/wizards/DiscoveryComponent.java
@@ -0,0 +1,86 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * 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:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.discovery.ui.wizards;
+
+import java.io.IOException;
+import java.util.Collections;
+
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.xmi.impl.XMIResourceImpl;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.wizard.WizardDialog;
+import org.eclipse.papyrus.infra.discovery.DiscoveryDefinition;
+import org.eclipse.papyrus.infra.discovery.ui.viewer.DiscoveryContentProvider;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PlatformUI;
+
+
+/**
+ * Execution class for the execution of the discovery component
+ */
+public class DiscoveryComponent {
+
+ /** URI of the model where all extra component features to be installed are referenced */
+ public static final String DISCOVERY_PAPYRUS_URI = "http://www.eclipse.org/modeling/mdt/papyrus/downloads/discovery/juno/papyrus-extra.xmi";
+
+ public static final Object execute() {
+ final IWorkbenchWindow window = PlatformUI.getWorkbench()
+ .getActiveWorkbenchWindow();
+
+ DiscoveryContentProvider provider = new DiscoveryContentProvider() {
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected DiscoveryDefinition load() {
+ Resource res = new XMIResourceImpl(
+ URI
+.createURI(DISCOVERY_PAPYRUS_URI));
+ try {
+ res.load(Collections.EMPTY_MAP);
+ } catch (IOException e) {
+ MessageDialog.openError(window.getShell(),
+ Messages.DiscoveryComponent_CannotConnectToSource_title, Messages.DiscoveryComponent_CannotConnectToSource_label);
+ throw new RuntimeException(e);
+ }
+ return (DiscoveryDefinition) res.getContents().get(0);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String getDescription() {
+ return Messages.DiscoveryComponent_description;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String getTitle() {
+ return Messages.DiscoveryComponent_title;
+ }
+
+ };
+
+
+ DiscoveryWizard wizard = new DiscoveryWizard(provider);
+ WizardDialog dialog = new WizardDialog(window.getShell(), wizard);
+ return dialog.open();
+ }
+
+}
diff --git a/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/src/org/eclipse/papyrus/infra/discovery/ui/wizards/DiscoveryWizard.java b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/src/org/eclipse/papyrus/infra/discovery/ui/wizards/DiscoveryWizard.java
new file mode 100644
index 00000000000..05f737bfa59
--- /dev/null
+++ b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/src/org/eclipse/papyrus/infra/discovery/ui/wizards/DiscoveryWizard.java
@@ -0,0 +1,90 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Tasktop Technologies 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:
+ * Tasktop Technologies - initial API and implementation
+ * Obeo - adaptation for Amalgamation, EMF based and no Mylyn dependency
+ * CEA LIST - adaptation to Papyrus
+ *******************************************************************************/
+package org.eclipse.papyrus.infra.discovery.ui.wizards;
+
+import org.eclipse.jface.wizard.Wizard;
+import org.eclipse.papyrus.infra.discovery.ui.internal.common.CommonImages;
+import org.eclipse.papyrus.infra.discovery.ui.internal.common.Installer;
+import org.eclipse.papyrus.infra.discovery.ui.internal.common.PrepareInstallProfileJob;
+import org.eclipse.papyrus.infra.discovery.ui.internal.wizards.DiscoveryWizardMainPage;
+import org.eclipse.papyrus.infra.discovery.ui.viewer.DiscoveryContentProvider;
+
+/**
+ * A wizard for performing discovery of connectors and selecting connectors to
+ * install. When finish is pressed, selected connectors are downloaded and
+ * installed.
+ *
+ * @see PrepareInstallProfileJob
+ * @see ConnectorDiscoveryWizardMainPage
+ * @author David Green
+ */
+public class DiscoveryWizard extends Wizard {
+
+ private DiscoveryWizardMainPage mainPage;
+
+ private boolean showConnectorDescriptorKindFilter = true;
+
+ private boolean showConnectorDescriptorTextFilter = true;
+
+ private DiscoveryContentProvider provider;
+
+ public DiscoveryWizard(DiscoveryContentProvider provider) {
+ this.provider = provider;
+ setWindowTitle(provider.getTitle());
+ setNeedsProgressMonitor(true);
+ setDefaultPageImageDescriptor(CommonImages.BANNER_DISCOVERY);
+ }
+
+ @Override
+ public void addPages() {
+ addPage(mainPage = new DiscoveryWizardMainPage(this.provider));
+ }
+
+ @Override
+ public boolean performFinish() {
+ return Installer.install(mainPage.getInstallableConnectors(), getContainer());
+ }
+
+ /**
+ * indicate if the connector descriptor filters should be shown in the UI.
+ * Changing this setting only has an effect before the UI is presented.
+ */
+ public boolean isShowConnectorDescriptorKindFilter() {
+ return showConnectorDescriptorKindFilter;
+ }
+
+ /**
+ * indicate if the connector descriptor filters should be shown in the UI.
+ * Changing this setting only has an effect before the UI is presented.
+ */
+ public void setShowConnectorDescriptorKindFilter(boolean showConnectorDescriptorKindFilter) {
+ this.showConnectorDescriptorKindFilter = showConnectorDescriptorKindFilter;
+ }
+
+ /**
+ * indicate if a text field should be provided to allow the user to filter
+ * connector descriptors
+ */
+ public boolean isShowConnectorDescriptorTextFilter() {
+ return showConnectorDescriptorTextFilter;
+ }
+
+ /**
+ * indicate if a text field should be provided to allow the user to filter
+ * connector descriptors
+ */
+ public void setShowConnectorDescriptorTextFilter(boolean showConnectorDescriptorTextFilter) {
+ this.showConnectorDescriptorTextFilter = showConnectorDescriptorTextFilter;
+ }
+
+}
diff --git a/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/src/org/eclipse/papyrus/infra/discovery/ui/wizards/Messages.java b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/src/org/eclipse/papyrus/infra/discovery/ui/wizards/Messages.java
new file mode 100644
index 00000000000..b871d1e1993
--- /dev/null
+++ b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/src/org/eclipse/papyrus/infra/discovery/ui/wizards/Messages.java
@@ -0,0 +1,38 @@
+/*******************************************************************************
+ * Copyright (c) 2012 CEA LIST 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:
+ * CEA LIST - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.papyrus.infra.discovery.ui.wizards;
+
+import org.eclipse.osgi.util.NLS;
+
+/**
+ * Internationalization messages
+ */
+public class Messages extends NLS {
+
+ private static final String BUNDLE_NAME = "org.eclipse.papyrus.infra.discovery.ui.wizards.messages"; //$NON-NLS-1$
+
+ public static String DiscoveryComponent_CannotConnectToSource_title;
+
+ public static String DiscoveryComponent_CannotConnectToSource_label;
+
+ public static String DiscoveryComponent_title;
+
+ public static String DiscoveryComponent_description;
+
+ static {
+ // initialize resource bundle
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+
+ private Messages() {
+ }
+}
diff --git a/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/src/org/eclipse/papyrus/infra/discovery/ui/wizards/messages.properties b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/src/org/eclipse/papyrus/infra/discovery/ui/wizards/messages.properties
new file mode 100644
index 00000000000..f7209b2d23a
--- /dev/null
+++ b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/src/org/eclipse/papyrus/infra/discovery/ui/wizards/messages.properties
@@ -0,0 +1,14 @@
+###############################################################################
+# Copyright (c) 2012 CEA LIST 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:
+# CEA LIST - initial API and implementation
+###############################################################################
+DiscoveryComponent_CannotConnectToSource_label=We can't connect to the discovery source, make sure you're connected to internet and try again.
+DiscoveryComponent_CannotConnectToSource_title=Can't connect to discovery source
+DiscoveryComponent_description=Pick a papyrus component to install it.
+DiscoveryComponent_title=Papyrus Additional Components Discovery \ No newline at end of file
diff --git a/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery/.classpath b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery/.classpath
new file mode 100644
index 00000000000..cedf0d0d0b5
--- /dev/null
+++ b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src-gen"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery/.project b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery/.project
new file mode 100644
index 00000000000..12d8cc2397f
--- /dev/null
+++ b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery/.project
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.infra.discovery</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>
+ <buildCommand>
+ <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
+ </natures>
+</projectDescription>
diff --git a/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery/.settings/org.eclipse.jdt.core.prefs b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 00000000000..44217f8c068
--- /dev/null
+++ b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery/.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.5
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.5
diff --git a/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery/META-INF/MANIFEST.MF b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery/META-INF/MANIFEST.MF
new file mode 100644
index 00000000000..90e8fca9279
--- /dev/null
+++ b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery/META-INF/MANIFEST.MF
@@ -0,0 +1,16 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.papyrus.infra.discovery;singleton:=true
+Bundle-Version: 0.9.0.qualifier
+Bundle-ClassPath: .
+Bundle-Activator: org.eclipse.papyrus.infra.discovery.Activator$Implementation
+Bundle-Vendor: %providerName
+Bundle-Localization: plugin
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Export-Package: org.eclipse.papyrus.infra.discovery,
+ org.eclipse.papyrus.infra.discovery.impl,
+ org.eclipse.papyrus.infra.discovery.util
+Require-Bundle: org.eclipse.core.runtime;bundle-version="3.8.0",
+ org.eclipse.emf.ecore;bundle-version="2.8.0";visibility:=reexport
+Bundle-ActivationPolicy: lazy
diff --git a/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery/about.html b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery/about.html
new file mode 100644
index 00000000000..34ab520eed4
--- /dev/null
+++ b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery/about.html
@@ -0,0 +1,106 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
+<title>Eclipse Foundation Software User Agreement</title>
+</head>
+
+<body lang="EN-US">
+<h2>Eclipse Foundation Software User Agreement</h2>
+<p>April 14, 2010</p>
+
+<h3>Usage Of Content</h3>
+
+<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
+ (COLLECTIVELY &quot;CONTENT&quot;). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
+ CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
+ OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
+ NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
+ CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
+
+<h3>Applicable Licenses</h3>
+
+<p>Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0
+ (&quot;EPL&quot;). A copy of the EPL is provided with this Content and is also available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+ For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse Foundation source code
+ repository (&quot;Repository&quot;) in software modules (&quot;Modules&quot;) and made available as downloadable archives (&quot;Downloads&quot;).</p>
+
+<ul>
+ <li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content. Typical modules may include plug-ins (&quot;Plug-ins&quot;), plug-in fragments (&quot;Fragments&quot;), and features (&quot;Features&quot;).</li>
+ <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java&trade; ARchive) in a directory named &quot;plugins&quot;.</li>
+ <li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material. Each Feature may be packaged as a sub-directory in a directory named &quot;features&quot;. Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of the Plug-ins
+ and/or Fragments associated with that Feature.</li>
+ <li>Features may also include other Features (&quot;Included Features&quot;). Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of Included Features.</li>
+</ul>
+
+<p>The terms and conditions governing Plug-ins and Fragments should be contained in files named &quot;about.html&quot; (&quot;Abouts&quot;). The terms and conditions governing Features and
+Included Features should be contained in files named &quot;license.html&quot; (&quot;Feature Licenses&quot;). Abouts and Feature Licenses may be located in any directory of a Download or Module
+including, but not limited to the following locations:</p>
+
+<ul>
+ <li>The top-level (root) directory</li>
+ <li>Plug-in and Fragment directories</li>
+ <li>Inside Plug-ins and Fragments packaged as JARs</li>
+ <li>Sub-directories of the directory named &quot;src&quot; of certain Plug-ins</li>
+ <li>Feature directories</li>
+</ul>
+
+<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Provisioning Technology (as defined below), you must agree to a license (&quot;Feature Update License&quot;) during the
+installation process. If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or
+inform you where you can locate them. Feature Update Licenses may be found in the &quot;license&quot; property of files named &quot;feature.properties&quot; found within a Feature.
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
+that directory.</p>
+
+<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE
+OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
+
+<ul>
+ <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
+ <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
+ <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
+ <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
+ <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
+</ul>
+
+<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License is provided, please
+contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
+
+
+<h3>Use of Provisioning Technology</h3>
+
+<p>The Eclipse Foundation makes available provisioning software, examples of which include, but are not limited to, p2 and the Eclipse
+ Update Manager (&quot;Provisioning Technology&quot;) for the purpose of allowing users to install software, documentation, information and/or
+ other materials (collectively &quot;Installable Software&quot;). This capability is provided with the intent of allowing such users to
+ install, extend and update Eclipse-based products. Information about packaging Installable Software is available at <a
+ href="http://eclipse.org/equinox/p2/repository_packaging.html">http://eclipse.org/equinox/p2/repository_packaging.html</a>
+ (&quot;Specification&quot;).</p>
+
+<p>You may use Provisioning Technology to allow other parties to install Installable Software. You shall be responsible for enabling the
+ applicable license agreements relating to the Installable Software to be presented to, and accepted by, the users of the Provisioning Technology
+ in accordance with the Specification. By using Provisioning Technology in such a manner and making it available in accordance with the
+ Specification, you further acknowledge your agreement to, and the acquisition of all necessary rights to permit the following:</p>
+
+<ol>
+ <li>A series of actions may occur (&quot;Provisioning Process&quot;) in which a user may execute the Provisioning Technology
+ on a machine (&quot;Target Machine&quot;) with the intent of installing, extending or updating the functionality of an Eclipse-based
+ product.</li>
+ <li>During the Provisioning Process, the Provisioning Technology may cause third party Installable Software or a portion thereof to be
+ accessed and copied to the Target Machine.</li>
+ <li>Pursuant to the Specification, you will provide to the user the terms and conditions that govern the use of the Installable
+ Software (&quot;Installable Software Agreement&quot;) and such Installable Software Agreement shall be accessed from the Target
+ Machine in accordance with the Specification. Such Installable Software Agreement must inform the user of the terms and conditions that govern
+ the Installable Software and must solicit acceptance by the end user in the manner prescribed in such Installable Software Agreement. Upon such
+ indication of agreement by the user, the provisioning Technology will complete installation of the Installable Software.</li>
+</ol>
+
+<h3>Cryptography</h3>
+
+<p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
+ another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
+ possession, or use, and re-export of encryption software, to see if this is permitted.</p>
+
+<p><small>Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.</small></p>
+</body>
+</html> \ No newline at end of file
diff --git a/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery/build.properties b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery/build.properties
new file mode 100644
index 00000000000..6617444e2c8
--- /dev/null
+++ b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery/build.properties
@@ -0,0 +1,22 @@
+#
+# Copyright (c) 2012 CEA LIST.
+# 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:
+# CEA LIST - initial API and implementation
+#
+
+bin.includes = .,\
+ model/,\
+ META-INF/,\
+ plugin.xml,\
+ plugin.properties,\
+ about.html
+jars.compile.order = .
+source.. = src-gen/
+output.. = bin/
+src.includes = about.html,\
+ plugin.pdoc
diff --git a/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery/model/discovery.ecore b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery/model/discovery.ecore
new file mode 100644
index 00000000000..8eab0d9d399
--- /dev/null
+++ b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery/model/discovery.ecore
@@ -0,0 +1,81 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ecore:EPackage xmi:version="2.0"
+ xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="discovery"
+ nsURI="http://www.eclipse.org/papyrus/discovery/1.0" nsPrefix="discovery">
+ <eClassifiers xsi:type="ecore:EClass" name="InstallableComponent">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="provider" lowerBound="1"
+ eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="sitesURLS" lowerBound="1"
+ upperBound="-1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="description" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="overview" eType="#//Overview"
+ containment="true"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="category" lowerBound="1"
+ eType="#//Category" eOpposite="#//Category/components"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="id" lowerBound="1" upperBound="-1"
+ eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="license" lowerBound="1"
+ eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="selected" lowerBound="1"
+ eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean" transient="true"
+ defaultValueLiteral="false"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="available" lowerBound="1"
+ eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean" transient="true"
+ defaultValueLiteral="false"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="installed" lowerBound="1"
+ eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean" transient="true"
+ defaultValueLiteral="false"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="groups" upperBound="-1"
+ eType="#//Group"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="image32" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="incubation" lowerBound="1"
+ eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean" defaultValueLiteral="false"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="messages" upperBound="-1"
+ eType="#//Message" containment="true"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="visible" lowerBound="1"
+ eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean" defaultValueLiteral="true"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="hiddingFeatureID" upperBound="-1"
+ eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="Overview">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="summary" lowerBound="1"
+ eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="screenshot" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="url" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"
+ defaultValueLiteral="http://www.eclipse.org/modeling"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="Category">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="description" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="components" upperBound="-1"
+ eType="#//InstallableComponent" containment="true" eOpposite="#//InstallableComponent/category"
+ eKeys="#//InstallableComponent/name"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="relevance" lowerBound="1"
+ eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EIntegerObject"
+ defaultValueLiteral="5"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="overview" eType="#//Overview"
+ containment="true"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="image48" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="DiscoveryDefinition">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="categories" upperBound="-1"
+ eType="#//Category" containment="true" eKeys="#//Category/name"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="filters" upperBound="-1"
+ eType="#//Group" containment="true"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="Group">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="Message">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="title" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="message" lowerBound="1"
+ eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="icon" lowerBound="1" eType="#//Severity"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EEnum" name="Severity">
+ <eLiterals name="info"/>
+ <eLiterals name="warning" value="1"/>
+ </eClassifiers>
+</ecore:EPackage>
diff --git a/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery/model/discovery.genmodel b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery/model/discovery.genmodel
new file mode 100644
index 00000000000..cb0c950a54f
--- /dev/null
+++ b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery/model/discovery.genmodel
@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<genmodel:GenModel xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
+ xmlns:genmodel="http://www.eclipse.org/emf/2002/GenModel" copyrightText="&#xD;&#xA; Copyright (c) 2012 CEA LIST.&#xD;&#xA; All rights reserved. This program and the accompanying materials&#xD;&#xA; are made available under the terms of the Eclipse Public License v1.0&#xD;&#xA; which accompanies this distribution, and is available at&#xD;&#xA; http://www.eclipse.org/legal/epl-v10.html&#xD;&#xA; &#xD;&#xA; Contributors:&#xD;&#xA; CEA LIST - initial API and implementation&#xD;&#xA; "
+ modelDirectory="/org.eclipse.papyrus.infra.discovery/src-gen" creationCommands="false"
+ creationIcons="false" editDirectory="" editorDirectory="" modelPluginID="org.eclipse.papyrus.infra.discovery"
+ modelName="Discovery" modelPluginClass="org.eclipse.papyrus.infra.discovery.Activator"
+ rootExtendsClass="org.eclipse.emf.ecore.impl.MinimalEObjectImpl" testsDirectory=""
+ booleanFlagsField="" importerID="org.eclipse.emf.importer.ecore" complianceLevel="5.0"
+ copyrightFields="false" editPluginID="org.eclipse.papyrus.infra.discovery.ui"
+ testsPluginID="org.eclipse.papyrus.infra.discovery.ui" tableProviders="true" language=""
+ packedEnums="true" interfaceNamePattern="" classNamePattern="">
+ <foreignModel>discovery.ecore</foreignModel>
+ <genPackages prefix="Discovery" basePackage="org.eclipse.papyrus.infra" disposableProviderFactory="true"
+ fileExtensions="papdiscovery" ecorePackage="discovery.ecore#/">
+ <genEnums typeSafeEnumCompatible="false" ecoreEnum="discovery.ecore#//Severity">
+ <genEnumLiterals ecoreEnumLiteral="discovery.ecore#//Severity/info"/>
+ <genEnumLiterals ecoreEnumLiteral="discovery.ecore#//Severity/warning"/>
+ </genEnums>
+ <genClasses ecoreClass="discovery.ecore#//InstallableComponent">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute discovery.ecore#//InstallableComponent/name"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute discovery.ecore#//InstallableComponent/provider"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute discovery.ecore#//InstallableComponent/sitesURLS"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute discovery.ecore#//InstallableComponent/description"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference discovery.ecore#//InstallableComponent/overview"/>
+ <genFeatures property="None" notify="false" createChild="false" ecoreFeature="ecore:EReference discovery.ecore#//InstallableComponent/category"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute discovery.ecore#//InstallableComponent/id"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute discovery.ecore#//InstallableComponent/license"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute discovery.ecore#//InstallableComponent/selected"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute discovery.ecore#//InstallableComponent/available"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute discovery.ecore#//InstallableComponent/installed"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EReference discovery.ecore#//InstallableComponent/groups"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute discovery.ecore#//InstallableComponent/image32"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute discovery.ecore#//InstallableComponent/incubation"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference discovery.ecore#//InstallableComponent/messages"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute discovery.ecore#//InstallableComponent/visible"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute discovery.ecore#//InstallableComponent/hiddingFeatureID"/>
+ </genClasses>
+ <genClasses ecoreClass="discovery.ecore#//Overview">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute discovery.ecore#//Overview/summary"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute discovery.ecore#//Overview/screenshot"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute discovery.ecore#//Overview/url"/>
+ </genClasses>
+ <genClasses ecoreClass="discovery.ecore#//Category">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute discovery.ecore#//Category/name"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute discovery.ecore#//Category/description"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference discovery.ecore#//Category/components"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute discovery.ecore#//Category/relevance"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference discovery.ecore#//Category/overview"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute discovery.ecore#//Category/image48"/>
+ </genClasses>
+ <genClasses ecoreClass="discovery.ecore#//DiscoveryDefinition">
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference discovery.ecore#//DiscoveryDefinition/categories"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference discovery.ecore#//DiscoveryDefinition/filters"/>
+ </genClasses>
+ <genClasses ecoreClass="discovery.ecore#//Group">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute discovery.ecore#//Group/name"/>
+ </genClasses>
+ <genClasses ecoreClass="discovery.ecore#//Message">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute discovery.ecore#//Message/title"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute discovery.ecore#//Message/message"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute discovery.ecore#//Message/icon"/>
+ </genClasses>
+ </genPackages>
+</genmodel:GenModel>
diff --git a/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery/plugin.pdoc b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery/plugin.pdoc
new file mode 100644
index 00000000000..e0d9c7c1130
--- /dev/null
+++ b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery/plugin.pdoc
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<doc:Documentation xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:doc="http://www.eclipse.org/papyrus/documentation/plugin/documentation" description="This plugin provides the content model for the papyrus discovery interface">
+ <referent firstName="remi" lastName="schnekenburger" eMail="remi.schnekenburger@cea.fr" currentCompany="CEA-LIST"/>
+</doc:Documentation>
diff --git a/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery/plugin.properties b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery/plugin.properties
new file mode 100644
index 00000000000..13a4d21540f
--- /dev/null
+++ b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery/plugin.properties
@@ -0,0 +1,12 @@
+#
+# Copyright (c) 2012 CEA LIST.
+# 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:
+# CEA LIST - initial API and implementation
+#
+pluginName = Papyrus Discovery Model (Incubation)
+providerName = Eclipse Modeling Project
diff --git a/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery/plugin.xml b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery/plugin.xml
new file mode 100644
index 00000000000..1b5539225da
--- /dev/null
+++ b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery/plugin.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.0"?>
+
+<!--
+
+ Copyright (c) 2012 CEA LIST.
+ 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:
+ CEA LIST - initial API and implementation
+
+-->
+
+<plugin>
+
+ <extension point="org.eclipse.emf.ecore.generated_package">
+ <package
+ uri="http://www.eclipse.org/papyrus/discovery/1.0"
+ class="org.eclipse.papyrus.infra.discovery.DiscoveryPackage"
+ genModel="model/discovery.genmodel"/>
+ </extension>
+
+</plugin>
diff --git a/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery/src-gen/org/eclipse/papyrus/infra/discovery/Activator.java b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery/src-gen/org/eclipse/papyrus/infra/discovery/Activator.java
new file mode 100644
index 00000000000..9a5eb49c671
--- /dev/null
+++ b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery/src-gen/org/eclipse/papyrus/infra/discovery/Activator.java
@@ -0,0 +1,97 @@
+/**
+ *
+ * Copyright (c) 2012 CEA LIST.
+ * 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:
+ * CEA LIST - initial API and implementation
+ *
+ */
+package org.eclipse.papyrus.infra.discovery;
+
+import org.eclipse.emf.common.EMFPlugin;
+
+import org.eclipse.emf.common.util.ResourceLocator;
+
+/**
+ * This is the central singleton for the Discovery model plugin.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public final class Activator extends EMFPlugin {
+ /**
+ * Keep track of the singleton.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static final Activator INSTANCE = new Activator();
+
+ /**
+ * Keep track of the singleton.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private static Implementation plugin;
+
+ /**
+ * Create the instance.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Activator() {
+ super(new ResourceLocator [] {});
+ }
+
+ /**
+ * Returns the singleton instance of the Eclipse plugin.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the singleton instance.
+ * @generated
+ */
+ @Override
+ public ResourceLocator getPluginResourceLocator() {
+ return plugin;
+ }
+
+ /**
+ * Returns the singleton instance of the Eclipse plugin.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the singleton instance.
+ * @generated
+ */
+ public static Implementation getPlugin() {
+ return plugin;
+ }
+
+ /**
+ * The actual implementation of the Eclipse <b>Plugin</b>.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static class Implementation extends EclipsePlugin {
+ /**
+ * Creates an instance.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Implementation() {
+ super();
+
+ // Remember the static instance.
+ //
+ plugin = this;
+ }
+ }
+
+}
diff --git a/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery/src-gen/org/eclipse/papyrus/infra/discovery/Category.java b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery/src-gen/org/eclipse/papyrus/infra/discovery/Category.java
new file mode 100644
index 00000000000..7b40bb52af2
--- /dev/null
+++ b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery/src-gen/org/eclipse/papyrus/infra/discovery/Category.java
@@ -0,0 +1,190 @@
+/**
+ *
+ * Copyright (c) 2012 CEA LIST.
+ * 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:
+ * CEA LIST - initial API and implementation
+ *
+ */
+package org.eclipse.papyrus.infra.discovery;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Category</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.infra.discovery.Category#getName <em>Name</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.discovery.Category#getDescription <em>Description</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.discovery.Category#getComponents <em>Components</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.discovery.Category#getRelevance <em>Relevance</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.discovery.Category#getOverview <em>Overview</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.discovery.Category#getImage48 <em>Image48</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.papyrus.infra.discovery.DiscoveryPackage#getCategory()
+ * @model
+ * @generated
+ */
+public interface Category extends EObject {
+ /**
+ * Returns the value of the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Name</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Name</em>' attribute.
+ * @see #setName(String)
+ * @see org.eclipse.papyrus.infra.discovery.DiscoveryPackage#getCategory_Name()
+ * @model required="true"
+ * @generated
+ */
+ String getName();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.infra.discovery.Category#getName <em>Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Name</em>' attribute.
+ * @see #getName()
+ * @generated
+ */
+ void setName(String value);
+
+ /**
+ * Returns the value of the '<em><b>Description</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Description</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Description</em>' attribute.
+ * @see #setDescription(String)
+ * @see org.eclipse.papyrus.infra.discovery.DiscoveryPackage#getCategory_Description()
+ * @model
+ * @generated
+ */
+ String getDescription();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.infra.discovery.Category#getDescription <em>Description</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Description</em>' attribute.
+ * @see #getDescription()
+ * @generated
+ */
+ void setDescription(String value);
+
+ /**
+ * Returns the value of the '<em><b>Components</b></em>' containment reference list.
+ * The list contents are of type {@link org.eclipse.papyrus.infra.discovery.InstallableComponent}.
+ * It is bidirectional and its opposite is '{@link org.eclipse.papyrus.infra.discovery.InstallableComponent#getCategory <em>Category</em>}'.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Components</em>' containment reference list isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Components</em>' containment reference list.
+ * @see org.eclipse.papyrus.infra.discovery.DiscoveryPackage#getCategory_Components()
+ * @see org.eclipse.papyrus.infra.discovery.InstallableComponent#getCategory
+ * @model opposite="category" containment="true" keys="name"
+ * @generated
+ */
+ EList<InstallableComponent> getComponents();
+
+ /**
+ * Returns the value of the '<em><b>Relevance</b></em>' attribute.
+ * The default value is <code>"5"</code>.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Relevance</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Relevance</em>' attribute.
+ * @see #setRelevance(Integer)
+ * @see org.eclipse.papyrus.infra.discovery.DiscoveryPackage#getCategory_Relevance()
+ * @model default="5" required="true"
+ * @generated
+ */
+ Integer getRelevance();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.infra.discovery.Category#getRelevance <em>Relevance</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Relevance</em>' attribute.
+ * @see #getRelevance()
+ * @generated
+ */
+ void setRelevance(Integer value);
+
+ /**
+ * Returns the value of the '<em><b>Overview</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Overview</em>' containment reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Overview</em>' containment reference.
+ * @see #setOverview(Overview)
+ * @see org.eclipse.papyrus.infra.discovery.DiscoveryPackage#getCategory_Overview()
+ * @model containment="true"
+ * @generated
+ */
+ Overview getOverview();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.infra.discovery.Category#getOverview <em>Overview</em>}' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Overview</em>' containment reference.
+ * @see #getOverview()
+ * @generated
+ */
+ void setOverview(Overview value);
+
+ /**
+ * Returns the value of the '<em><b>Image48</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Image48</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Image48</em>' attribute.
+ * @see #setImage48(String)
+ * @see org.eclipse.papyrus.infra.discovery.DiscoveryPackage#getCategory_Image48()
+ * @model
+ * @generated
+ */
+ String getImage48();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.infra.discovery.Category#getImage48 <em>Image48</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Image48</em>' attribute.
+ * @see #getImage48()
+ * @generated
+ */
+ void setImage48(String value);
+
+} // Category
diff --git a/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery/src-gen/org/eclipse/papyrus/infra/discovery/DiscoveryDefinition.java b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery/src-gen/org/eclipse/papyrus/infra/discovery/DiscoveryDefinition.java
new file mode 100644
index 00000000000..3c4aa77cdf6
--- /dev/null
+++ b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery/src-gen/org/eclipse/papyrus/infra/discovery/DiscoveryDefinition.java
@@ -0,0 +1,69 @@
+/**
+ *
+ * Copyright (c) 2012 CEA LIST.
+ * 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:
+ * CEA LIST - initial API and implementation
+ *
+ */
+package org.eclipse.papyrus.infra.discovery;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Definition</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.infra.discovery.DiscoveryDefinition#getCategories <em>Categories</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.discovery.DiscoveryDefinition#getFilters <em>Filters</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.papyrus.infra.discovery.DiscoveryPackage#getDiscoveryDefinition()
+ * @model
+ * @generated
+ */
+public interface DiscoveryDefinition extends EObject {
+ /**
+ * Returns the value of the '<em><b>Categories</b></em>' containment reference list.
+ * The list contents are of type {@link org.eclipse.papyrus.infra.discovery.Category}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Categories</em>' containment reference list isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Categories</em>' containment reference list.
+ * @see org.eclipse.papyrus.infra.discovery.DiscoveryPackage#getDiscoveryDefinition_Categories()
+ * @model containment="true" keys="name"
+ * @generated
+ */
+ EList<Category> getCategories();
+
+ /**
+ * Returns the value of the '<em><b>Filters</b></em>' containment reference list.
+ * The list contents are of type {@link org.eclipse.papyrus.infra.discovery.Group}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Filters</em>' containment reference list isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Filters</em>' containment reference list.
+ * @see org.eclipse.papyrus.infra.discovery.DiscoveryPackage#getDiscoveryDefinition_Filters()
+ * @model containment="true"
+ * @generated
+ */
+ EList<Group> getFilters();
+
+} // DiscoveryDefinition
diff --git a/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery/src-gen/org/eclipse/papyrus/infra/discovery/DiscoveryFactory.java b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery/src-gen/org/eclipse/papyrus/infra/discovery/DiscoveryFactory.java
new file mode 100644
index 00000000000..6c5fbb097ac
--- /dev/null
+++ b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery/src-gen/org/eclipse/papyrus/infra/discovery/DiscoveryFactory.java
@@ -0,0 +1,97 @@
+/**
+ *
+ * Copyright (c) 2012 CEA LIST.
+ * 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:
+ * CEA LIST - initial API and implementation
+ *
+ */
+package org.eclipse.papyrus.infra.discovery;
+
+import org.eclipse.emf.ecore.EFactory;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Factory</b> for the model.
+ * It provides a create method for each non-abstract class of the model.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.discovery.DiscoveryPackage
+ * @generated
+ */
+public interface DiscoveryFactory extends EFactory {
+ /**
+ * The singleton instance of the factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ DiscoveryFactory eINSTANCE = org.eclipse.papyrus.infra.discovery.impl.DiscoveryFactoryImpl.init();
+
+ /**
+ * Returns a new object of class '<em>Installable Component</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Installable Component</em>'.
+ * @generated
+ */
+ InstallableComponent createInstallableComponent();
+
+ /**
+ * Returns a new object of class '<em>Overview</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Overview</em>'.
+ * @generated
+ */
+ Overview createOverview();
+
+ /**
+ * Returns a new object of class '<em>Category</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Category</em>'.
+ * @generated
+ */
+ Category createCategory();
+
+ /**
+ * Returns a new object of class '<em>Definition</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Definition</em>'.
+ * @generated
+ */
+ DiscoveryDefinition createDiscoveryDefinition();
+
+ /**
+ * Returns a new object of class '<em>Group</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Group</em>'.
+ * @generated
+ */
+ Group createGroup();
+
+ /**
+ * Returns a new object of class '<em>Message</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Message</em>'.
+ * @generated
+ */
+ Message createMessage();
+
+ /**
+ * Returns the package supported by this factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the package supported by this factory.
+ * @generated
+ */
+ DiscoveryPackage getDiscoveryPackage();
+
+} //DiscoveryFactory
diff --git a/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery/src-gen/org/eclipse/papyrus/infra/discovery/DiscoveryPackage.java b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery/src-gen/org/eclipse/papyrus/infra/discovery/DiscoveryPackage.java
new file mode 100644
index 00000000000..5fc5debfc98
--- /dev/null
+++ b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery/src-gen/org/eclipse/papyrus/infra/discovery/DiscoveryPackage.java
@@ -0,0 +1,1254 @@
+/**
+ *
+ * Copyright (c) 2012 CEA LIST.
+ * 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:
+ * CEA LIST - initial API and implementation
+ *
+ */
+package org.eclipse.papyrus.infra.discovery;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EEnum;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EReference;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Package</b> for the model.
+ * It contains accessors for the meta objects to represent
+ * <ul>
+ * <li>each class,</li>
+ * <li>each feature of each class,</li>
+ * <li>each enum,</li>
+ * <li>and each data type</li>
+ * </ul>
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.discovery.DiscoveryFactory
+ * @model kind="package"
+ * @generated
+ */
+public interface DiscoveryPackage extends EPackage {
+ /**
+ * The package name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNAME = "discovery";
+
+ /**
+ * The package namespace URI.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNS_URI = "http://www.eclipse.org/papyrus/discovery/1.0";
+
+ /**
+ * The package namespace name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNS_PREFIX = "discovery";
+
+ /**
+ * The singleton instance of the package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ DiscoveryPackage eINSTANCE = org.eclipse.papyrus.infra.discovery.impl.DiscoveryPackageImpl.init();
+
+ /**
+ * The meta object id for the '{@link org.eclipse.papyrus.infra.discovery.impl.InstallableComponentImpl <em>Installable Component</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.discovery.impl.InstallableComponentImpl
+ * @see org.eclipse.papyrus.infra.discovery.impl.DiscoveryPackageImpl#getInstallableComponent()
+ * @generated
+ */
+ int INSTALLABLE_COMPONENT = 0;
+
+ /**
+ * The feature id for the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int INSTALLABLE_COMPONENT__NAME = 0;
+
+ /**
+ * The feature id for the '<em><b>Provider</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int INSTALLABLE_COMPONENT__PROVIDER = 1;
+
+ /**
+ * The feature id for the '<em><b>Sites URLS</b></em>' attribute list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int INSTALLABLE_COMPONENT__SITES_URLS = 2;
+
+ /**
+ * The feature id for the '<em><b>Description</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int INSTALLABLE_COMPONENT__DESCRIPTION = 3;
+
+ /**
+ * The feature id for the '<em><b>Overview</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int INSTALLABLE_COMPONENT__OVERVIEW = 4;
+
+ /**
+ * The feature id for the '<em><b>Category</b></em>' container reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int INSTALLABLE_COMPONENT__CATEGORY = 5;
+
+ /**
+ * The feature id for the '<em><b>Id</b></em>' attribute list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int INSTALLABLE_COMPONENT__ID = 6;
+
+ /**
+ * The feature id for the '<em><b>License</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int INSTALLABLE_COMPONENT__LICENSE = 7;
+
+ /**
+ * The feature id for the '<em><b>Selected</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int INSTALLABLE_COMPONENT__SELECTED = 8;
+
+ /**
+ * The feature id for the '<em><b>Available</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int INSTALLABLE_COMPONENT__AVAILABLE = 9;
+
+ /**
+ * The feature id for the '<em><b>Installed</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int INSTALLABLE_COMPONENT__INSTALLED = 10;
+
+ /**
+ * The feature id for the '<em><b>Groups</b></em>' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int INSTALLABLE_COMPONENT__GROUPS = 11;
+
+ /**
+ * The feature id for the '<em><b>Image32</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int INSTALLABLE_COMPONENT__IMAGE32 = 12;
+
+ /**
+ * The feature id for the '<em><b>Incubation</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int INSTALLABLE_COMPONENT__INCUBATION = 13;
+
+ /**
+ * The feature id for the '<em><b>Messages</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int INSTALLABLE_COMPONENT__MESSAGES = 14;
+
+ /**
+ * The feature id for the '<em><b>Visible</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int INSTALLABLE_COMPONENT__VISIBLE = 15;
+
+ /**
+ * The feature id for the '<em><b>Hidding Feature ID</b></em>' attribute list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int INSTALLABLE_COMPONENT__HIDDING_FEATURE_ID = 16;
+
+ /**
+ * The number of structural features of the '<em>Installable Component</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int INSTALLABLE_COMPONENT_FEATURE_COUNT = 17;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.papyrus.infra.discovery.impl.OverviewImpl <em>Overview</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.discovery.impl.OverviewImpl
+ * @see org.eclipse.papyrus.infra.discovery.impl.DiscoveryPackageImpl#getOverview()
+ * @generated
+ */
+ int OVERVIEW = 1;
+
+ /**
+ * The feature id for the '<em><b>Summary</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int OVERVIEW__SUMMARY = 0;
+
+ /**
+ * The feature id for the '<em><b>Screenshot</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int OVERVIEW__SCREENSHOT = 1;
+
+ /**
+ * The feature id for the '<em><b>Url</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int OVERVIEW__URL = 2;
+
+ /**
+ * The number of structural features of the '<em>Overview</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int OVERVIEW_FEATURE_COUNT = 3;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.papyrus.infra.discovery.impl.CategoryImpl <em>Category</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.discovery.impl.CategoryImpl
+ * @see org.eclipse.papyrus.infra.discovery.impl.DiscoveryPackageImpl#getCategory()
+ * @generated
+ */
+ int CATEGORY = 2;
+
+ /**
+ * The feature id for the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int CATEGORY__NAME = 0;
+
+ /**
+ * The feature id for the '<em><b>Description</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int CATEGORY__DESCRIPTION = 1;
+
+ /**
+ * The feature id for the '<em><b>Components</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int CATEGORY__COMPONENTS = 2;
+
+ /**
+ * The feature id for the '<em><b>Relevance</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int CATEGORY__RELEVANCE = 3;
+
+ /**
+ * The feature id for the '<em><b>Overview</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int CATEGORY__OVERVIEW = 4;
+
+ /**
+ * The feature id for the '<em><b>Image48</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int CATEGORY__IMAGE48 = 5;
+
+ /**
+ * The number of structural features of the '<em>Category</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int CATEGORY_FEATURE_COUNT = 6;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.papyrus.infra.discovery.impl.DiscoveryDefinitionImpl <em>Definition</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.discovery.impl.DiscoveryDefinitionImpl
+ * @see org.eclipse.papyrus.infra.discovery.impl.DiscoveryPackageImpl#getDiscoveryDefinition()
+ * @generated
+ */
+ int DISCOVERY_DEFINITION = 3;
+
+ /**
+ * The feature id for the '<em><b>Categories</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int DISCOVERY_DEFINITION__CATEGORIES = 0;
+
+ /**
+ * The feature id for the '<em><b>Filters</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int DISCOVERY_DEFINITION__FILTERS = 1;
+
+ /**
+ * The number of structural features of the '<em>Definition</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int DISCOVERY_DEFINITION_FEATURE_COUNT = 2;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.papyrus.infra.discovery.impl.GroupImpl <em>Group</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.discovery.impl.GroupImpl
+ * @see org.eclipse.papyrus.infra.discovery.impl.DiscoveryPackageImpl#getGroup()
+ * @generated
+ */
+ int GROUP = 4;
+
+ /**
+ * The feature id for the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GROUP__NAME = 0;
+
+ /**
+ * The number of structural features of the '<em>Group</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GROUP_FEATURE_COUNT = 1;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.papyrus.infra.discovery.impl.MessageImpl <em>Message</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.discovery.impl.MessageImpl
+ * @see org.eclipse.papyrus.infra.discovery.impl.DiscoveryPackageImpl#getMessage()
+ * @generated
+ */
+ int MESSAGE = 5;
+
+ /**
+ * The feature id for the '<em><b>Title</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int MESSAGE__TITLE = 0;
+
+ /**
+ * The feature id for the '<em><b>Message</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int MESSAGE__MESSAGE = 1;
+
+ /**
+ * The feature id for the '<em><b>Icon</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int MESSAGE__ICON = 2;
+
+ /**
+ * The number of structural features of the '<em>Message</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int MESSAGE_FEATURE_COUNT = 3;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.papyrus.infra.discovery.Severity <em>Severity</em>}' enum.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.discovery.Severity
+ * @see org.eclipse.papyrus.infra.discovery.impl.DiscoveryPackageImpl#getSeverity()
+ * @generated
+ */
+ int SEVERITY = 6;
+
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.papyrus.infra.discovery.InstallableComponent <em>Installable Component</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Installable Component</em>'.
+ * @see org.eclipse.papyrus.infra.discovery.InstallableComponent
+ * @generated
+ */
+ EClass getInstallableComponent();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.papyrus.infra.discovery.InstallableComponent#getName <em>Name</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Name</em>'.
+ * @see org.eclipse.papyrus.infra.discovery.InstallableComponent#getName()
+ * @see #getInstallableComponent()
+ * @generated
+ */
+ EAttribute getInstallableComponent_Name();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.papyrus.infra.discovery.InstallableComponent#getProvider <em>Provider</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Provider</em>'.
+ * @see org.eclipse.papyrus.infra.discovery.InstallableComponent#getProvider()
+ * @see #getInstallableComponent()
+ * @generated
+ */
+ EAttribute getInstallableComponent_Provider();
+
+ /**
+ * Returns the meta object for the attribute list '{@link org.eclipse.papyrus.infra.discovery.InstallableComponent#getSitesURLS <em>Sites URLS</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute list '<em>Sites URLS</em>'.
+ * @see org.eclipse.papyrus.infra.discovery.InstallableComponent#getSitesURLS()
+ * @see #getInstallableComponent()
+ * @generated
+ */
+ EAttribute getInstallableComponent_SitesURLS();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.papyrus.infra.discovery.InstallableComponent#getDescription <em>Description</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Description</em>'.
+ * @see org.eclipse.papyrus.infra.discovery.InstallableComponent#getDescription()
+ * @see #getInstallableComponent()
+ * @generated
+ */
+ EAttribute getInstallableComponent_Description();
+
+ /**
+ * Returns the meta object for the containment reference '{@link org.eclipse.papyrus.infra.discovery.InstallableComponent#getOverview <em>Overview</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference '<em>Overview</em>'.
+ * @see org.eclipse.papyrus.infra.discovery.InstallableComponent#getOverview()
+ * @see #getInstallableComponent()
+ * @generated
+ */
+ EReference getInstallableComponent_Overview();
+
+ /**
+ * Returns the meta object for the container reference '{@link org.eclipse.papyrus.infra.discovery.InstallableComponent#getCategory <em>Category</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the container reference '<em>Category</em>'.
+ * @see org.eclipse.papyrus.infra.discovery.InstallableComponent#getCategory()
+ * @see #getInstallableComponent()
+ * @generated
+ */
+ EReference getInstallableComponent_Category();
+
+ /**
+ * Returns the meta object for the attribute list '{@link org.eclipse.papyrus.infra.discovery.InstallableComponent#getId <em>Id</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute list '<em>Id</em>'.
+ * @see org.eclipse.papyrus.infra.discovery.InstallableComponent#getId()
+ * @see #getInstallableComponent()
+ * @generated
+ */
+ EAttribute getInstallableComponent_Id();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.papyrus.infra.discovery.InstallableComponent#getLicense <em>License</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>License</em>'.
+ * @see org.eclipse.papyrus.infra.discovery.InstallableComponent#getLicense()
+ * @see #getInstallableComponent()
+ * @generated
+ */
+ EAttribute getInstallableComponent_License();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.papyrus.infra.discovery.InstallableComponent#isSelected <em>Selected</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Selected</em>'.
+ * @see org.eclipse.papyrus.infra.discovery.InstallableComponent#isSelected()
+ * @see #getInstallableComponent()
+ * @generated
+ */
+ EAttribute getInstallableComponent_Selected();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.papyrus.infra.discovery.InstallableComponent#isAvailable <em>Available</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Available</em>'.
+ * @see org.eclipse.papyrus.infra.discovery.InstallableComponent#isAvailable()
+ * @see #getInstallableComponent()
+ * @generated
+ */
+ EAttribute getInstallableComponent_Available();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.papyrus.infra.discovery.InstallableComponent#isInstalled <em>Installed</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Installed</em>'.
+ * @see org.eclipse.papyrus.infra.discovery.InstallableComponent#isInstalled()
+ * @see #getInstallableComponent()
+ * @generated
+ */
+ EAttribute getInstallableComponent_Installed();
+
+ /**
+ * Returns the meta object for the reference list '{@link org.eclipse.papyrus.infra.discovery.InstallableComponent#getGroups <em>Groups</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference list '<em>Groups</em>'.
+ * @see org.eclipse.papyrus.infra.discovery.InstallableComponent#getGroups()
+ * @see #getInstallableComponent()
+ * @generated
+ */
+ EReference getInstallableComponent_Groups();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.papyrus.infra.discovery.InstallableComponent#getImage32 <em>Image32</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Image32</em>'.
+ * @see org.eclipse.papyrus.infra.discovery.InstallableComponent#getImage32()
+ * @see #getInstallableComponent()
+ * @generated
+ */
+ EAttribute getInstallableComponent_Image32();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.papyrus.infra.discovery.InstallableComponent#isIncubation <em>Incubation</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Incubation</em>'.
+ * @see org.eclipse.papyrus.infra.discovery.InstallableComponent#isIncubation()
+ * @see #getInstallableComponent()
+ * @generated
+ */
+ EAttribute getInstallableComponent_Incubation();
+
+ /**
+ * Returns the meta object for the containment reference list '{@link org.eclipse.papyrus.infra.discovery.InstallableComponent#getMessages <em>Messages</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference list '<em>Messages</em>'.
+ * @see org.eclipse.papyrus.infra.discovery.InstallableComponent#getMessages()
+ * @see #getInstallableComponent()
+ * @generated
+ */
+ EReference getInstallableComponent_Messages();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.papyrus.infra.discovery.InstallableComponent#isVisible <em>Visible</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Visible</em>'.
+ * @see org.eclipse.papyrus.infra.discovery.InstallableComponent#isVisible()
+ * @see #getInstallableComponent()
+ * @generated
+ */
+ EAttribute getInstallableComponent_Visible();
+
+ /**
+ * Returns the meta object for the attribute list '{@link org.eclipse.papyrus.infra.discovery.InstallableComponent#getHiddingFeatureID <em>Hidding Feature ID</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute list '<em>Hidding Feature ID</em>'.
+ * @see org.eclipse.papyrus.infra.discovery.InstallableComponent#getHiddingFeatureID()
+ * @see #getInstallableComponent()
+ * @generated
+ */
+ EAttribute getInstallableComponent_HiddingFeatureID();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.papyrus.infra.discovery.Overview <em>Overview</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Overview</em>'.
+ * @see org.eclipse.papyrus.infra.discovery.Overview
+ * @generated
+ */
+ EClass getOverview();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.papyrus.infra.discovery.Overview#getSummary <em>Summary</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Summary</em>'.
+ * @see org.eclipse.papyrus.infra.discovery.Overview#getSummary()
+ * @see #getOverview()
+ * @generated
+ */
+ EAttribute getOverview_Summary();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.papyrus.infra.discovery.Overview#getScreenshot <em>Screenshot</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Screenshot</em>'.
+ * @see org.eclipse.papyrus.infra.discovery.Overview#getScreenshot()
+ * @see #getOverview()
+ * @generated
+ */
+ EAttribute getOverview_Screenshot();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.papyrus.infra.discovery.Overview#getUrl <em>Url</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Url</em>'.
+ * @see org.eclipse.papyrus.infra.discovery.Overview#getUrl()
+ * @see #getOverview()
+ * @generated
+ */
+ EAttribute getOverview_Url();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.papyrus.infra.discovery.Category <em>Category</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Category</em>'.
+ * @see org.eclipse.papyrus.infra.discovery.Category
+ * @generated
+ */
+ EClass getCategory();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.papyrus.infra.discovery.Category#getName <em>Name</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Name</em>'.
+ * @see org.eclipse.papyrus.infra.discovery.Category#getName()
+ * @see #getCategory()
+ * @generated
+ */
+ EAttribute getCategory_Name();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.papyrus.infra.discovery.Category#getDescription <em>Description</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Description</em>'.
+ * @see org.eclipse.papyrus.infra.discovery.Category#getDescription()
+ * @see #getCategory()
+ * @generated
+ */
+ EAttribute getCategory_Description();
+
+ /**
+ * Returns the meta object for the containment reference list '{@link org.eclipse.papyrus.infra.discovery.Category#getComponents <em>Components</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference list '<em>Components</em>'.
+ * @see org.eclipse.papyrus.infra.discovery.Category#getComponents()
+ * @see #getCategory()
+ * @generated
+ */
+ EReference getCategory_Components();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.papyrus.infra.discovery.Category#getRelevance <em>Relevance</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Relevance</em>'.
+ * @see org.eclipse.papyrus.infra.discovery.Category#getRelevance()
+ * @see #getCategory()
+ * @generated
+ */
+ EAttribute getCategory_Relevance();
+
+ /**
+ * Returns the meta object for the containment reference '{@link org.eclipse.papyrus.infra.discovery.Category#getOverview <em>Overview</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference '<em>Overview</em>'.
+ * @see org.eclipse.papyrus.infra.discovery.Category#getOverview()
+ * @see #getCategory()
+ * @generated
+ */
+ EReference getCategory_Overview();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.papyrus.infra.discovery.Category#getImage48 <em>Image48</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Image48</em>'.
+ * @see org.eclipse.papyrus.infra.discovery.Category#getImage48()
+ * @see #getCategory()
+ * @generated
+ */
+ EAttribute getCategory_Image48();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.papyrus.infra.discovery.DiscoveryDefinition <em>Definition</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Definition</em>'.
+ * @see org.eclipse.papyrus.infra.discovery.DiscoveryDefinition
+ * @generated
+ */
+ EClass getDiscoveryDefinition();
+
+ /**
+ * Returns the meta object for the containment reference list '{@link org.eclipse.papyrus.infra.discovery.DiscoveryDefinition#getCategories <em>Categories</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference list '<em>Categories</em>'.
+ * @see org.eclipse.papyrus.infra.discovery.DiscoveryDefinition#getCategories()
+ * @see #getDiscoveryDefinition()
+ * @generated
+ */
+ EReference getDiscoveryDefinition_Categories();
+
+ /**
+ * Returns the meta object for the containment reference list '{@link org.eclipse.papyrus.infra.discovery.DiscoveryDefinition#getFilters <em>Filters</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference list '<em>Filters</em>'.
+ * @see org.eclipse.papyrus.infra.discovery.DiscoveryDefinition#getFilters()
+ * @see #getDiscoveryDefinition()
+ * @generated
+ */
+ EReference getDiscoveryDefinition_Filters();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.papyrus.infra.discovery.Group <em>Group</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Group</em>'.
+ * @see org.eclipse.papyrus.infra.discovery.Group
+ * @generated
+ */
+ EClass getGroup();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.papyrus.infra.discovery.Group#getName <em>Name</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Name</em>'.
+ * @see org.eclipse.papyrus.infra.discovery.Group#getName()
+ * @see #getGroup()
+ * @generated
+ */
+ EAttribute getGroup_Name();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.papyrus.infra.discovery.Message <em>Message</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Message</em>'.
+ * @see org.eclipse.papyrus.infra.discovery.Message
+ * @generated
+ */
+ EClass getMessage();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.papyrus.infra.discovery.Message#getTitle <em>Title</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Title</em>'.
+ * @see org.eclipse.papyrus.infra.discovery.Message#getTitle()
+ * @see #getMessage()
+ * @generated
+ */
+ EAttribute getMessage_Title();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.papyrus.infra.discovery.Message#getMessage <em>Message</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Message</em>'.
+ * @see org.eclipse.papyrus.infra.discovery.Message#getMessage()
+ * @see #getMessage()
+ * @generated
+ */
+ EAttribute getMessage_Message();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.papyrus.infra.discovery.Message#getIcon <em>Icon</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Icon</em>'.
+ * @see org.eclipse.papyrus.infra.discovery.Message#getIcon()
+ * @see #getMessage()
+ * @generated
+ */
+ EAttribute getMessage_Icon();
+
+ /**
+ * Returns the meta object for enum '{@link org.eclipse.papyrus.infra.discovery.Severity <em>Severity</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for enum '<em>Severity</em>'.
+ * @see org.eclipse.papyrus.infra.discovery.Severity
+ * @generated
+ */
+ EEnum getSeverity();
+
+ /**
+ * Returns the factory that creates the instances of the model.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the factory that creates the instances of the model.
+ * @generated
+ */
+ DiscoveryFactory getDiscoveryFactory();
+
+ /**
+ * <!-- begin-user-doc -->
+ * Defines literals for the meta objects that represent
+ * <ul>
+ * <li>each class,</li>
+ * <li>each feature of each class,</li>
+ * <li>each enum,</li>
+ * <li>and each data type</li>
+ * </ul>
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ interface Literals {
+ /**
+ * The meta object literal for the '{@link org.eclipse.papyrus.infra.discovery.impl.InstallableComponentImpl <em>Installable Component</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.discovery.impl.InstallableComponentImpl
+ * @see org.eclipse.papyrus.infra.discovery.impl.DiscoveryPackageImpl#getInstallableComponent()
+ * @generated
+ */
+ EClass INSTALLABLE_COMPONENT = eINSTANCE.getInstallableComponent();
+
+ /**
+ * The meta object literal for the '<em><b>Name</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute INSTALLABLE_COMPONENT__NAME = eINSTANCE.getInstallableComponent_Name();
+
+ /**
+ * The meta object literal for the '<em><b>Provider</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute INSTALLABLE_COMPONENT__PROVIDER = eINSTANCE.getInstallableComponent_Provider();
+
+ /**
+ * The meta object literal for the '<em><b>Sites URLS</b></em>' attribute list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute INSTALLABLE_COMPONENT__SITES_URLS = eINSTANCE.getInstallableComponent_SitesURLS();
+
+ /**
+ * The meta object literal for the '<em><b>Description</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute INSTALLABLE_COMPONENT__DESCRIPTION = eINSTANCE.getInstallableComponent_Description();
+
+ /**
+ * The meta object literal for the '<em><b>Overview</b></em>' containment reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference INSTALLABLE_COMPONENT__OVERVIEW = eINSTANCE.getInstallableComponent_Overview();
+
+ /**
+ * The meta object literal for the '<em><b>Category</b></em>' container reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference INSTALLABLE_COMPONENT__CATEGORY = eINSTANCE.getInstallableComponent_Category();
+
+ /**
+ * The meta object literal for the '<em><b>Id</b></em>' attribute list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute INSTALLABLE_COMPONENT__ID = eINSTANCE.getInstallableComponent_Id();
+
+ /**
+ * The meta object literal for the '<em><b>License</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute INSTALLABLE_COMPONENT__LICENSE = eINSTANCE.getInstallableComponent_License();
+
+ /**
+ * The meta object literal for the '<em><b>Selected</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute INSTALLABLE_COMPONENT__SELECTED = eINSTANCE.getInstallableComponent_Selected();
+
+ /**
+ * The meta object literal for the '<em><b>Available</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute INSTALLABLE_COMPONENT__AVAILABLE = eINSTANCE.getInstallableComponent_Available();
+
+ /**
+ * The meta object literal for the '<em><b>Installed</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute INSTALLABLE_COMPONENT__INSTALLED = eINSTANCE.getInstallableComponent_Installed();
+
+ /**
+ * The meta object literal for the '<em><b>Groups</b></em>' reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference INSTALLABLE_COMPONENT__GROUPS = eINSTANCE.getInstallableComponent_Groups();
+
+ /**
+ * The meta object literal for the '<em><b>Image32</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute INSTALLABLE_COMPONENT__IMAGE32 = eINSTANCE.getInstallableComponent_Image32();
+
+ /**
+ * The meta object literal for the '<em><b>Incubation</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute INSTALLABLE_COMPONENT__INCUBATION = eINSTANCE.getInstallableComponent_Incubation();
+
+ /**
+ * The meta object literal for the '<em><b>Messages</b></em>' containment reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference INSTALLABLE_COMPONENT__MESSAGES = eINSTANCE.getInstallableComponent_Messages();
+
+ /**
+ * The meta object literal for the '<em><b>Visible</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute INSTALLABLE_COMPONENT__VISIBLE = eINSTANCE.getInstallableComponent_Visible();
+
+ /**
+ * The meta object literal for the '<em><b>Hidding Feature ID</b></em>' attribute list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute INSTALLABLE_COMPONENT__HIDDING_FEATURE_ID = eINSTANCE.getInstallableComponent_HiddingFeatureID();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.papyrus.infra.discovery.impl.OverviewImpl <em>Overview</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.discovery.impl.OverviewImpl
+ * @see org.eclipse.papyrus.infra.discovery.impl.DiscoveryPackageImpl#getOverview()
+ * @generated
+ */
+ EClass OVERVIEW = eINSTANCE.getOverview();
+
+ /**
+ * The meta object literal for the '<em><b>Summary</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute OVERVIEW__SUMMARY = eINSTANCE.getOverview_Summary();
+
+ /**
+ * The meta object literal for the '<em><b>Screenshot</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute OVERVIEW__SCREENSHOT = eINSTANCE.getOverview_Screenshot();
+
+ /**
+ * The meta object literal for the '<em><b>Url</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute OVERVIEW__URL = eINSTANCE.getOverview_Url();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.papyrus.infra.discovery.impl.CategoryImpl <em>Category</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.discovery.impl.CategoryImpl
+ * @see org.eclipse.papyrus.infra.discovery.impl.DiscoveryPackageImpl#getCategory()
+ * @generated
+ */
+ EClass CATEGORY = eINSTANCE.getCategory();
+
+ /**
+ * The meta object literal for the '<em><b>Name</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute CATEGORY__NAME = eINSTANCE.getCategory_Name();
+
+ /**
+ * The meta object literal for the '<em><b>Description</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute CATEGORY__DESCRIPTION = eINSTANCE.getCategory_Description();
+
+ /**
+ * The meta object literal for the '<em><b>Components</b></em>' containment reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference CATEGORY__COMPONENTS = eINSTANCE.getCategory_Components();
+
+ /**
+ * The meta object literal for the '<em><b>Relevance</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute CATEGORY__RELEVANCE = eINSTANCE.getCategory_Relevance();
+
+ /**
+ * The meta object literal for the '<em><b>Overview</b></em>' containment reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference CATEGORY__OVERVIEW = eINSTANCE.getCategory_Overview();
+
+ /**
+ * The meta object literal for the '<em><b>Image48</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute CATEGORY__IMAGE48 = eINSTANCE.getCategory_Image48();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.papyrus.infra.discovery.impl.DiscoveryDefinitionImpl <em>Definition</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.discovery.impl.DiscoveryDefinitionImpl
+ * @see org.eclipse.papyrus.infra.discovery.impl.DiscoveryPackageImpl#getDiscoveryDefinition()
+ * @generated
+ */
+ EClass DISCOVERY_DEFINITION = eINSTANCE.getDiscoveryDefinition();
+
+ /**
+ * The meta object literal for the '<em><b>Categories</b></em>' containment reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference DISCOVERY_DEFINITION__CATEGORIES = eINSTANCE.getDiscoveryDefinition_Categories();
+
+ /**
+ * The meta object literal for the '<em><b>Filters</b></em>' containment reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference DISCOVERY_DEFINITION__FILTERS = eINSTANCE.getDiscoveryDefinition_Filters();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.papyrus.infra.discovery.impl.GroupImpl <em>Group</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.discovery.impl.GroupImpl
+ * @see org.eclipse.papyrus.infra.discovery.impl.DiscoveryPackageImpl#getGroup()
+ * @generated
+ */
+ EClass GROUP = eINSTANCE.getGroup();
+
+ /**
+ * The meta object literal for the '<em><b>Name</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute GROUP__NAME = eINSTANCE.getGroup_Name();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.papyrus.infra.discovery.impl.MessageImpl <em>Message</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.discovery.impl.MessageImpl
+ * @see org.eclipse.papyrus.infra.discovery.impl.DiscoveryPackageImpl#getMessage()
+ * @generated
+ */
+ EClass MESSAGE = eINSTANCE.getMessage();
+
+ /**
+ * The meta object literal for the '<em><b>Title</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute MESSAGE__TITLE = eINSTANCE.getMessage_Title();
+
+ /**
+ * The meta object literal for the '<em><b>Message</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute MESSAGE__MESSAGE = eINSTANCE.getMessage_Message();
+
+ /**
+ * The meta object literal for the '<em><b>Icon</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute MESSAGE__ICON = eINSTANCE.getMessage_Icon();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.papyrus.infra.discovery.Severity <em>Severity</em>}' enum.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.discovery.Severity
+ * @see org.eclipse.papyrus.infra.discovery.impl.DiscoveryPackageImpl#getSeverity()
+ * @generated
+ */
+ EEnum SEVERITY = eINSTANCE.getSeverity();
+
+ }
+
+} //DiscoveryPackage
diff --git a/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery/src-gen/org/eclipse/papyrus/infra/discovery/Group.java b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery/src-gen/org/eclipse/papyrus/infra/discovery/Group.java
new file mode 100644
index 00000000000..aee6c5f6840
--- /dev/null
+++ b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery/src-gen/org/eclipse/papyrus/infra/discovery/Group.java
@@ -0,0 +1,60 @@
+/**
+ *
+ * Copyright (c) 2012 CEA LIST.
+ * 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:
+ * CEA LIST - initial API and implementation
+ *
+ */
+package org.eclipse.papyrus.infra.discovery;
+
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Group</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.infra.discovery.Group#getName <em>Name</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.papyrus.infra.discovery.DiscoveryPackage#getGroup()
+ * @model
+ * @generated
+ */
+public interface Group extends EObject {
+ /**
+ * Returns the value of the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Name</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Name</em>' attribute.
+ * @see #setName(String)
+ * @see org.eclipse.papyrus.infra.discovery.DiscoveryPackage#getGroup_Name()
+ * @model required="true"
+ * @generated
+ */
+ String getName();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.infra.discovery.Group#getName <em>Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Name</em>' attribute.
+ * @see #getName()
+ * @generated
+ */
+ void setName(String value);
+
+} // Group
diff --git a/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery/src-gen/org/eclipse/papyrus/infra/discovery/InstallableComponent.java b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery/src-gen/org/eclipse/papyrus/infra/discovery/InstallableComponent.java
new file mode 100644
index 00000000000..798c754b7e3
--- /dev/null
+++ b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery/src-gen/org/eclipse/papyrus/infra/discovery/InstallableComponent.java
@@ -0,0 +1,451 @@
+/**
+ *
+ * Copyright (c) 2012 CEA LIST.
+ * 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:
+ * CEA LIST - initial API and implementation
+ *
+ */
+package org.eclipse.papyrus.infra.discovery;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Installable Component</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.infra.discovery.InstallableComponent#getName <em>Name</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.discovery.InstallableComponent#getProvider <em>Provider</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.discovery.InstallableComponent#getSitesURLS <em>Sites URLS</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.discovery.InstallableComponent#getDescription <em>Description</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.discovery.InstallableComponent#getOverview <em>Overview</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.discovery.InstallableComponent#getCategory <em>Category</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.discovery.InstallableComponent#getId <em>Id</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.discovery.InstallableComponent#getLicense <em>License</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.discovery.InstallableComponent#isSelected <em>Selected</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.discovery.InstallableComponent#isAvailable <em>Available</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.discovery.InstallableComponent#isInstalled <em>Installed</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.discovery.InstallableComponent#getGroups <em>Groups</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.discovery.InstallableComponent#getImage32 <em>Image32</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.discovery.InstallableComponent#isIncubation <em>Incubation</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.discovery.InstallableComponent#getMessages <em>Messages</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.discovery.InstallableComponent#isVisible <em>Visible</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.discovery.InstallableComponent#getHiddingFeatureID <em>Hidding Feature ID</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.papyrus.infra.discovery.DiscoveryPackage#getInstallableComponent()
+ * @model
+ * @generated
+ */
+public interface InstallableComponent extends EObject {
+ /**
+ * Returns the value of the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Name</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Name</em>' attribute.
+ * @see #setName(String)
+ * @see org.eclipse.papyrus.infra.discovery.DiscoveryPackage#getInstallableComponent_Name()
+ * @model required="true"
+ * @generated
+ */
+ String getName();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.infra.discovery.InstallableComponent#getName <em>Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Name</em>' attribute.
+ * @see #getName()
+ * @generated
+ */
+ void setName(String value);
+
+ /**
+ * Returns the value of the '<em><b>Provider</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Provider</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Provider</em>' attribute.
+ * @see #setProvider(String)
+ * @see org.eclipse.papyrus.infra.discovery.DiscoveryPackage#getInstallableComponent_Provider()
+ * @model required="true"
+ * @generated
+ */
+ String getProvider();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.infra.discovery.InstallableComponent#getProvider <em>Provider</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Provider</em>' attribute.
+ * @see #getProvider()
+ * @generated
+ */
+ void setProvider(String value);
+
+ /**
+ * Returns the value of the '<em><b>Sites URLS</b></em>' attribute list.
+ * The list contents are of type {@link java.lang.String}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Sites URLS</em>' attribute list isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Sites URLS</em>' attribute list.
+ * @see org.eclipse.papyrus.infra.discovery.DiscoveryPackage#getInstallableComponent_SitesURLS()
+ * @model required="true"
+ * @generated
+ */
+ EList<String> getSitesURLS();
+
+ /**
+ * Returns the value of the '<em><b>Description</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Description</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Description</em>' attribute.
+ * @see #setDescription(String)
+ * @see org.eclipse.papyrus.infra.discovery.DiscoveryPackage#getInstallableComponent_Description()
+ * @model
+ * @generated
+ */
+ String getDescription();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.infra.discovery.InstallableComponent#getDescription <em>Description</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Description</em>' attribute.
+ * @see #getDescription()
+ * @generated
+ */
+ void setDescription(String value);
+
+ /**
+ * Returns the value of the '<em><b>Overview</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Overview</em>' containment reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Overview</em>' containment reference.
+ * @see #setOverview(Overview)
+ * @see org.eclipse.papyrus.infra.discovery.DiscoveryPackage#getInstallableComponent_Overview()
+ * @model containment="true"
+ * @generated
+ */
+ Overview getOverview();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.infra.discovery.InstallableComponent#getOverview <em>Overview</em>}' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Overview</em>' containment reference.
+ * @see #getOverview()
+ * @generated
+ */
+ void setOverview(Overview value);
+
+ /**
+ * Returns the value of the '<em><b>Category</b></em>' container reference.
+ * It is bidirectional and its opposite is '{@link org.eclipse.papyrus.infra.discovery.Category#getComponents <em>Components</em>}'.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Category</em>' container reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Category</em>' container reference.
+ * @see #setCategory(Category)
+ * @see org.eclipse.papyrus.infra.discovery.DiscoveryPackage#getInstallableComponent_Category()
+ * @see org.eclipse.papyrus.infra.discovery.Category#getComponents
+ * @model opposite="components" required="true" transient="false"
+ * @generated
+ */
+ Category getCategory();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.infra.discovery.InstallableComponent#getCategory <em>Category</em>}' container reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Category</em>' container reference.
+ * @see #getCategory()
+ * @generated
+ */
+ void setCategory(Category value);
+
+ /**
+ * Returns the value of the '<em><b>Id</b></em>' attribute list.
+ * The list contents are of type {@link java.lang.String}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Id</em>' attribute list isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Id</em>' attribute list.
+ * @see org.eclipse.papyrus.infra.discovery.DiscoveryPackage#getInstallableComponent_Id()
+ * @model required="true"
+ * @generated
+ */
+ EList<String> getId();
+
+ /**
+ * Returns the value of the '<em><b>License</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>License</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>License</em>' attribute.
+ * @see #setLicense(String)
+ * @see org.eclipse.papyrus.infra.discovery.DiscoveryPackage#getInstallableComponent_License()
+ * @model required="true"
+ * @generated
+ */
+ String getLicense();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.infra.discovery.InstallableComponent#getLicense <em>License</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>License</em>' attribute.
+ * @see #getLicense()
+ * @generated
+ */
+ void setLicense(String value);
+
+ /**
+ * Returns the value of the '<em><b>Selected</b></em>' attribute.
+ * The default value is <code>"false"</code>.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Selected</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Selected</em>' attribute.
+ * @see #setSelected(boolean)
+ * @see org.eclipse.papyrus.infra.discovery.DiscoveryPackage#getInstallableComponent_Selected()
+ * @model default="false" required="true" transient="true"
+ * @generated
+ */
+ boolean isSelected();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.infra.discovery.InstallableComponent#isSelected <em>Selected</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Selected</em>' attribute.
+ * @see #isSelected()
+ * @generated
+ */
+ void setSelected(boolean value);
+
+ /**
+ * Returns the value of the '<em><b>Available</b></em>' attribute.
+ * The default value is <code>"false"</code>.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Available</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Available</em>' attribute.
+ * @see #setAvailable(boolean)
+ * @see org.eclipse.papyrus.infra.discovery.DiscoveryPackage#getInstallableComponent_Available()
+ * @model default="false" required="true" transient="true"
+ * @generated
+ */
+ boolean isAvailable();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.infra.discovery.InstallableComponent#isAvailable <em>Available</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Available</em>' attribute.
+ * @see #isAvailable()
+ * @generated
+ */
+ void setAvailable(boolean value);
+
+ /**
+ * Returns the value of the '<em><b>Installed</b></em>' attribute.
+ * The default value is <code>"false"</code>.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Installed</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Installed</em>' attribute.
+ * @see #setInstalled(boolean)
+ * @see org.eclipse.papyrus.infra.discovery.DiscoveryPackage#getInstallableComponent_Installed()
+ * @model default="false" required="true" transient="true"
+ * @generated
+ */
+ boolean isInstalled();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.infra.discovery.InstallableComponent#isInstalled <em>Installed</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Installed</em>' attribute.
+ * @see #isInstalled()
+ * @generated
+ */
+ void setInstalled(boolean value);
+
+ /**
+ * Returns the value of the '<em><b>Groups</b></em>' reference list.
+ * The list contents are of type {@link org.eclipse.papyrus.infra.discovery.Group}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Groups</em>' reference list isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Groups</em>' reference list.
+ * @see org.eclipse.papyrus.infra.discovery.DiscoveryPackage#getInstallableComponent_Groups()
+ * @model
+ * @generated
+ */
+ EList<Group> getGroups();
+
+ /**
+ * Returns the value of the '<em><b>Image32</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Image32</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Image32</em>' attribute.
+ * @see #setImage32(String)
+ * @see org.eclipse.papyrus.infra.discovery.DiscoveryPackage#getInstallableComponent_Image32()
+ * @model
+ * @generated
+ */
+ String getImage32();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.infra.discovery.InstallableComponent#getImage32 <em>Image32</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Image32</em>' attribute.
+ * @see #getImage32()
+ * @generated
+ */
+ void setImage32(String value);
+
+ /**
+ * Returns the value of the '<em><b>Incubation</b></em>' attribute.
+ * The default value is <code>"false"</code>.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Incubation</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Incubation</em>' attribute.
+ * @see #setIncubation(boolean)
+ * @see org.eclipse.papyrus.infra.discovery.DiscoveryPackage#getInstallableComponent_Incubation()
+ * @model default="false" required="true"
+ * @generated
+ */
+ boolean isIncubation();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.infra.discovery.InstallableComponent#isIncubation <em>Incubation</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Incubation</em>' attribute.
+ * @see #isIncubation()
+ * @generated
+ */
+ void setIncubation(boolean value);
+
+ /**
+ * Returns the value of the '<em><b>Messages</b></em>' containment reference list.
+ * The list contents are of type {@link org.eclipse.papyrus.infra.discovery.Message}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Messages</em>' containment reference list isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Messages</em>' containment reference list.
+ * @see org.eclipse.papyrus.infra.discovery.DiscoveryPackage#getInstallableComponent_Messages()
+ * @model containment="true"
+ * @generated
+ */
+ EList<Message> getMessages();
+
+ /**
+ * Returns the value of the '<em><b>Visible</b></em>' attribute.
+ * The default value is <code>"true"</code>.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Visible</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Visible</em>' attribute.
+ * @see #setVisible(boolean)
+ * @see org.eclipse.papyrus.infra.discovery.DiscoveryPackage#getInstallableComponent_Visible()
+ * @model default="true" required="true"
+ * @generated
+ */
+ boolean isVisible();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.infra.discovery.InstallableComponent#isVisible <em>Visible</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Visible</em>' attribute.
+ * @see #isVisible()
+ * @generated
+ */
+ void setVisible(boolean value);
+
+ /**
+ * Returns the value of the '<em><b>Hidding Feature ID</b></em>' attribute list.
+ * The list contents are of type {@link java.lang.String}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Hidding Feature ID</em>' attribute list isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Hidding Feature ID</em>' attribute list.
+ * @see org.eclipse.papyrus.infra.discovery.DiscoveryPackage#getInstallableComponent_HiddingFeatureID()
+ * @model
+ * @generated
+ */
+ EList<String> getHiddingFeatureID();
+
+} // InstallableComponent
diff --git a/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery/src-gen/org/eclipse/papyrus/infra/discovery/Message.java b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery/src-gen/org/eclipse/papyrus/infra/discovery/Message.java
new file mode 100644
index 00000000000..0a516d7ab11
--- /dev/null
+++ b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery/src-gen/org/eclipse/papyrus/infra/discovery/Message.java
@@ -0,0 +1,117 @@
+/**
+ *
+ * Copyright (c) 2012 CEA LIST.
+ * 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:
+ * CEA LIST - initial API and implementation
+ *
+ */
+package org.eclipse.papyrus.infra.discovery;
+
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Message</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.infra.discovery.Message#getTitle <em>Title</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.discovery.Message#getMessage <em>Message</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.discovery.Message#getIcon <em>Icon</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.papyrus.infra.discovery.DiscoveryPackage#getMessage()
+ * @model
+ * @generated
+ */
+public interface Message extends EObject {
+ /**
+ * Returns the value of the '<em><b>Title</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Title</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Title</em>' attribute.
+ * @see #setTitle(String)
+ * @see org.eclipse.papyrus.infra.discovery.DiscoveryPackage#getMessage_Title()
+ * @model required="true"
+ * @generated
+ */
+ String getTitle();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.infra.discovery.Message#getTitle <em>Title</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Title</em>' attribute.
+ * @see #getTitle()
+ * @generated
+ */
+ void setTitle(String value);
+
+ /**
+ * Returns the value of the '<em><b>Message</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Message</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Message</em>' attribute.
+ * @see #setMessage(String)
+ * @see org.eclipse.papyrus.infra.discovery.DiscoveryPackage#getMessage_Message()
+ * @model required="true"
+ * @generated
+ */
+ String getMessage();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.infra.discovery.Message#getMessage <em>Message</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Message</em>' attribute.
+ * @see #getMessage()
+ * @generated
+ */
+ void setMessage(String value);
+
+ /**
+ * Returns the value of the '<em><b>Icon</b></em>' attribute.
+ * The literals are from the enumeration {@link org.eclipse.papyrus.infra.discovery.Severity}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Icon</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Icon</em>' attribute.
+ * @see org.eclipse.papyrus.infra.discovery.Severity
+ * @see #setIcon(Severity)
+ * @see org.eclipse.papyrus.infra.discovery.DiscoveryPackage#getMessage_Icon()
+ * @model required="true"
+ * @generated
+ */
+ Severity getIcon();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.infra.discovery.Message#getIcon <em>Icon</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Icon</em>' attribute.
+ * @see org.eclipse.papyrus.infra.discovery.Severity
+ * @see #getIcon()
+ * @generated
+ */
+ void setIcon(Severity value);
+
+} // Message
diff --git a/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery/src-gen/org/eclipse/papyrus/infra/discovery/Overview.java b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery/src-gen/org/eclipse/papyrus/infra/discovery/Overview.java
new file mode 100644
index 00000000000..145d42bd18a
--- /dev/null
+++ b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery/src-gen/org/eclipse/papyrus/infra/discovery/Overview.java
@@ -0,0 +1,115 @@
+/**
+ *
+ * Copyright (c) 2012 CEA LIST.
+ * 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:
+ * CEA LIST - initial API and implementation
+ *
+ */
+package org.eclipse.papyrus.infra.discovery;
+
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Overview</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.infra.discovery.Overview#getSummary <em>Summary</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.discovery.Overview#getScreenshot <em>Screenshot</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.discovery.Overview#getUrl <em>Url</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.papyrus.infra.discovery.DiscoveryPackage#getOverview()
+ * @model
+ * @generated
+ */
+public interface Overview extends EObject {
+ /**
+ * Returns the value of the '<em><b>Summary</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Summary</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Summary</em>' attribute.
+ * @see #setSummary(String)
+ * @see org.eclipse.papyrus.infra.discovery.DiscoveryPackage#getOverview_Summary()
+ * @model required="true"
+ * @generated
+ */
+ String getSummary();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.infra.discovery.Overview#getSummary <em>Summary</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Summary</em>' attribute.
+ * @see #getSummary()
+ * @generated
+ */
+ void setSummary(String value);
+
+ /**
+ * Returns the value of the '<em><b>Screenshot</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Screenshot</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Screenshot</em>' attribute.
+ * @see #setScreenshot(String)
+ * @see org.eclipse.papyrus.infra.discovery.DiscoveryPackage#getOverview_Screenshot()
+ * @model
+ * @generated
+ */
+ String getScreenshot();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.infra.discovery.Overview#getScreenshot <em>Screenshot</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Screenshot</em>' attribute.
+ * @see #getScreenshot()
+ * @generated
+ */
+ void setScreenshot(String value);
+
+ /**
+ * Returns the value of the '<em><b>Url</b></em>' attribute.
+ * The default value is <code>"http://www.eclipse.org/modeling"</code>.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Url</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Url</em>' attribute.
+ * @see #setUrl(String)
+ * @see org.eclipse.papyrus.infra.discovery.DiscoveryPackage#getOverview_Url()
+ * @model default="http://www.eclipse.org/modeling" required="true"
+ * @generated
+ */
+ String getUrl();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.infra.discovery.Overview#getUrl <em>Url</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Url</em>' attribute.
+ * @see #getUrl()
+ * @generated
+ */
+ void setUrl(String value);
+
+} // Overview
diff --git a/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery/src-gen/org/eclipse/papyrus/infra/discovery/Severity.java b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery/src-gen/org/eclipse/papyrus/infra/discovery/Severity.java
new file mode 100644
index 00000000000..f75501fcb0b
--- /dev/null
+++ b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery/src-gen/org/eclipse/papyrus/infra/discovery/Severity.java
@@ -0,0 +1,218 @@
+/**
+ *
+ * Copyright (c) 2012 CEA LIST.
+ * 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:
+ * CEA LIST - initial API and implementation
+ *
+ */
+package org.eclipse.papyrus.infra.discovery;
+
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.emf.common.util.Enumerator;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the literals of the enumeration '<em><b>Severity</b></em>',
+ * and utility methods for working with them.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.discovery.DiscoveryPackage#getSeverity()
+ * @model
+ * @generated
+ */
+public enum Severity implements Enumerator {
+ /**
+ * The '<em><b>Info</b></em>' literal object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #INFO_VALUE
+ * @generated
+ * @ordered
+ */
+ INFO(0, "info", "info"),
+
+ /**
+ * The '<em><b>Warning</b></em>' literal object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #WARNING_VALUE
+ * @generated
+ * @ordered
+ */
+ WARNING(1, "warning", "warning");
+
+ /**
+ * The '<em><b>Info</b></em>' literal value.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of '<em><b>Info</b></em>' literal object isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @see #INFO
+ * @model name="info"
+ * @generated
+ * @ordered
+ */
+ public static final int INFO_VALUE = 0;
+
+ /**
+ * The '<em><b>Warning</b></em>' literal value.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of '<em><b>Warning</b></em>' literal object isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @see #WARNING
+ * @model name="warning"
+ * @generated
+ * @ordered
+ */
+ public static final int WARNING_VALUE = 1;
+
+ /**
+ * An array of all the '<em><b>Severity</b></em>' enumerators.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private static final Severity[] VALUES_ARRAY =
+ new Severity[] {
+ INFO,
+ WARNING,
+ };
+
+ /**
+ * A public read-only list of all the '<em><b>Severity</b></em>' enumerators.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static final List<Severity> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY));
+
+ /**
+ * Returns the '<em><b>Severity</b></em>' literal with the specified literal value.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static Severity get(String literal) {
+ for (int i = 0; i < VALUES_ARRAY.length; ++i) {
+ Severity result = VALUES_ARRAY[i];
+ if (result.toString().equals(literal)) {
+ return result;
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Returns the '<em><b>Severity</b></em>' literal with the specified name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static Severity getByName(String name) {
+ for (int i = 0; i < VALUES_ARRAY.length; ++i) {
+ Severity result = VALUES_ARRAY[i];
+ if (result.getName().equals(name)) {
+ return result;
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Returns the '<em><b>Severity</b></em>' literal with the specified integer value.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static Severity get(int value) {
+ switch (value) {
+ case INFO_VALUE: return INFO;
+ case WARNING_VALUE: return WARNING;
+ }
+ return null;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private final int value;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private final String name;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private final String literal;
+
+ /**
+ * Only this class can construct instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private Severity(int value, String name, String literal) {
+ this.value = value;
+ this.name = name;
+ this.literal = literal;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public int getValue() {
+ return value;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getLiteral() {
+ return literal;
+ }
+
+ /**
+ * Returns the literal value of the enumerator, which is its string representation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String toString() {
+ return literal;
+ }
+
+} //Severity
diff --git a/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery/src-gen/org/eclipse/papyrus/infra/discovery/impl/CategoryImpl.java b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery/src-gen/org/eclipse/papyrus/infra/discovery/impl/CategoryImpl.java
new file mode 100644
index 00000000000..faccc060170
--- /dev/null
+++ b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery/src-gen/org/eclipse/papyrus/infra/discovery/impl/CategoryImpl.java
@@ -0,0 +1,476 @@
+/**
+ *
+ * Copyright (c) 2012 CEA LIST.
+ * 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:
+ * CEA LIST - initial API and implementation
+ *
+ */
+package org.eclipse.papyrus.infra.discovery.impl;
+
+import java.util.Collection;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
+
+import org.eclipse.emf.ecore.util.EObjectContainmentWithInverseEList;
+import org.eclipse.emf.ecore.util.InternalEList;
+
+import org.eclipse.papyrus.infra.discovery.Category;
+import org.eclipse.papyrus.infra.discovery.DiscoveryPackage;
+import org.eclipse.papyrus.infra.discovery.InstallableComponent;
+import org.eclipse.papyrus.infra.discovery.Overview;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Category</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.infra.discovery.impl.CategoryImpl#getName <em>Name</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.discovery.impl.CategoryImpl#getDescription <em>Description</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.discovery.impl.CategoryImpl#getComponents <em>Components</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.discovery.impl.CategoryImpl#getRelevance <em>Relevance</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.discovery.impl.CategoryImpl#getOverview <em>Overview</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.discovery.impl.CategoryImpl#getImage48 <em>Image48</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class CategoryImpl extends MinimalEObjectImpl implements Category {
+ /**
+ * The default value of the '{@link #getName() <em>Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getName()
+ * @generated
+ * @ordered
+ */
+ protected static final String NAME_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getName() <em>Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getName()
+ * @generated
+ * @ordered
+ */
+ protected String name = NAME_EDEFAULT;
+
+ /**
+ * The default value of the '{@link #getDescription() <em>Description</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getDescription()
+ * @generated
+ * @ordered
+ */
+ protected static final String DESCRIPTION_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getDescription() <em>Description</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getDescription()
+ * @generated
+ * @ordered
+ */
+ protected String description = DESCRIPTION_EDEFAULT;
+
+ /**
+ * The cached value of the '{@link #getComponents() <em>Components</em>}' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getComponents()
+ * @generated
+ * @ordered
+ */
+ protected EList<InstallableComponent> components;
+
+ /**
+ * The default value of the '{@link #getRelevance() <em>Relevance</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getRelevance()
+ * @generated
+ * @ordered
+ */
+ protected static final Integer RELEVANCE_EDEFAULT = new Integer(5);
+
+ /**
+ * The cached value of the '{@link #getRelevance() <em>Relevance</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getRelevance()
+ * @generated
+ * @ordered
+ */
+ protected Integer relevance = RELEVANCE_EDEFAULT;
+
+ /**
+ * The cached value of the '{@link #getOverview() <em>Overview</em>}' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getOverview()
+ * @generated
+ * @ordered
+ */
+ protected Overview overview;
+
+ /**
+ * The default value of the '{@link #getImage48() <em>Image48</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getImage48()
+ * @generated
+ * @ordered
+ */
+ protected static final String IMAGE48_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getImage48() <em>Image48</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getImage48()
+ * @generated
+ * @ordered
+ */
+ protected String image48 = IMAGE48_EDEFAULT;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected CategoryImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return DiscoveryPackage.Literals.CATEGORY;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setName(String newName) {
+ String oldName = name;
+ name = newName;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, DiscoveryPackage.CATEGORY__NAME, oldName, name));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getDescription() {
+ return description;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setDescription(String newDescription) {
+ String oldDescription = description;
+ description = newDescription;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, DiscoveryPackage.CATEGORY__DESCRIPTION, oldDescription, description));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<InstallableComponent> getComponents() {
+ if (components == null) {
+ components = new EObjectContainmentWithInverseEList<InstallableComponent>(InstallableComponent.class, this, DiscoveryPackage.CATEGORY__COMPONENTS, DiscoveryPackage.INSTALLABLE_COMPONENT__CATEGORY);
+ }
+ return components;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Integer getRelevance() {
+ return relevance;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setRelevance(Integer newRelevance) {
+ Integer oldRelevance = relevance;
+ relevance = newRelevance;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, DiscoveryPackage.CATEGORY__RELEVANCE, oldRelevance, relevance));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Overview getOverview() {
+ return overview;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NotificationChain basicSetOverview(Overview newOverview, NotificationChain msgs) {
+ Overview oldOverview = overview;
+ overview = newOverview;
+ if (eNotificationRequired()) {
+ ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, DiscoveryPackage.CATEGORY__OVERVIEW, oldOverview, newOverview);
+ if (msgs == null) msgs = notification; else msgs.add(notification);
+ }
+ return msgs;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setOverview(Overview newOverview) {
+ if (newOverview != overview) {
+ NotificationChain msgs = null;
+ if (overview != null)
+ msgs = ((InternalEObject)overview).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - DiscoveryPackage.CATEGORY__OVERVIEW, null, msgs);
+ if (newOverview != null)
+ msgs = ((InternalEObject)newOverview).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - DiscoveryPackage.CATEGORY__OVERVIEW, null, msgs);
+ msgs = basicSetOverview(newOverview, msgs);
+ if (msgs != null) msgs.dispatch();
+ }
+ else if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, DiscoveryPackage.CATEGORY__OVERVIEW, newOverview, newOverview));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getImage48() {
+ return image48;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setImage48(String newImage48) {
+ String oldImage48 = image48;
+ image48 = newImage48;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, DiscoveryPackage.CATEGORY__IMAGE48, oldImage48, image48));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case DiscoveryPackage.CATEGORY__COMPONENTS:
+ return ((InternalEList<InternalEObject>)(InternalEList<?>)getComponents()).basicAdd(otherEnd, msgs);
+ }
+ return super.eInverseAdd(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case DiscoveryPackage.CATEGORY__COMPONENTS:
+ return ((InternalEList<?>)getComponents()).basicRemove(otherEnd, msgs);
+ case DiscoveryPackage.CATEGORY__OVERVIEW:
+ return basicSetOverview(null, msgs);
+ }
+ return super.eInverseRemove(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case DiscoveryPackage.CATEGORY__NAME:
+ return getName();
+ case DiscoveryPackage.CATEGORY__DESCRIPTION:
+ return getDescription();
+ case DiscoveryPackage.CATEGORY__COMPONENTS:
+ return getComponents();
+ case DiscoveryPackage.CATEGORY__RELEVANCE:
+ return getRelevance();
+ case DiscoveryPackage.CATEGORY__OVERVIEW:
+ return getOverview();
+ case DiscoveryPackage.CATEGORY__IMAGE48:
+ return getImage48();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case DiscoveryPackage.CATEGORY__NAME:
+ setName((String)newValue);
+ return;
+ case DiscoveryPackage.CATEGORY__DESCRIPTION:
+ setDescription((String)newValue);
+ return;
+ case DiscoveryPackage.CATEGORY__COMPONENTS:
+ getComponents().clear();
+ getComponents().addAll((Collection<? extends InstallableComponent>)newValue);
+ return;
+ case DiscoveryPackage.CATEGORY__RELEVANCE:
+ setRelevance((Integer)newValue);
+ return;
+ case DiscoveryPackage.CATEGORY__OVERVIEW:
+ setOverview((Overview)newValue);
+ return;
+ case DiscoveryPackage.CATEGORY__IMAGE48:
+ setImage48((String)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case DiscoveryPackage.CATEGORY__NAME:
+ setName(NAME_EDEFAULT);
+ return;
+ case DiscoveryPackage.CATEGORY__DESCRIPTION:
+ setDescription(DESCRIPTION_EDEFAULT);
+ return;
+ case DiscoveryPackage.CATEGORY__COMPONENTS:
+ getComponents().clear();
+ return;
+ case DiscoveryPackage.CATEGORY__RELEVANCE:
+ setRelevance(RELEVANCE_EDEFAULT);
+ return;
+ case DiscoveryPackage.CATEGORY__OVERVIEW:
+ setOverview((Overview)null);
+ return;
+ case DiscoveryPackage.CATEGORY__IMAGE48:
+ setImage48(IMAGE48_EDEFAULT);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case DiscoveryPackage.CATEGORY__NAME:
+ return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
+ case DiscoveryPackage.CATEGORY__DESCRIPTION:
+ return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description);
+ case DiscoveryPackage.CATEGORY__COMPONENTS:
+ return components != null && !components.isEmpty();
+ case DiscoveryPackage.CATEGORY__RELEVANCE:
+ return RELEVANCE_EDEFAULT == null ? relevance != null : !RELEVANCE_EDEFAULT.equals(relevance);
+ case DiscoveryPackage.CATEGORY__OVERVIEW:
+ return overview != null;
+ case DiscoveryPackage.CATEGORY__IMAGE48:
+ return IMAGE48_EDEFAULT == null ? image48 != null : !IMAGE48_EDEFAULT.equals(image48);
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String toString() {
+ if (eIsProxy()) return super.toString();
+
+ StringBuffer result = new StringBuffer(super.toString());
+ result.append(" (name: ");
+ result.append(name);
+ result.append(", description: ");
+ result.append(description);
+ result.append(", relevance: ");
+ result.append(relevance);
+ result.append(", image48: ");
+ result.append(image48);
+ result.append(')');
+ return result.toString();
+ }
+
+} //CategoryImpl
diff --git a/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery/src-gen/org/eclipse/papyrus/infra/discovery/impl/DiscoveryDefinitionImpl.java b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery/src-gen/org/eclipse/papyrus/infra/discovery/impl/DiscoveryDefinitionImpl.java
new file mode 100644
index 00000000000..0b0b6be9e69
--- /dev/null
+++ b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery/src-gen/org/eclipse/papyrus/infra/discovery/impl/DiscoveryDefinitionImpl.java
@@ -0,0 +1,199 @@
+/**
+ *
+ * Copyright (c) 2012 CEA LIST.
+ * 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:
+ * CEA LIST - initial API and implementation
+ *
+ */
+package org.eclipse.papyrus.infra.discovery.impl;
+
+import java.util.Collection;
+
+import org.eclipse.emf.common.notify.NotificationChain;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
+
+import org.eclipse.emf.ecore.util.EObjectContainmentEList;
+import org.eclipse.emf.ecore.util.InternalEList;
+
+import org.eclipse.papyrus.infra.discovery.Category;
+import org.eclipse.papyrus.infra.discovery.DiscoveryDefinition;
+import org.eclipse.papyrus.infra.discovery.DiscoveryPackage;
+import org.eclipse.papyrus.infra.discovery.Group;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Definition</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.infra.discovery.impl.DiscoveryDefinitionImpl#getCategories <em>Categories</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.discovery.impl.DiscoveryDefinitionImpl#getFilters <em>Filters</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class DiscoveryDefinitionImpl extends MinimalEObjectImpl implements DiscoveryDefinition {
+ /**
+ * The cached value of the '{@link #getCategories() <em>Categories</em>}' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getCategories()
+ * @generated
+ * @ordered
+ */
+ protected EList<Category> categories;
+
+ /**
+ * The cached value of the '{@link #getFilters() <em>Filters</em>}' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getFilters()
+ * @generated
+ * @ordered
+ */
+ protected EList<Group> filters;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected DiscoveryDefinitionImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return DiscoveryPackage.Literals.DISCOVERY_DEFINITION;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<Category> getCategories() {
+ if (categories == null) {
+ categories = new EObjectContainmentEList<Category>(Category.class, this, DiscoveryPackage.DISCOVERY_DEFINITION__CATEGORIES);
+ }
+ return categories;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<Group> getFilters() {
+ if (filters == null) {
+ filters = new EObjectContainmentEList<Group>(Group.class, this, DiscoveryPackage.DISCOVERY_DEFINITION__FILTERS);
+ }
+ return filters;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case DiscoveryPackage.DISCOVERY_DEFINITION__CATEGORIES:
+ return ((InternalEList<?>)getCategories()).basicRemove(otherEnd, msgs);
+ case DiscoveryPackage.DISCOVERY_DEFINITION__FILTERS:
+ return ((InternalEList<?>)getFilters()).basicRemove(otherEnd, msgs);
+ }
+ return super.eInverseRemove(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case DiscoveryPackage.DISCOVERY_DEFINITION__CATEGORIES:
+ return getCategories();
+ case DiscoveryPackage.DISCOVERY_DEFINITION__FILTERS:
+ return getFilters();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case DiscoveryPackage.DISCOVERY_DEFINITION__CATEGORIES:
+ getCategories().clear();
+ getCategories().addAll((Collection<? extends Category>)newValue);
+ return;
+ case DiscoveryPackage.DISCOVERY_DEFINITION__FILTERS:
+ getFilters().clear();
+ getFilters().addAll((Collection<? extends Group>)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case DiscoveryPackage.DISCOVERY_DEFINITION__CATEGORIES:
+ getCategories().clear();
+ return;
+ case DiscoveryPackage.DISCOVERY_DEFINITION__FILTERS:
+ getFilters().clear();
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case DiscoveryPackage.DISCOVERY_DEFINITION__CATEGORIES:
+ return categories != null && !categories.isEmpty();
+ case DiscoveryPackage.DISCOVERY_DEFINITION__FILTERS:
+ return filters != null && !filters.isEmpty();
+ }
+ return super.eIsSet(featureID);
+ }
+
+} //DiscoveryDefinitionImpl
diff --git a/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery/src-gen/org/eclipse/papyrus/infra/discovery/impl/DiscoveryFactoryImpl.java b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery/src-gen/org/eclipse/papyrus/infra/discovery/impl/DiscoveryFactoryImpl.java
new file mode 100644
index 00000000000..110130babd3
--- /dev/null
+++ b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery/src-gen/org/eclipse/papyrus/infra/discovery/impl/DiscoveryFactoryImpl.java
@@ -0,0 +1,211 @@
+/**
+ *
+ * Copyright (c) 2012 CEA LIST.
+ * 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:
+ * CEA LIST - initial API and implementation
+ *
+ */
+package org.eclipse.papyrus.infra.discovery.impl;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EDataType;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+
+import org.eclipse.emf.ecore.impl.EFactoryImpl;
+
+import org.eclipse.emf.ecore.plugin.EcorePlugin;
+
+import org.eclipse.papyrus.infra.discovery.*;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model <b>Factory</b>.
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class DiscoveryFactoryImpl extends EFactoryImpl implements DiscoveryFactory {
+ /**
+ * Creates the default factory implementation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static DiscoveryFactory init() {
+ try {
+ DiscoveryFactory theDiscoveryFactory = (DiscoveryFactory)EPackage.Registry.INSTANCE.getEFactory("http://www.eclipse.org/papyrus/discovery/1.0");
+ if (theDiscoveryFactory != null) {
+ return theDiscoveryFactory;
+ }
+ }
+ catch (Exception exception) {
+ EcorePlugin.INSTANCE.log(exception);
+ }
+ return new DiscoveryFactoryImpl();
+ }
+
+ /**
+ * Creates an instance of the factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public DiscoveryFactoryImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public EObject create(EClass eClass) {
+ switch (eClass.getClassifierID()) {
+ case DiscoveryPackage.INSTALLABLE_COMPONENT: return createInstallableComponent();
+ case DiscoveryPackage.OVERVIEW: return createOverview();
+ case DiscoveryPackage.CATEGORY: return createCategory();
+ case DiscoveryPackage.DISCOVERY_DEFINITION: return createDiscoveryDefinition();
+ case DiscoveryPackage.GROUP: return createGroup();
+ case DiscoveryPackage.MESSAGE: return createMessage();
+ default:
+ throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object createFromString(EDataType eDataType, String initialValue) {
+ switch (eDataType.getClassifierID()) {
+ case DiscoveryPackage.SEVERITY:
+ return createSeverityFromString(eDataType, initialValue);
+ default:
+ throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier");
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String convertToString(EDataType eDataType, Object instanceValue) {
+ switch (eDataType.getClassifierID()) {
+ case DiscoveryPackage.SEVERITY:
+ return convertSeverityToString(eDataType, instanceValue);
+ default:
+ throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier");
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public InstallableComponent createInstallableComponent() {
+ InstallableComponentImpl installableComponent = new InstallableComponentImpl();
+ return installableComponent;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Overview createOverview() {
+ OverviewImpl overview = new OverviewImpl();
+ return overview;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Category createCategory() {
+ CategoryImpl category = new CategoryImpl();
+ return category;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public DiscoveryDefinition createDiscoveryDefinition() {
+ DiscoveryDefinitionImpl discoveryDefinition = new DiscoveryDefinitionImpl();
+ return discoveryDefinition;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Group createGroup() {
+ GroupImpl group = new GroupImpl();
+ return group;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Message createMessage() {
+ MessageImpl message = new MessageImpl();
+ return message;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Severity createSeverityFromString(EDataType eDataType, String initialValue) {
+ Severity result = Severity.get(initialValue);
+ if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'");
+ return result;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String convertSeverityToString(EDataType eDataType, Object instanceValue) {
+ return instanceValue == null ? null : instanceValue.toString();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public DiscoveryPackage getDiscoveryPackage() {
+ return (DiscoveryPackage)getEPackage();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @deprecated
+ * @generated
+ */
+ @Deprecated
+ public static DiscoveryPackage getPackage() {
+ return DiscoveryPackage.eINSTANCE;
+ }
+
+} //DiscoveryFactoryImpl
diff --git a/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery/src-gen/org/eclipse/papyrus/infra/discovery/impl/DiscoveryPackageImpl.java b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery/src-gen/org/eclipse/papyrus/infra/discovery/impl/DiscoveryPackageImpl.java
new file mode 100644
index 00000000000..78f12d10f2f
--- /dev/null
+++ b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery/src-gen/org/eclipse/papyrus/infra/discovery/impl/DiscoveryPackageImpl.java
@@ -0,0 +1,662 @@
+/**
+ *
+ * Copyright (c) 2012 CEA LIST.
+ * 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:
+ * CEA LIST - initial API and implementation
+ *
+ */
+package org.eclipse.papyrus.infra.discovery.impl;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EEnum;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EReference;
+
+import org.eclipse.emf.ecore.impl.EPackageImpl;
+
+import org.eclipse.papyrus.infra.discovery.Category;
+import org.eclipse.papyrus.infra.discovery.DiscoveryDefinition;
+import org.eclipse.papyrus.infra.discovery.DiscoveryFactory;
+import org.eclipse.papyrus.infra.discovery.DiscoveryPackage;
+import org.eclipse.papyrus.infra.discovery.Group;
+import org.eclipse.papyrus.infra.discovery.InstallableComponent;
+import org.eclipse.papyrus.infra.discovery.Message;
+import org.eclipse.papyrus.infra.discovery.Overview;
+import org.eclipse.papyrus.infra.discovery.Severity;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model <b>Package</b>.
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class DiscoveryPackageImpl extends EPackageImpl implements DiscoveryPackage {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass installableComponentEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass overviewEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass categoryEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass discoveryDefinitionEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass groupEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass messageEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EEnum severityEEnum = null;
+
+ /**
+ * Creates an instance of the model <b>Package</b>, registered with
+ * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package
+ * package URI value.
+ * <p>Note: the correct way to create the package is via the static
+ * factory method {@link #init init()}, which also performs
+ * initialization of the package, or returns the registered package,
+ * if one already exists.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.ecore.EPackage.Registry
+ * @see org.eclipse.papyrus.infra.discovery.DiscoveryPackage#eNS_URI
+ * @see #init()
+ * @generated
+ */
+ private DiscoveryPackageImpl() {
+ super(eNS_URI, DiscoveryFactory.eINSTANCE);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private static boolean isInited = false;
+
+ /**
+ * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends.
+ *
+ * <p>This method is used to initialize {@link DiscoveryPackage#eINSTANCE} when that field is accessed.
+ * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #eNS_URI
+ * @see #createPackageContents()
+ * @see #initializePackageContents()
+ * @generated
+ */
+ public static DiscoveryPackage init() {
+ if (isInited) return (DiscoveryPackage)EPackage.Registry.INSTANCE.getEPackage(DiscoveryPackage.eNS_URI);
+
+ // Obtain or create and register package
+ DiscoveryPackageImpl theDiscoveryPackage = (DiscoveryPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof DiscoveryPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new DiscoveryPackageImpl());
+
+ isInited = true;
+
+ // Create package meta-data objects
+ theDiscoveryPackage.createPackageContents();
+
+ // Initialize created meta-data
+ theDiscoveryPackage.initializePackageContents();
+
+ // Mark meta-data to indicate it can't be changed
+ theDiscoveryPackage.freeze();
+
+
+ // Update the registry and return the package
+ EPackage.Registry.INSTANCE.put(DiscoveryPackage.eNS_URI, theDiscoveryPackage);
+ return theDiscoveryPackage;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getInstallableComponent() {
+ return installableComponentEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getInstallableComponent_Name() {
+ return (EAttribute)installableComponentEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getInstallableComponent_Provider() {
+ return (EAttribute)installableComponentEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getInstallableComponent_SitesURLS() {
+ return (EAttribute)installableComponentEClass.getEStructuralFeatures().get(2);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getInstallableComponent_Description() {
+ return (EAttribute)installableComponentEClass.getEStructuralFeatures().get(3);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getInstallableComponent_Overview() {
+ return (EReference)installableComponentEClass.getEStructuralFeatures().get(4);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getInstallableComponent_Category() {
+ return (EReference)installableComponentEClass.getEStructuralFeatures().get(5);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getInstallableComponent_Id() {
+ return (EAttribute)installableComponentEClass.getEStructuralFeatures().get(6);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getInstallableComponent_License() {
+ return (EAttribute)installableComponentEClass.getEStructuralFeatures().get(7);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getInstallableComponent_Selected() {
+ return (EAttribute)installableComponentEClass.getEStructuralFeatures().get(8);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getInstallableComponent_Available() {
+ return (EAttribute)installableComponentEClass.getEStructuralFeatures().get(9);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getInstallableComponent_Installed() {
+ return (EAttribute)installableComponentEClass.getEStructuralFeatures().get(10);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getInstallableComponent_Groups() {
+ return (EReference)installableComponentEClass.getEStructuralFeatures().get(11);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getInstallableComponent_Image32() {
+ return (EAttribute)installableComponentEClass.getEStructuralFeatures().get(12);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getInstallableComponent_Incubation() {
+ return (EAttribute)installableComponentEClass.getEStructuralFeatures().get(13);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getInstallableComponent_Messages() {
+ return (EReference)installableComponentEClass.getEStructuralFeatures().get(14);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getInstallableComponent_Visible() {
+ return (EAttribute)installableComponentEClass.getEStructuralFeatures().get(15);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getInstallableComponent_HiddingFeatureID() {
+ return (EAttribute)installableComponentEClass.getEStructuralFeatures().get(16);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getOverview() {
+ return overviewEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getOverview_Summary() {
+ return (EAttribute)overviewEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getOverview_Screenshot() {
+ return (EAttribute)overviewEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getOverview_Url() {
+ return (EAttribute)overviewEClass.getEStructuralFeatures().get(2);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getCategory() {
+ return categoryEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getCategory_Name() {
+ return (EAttribute)categoryEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getCategory_Description() {
+ return (EAttribute)categoryEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getCategory_Components() {
+ return (EReference)categoryEClass.getEStructuralFeatures().get(2);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getCategory_Relevance() {
+ return (EAttribute)categoryEClass.getEStructuralFeatures().get(3);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getCategory_Overview() {
+ return (EReference)categoryEClass.getEStructuralFeatures().get(4);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getCategory_Image48() {
+ return (EAttribute)categoryEClass.getEStructuralFeatures().get(5);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getDiscoveryDefinition() {
+ return discoveryDefinitionEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getDiscoveryDefinition_Categories() {
+ return (EReference)discoveryDefinitionEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getDiscoveryDefinition_Filters() {
+ return (EReference)discoveryDefinitionEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getGroup() {
+ return groupEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getGroup_Name() {
+ return (EAttribute)groupEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getMessage() {
+ return messageEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getMessage_Title() {
+ return (EAttribute)messageEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getMessage_Message() {
+ return (EAttribute)messageEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getMessage_Icon() {
+ return (EAttribute)messageEClass.getEStructuralFeatures().get(2);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EEnum getSeverity() {
+ return severityEEnum;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public DiscoveryFactory getDiscoveryFactory() {
+ return (DiscoveryFactory)getEFactoryInstance();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private boolean isCreated = false;
+
+ /**
+ * Creates the meta-model objects for the package. This method is
+ * guarded to have no affect on any invocation but its first.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void createPackageContents() {
+ if (isCreated) return;
+ isCreated = true;
+
+ // Create classes and their features
+ installableComponentEClass = createEClass(INSTALLABLE_COMPONENT);
+ createEAttribute(installableComponentEClass, INSTALLABLE_COMPONENT__NAME);
+ createEAttribute(installableComponentEClass, INSTALLABLE_COMPONENT__PROVIDER);
+ createEAttribute(installableComponentEClass, INSTALLABLE_COMPONENT__SITES_URLS);
+ createEAttribute(installableComponentEClass, INSTALLABLE_COMPONENT__DESCRIPTION);
+ createEReference(installableComponentEClass, INSTALLABLE_COMPONENT__OVERVIEW);
+ createEReference(installableComponentEClass, INSTALLABLE_COMPONENT__CATEGORY);
+ createEAttribute(installableComponentEClass, INSTALLABLE_COMPONENT__ID);
+ createEAttribute(installableComponentEClass, INSTALLABLE_COMPONENT__LICENSE);
+ createEAttribute(installableComponentEClass, INSTALLABLE_COMPONENT__SELECTED);
+ createEAttribute(installableComponentEClass, INSTALLABLE_COMPONENT__AVAILABLE);
+ createEAttribute(installableComponentEClass, INSTALLABLE_COMPONENT__INSTALLED);
+ createEReference(installableComponentEClass, INSTALLABLE_COMPONENT__GROUPS);
+ createEAttribute(installableComponentEClass, INSTALLABLE_COMPONENT__IMAGE32);
+ createEAttribute(installableComponentEClass, INSTALLABLE_COMPONENT__INCUBATION);
+ createEReference(installableComponentEClass, INSTALLABLE_COMPONENT__MESSAGES);
+ createEAttribute(installableComponentEClass, INSTALLABLE_COMPONENT__VISIBLE);
+ createEAttribute(installableComponentEClass, INSTALLABLE_COMPONENT__HIDDING_FEATURE_ID);
+
+ overviewEClass = createEClass(OVERVIEW);
+ createEAttribute(overviewEClass, OVERVIEW__SUMMARY);
+ createEAttribute(overviewEClass, OVERVIEW__SCREENSHOT);
+ createEAttribute(overviewEClass, OVERVIEW__URL);
+
+ categoryEClass = createEClass(CATEGORY);
+ createEAttribute(categoryEClass, CATEGORY__NAME);
+ createEAttribute(categoryEClass, CATEGORY__DESCRIPTION);
+ createEReference(categoryEClass, CATEGORY__COMPONENTS);
+ createEAttribute(categoryEClass, CATEGORY__RELEVANCE);
+ createEReference(categoryEClass, CATEGORY__OVERVIEW);
+ createEAttribute(categoryEClass, CATEGORY__IMAGE48);
+
+ discoveryDefinitionEClass = createEClass(DISCOVERY_DEFINITION);
+ createEReference(discoveryDefinitionEClass, DISCOVERY_DEFINITION__CATEGORIES);
+ createEReference(discoveryDefinitionEClass, DISCOVERY_DEFINITION__FILTERS);
+
+ groupEClass = createEClass(GROUP);
+ createEAttribute(groupEClass, GROUP__NAME);
+
+ messageEClass = createEClass(MESSAGE);
+ createEAttribute(messageEClass, MESSAGE__TITLE);
+ createEAttribute(messageEClass, MESSAGE__MESSAGE);
+ createEAttribute(messageEClass, MESSAGE__ICON);
+
+ // Create enums
+ severityEEnum = createEEnum(SEVERITY);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private boolean isInitialized = false;
+
+ /**
+ * Complete the initialization of the package and its meta-model. This
+ * method is guarded to have no affect on any invocation but its first.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void initializePackageContents() {
+ if (isInitialized) return;
+ isInitialized = true;
+
+ // Initialize package
+ setName(eNAME);
+ setNsPrefix(eNS_PREFIX);
+ setNsURI(eNS_URI);
+
+ // Create type parameters
+
+ // Set bounds for type parameters
+
+ // Add supertypes to classes
+
+ // Initialize classes and features; add operations and parameters
+ initEClass(installableComponentEClass, InstallableComponent.class, "InstallableComponent", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getInstallableComponent_Name(), ecorePackage.getEString(), "name", null, 1, 1, InstallableComponent.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getInstallableComponent_Provider(), ecorePackage.getEString(), "provider", null, 1, 1, InstallableComponent.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getInstallableComponent_SitesURLS(), ecorePackage.getEString(), "sitesURLS", null, 1, -1, InstallableComponent.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getInstallableComponent_Description(), ecorePackage.getEString(), "description", null, 0, 1, InstallableComponent.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getInstallableComponent_Overview(), this.getOverview(), null, "overview", null, 0, 1, InstallableComponent.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getInstallableComponent_Category(), this.getCategory(), this.getCategory_Components(), "category", null, 1, 1, InstallableComponent.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getInstallableComponent_Id(), ecorePackage.getEString(), "id", null, 1, -1, InstallableComponent.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getInstallableComponent_License(), ecorePackage.getEString(), "license", null, 1, 1, InstallableComponent.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getInstallableComponent_Selected(), ecorePackage.getEBoolean(), "selected", "false", 1, 1, InstallableComponent.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getInstallableComponent_Available(), ecorePackage.getEBoolean(), "available", "false", 1, 1, InstallableComponent.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getInstallableComponent_Installed(), ecorePackage.getEBoolean(), "installed", "false", 1, 1, InstallableComponent.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getInstallableComponent_Groups(), this.getGroup(), null, "groups", null, 0, -1, InstallableComponent.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getInstallableComponent_Image32(), ecorePackage.getEString(), "image32", null, 0, 1, InstallableComponent.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getInstallableComponent_Incubation(), ecorePackage.getEBoolean(), "incubation", "false", 1, 1, InstallableComponent.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getInstallableComponent_Messages(), this.getMessage(), null, "messages", null, 0, -1, InstallableComponent.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getInstallableComponent_Visible(), ecorePackage.getEBoolean(), "visible", "true", 1, 1, InstallableComponent.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getInstallableComponent_HiddingFeatureID(), ecorePackage.getEString(), "hiddingFeatureID", null, 0, -1, InstallableComponent.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(overviewEClass, Overview.class, "Overview", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getOverview_Summary(), ecorePackage.getEString(), "summary", null, 1, 1, Overview.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getOverview_Screenshot(), ecorePackage.getEString(), "screenshot", null, 0, 1, Overview.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getOverview_Url(), ecorePackage.getEString(), "url", "http://www.eclipse.org/modeling", 1, 1, Overview.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(categoryEClass, Category.class, "Category", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getCategory_Name(), ecorePackage.getEString(), "name", null, 1, 1, Category.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getCategory_Description(), ecorePackage.getEString(), "description", null, 0, 1, Category.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getCategory_Components(), this.getInstallableComponent(), this.getInstallableComponent_Category(), "components", null, 0, -1, Category.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ getCategory_Components().getEKeys().add(this.getInstallableComponent_Name());
+ initEAttribute(getCategory_Relevance(), ecorePackage.getEIntegerObject(), "relevance", "5", 1, 1, Category.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getCategory_Overview(), this.getOverview(), null, "overview", null, 0, 1, Category.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getCategory_Image48(), ecorePackage.getEString(), "image48", null, 0, 1, Category.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(discoveryDefinitionEClass, DiscoveryDefinition.class, "DiscoveryDefinition", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEReference(getDiscoveryDefinition_Categories(), this.getCategory(), null, "categories", null, 0, -1, DiscoveryDefinition.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ getDiscoveryDefinition_Categories().getEKeys().add(this.getCategory_Name());
+ initEReference(getDiscoveryDefinition_Filters(), this.getGroup(), null, "filters", null, 0, -1, DiscoveryDefinition.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(groupEClass, Group.class, "Group", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getGroup_Name(), ecorePackage.getEString(), "name", null, 1, 1, Group.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(messageEClass, Message.class, "Message", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getMessage_Title(), ecorePackage.getEString(), "title", null, 1, 1, Message.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getMessage_Message(), ecorePackage.getEString(), "message", null, 1, 1, Message.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getMessage_Icon(), this.getSeverity(), "icon", null, 1, 1, Message.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ // Initialize enums and add enum literals
+ initEEnum(severityEEnum, Severity.class, "Severity");
+ addEEnumLiteral(severityEEnum, Severity.INFO);
+ addEEnumLiteral(severityEEnum, Severity.WARNING);
+
+ // Create resource
+ createResource(eNS_URI);
+ }
+
+} //DiscoveryPackageImpl
diff --git a/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery/src-gen/org/eclipse/papyrus/infra/discovery/impl/GroupImpl.java b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery/src-gen/org/eclipse/papyrus/infra/discovery/impl/GroupImpl.java
new file mode 100644
index 00000000000..0f59cc412e0
--- /dev/null
+++ b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery/src-gen/org/eclipse/papyrus/infra/discovery/impl/GroupImpl.java
@@ -0,0 +1,173 @@
+/**
+ *
+ * Copyright (c) 2012 CEA LIST.
+ * 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:
+ * CEA LIST - initial API and implementation
+ *
+ */
+package org.eclipse.papyrus.infra.discovery.impl;
+
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.ecore.EClass;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
+
+import org.eclipse.papyrus.infra.discovery.DiscoveryPackage;
+import org.eclipse.papyrus.infra.discovery.Group;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Group</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.infra.discovery.impl.GroupImpl#getName <em>Name</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class GroupImpl extends MinimalEObjectImpl implements Group {
+ /**
+ * The default value of the '{@link #getName() <em>Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getName()
+ * @generated
+ * @ordered
+ */
+ protected static final String NAME_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getName() <em>Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getName()
+ * @generated
+ * @ordered
+ */
+ protected String name = NAME_EDEFAULT;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected GroupImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return DiscoveryPackage.Literals.GROUP;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setName(String newName) {
+ String oldName = name;
+ name = newName;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, DiscoveryPackage.GROUP__NAME, oldName, name));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case DiscoveryPackage.GROUP__NAME:
+ return getName();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case DiscoveryPackage.GROUP__NAME:
+ setName((String)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case DiscoveryPackage.GROUP__NAME:
+ setName(NAME_EDEFAULT);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case DiscoveryPackage.GROUP__NAME:
+ return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String toString() {
+ if (eIsProxy()) return super.toString();
+
+ StringBuffer result = new StringBuffer(super.toString());
+ result.append(" (name: ");
+ result.append(name);
+ result.append(')');
+ return result.toString();
+ }
+
+} //GroupImpl
diff --git a/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery/src-gen/org/eclipse/papyrus/infra/discovery/impl/InstallableComponentImpl.java b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery/src-gen/org/eclipse/papyrus/infra/discovery/impl/InstallableComponentImpl.java
new file mode 100644
index 00000000000..4dde9b22573
--- /dev/null
+++ b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery/src-gen/org/eclipse/papyrus/infra/discovery/impl/InstallableComponentImpl.java
@@ -0,0 +1,1016 @@
+/**
+ *
+ * Copyright (c) 2012 CEA LIST.
+ * 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:
+ * CEA LIST - initial API and implementation
+ *
+ */
+package org.eclipse.papyrus.infra.discovery.impl;
+
+import java.util.Collection;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
+
+import org.eclipse.emf.ecore.util.EDataTypeUniqueEList;
+import org.eclipse.emf.ecore.util.EObjectContainmentEList;
+import org.eclipse.emf.ecore.util.EObjectResolvingEList;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.emf.ecore.util.InternalEList;
+
+import org.eclipse.papyrus.infra.discovery.Category;
+import org.eclipse.papyrus.infra.discovery.DiscoveryPackage;
+import org.eclipse.papyrus.infra.discovery.Group;
+import org.eclipse.papyrus.infra.discovery.InstallableComponent;
+import org.eclipse.papyrus.infra.discovery.Message;
+import org.eclipse.papyrus.infra.discovery.Overview;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Installable Component</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.infra.discovery.impl.InstallableComponentImpl#getName <em>Name</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.discovery.impl.InstallableComponentImpl#getProvider <em>Provider</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.discovery.impl.InstallableComponentImpl#getSitesURLS <em>Sites URLS</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.discovery.impl.InstallableComponentImpl#getDescription <em>Description</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.discovery.impl.InstallableComponentImpl#getOverview <em>Overview</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.discovery.impl.InstallableComponentImpl#getCategory <em>Category</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.discovery.impl.InstallableComponentImpl#getId <em>Id</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.discovery.impl.InstallableComponentImpl#getLicense <em>License</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.discovery.impl.InstallableComponentImpl#isSelected <em>Selected</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.discovery.impl.InstallableComponentImpl#isAvailable <em>Available</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.discovery.impl.InstallableComponentImpl#isInstalled <em>Installed</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.discovery.impl.InstallableComponentImpl#getGroups <em>Groups</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.discovery.impl.InstallableComponentImpl#getImage32 <em>Image32</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.discovery.impl.InstallableComponentImpl#isIncubation <em>Incubation</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.discovery.impl.InstallableComponentImpl#getMessages <em>Messages</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.discovery.impl.InstallableComponentImpl#isVisible <em>Visible</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.discovery.impl.InstallableComponentImpl#getHiddingFeatureID <em>Hidding Feature ID</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class InstallableComponentImpl extends MinimalEObjectImpl implements InstallableComponent {
+ /**
+ * The default value of the '{@link #getName() <em>Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getName()
+ * @generated
+ * @ordered
+ */
+ protected static final String NAME_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getName() <em>Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getName()
+ * @generated
+ * @ordered
+ */
+ protected String name = NAME_EDEFAULT;
+
+ /**
+ * The default value of the '{@link #getProvider() <em>Provider</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getProvider()
+ * @generated
+ * @ordered
+ */
+ protected static final String PROVIDER_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getProvider() <em>Provider</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getProvider()
+ * @generated
+ * @ordered
+ */
+ protected String provider = PROVIDER_EDEFAULT;
+
+ /**
+ * The cached value of the '{@link #getSitesURLS() <em>Sites URLS</em>}' attribute list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getSitesURLS()
+ * @generated
+ * @ordered
+ */
+ protected EList<String> sitesURLS;
+
+ /**
+ * The default value of the '{@link #getDescription() <em>Description</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getDescription()
+ * @generated
+ * @ordered
+ */
+ protected static final String DESCRIPTION_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getDescription() <em>Description</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getDescription()
+ * @generated
+ * @ordered
+ */
+ protected String description = DESCRIPTION_EDEFAULT;
+
+ /**
+ * The cached value of the '{@link #getOverview() <em>Overview</em>}' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getOverview()
+ * @generated
+ * @ordered
+ */
+ protected Overview overview;
+
+ /**
+ * The cached value of the '{@link #getId() <em>Id</em>}' attribute list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getId()
+ * @generated
+ * @ordered
+ */
+ protected EList<String> id;
+
+ /**
+ * The default value of the '{@link #getLicense() <em>License</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getLicense()
+ * @generated
+ * @ordered
+ */
+ protected static final String LICENSE_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getLicense() <em>License</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getLicense()
+ * @generated
+ * @ordered
+ */
+ protected String license = LICENSE_EDEFAULT;
+
+ /**
+ * The default value of the '{@link #isSelected() <em>Selected</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #isSelected()
+ * @generated
+ * @ordered
+ */
+ protected static final boolean SELECTED_EDEFAULT = false;
+
+ /**
+ * The cached value of the '{@link #isSelected() <em>Selected</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #isSelected()
+ * @generated
+ * @ordered
+ */
+ protected boolean selected = SELECTED_EDEFAULT;
+
+ /**
+ * The default value of the '{@link #isAvailable() <em>Available</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #isAvailable()
+ * @generated
+ * @ordered
+ */
+ protected static final boolean AVAILABLE_EDEFAULT = false;
+
+ /**
+ * The cached value of the '{@link #isAvailable() <em>Available</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #isAvailable()
+ * @generated
+ * @ordered
+ */
+ protected boolean available = AVAILABLE_EDEFAULT;
+
+ /**
+ * The default value of the '{@link #isInstalled() <em>Installed</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #isInstalled()
+ * @generated
+ * @ordered
+ */
+ protected static final boolean INSTALLED_EDEFAULT = false;
+
+ /**
+ * The cached value of the '{@link #isInstalled() <em>Installed</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #isInstalled()
+ * @generated
+ * @ordered
+ */
+ protected boolean installed = INSTALLED_EDEFAULT;
+
+ /**
+ * The cached value of the '{@link #getGroups() <em>Groups</em>}' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getGroups()
+ * @generated
+ * @ordered
+ */
+ protected EList<Group> groups;
+
+ /**
+ * The default value of the '{@link #getImage32() <em>Image32</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getImage32()
+ * @generated
+ * @ordered
+ */
+ protected static final String IMAGE32_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getImage32() <em>Image32</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getImage32()
+ * @generated
+ * @ordered
+ */
+ protected String image32 = IMAGE32_EDEFAULT;
+
+ /**
+ * The default value of the '{@link #isIncubation() <em>Incubation</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #isIncubation()
+ * @generated
+ * @ordered
+ */
+ protected static final boolean INCUBATION_EDEFAULT = false;
+
+ /**
+ * The cached value of the '{@link #isIncubation() <em>Incubation</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #isIncubation()
+ * @generated
+ * @ordered
+ */
+ protected boolean incubation = INCUBATION_EDEFAULT;
+
+ /**
+ * The cached value of the '{@link #getMessages() <em>Messages</em>}' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getMessages()
+ * @generated
+ * @ordered
+ */
+ protected EList<Message> messages;
+
+ /**
+ * The default value of the '{@link #isVisible() <em>Visible</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #isVisible()
+ * @generated
+ * @ordered
+ */
+ protected static final boolean VISIBLE_EDEFAULT = true;
+
+ /**
+ * The cached value of the '{@link #isVisible() <em>Visible</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #isVisible()
+ * @generated
+ * @ordered
+ */
+ protected boolean visible = VISIBLE_EDEFAULT;
+
+ /**
+ * The cached value of the '{@link #getHiddingFeatureID() <em>Hidding Feature ID</em>}' attribute list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getHiddingFeatureID()
+ * @generated
+ * @ordered
+ */
+ protected EList<String> hiddingFeatureID;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected InstallableComponentImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return DiscoveryPackage.Literals.INSTALLABLE_COMPONENT;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setName(String newName) {
+ String oldName = name;
+ name = newName;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, DiscoveryPackage.INSTALLABLE_COMPONENT__NAME, oldName, name));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getProvider() {
+ return provider;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setProvider(String newProvider) {
+ String oldProvider = provider;
+ provider = newProvider;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, DiscoveryPackage.INSTALLABLE_COMPONENT__PROVIDER, oldProvider, provider));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<String> getSitesURLS() {
+ if (sitesURLS == null) {
+ sitesURLS = new EDataTypeUniqueEList<String>(String.class, this, DiscoveryPackage.INSTALLABLE_COMPONENT__SITES_URLS);
+ }
+ return sitesURLS;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getDescription() {
+ return description;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setDescription(String newDescription) {
+ String oldDescription = description;
+ description = newDescription;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, DiscoveryPackage.INSTALLABLE_COMPONENT__DESCRIPTION, oldDescription, description));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Overview getOverview() {
+ return overview;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NotificationChain basicSetOverview(Overview newOverview, NotificationChain msgs) {
+ Overview oldOverview = overview;
+ overview = newOverview;
+ if (eNotificationRequired()) {
+ ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, DiscoveryPackage.INSTALLABLE_COMPONENT__OVERVIEW, oldOverview, newOverview);
+ if (msgs == null) msgs = notification; else msgs.add(notification);
+ }
+ return msgs;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setOverview(Overview newOverview) {
+ if (newOverview != overview) {
+ NotificationChain msgs = null;
+ if (overview != null)
+ msgs = ((InternalEObject)overview).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - DiscoveryPackage.INSTALLABLE_COMPONENT__OVERVIEW, null, msgs);
+ if (newOverview != null)
+ msgs = ((InternalEObject)newOverview).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - DiscoveryPackage.INSTALLABLE_COMPONENT__OVERVIEW, null, msgs);
+ msgs = basicSetOverview(newOverview, msgs);
+ if (msgs != null) msgs.dispatch();
+ }
+ else if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, DiscoveryPackage.INSTALLABLE_COMPONENT__OVERVIEW, newOverview, newOverview));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Category getCategory() {
+ if (eContainerFeatureID() != DiscoveryPackage.INSTALLABLE_COMPONENT__CATEGORY) return null;
+ return (Category)eContainer();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NotificationChain basicSetCategory(Category newCategory, NotificationChain msgs) {
+ msgs = eBasicSetContainer((InternalEObject)newCategory, DiscoveryPackage.INSTALLABLE_COMPONENT__CATEGORY, msgs);
+ return msgs;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setCategory(Category newCategory) {
+ if (newCategory != eInternalContainer() || (eContainerFeatureID() != DiscoveryPackage.INSTALLABLE_COMPONENT__CATEGORY && newCategory != null)) {
+ if (EcoreUtil.isAncestor(this, newCategory))
+ throw new IllegalArgumentException("Recursive containment not allowed for " + toString());
+ NotificationChain msgs = null;
+ if (eInternalContainer() != null)
+ msgs = eBasicRemoveFromContainer(msgs);
+ if (newCategory != null)
+ msgs = ((InternalEObject)newCategory).eInverseAdd(this, DiscoveryPackage.CATEGORY__COMPONENTS, Category.class, msgs);
+ msgs = basicSetCategory(newCategory, msgs);
+ if (msgs != null) msgs.dispatch();
+ }
+ else if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, DiscoveryPackage.INSTALLABLE_COMPONENT__CATEGORY, newCategory, newCategory));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<String> getId() {
+ if (id == null) {
+ id = new EDataTypeUniqueEList<String>(String.class, this, DiscoveryPackage.INSTALLABLE_COMPONENT__ID);
+ }
+ return id;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getLicense() {
+ return license;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setLicense(String newLicense) {
+ String oldLicense = license;
+ license = newLicense;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, DiscoveryPackage.INSTALLABLE_COMPONENT__LICENSE, oldLicense, license));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean isSelected() {
+ return selected;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setSelected(boolean newSelected) {
+ boolean oldSelected = selected;
+ selected = newSelected;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, DiscoveryPackage.INSTALLABLE_COMPONENT__SELECTED, oldSelected, selected));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean isAvailable() {
+ return available;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setAvailable(boolean newAvailable) {
+ boolean oldAvailable = available;
+ available = newAvailable;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, DiscoveryPackage.INSTALLABLE_COMPONENT__AVAILABLE, oldAvailable, available));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean isInstalled() {
+ return installed;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setInstalled(boolean newInstalled) {
+ boolean oldInstalled = installed;
+ installed = newInstalled;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, DiscoveryPackage.INSTALLABLE_COMPONENT__INSTALLED, oldInstalled, installed));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<Group> getGroups() {
+ if (groups == null) {
+ groups = new EObjectResolvingEList<Group>(Group.class, this, DiscoveryPackage.INSTALLABLE_COMPONENT__GROUPS);
+ }
+ return groups;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getImage32() {
+ return image32;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setImage32(String newImage32) {
+ String oldImage32 = image32;
+ image32 = newImage32;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, DiscoveryPackage.INSTALLABLE_COMPONENT__IMAGE32, oldImage32, image32));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean isIncubation() {
+ return incubation;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setIncubation(boolean newIncubation) {
+ boolean oldIncubation = incubation;
+ incubation = newIncubation;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, DiscoveryPackage.INSTALLABLE_COMPONENT__INCUBATION, oldIncubation, incubation));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<Message> getMessages() {
+ if (messages == null) {
+ messages = new EObjectContainmentEList<Message>(Message.class, this, DiscoveryPackage.INSTALLABLE_COMPONENT__MESSAGES);
+ }
+ return messages;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean isVisible() {
+ return visible;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setVisible(boolean newVisible) {
+ boolean oldVisible = visible;
+ visible = newVisible;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, DiscoveryPackage.INSTALLABLE_COMPONENT__VISIBLE, oldVisible, visible));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<String> getHiddingFeatureID() {
+ if (hiddingFeatureID == null) {
+ hiddingFeatureID = new EDataTypeUniqueEList<String>(String.class, this, DiscoveryPackage.INSTALLABLE_COMPONENT__HIDDING_FEATURE_ID);
+ }
+ return hiddingFeatureID;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case DiscoveryPackage.INSTALLABLE_COMPONENT__CATEGORY:
+ if (eInternalContainer() != null)
+ msgs = eBasicRemoveFromContainer(msgs);
+ return basicSetCategory((Category)otherEnd, msgs);
+ }
+ return super.eInverseAdd(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case DiscoveryPackage.INSTALLABLE_COMPONENT__OVERVIEW:
+ return basicSetOverview(null, msgs);
+ case DiscoveryPackage.INSTALLABLE_COMPONENT__CATEGORY:
+ return basicSetCategory(null, msgs);
+ case DiscoveryPackage.INSTALLABLE_COMPONENT__MESSAGES:
+ return ((InternalEList<?>)getMessages()).basicRemove(otherEnd, msgs);
+ }
+ return super.eInverseRemove(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eBasicRemoveFromContainerFeature(NotificationChain msgs) {
+ switch (eContainerFeatureID()) {
+ case DiscoveryPackage.INSTALLABLE_COMPONENT__CATEGORY:
+ return eInternalContainer().eInverseRemove(this, DiscoveryPackage.CATEGORY__COMPONENTS, Category.class, msgs);
+ }
+ return super.eBasicRemoveFromContainerFeature(msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case DiscoveryPackage.INSTALLABLE_COMPONENT__NAME:
+ return getName();
+ case DiscoveryPackage.INSTALLABLE_COMPONENT__PROVIDER:
+ return getProvider();
+ case DiscoveryPackage.INSTALLABLE_COMPONENT__SITES_URLS:
+ return getSitesURLS();
+ case DiscoveryPackage.INSTALLABLE_COMPONENT__DESCRIPTION:
+ return getDescription();
+ case DiscoveryPackage.INSTALLABLE_COMPONENT__OVERVIEW:
+ return getOverview();
+ case DiscoveryPackage.INSTALLABLE_COMPONENT__CATEGORY:
+ return getCategory();
+ case DiscoveryPackage.INSTALLABLE_COMPONENT__ID:
+ return getId();
+ case DiscoveryPackage.INSTALLABLE_COMPONENT__LICENSE:
+ return getLicense();
+ case DiscoveryPackage.INSTALLABLE_COMPONENT__SELECTED:
+ return isSelected();
+ case DiscoveryPackage.INSTALLABLE_COMPONENT__AVAILABLE:
+ return isAvailable();
+ case DiscoveryPackage.INSTALLABLE_COMPONENT__INSTALLED:
+ return isInstalled();
+ case DiscoveryPackage.INSTALLABLE_COMPONENT__GROUPS:
+ return getGroups();
+ case DiscoveryPackage.INSTALLABLE_COMPONENT__IMAGE32:
+ return getImage32();
+ case DiscoveryPackage.INSTALLABLE_COMPONENT__INCUBATION:
+ return isIncubation();
+ case DiscoveryPackage.INSTALLABLE_COMPONENT__MESSAGES:
+ return getMessages();
+ case DiscoveryPackage.INSTALLABLE_COMPONENT__VISIBLE:
+ return isVisible();
+ case DiscoveryPackage.INSTALLABLE_COMPONENT__HIDDING_FEATURE_ID:
+ return getHiddingFeatureID();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case DiscoveryPackage.INSTALLABLE_COMPONENT__NAME:
+ setName((String)newValue);
+ return;
+ case DiscoveryPackage.INSTALLABLE_COMPONENT__PROVIDER:
+ setProvider((String)newValue);
+ return;
+ case DiscoveryPackage.INSTALLABLE_COMPONENT__SITES_URLS:
+ getSitesURLS().clear();
+ getSitesURLS().addAll((Collection<? extends String>)newValue);
+ return;
+ case DiscoveryPackage.INSTALLABLE_COMPONENT__DESCRIPTION:
+ setDescription((String)newValue);
+ return;
+ case DiscoveryPackage.INSTALLABLE_COMPONENT__OVERVIEW:
+ setOverview((Overview)newValue);
+ return;
+ case DiscoveryPackage.INSTALLABLE_COMPONENT__CATEGORY:
+ setCategory((Category)newValue);
+ return;
+ case DiscoveryPackage.INSTALLABLE_COMPONENT__ID:
+ getId().clear();
+ getId().addAll((Collection<? extends String>)newValue);
+ return;
+ case DiscoveryPackage.INSTALLABLE_COMPONENT__LICENSE:
+ setLicense((String)newValue);
+ return;
+ case DiscoveryPackage.INSTALLABLE_COMPONENT__SELECTED:
+ setSelected((Boolean)newValue);
+ return;
+ case DiscoveryPackage.INSTALLABLE_COMPONENT__AVAILABLE:
+ setAvailable((Boolean)newValue);
+ return;
+ case DiscoveryPackage.INSTALLABLE_COMPONENT__INSTALLED:
+ setInstalled((Boolean)newValue);
+ return;
+ case DiscoveryPackage.INSTALLABLE_COMPONENT__GROUPS:
+ getGroups().clear();
+ getGroups().addAll((Collection<? extends Group>)newValue);
+ return;
+ case DiscoveryPackage.INSTALLABLE_COMPONENT__IMAGE32:
+ setImage32((String)newValue);
+ return;
+ case DiscoveryPackage.INSTALLABLE_COMPONENT__INCUBATION:
+ setIncubation((Boolean)newValue);
+ return;
+ case DiscoveryPackage.INSTALLABLE_COMPONENT__MESSAGES:
+ getMessages().clear();
+ getMessages().addAll((Collection<? extends Message>)newValue);
+ return;
+ case DiscoveryPackage.INSTALLABLE_COMPONENT__VISIBLE:
+ setVisible((Boolean)newValue);
+ return;
+ case DiscoveryPackage.INSTALLABLE_COMPONENT__HIDDING_FEATURE_ID:
+ getHiddingFeatureID().clear();
+ getHiddingFeatureID().addAll((Collection<? extends String>)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case DiscoveryPackage.INSTALLABLE_COMPONENT__NAME:
+ setName(NAME_EDEFAULT);
+ return;
+ case DiscoveryPackage.INSTALLABLE_COMPONENT__PROVIDER:
+ setProvider(PROVIDER_EDEFAULT);
+ return;
+ case DiscoveryPackage.INSTALLABLE_COMPONENT__SITES_URLS:
+ getSitesURLS().clear();
+ return;
+ case DiscoveryPackage.INSTALLABLE_COMPONENT__DESCRIPTION:
+ setDescription(DESCRIPTION_EDEFAULT);
+ return;
+ case DiscoveryPackage.INSTALLABLE_COMPONENT__OVERVIEW:
+ setOverview((Overview)null);
+ return;
+ case DiscoveryPackage.INSTALLABLE_COMPONENT__CATEGORY:
+ setCategory((Category)null);
+ return;
+ case DiscoveryPackage.INSTALLABLE_COMPONENT__ID:
+ getId().clear();
+ return;
+ case DiscoveryPackage.INSTALLABLE_COMPONENT__LICENSE:
+ setLicense(LICENSE_EDEFAULT);
+ return;
+ case DiscoveryPackage.INSTALLABLE_COMPONENT__SELECTED:
+ setSelected(SELECTED_EDEFAULT);
+ return;
+ case DiscoveryPackage.INSTALLABLE_COMPONENT__AVAILABLE:
+ setAvailable(AVAILABLE_EDEFAULT);
+ return;
+ case DiscoveryPackage.INSTALLABLE_COMPONENT__INSTALLED:
+ setInstalled(INSTALLED_EDEFAULT);
+ return;
+ case DiscoveryPackage.INSTALLABLE_COMPONENT__GROUPS:
+ getGroups().clear();
+ return;
+ case DiscoveryPackage.INSTALLABLE_COMPONENT__IMAGE32:
+ setImage32(IMAGE32_EDEFAULT);
+ return;
+ case DiscoveryPackage.INSTALLABLE_COMPONENT__INCUBATION:
+ setIncubation(INCUBATION_EDEFAULT);
+ return;
+ case DiscoveryPackage.INSTALLABLE_COMPONENT__MESSAGES:
+ getMessages().clear();
+ return;
+ case DiscoveryPackage.INSTALLABLE_COMPONENT__VISIBLE:
+ setVisible(VISIBLE_EDEFAULT);
+ return;
+ case DiscoveryPackage.INSTALLABLE_COMPONENT__HIDDING_FEATURE_ID:
+ getHiddingFeatureID().clear();
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case DiscoveryPackage.INSTALLABLE_COMPONENT__NAME:
+ return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
+ case DiscoveryPackage.INSTALLABLE_COMPONENT__PROVIDER:
+ return PROVIDER_EDEFAULT == null ? provider != null : !PROVIDER_EDEFAULT.equals(provider);
+ case DiscoveryPackage.INSTALLABLE_COMPONENT__SITES_URLS:
+ return sitesURLS != null && !sitesURLS.isEmpty();
+ case DiscoveryPackage.INSTALLABLE_COMPONENT__DESCRIPTION:
+ return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description);
+ case DiscoveryPackage.INSTALLABLE_COMPONENT__OVERVIEW:
+ return overview != null;
+ case DiscoveryPackage.INSTALLABLE_COMPONENT__CATEGORY:
+ return getCategory() != null;
+ case DiscoveryPackage.INSTALLABLE_COMPONENT__ID:
+ return id != null && !id.isEmpty();
+ case DiscoveryPackage.INSTALLABLE_COMPONENT__LICENSE:
+ return LICENSE_EDEFAULT == null ? license != null : !LICENSE_EDEFAULT.equals(license);
+ case DiscoveryPackage.INSTALLABLE_COMPONENT__SELECTED:
+ return selected != SELECTED_EDEFAULT;
+ case DiscoveryPackage.INSTALLABLE_COMPONENT__AVAILABLE:
+ return available != AVAILABLE_EDEFAULT;
+ case DiscoveryPackage.INSTALLABLE_COMPONENT__INSTALLED:
+ return installed != INSTALLED_EDEFAULT;
+ case DiscoveryPackage.INSTALLABLE_COMPONENT__GROUPS:
+ return groups != null && !groups.isEmpty();
+ case DiscoveryPackage.INSTALLABLE_COMPONENT__IMAGE32:
+ return IMAGE32_EDEFAULT == null ? image32 != null : !IMAGE32_EDEFAULT.equals(image32);
+ case DiscoveryPackage.INSTALLABLE_COMPONENT__INCUBATION:
+ return incubation != INCUBATION_EDEFAULT;
+ case DiscoveryPackage.INSTALLABLE_COMPONENT__MESSAGES:
+ return messages != null && !messages.isEmpty();
+ case DiscoveryPackage.INSTALLABLE_COMPONENT__VISIBLE:
+ return visible != VISIBLE_EDEFAULT;
+ case DiscoveryPackage.INSTALLABLE_COMPONENT__HIDDING_FEATURE_ID:
+ return hiddingFeatureID != null && !hiddingFeatureID.isEmpty();
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String toString() {
+ if (eIsProxy()) return super.toString();
+
+ StringBuffer result = new StringBuffer(super.toString());
+ result.append(" (name: ");
+ result.append(name);
+ result.append(", provider: ");
+ result.append(provider);
+ result.append(", sitesURLS: ");
+ result.append(sitesURLS);
+ result.append(", description: ");
+ result.append(description);
+ result.append(", id: ");
+ result.append(id);
+ result.append(", license: ");
+ result.append(license);
+ result.append(", selected: ");
+ result.append(selected);
+ result.append(", available: ");
+ result.append(available);
+ result.append(", installed: ");
+ result.append(installed);
+ result.append(", image32: ");
+ result.append(image32);
+ result.append(", incubation: ");
+ result.append(incubation);
+ result.append(", visible: ");
+ result.append(visible);
+ result.append(", hiddingFeatureID: ");
+ result.append(hiddingFeatureID);
+ result.append(')');
+ return result.toString();
+ }
+
+} //InstallableComponentImpl
diff --git a/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery/src-gen/org/eclipse/papyrus/infra/discovery/impl/MessageImpl.java b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery/src-gen/org/eclipse/papyrus/infra/discovery/impl/MessageImpl.java
new file mode 100644
index 00000000000..2c72288acdf
--- /dev/null
+++ b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery/src-gen/org/eclipse/papyrus/infra/discovery/impl/MessageImpl.java
@@ -0,0 +1,282 @@
+/**
+ *
+ * Copyright (c) 2012 CEA LIST.
+ * 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:
+ * CEA LIST - initial API and implementation
+ *
+ */
+package org.eclipse.papyrus.infra.discovery.impl;
+
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.ecore.EClass;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
+
+import org.eclipse.papyrus.infra.discovery.DiscoveryPackage;
+import org.eclipse.papyrus.infra.discovery.Message;
+import org.eclipse.papyrus.infra.discovery.Severity;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Message</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.infra.discovery.impl.MessageImpl#getTitle <em>Title</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.discovery.impl.MessageImpl#getMessage <em>Message</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.discovery.impl.MessageImpl#getIcon <em>Icon</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class MessageImpl extends MinimalEObjectImpl implements Message {
+ /**
+ * The default value of the '{@link #getTitle() <em>Title</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getTitle()
+ * @generated
+ * @ordered
+ */
+ protected static final String TITLE_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getTitle() <em>Title</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getTitle()
+ * @generated
+ * @ordered
+ */
+ protected String title = TITLE_EDEFAULT;
+
+ /**
+ * The default value of the '{@link #getMessage() <em>Message</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getMessage()
+ * @generated
+ * @ordered
+ */
+ protected static final String MESSAGE_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getMessage() <em>Message</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getMessage()
+ * @generated
+ * @ordered
+ */
+ protected String message = MESSAGE_EDEFAULT;
+
+ /**
+ * The default value of the '{@link #getIcon() <em>Icon</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getIcon()
+ * @generated
+ * @ordered
+ */
+ protected static final Severity ICON_EDEFAULT = Severity.INFO;
+
+ /**
+ * The cached value of the '{@link #getIcon() <em>Icon</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getIcon()
+ * @generated
+ * @ordered
+ */
+ protected Severity icon = ICON_EDEFAULT;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected MessageImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return DiscoveryPackage.Literals.MESSAGE;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getTitle() {
+ return title;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setTitle(String newTitle) {
+ String oldTitle = title;
+ title = newTitle;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, DiscoveryPackage.MESSAGE__TITLE, oldTitle, title));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getMessage() {
+ return message;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setMessage(String newMessage) {
+ String oldMessage = message;
+ message = newMessage;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, DiscoveryPackage.MESSAGE__MESSAGE, oldMessage, message));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Severity getIcon() {
+ return icon;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setIcon(Severity newIcon) {
+ Severity oldIcon = icon;
+ icon = newIcon == null ? ICON_EDEFAULT : newIcon;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, DiscoveryPackage.MESSAGE__ICON, oldIcon, icon));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case DiscoveryPackage.MESSAGE__TITLE:
+ return getTitle();
+ case DiscoveryPackage.MESSAGE__MESSAGE:
+ return getMessage();
+ case DiscoveryPackage.MESSAGE__ICON:
+ return getIcon();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case DiscoveryPackage.MESSAGE__TITLE:
+ setTitle((String)newValue);
+ return;
+ case DiscoveryPackage.MESSAGE__MESSAGE:
+ setMessage((String)newValue);
+ return;
+ case DiscoveryPackage.MESSAGE__ICON:
+ setIcon((Severity)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case DiscoveryPackage.MESSAGE__TITLE:
+ setTitle(TITLE_EDEFAULT);
+ return;
+ case DiscoveryPackage.MESSAGE__MESSAGE:
+ setMessage(MESSAGE_EDEFAULT);
+ return;
+ case DiscoveryPackage.MESSAGE__ICON:
+ setIcon(ICON_EDEFAULT);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case DiscoveryPackage.MESSAGE__TITLE:
+ return TITLE_EDEFAULT == null ? title != null : !TITLE_EDEFAULT.equals(title);
+ case DiscoveryPackage.MESSAGE__MESSAGE:
+ return MESSAGE_EDEFAULT == null ? message != null : !MESSAGE_EDEFAULT.equals(message);
+ case DiscoveryPackage.MESSAGE__ICON:
+ return icon != ICON_EDEFAULT;
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String toString() {
+ if (eIsProxy()) return super.toString();
+
+ StringBuffer result = new StringBuffer(super.toString());
+ result.append(" (title: ");
+ result.append(title);
+ result.append(", message: ");
+ result.append(message);
+ result.append(", icon: ");
+ result.append(icon);
+ result.append(')');
+ return result.toString();
+ }
+
+} //MessageImpl
diff --git a/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery/src-gen/org/eclipse/papyrus/infra/discovery/impl/OverviewImpl.java b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery/src-gen/org/eclipse/papyrus/infra/discovery/impl/OverviewImpl.java
new file mode 100644
index 00000000000..b26bf84119a
--- /dev/null
+++ b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery/src-gen/org/eclipse/papyrus/infra/discovery/impl/OverviewImpl.java
@@ -0,0 +1,281 @@
+/**
+ *
+ * Copyright (c) 2012 CEA LIST.
+ * 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:
+ * CEA LIST - initial API and implementation
+ *
+ */
+package org.eclipse.papyrus.infra.discovery.impl;
+
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.ecore.EClass;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
+
+import org.eclipse.papyrus.infra.discovery.DiscoveryPackage;
+import org.eclipse.papyrus.infra.discovery.Overview;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Overview</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.infra.discovery.impl.OverviewImpl#getSummary <em>Summary</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.discovery.impl.OverviewImpl#getScreenshot <em>Screenshot</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.discovery.impl.OverviewImpl#getUrl <em>Url</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class OverviewImpl extends MinimalEObjectImpl implements Overview {
+ /**
+ * The default value of the '{@link #getSummary() <em>Summary</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getSummary()
+ * @generated
+ * @ordered
+ */
+ protected static final String SUMMARY_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getSummary() <em>Summary</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getSummary()
+ * @generated
+ * @ordered
+ */
+ protected String summary = SUMMARY_EDEFAULT;
+
+ /**
+ * The default value of the '{@link #getScreenshot() <em>Screenshot</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getScreenshot()
+ * @generated
+ * @ordered
+ */
+ protected static final String SCREENSHOT_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getScreenshot() <em>Screenshot</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getScreenshot()
+ * @generated
+ * @ordered
+ */
+ protected String screenshot = SCREENSHOT_EDEFAULT;
+
+ /**
+ * The default value of the '{@link #getUrl() <em>Url</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getUrl()
+ * @generated
+ * @ordered
+ */
+ protected static final String URL_EDEFAULT = "http://www.eclipse.org/modeling";
+
+ /**
+ * The cached value of the '{@link #getUrl() <em>Url</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getUrl()
+ * @generated
+ * @ordered
+ */
+ protected String url = URL_EDEFAULT;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected OverviewImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return DiscoveryPackage.Literals.OVERVIEW;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getSummary() {
+ return summary;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setSummary(String newSummary) {
+ String oldSummary = summary;
+ summary = newSummary;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, DiscoveryPackage.OVERVIEW__SUMMARY, oldSummary, summary));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getScreenshot() {
+ return screenshot;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setScreenshot(String newScreenshot) {
+ String oldScreenshot = screenshot;
+ screenshot = newScreenshot;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, DiscoveryPackage.OVERVIEW__SCREENSHOT, oldScreenshot, screenshot));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getUrl() {
+ return url;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setUrl(String newUrl) {
+ String oldUrl = url;
+ url = newUrl;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, DiscoveryPackage.OVERVIEW__URL, oldUrl, url));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case DiscoveryPackage.OVERVIEW__SUMMARY:
+ return getSummary();
+ case DiscoveryPackage.OVERVIEW__SCREENSHOT:
+ return getScreenshot();
+ case DiscoveryPackage.OVERVIEW__URL:
+ return getUrl();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case DiscoveryPackage.OVERVIEW__SUMMARY:
+ setSummary((String)newValue);
+ return;
+ case DiscoveryPackage.OVERVIEW__SCREENSHOT:
+ setScreenshot((String)newValue);
+ return;
+ case DiscoveryPackage.OVERVIEW__URL:
+ setUrl((String)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case DiscoveryPackage.OVERVIEW__SUMMARY:
+ setSummary(SUMMARY_EDEFAULT);
+ return;
+ case DiscoveryPackage.OVERVIEW__SCREENSHOT:
+ setScreenshot(SCREENSHOT_EDEFAULT);
+ return;
+ case DiscoveryPackage.OVERVIEW__URL:
+ setUrl(URL_EDEFAULT);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case DiscoveryPackage.OVERVIEW__SUMMARY:
+ return SUMMARY_EDEFAULT == null ? summary != null : !SUMMARY_EDEFAULT.equals(summary);
+ case DiscoveryPackage.OVERVIEW__SCREENSHOT:
+ return SCREENSHOT_EDEFAULT == null ? screenshot != null : !SCREENSHOT_EDEFAULT.equals(screenshot);
+ case DiscoveryPackage.OVERVIEW__URL:
+ return URL_EDEFAULT == null ? url != null : !URL_EDEFAULT.equals(url);
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String toString() {
+ if (eIsProxy()) return super.toString();
+
+ StringBuffer result = new StringBuffer(super.toString());
+ result.append(" (summary: ");
+ result.append(summary);
+ result.append(", screenshot: ");
+ result.append(screenshot);
+ result.append(", url: ");
+ result.append(url);
+ result.append(')');
+ return result.toString();
+ }
+
+} //OverviewImpl
diff --git a/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery/src-gen/org/eclipse/papyrus/infra/discovery/util/DiscoveryAdapterFactory.java b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery/src-gen/org/eclipse/papyrus/infra/discovery/util/DiscoveryAdapterFactory.java
new file mode 100644
index 00000000000..2457d53e869
--- /dev/null
+++ b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery/src-gen/org/eclipse/papyrus/infra/discovery/util/DiscoveryAdapterFactory.java
@@ -0,0 +1,220 @@
+/**
+ *
+ * Copyright (c) 2012 CEA LIST.
+ * 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:
+ * CEA LIST - initial API and implementation
+ *
+ */
+package org.eclipse.papyrus.infra.discovery.util;
+
+import org.eclipse.emf.common.notify.Adapter;
+import org.eclipse.emf.common.notify.Notifier;
+
+import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl;
+
+import org.eclipse.emf.ecore.EObject;
+
+import org.eclipse.papyrus.infra.discovery.*;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Adapter Factory</b> for the model.
+ * It provides an adapter <code>createXXX</code> method for each class of the model.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.discovery.DiscoveryPackage
+ * @generated
+ */
+public class DiscoveryAdapterFactory extends AdapterFactoryImpl {
+ /**
+ * The cached model package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected static DiscoveryPackage modelPackage;
+
+ /**
+ * Creates an instance of the adapter factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public DiscoveryAdapterFactory() {
+ if (modelPackage == null) {
+ modelPackage = DiscoveryPackage.eINSTANCE;
+ }
+ }
+
+ /**
+ * Returns whether this factory is applicable for the type of the object.
+ * <!-- begin-user-doc -->
+ * This implementation returns <code>true</code> if the object is either the model's package or is an instance object of the model.
+ * <!-- end-user-doc -->
+ * @return whether this factory is applicable for the type of the object.
+ * @generated
+ */
+ @Override
+ public boolean isFactoryForType(Object object) {
+ if (object == modelPackage) {
+ return true;
+ }
+ if (object instanceof EObject) {
+ return ((EObject)object).eClass().getEPackage() == modelPackage;
+ }
+ return false;
+ }
+
+ /**
+ * The switch that delegates to the <code>createXXX</code> methods.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected DiscoverySwitch<Adapter> modelSwitch =
+ new DiscoverySwitch<Adapter>() {
+ @Override
+ public Adapter caseInstallableComponent(InstallableComponent object) {
+ return createInstallableComponentAdapter();
+ }
+ @Override
+ public Adapter caseOverview(Overview object) {
+ return createOverviewAdapter();
+ }
+ @Override
+ public Adapter caseCategory(Category object) {
+ return createCategoryAdapter();
+ }
+ @Override
+ public Adapter caseDiscoveryDefinition(DiscoveryDefinition object) {
+ return createDiscoveryDefinitionAdapter();
+ }
+ @Override
+ public Adapter caseGroup(Group object) {
+ return createGroupAdapter();
+ }
+ @Override
+ public Adapter caseMessage(Message object) {
+ return createMessageAdapter();
+ }
+ @Override
+ public Adapter defaultCase(EObject object) {
+ return createEObjectAdapter();
+ }
+ };
+
+ /**
+ * Creates an adapter for the <code>target</code>.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param target the object to adapt.
+ * @return the adapter for the <code>target</code>.
+ * @generated
+ */
+ @Override
+ public Adapter createAdapter(Notifier target) {
+ return modelSwitch.doSwitch((EObject)target);
+ }
+
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.infra.discovery.InstallableComponent <em>Installable Component</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.papyrus.infra.discovery.InstallableComponent
+ * @generated
+ */
+ public Adapter createInstallableComponentAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.infra.discovery.Overview <em>Overview</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.papyrus.infra.discovery.Overview
+ * @generated
+ */
+ public Adapter createOverviewAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.infra.discovery.Category <em>Category</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.papyrus.infra.discovery.Category
+ * @generated
+ */
+ public Adapter createCategoryAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.infra.discovery.DiscoveryDefinition <em>Definition</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.papyrus.infra.discovery.DiscoveryDefinition
+ * @generated
+ */
+ public Adapter createDiscoveryDefinitionAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.infra.discovery.Group <em>Group</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.papyrus.infra.discovery.Group
+ * @generated
+ */
+ public Adapter createGroupAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.infra.discovery.Message <em>Message</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.papyrus.infra.discovery.Message
+ * @generated
+ */
+ public Adapter createMessageAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for the default case.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @generated
+ */
+ public Adapter createEObjectAdapter() {
+ return null;
+ }
+
+} //DiscoveryAdapterFactory
diff --git a/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery/src-gen/org/eclipse/papyrus/infra/discovery/util/DiscoverySwitch.java b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery/src-gen/org/eclipse/papyrus/infra/discovery/util/DiscoverySwitch.java
new file mode 100644
index 00000000000..371f05d7c6c
--- /dev/null
+++ b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery/src-gen/org/eclipse/papyrus/infra/discovery/util/DiscoverySwitch.java
@@ -0,0 +1,225 @@
+/**
+ *
+ * Copyright (c) 2012 CEA LIST.
+ * 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:
+ * CEA LIST - initial API and implementation
+ *
+ */
+package org.eclipse.papyrus.infra.discovery.util;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+
+import org.eclipse.emf.ecore.util.Switch;
+
+import org.eclipse.papyrus.infra.discovery.*;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Switch</b> for the model's inheritance hierarchy.
+ * It supports the call {@link #doSwitch(EObject) doSwitch(object)}
+ * to invoke the <code>caseXXX</code> method for each class of the model,
+ * starting with the actual class of the object
+ * and proceeding up the inheritance hierarchy
+ * until a non-null result is returned,
+ * which is the result of the switch.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.discovery.DiscoveryPackage
+ * @generated
+ */
+public class DiscoverySwitch<T> extends Switch<T> {
+ /**
+ * The cached model package
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected static DiscoveryPackage modelPackage;
+
+ /**
+ * Creates an instance of the switch.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public DiscoverySwitch() {
+ if (modelPackage == null) {
+ modelPackage = DiscoveryPackage.eINSTANCE;
+ }
+ }
+
+ /**
+ * Checks whether this is a switch for the given package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @parameter ePackage the package in question.
+ * @return whether this is a switch for the given package.
+ * @generated
+ */
+ @Override
+ protected boolean isSwitchFor(EPackage ePackage) {
+ return ePackage == modelPackage;
+ }
+
+ /**
+ * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the first non-null result returned by a <code>caseXXX</code> call.
+ * @generated
+ */
+ @Override
+ protected T doSwitch(int classifierID, EObject theEObject) {
+ switch (classifierID) {
+ case DiscoveryPackage.INSTALLABLE_COMPONENT: {
+ InstallableComponent installableComponent = (InstallableComponent)theEObject;
+ T result = caseInstallableComponent(installableComponent);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case DiscoveryPackage.OVERVIEW: {
+ Overview overview = (Overview)theEObject;
+ T result = caseOverview(overview);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case DiscoveryPackage.CATEGORY: {
+ Category category = (Category)theEObject;
+ T result = caseCategory(category);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case DiscoveryPackage.DISCOVERY_DEFINITION: {
+ DiscoveryDefinition discoveryDefinition = (DiscoveryDefinition)theEObject;
+ T result = caseDiscoveryDefinition(discoveryDefinition);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case DiscoveryPackage.GROUP: {
+ Group group = (Group)theEObject;
+ T result = caseGroup(group);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case DiscoveryPackage.MESSAGE: {
+ Message message = (Message)theEObject;
+ T result = caseMessage(message);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ default: return defaultCase(theEObject);
+ }
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Installable Component</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Installable Component</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseInstallableComponent(InstallableComponent object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Overview</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Overview</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseOverview(Overview object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Category</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Category</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseCategory(Category object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Definition</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Definition</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseDiscoveryDefinition(DiscoveryDefinition object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Group</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Group</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseGroup(Group object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Message</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Message</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseMessage(Message object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>EObject</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch, but this is the last case anyway.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>EObject</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject)
+ * @generated
+ */
+ @Override
+ public T defaultCase(EObject object) {
+ return null;
+ }
+
+} //DiscoverySwitch

Back to the top