Merge ../org.eclipse.datatools.enablement.oracle
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..910710c
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,3 @@
+releng.new/build/**
+releng.new/dev-eclipse/**
+releng.new/dev-target/**
\ No newline at end of file
diff --git a/.project b/.project
new file mode 100644
index 0000000..3ba0b83
--- /dev/null
+++ b/.project
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.datatools.build</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ </buildSpec>
+ <natures>
+ </natures>
+</projectDescription>
diff --git a/examples/org.eclipse.datatools.connectivity.oda.jdbc.dbprofile.sample.ui/.classpath b/examples/org.eclipse.datatools.connectivity.oda.jdbc.dbprofile.sample.ui/.classpath
new file mode 100644
index 0000000..751c8f2
--- /dev/null
+++ b/examples/org.eclipse.datatools.connectivity.oda.jdbc.dbprofile.sample.ui/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/examples/org.eclipse.datatools.connectivity.oda.jdbc.dbprofile.sample.ui/.gitignore b/examples/org.eclipse.datatools.connectivity.oda.jdbc.dbprofile.sample.ui/.gitignore
new file mode 100644
index 0000000..6ec8be4
--- /dev/null
+++ b/examples/org.eclipse.datatools.connectivity.oda.jdbc.dbprofile.sample.ui/.gitignore
@@ -0,0 +1,4 @@
+bin
+download
+*.jar
+*.zip
diff --git a/examples/org.eclipse.datatools.connectivity.oda.jdbc.dbprofile.sample.ui/.project b/examples/org.eclipse.datatools.connectivity.oda.jdbc.dbprofile.sample.ui/.project
new file mode 100644
index 0000000..08c062b
--- /dev/null
+++ b/examples/org.eclipse.datatools.connectivity.oda.jdbc.dbprofile.sample.ui/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.datatools.connectivity.oda.jdbc.dbprofile.sample.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/examples/org.eclipse.datatools.connectivity.oda.jdbc.dbprofile.sample.ui/META-INF/MANIFEST.MF b/examples/org.eclipse.datatools.connectivity.oda.jdbc.dbprofile.sample.ui/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..65109dc
--- /dev/null
+++ b/examples/org.eclipse.datatools.connectivity.oda.jdbc.dbprofile.sample.ui/META-INF/MANIFEST.MF
@@ -0,0 +1,15 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %plugin.name
+Bundle-SymbolicName: org.eclipse.datatools.connectivity.oda.jdbc.dbprofile.sample.ui; singleton:=true
+Bundle-Version: 1.0.1
+Bundle-Activator: org.eclipse.datatools.connectivity.oda.jdbc.dbprofile.sample.ui.Activator
+Bundle-Vendor: Eclipse.org
+Bundle-Localization: plugin
+Require-Bundle: org.eclipse.ui;bundle-version="[3.3.0,4.0.0)",
+ org.eclipse.core.runtime;bundle-version="[3.3.0,4.0.0)",
+ org.eclipse.datatools.connectivity.oda.design.ui;bundle-version="[3.0.6,4.0.0)",
+ org.eclipse.datatools.connectivity.oda.jdbc.dbprofile.sample,
+ org.eclipse.ui.navigator;bundle-version="[3.3.0,4.0.0)",
+ org.eclipse.datatools.connectivity.oda.consumer;bundle-version="[3.2.2,4.0.0)"
+Eclipse-LazyStart: true
diff --git a/examples/org.eclipse.datatools.connectivity.oda.jdbc.dbprofile.sample.ui/about.html b/examples/org.eclipse.datatools.connectivity.oda.jdbc.dbprofile.sample.ui/about.html
new file mode 100644
index 0000000..129db9d
--- /dev/null
+++ b/examples/org.eclipse.datatools.connectivity.oda.jdbc.dbprofile.sample.ui/about.html
@@ -0,0 +1,28 @@
+<!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>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>June 15, 2009</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is 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, "Program" will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party ("Redistributor") and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/examples/org.eclipse.datatools.connectivity.oda.jdbc.dbprofile.sample.ui/build.properties b/examples/org.eclipse.datatools.connectivity.oda.jdbc.dbprofile.sample.ui/build.properties
new file mode 100644
index 0000000..3f6e715
--- /dev/null
+++ b/examples/org.eclipse.datatools.connectivity.oda.jdbc.dbprofile.sample.ui/build.properties
@@ -0,0 +1,9 @@
+source.. = src/
+output.. = bin/
+bin.includes = plugin.xml,\
+ META-INF/,\
+ .,\
+ plugin.properties,\
+ icons/,\
+ about.html
+src.includes = about.html
diff --git a/examples/org.eclipse.datatools.connectivity.oda.jdbc.dbprofile.sample.ui/icons/datasetpage.ico b/examples/org.eclipse.datatools.connectivity.oda.jdbc.dbprofile.sample.ui/icons/datasetpage.ico
new file mode 100644
index 0000000..69f4ae1
--- /dev/null
+++ b/examples/org.eclipse.datatools.connectivity.oda.jdbc.dbprofile.sample.ui/icons/datasetpage.ico
Binary files differ
diff --git a/examples/org.eclipse.datatools.connectivity.oda.jdbc.dbprofile.sample.ui/icons/new_db_element.gif b/examples/org.eclipse.datatools.connectivity.oda.jdbc.dbprofile.sample.ui/icons/new_db_element.gif
new file mode 100644
index 0000000..1d459ce
--- /dev/null
+++ b/examples/org.eclipse.datatools.connectivity.oda.jdbc.dbprofile.sample.ui/icons/new_db_element.gif
Binary files differ
diff --git a/examples/org.eclipse.datatools.connectivity.oda.jdbc.dbprofile.sample.ui/icons/profile.gif b/examples/org.eclipse.datatools.connectivity.oda.jdbc.dbprofile.sample.ui/icons/profile.gif
new file mode 100644
index 0000000..6b86d07
--- /dev/null
+++ b/examples/org.eclipse.datatools.connectivity.oda.jdbc.dbprofile.sample.ui/icons/profile.gif
Binary files differ
diff --git a/examples/org.eclipse.datatools.connectivity.oda.jdbc.dbprofile.sample.ui/plugin.properties b/examples/org.eclipse.datatools.connectivity.oda.jdbc.dbprofile.sample.ui/plugin.properties
new file mode 100644
index 0000000..ba81984
--- /dev/null
+++ b/examples/org.eclipse.datatools.connectivity.oda.jdbc.dbprofile.sample.ui/plugin.properties
@@ -0,0 +1,27 @@
+###############################################################################
+# Copyright (c) 2008 Actuate Corporation.
+# 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:
+# Actuate Corporation - initial API and implementation
+#
+###############################################################################
+# Plug-in Configuration
+#
+oda.data.source.id=org.eclipse.datatools.connectivity.oda.jdbc.dbprofile.sample
+parent.category.id=org.eclipse.datatools.connectivity.db.category
+#
+###############################################################################
+# NLS strings
+#
+plugin.name=ODA Databases Profile Sample Wrapper UI Data Source ODA Designer
+newwizard.name=ODA Databases Profile Sample Wrapper UI Data Source
+newwizard.description=Create a ODA Databases Profile Sample Wrapper UI Data Source connection profile
+wizard.window.title=New ODA Databases Profile Sample Wrapper UI Data Source Profile
+wizard.data.source.page.title=ODA Databases Profile Sample Wrapper UI Data Source
+profile.propertypage.name=ODA Databases Profile Sample Wrapper UI Data Source Connection Properties
+wizard.data.set.window.title=New ODA Databases Profile Sample Wrapper UI Data Set
+wizard.data.set.page.title=Query
diff --git a/examples/org.eclipse.datatools.connectivity.oda.jdbc.dbprofile.sample.ui/plugin.xml b/examples/org.eclipse.datatools.connectivity.oda.jdbc.dbprofile.sample.ui/plugin.xml
new file mode 100644
index 0000000..cd50ff8
--- /dev/null
+++ b/examples/org.eclipse.datatools.connectivity.oda.jdbc.dbprofile.sample.ui/plugin.xml
@@ -0,0 +1,205 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.2"?>
+<plugin>
+
+ <extension
+ point="org.eclipse.datatools.connectivity.connectionProfile">
+ <newWizard
+ name="%newwizard.name"
+ icon="icons/new_db_element.gif"
+ profile="%oda.data.source.id"
+ description="%newwizard.description"
+ class="org.eclipse.datatools.connectivity.oda.design.ui.profile.db.wizards.NewDbDataSourceWizard"
+ id="%oda.data.source.id">
+ </newWizard>
+ </extension>
+ <extension
+ point="org.eclipse.ui.propertyPages">
+ <page
+ name="%profile.propertypage.name"
+ class="org.eclipse.datatools.connectivity.oda.design.ui.profile.db.wizards.DbProfileEditorPage"
+ id="%oda.data.source.id">
+ <enabledWhen>
+ <instanceof
+ value="org.eclipse.datatools.connectivity.IConnectionProfile">
+ </instanceof>
+ </enabledWhen>
+ <filter
+ name="org.eclipse.datatools.profile.property.id"
+ value="%oda.data.source.id">
+ </filter>
+ </page>
+ </extension>
+ <extension
+ point="org.eclipse.datatools.connectivity.oda.design.ui.dataSource">
+ <dataSourceUI
+ id="%oda.data.source.id">
+ <newDataSourceWizard
+ pageClass="dummy"
+ includesProgressMonitor="false"
+ pageTitle="%wizard.data.source.page.title"
+ windowTitle="%wizard.window.title">
+ </newDataSourceWizard>
+ </dataSourceUI>
+ <dataSetUI
+ supportsOutParameters="false"
+ supportsInParameters="false"
+ initialPageId="org.eclipse.datatools.connectivity.oda.jdbc.dbprofile.sample.dataSet.page1"
+ id="org.eclipse.datatools.connectivity.oda.jdbc.dbprofile.sample.dataSet">
+ <dataSetWizard
+ class="org.eclipse.datatools.connectivity.oda.design.ui.wizards.DataSetWizard"
+ windowTitle="%wizard.data.set.window.title">
+ </dataSetWizard>
+ <dataSetPage
+ displayName="%wizard.data.set.page.title"
+ icon="icons/datasetpage.ico"
+ wizardPageClass="org.eclipse.datatools.connectivity.oda.jdbc.dbprofile.sample.ui.impl.CustomDataSetWizardPage"
+ path="/"
+ id="org.eclipse.datatools.connectivity.oda.jdbc.dbprofile.sample.dataSet.page1">
+ </dataSetPage>
+ </dataSetUI>
+ </extension>
+ <extension
+ point="org.eclipse.ui.navigator.viewer">
+ <viewerContentBinding
+ viewerId="org.eclipse.datatools.connectivity.DataSourceExplorerNavigator">
+ <includes>
+ <contentExtension
+ isRoot="false"
+ pattern="org.eclipse.datatools.connectivity.oda.jdbc.dbprofile.sample.ui.filter.commonFilter">
+ </contentExtension>
+ </includes>
+ </viewerContentBinding>
+ <viewerActionBinding
+ viewerId="org.eclipse.datatools.connectivity.DataSourceExplorerNavigator">
+ <includes>
+ <actionExtension
+ pattern="org.eclipse.datatools.connectivity.oda.jdbc.dbprofile.sample.ui.filter.actionExtension">
+ </actionExtension>
+ </includes>
+ </viewerActionBinding>
+ </extension>
+ <extension
+ point="org.eclipse.ui.navigator.navigatorContent">
+ <commonFilter
+ activeByDefault="true"
+ description="Filters out this ODA DB Profile Category in Data Source Explorer"
+ id="org.eclipse.datatools.connectivity.oda.jdbc.dbprofile.sample.ui.filter.commonFilter"
+ name="ODA Databases Profiles Category Sample Filter">
+ <filterExpression>
+ <and>
+ <instanceof
+ value="org.eclipse.datatools.connectivity.ICategory">
+ </instanceof>
+ <test
+ property="org.eclipse.datatools.connectivity.category.property.categoryID"
+ value="%oda.data.source.id">
+ </test>
+ </and>
+ </filterExpression>
+ </commonFilter>
+ <actionProvider
+ class="org.eclipse.datatools.connectivity.oda.jdbc.dbprofile.sample.ui.filter.DbProfileActionProvider"
+ id="org.eclipse.datatools.connectivity.oda.jdbc.dbprofile.sample.ui.filter.actionExtension"
+ overrides="org.eclipse.datatools.connectivity.ui.dse.actions.ProfileActionsActionProvider"
+ priority="lowest">
+ <enablement>
+ <and>
+ <instanceof
+ value="org.eclipse.datatools.connectivity.ICategory">
+ </instanceof>
+ <test
+ property="org.eclipse.datatools.connectivity.category.property.categoryID"
+ value="%parent.category.id">
+ </test>
+ </and>
+ </enablement>
+ </actionProvider>
+ </extension>
+ <extension
+ point="org.eclipse.ui.handlers">
+ <handler
+ class="org.eclipse.datatools.connectivity.oda.jdbc.dbprofile.sample.ui.filter.AddDbProfileViewAction"
+ commandId="org.eclipse.datatools.connectivity.commands.addprofile">
+ <enabledWhen>
+ <or>
+ <with
+ variable="selection">
+ <count
+ value="0">
+ </count>
+ </with>
+ <with variable="selection">
+ <count value="+" />
+ <iterate>
+ <or>
+ <and>
+ <instanceof
+ value="org.eclipse.datatools.connectivity.ICategory">
+ </instanceof>
+ <test
+ property="org.eclipse.datatools.connectivity.category.property.categoryID"
+ value="%parent.category.id">
+ </test>
+ </and>
+ <and>
+ <instanceof
+ value="org.eclipse.datatools.connectivity.IConnectionProfile">
+ </instanceof>
+ <test
+ property="org.eclipse.datatools.connectivity.profile.property.categoryID"
+ value="%parent.category.id">
+ </test>
+ </and>
+ </or>
+ </iterate>
+ </with>
+ </or>
+ </enabledWhen>
+ <activeWhen>
+ <or>
+ <with
+ variable="selection">
+ <count
+ value="0">
+ </count>
+ </with>
+ <with variable="selection">
+ <count value="+" />
+ <iterate>
+ <or>
+ <and>
+ <instanceof
+ value="org.eclipse.datatools.connectivity.ICategory">
+ </instanceof>
+ <test
+ property="org.eclipse.datatools.connectivity.category.property.categoryID"
+ value="%parent.category.id">
+ </test>
+ </and>
+ <and>
+ <instanceof
+ value="org.eclipse.datatools.connectivity.IConnectionProfile">
+ </instanceof>
+ <test
+ property="org.eclipse.datatools.connectivity.profile.property.categoryID"
+ value="%parent.category.id">
+ </test>
+ </and>
+ </or>
+ </iterate>
+ </with>
+ </or>
+ </activeWhen>
+ </handler>
+ </extension>
+
+ <extension
+ point="org.eclipse.datatools.connectivity.oda.consumer.propertyProvider">
+ <dataSourcePropertyService
+ consumerApplicationId="%oda.data.source.id"
+ providerClass="org.eclipse.datatools.connectivity.oda.jdbc.dbprofile.sample.ui.impl.ProfilePropertyProvider">
+ </dataSourcePropertyService>
+ </extension>
+
+</plugin>
diff --git a/examples/org.eclipse.datatools.connectivity.oda.jdbc.dbprofile.sample.ui/src/org/eclipse/datatools/connectivity/oda/jdbc/dbprofile/sample/ui/Activator.java b/examples/org.eclipse.datatools.connectivity.oda.jdbc.dbprofile.sample.ui/src/org/eclipse/datatools/connectivity/oda/jdbc/dbprofile/sample/ui/Activator.java
new file mode 100644
index 0000000..4a243e8
--- /dev/null
+++ b/examples/org.eclipse.datatools.connectivity.oda.jdbc.dbprofile.sample.ui/src/org/eclipse/datatools/connectivity/oda/jdbc/dbprofile/sample/ui/Activator.java
@@ -0,0 +1,80 @@
+/*
+ *************************************************************************
+ * Copyright (c) 2008 Actuate Corporation.
+ * 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:
+ * Actuate Corporation - initial API and implementation
+ *
+ *************************************************************************
+ */
+
+package org.eclipse.datatools.connectivity.oda.jdbc.dbprofile.sample.ui;
+
+import org.eclipse.jface.resource.ImageDescriptor;
+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
+{
+ private static Activator sm_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 );
+ sm_plugin = this;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+ */
+ public void stop(BundleContext context) throws Exception
+ {
+ sm_plugin = null;
+ super.stop( context );
+ }
+
+ /**
+ * Returns the shared instance
+ * @return the shared instance
+ */
+ public static Activator getDefault()
+ {
+ return sm_plugin;
+ }
+
+ /**
+ * Returns an image descriptor for the image file at the given
+ * plug-in relative path
+ * @param path the path
+ * @return the image descriptor
+ */
+ public static ImageDescriptor getImageDescriptor( String path )
+ {
+ return imageDescriptorFromPlugin( getBundleId(), path );
+ }
+
+ public static String getBundleId()
+ {
+ return getDefault().getBundle().getSymbolicName();
+ }
+
+}
diff --git a/examples/org.eclipse.datatools.connectivity.oda.jdbc.dbprofile.sample.ui/src/org/eclipse/datatools/connectivity/oda/jdbc/dbprofile/sample/ui/filter/AddDbProfileViewAction.java b/examples/org.eclipse.datatools.connectivity.oda.jdbc.dbprofile.sample.ui/src/org/eclipse/datatools/connectivity/oda/jdbc/dbprofile/sample/ui/filter/AddDbProfileViewAction.java
new file mode 100644
index 0000000..9f0e291
--- /dev/null
+++ b/examples/org.eclipse.datatools.connectivity.oda.jdbc.dbprofile.sample.ui/src/org/eclipse/datatools/connectivity/oda/jdbc/dbprofile/sample/ui/filter/AddDbProfileViewAction.java
@@ -0,0 +1,65 @@
+/*
+ *************************************************************************
+ * Copyright (c) 2008 Actuate Corporation.
+ * 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:
+ * Actuate Corporation - initial API and implementation
+ *
+ *************************************************************************
+ */
+
+package org.eclipse.datatools.connectivity.oda.jdbc.dbprofile.sample.ui.filter;
+
+import java.util.ArrayList;
+
+import org.eclipse.datatools.connectivity.ui.actions.AddProfileViewAction;
+import org.eclipse.jface.viewers.ViewerFilter;
+
+/**
+ * Extends the DTP Data Source Explorer's Default Add Profile Action
+ * to filter out the Databases Connection Profile wrapper type from the DSE.
+ */
+public class AddDbProfileViewAction extends AddProfileViewAction
+{
+ private ViewerFilter m_dbProfileFilter;
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.datatools.connectivity.ui.actions.AddProfileViewAction#getWizardSelectionFilters()
+ */
+ protected ViewerFilter[] getWizardSelectionFilters()
+ {
+ // overrides base class method to provide an additional filter to
+ // hide the Databases wrapper profile type in the DSE view
+ ViewerFilter[] baseFilters = super.getWizardSelectionFilters();
+ return appendFilter( baseFilters, getDbProfileFilter() );
+ }
+
+ private ViewerFilter getDbProfileFilter()
+ {
+ if( m_dbProfileFilter == null )
+ m_dbProfileFilter = new DbProfileCategoryFilter();
+
+ return m_dbProfileFilter;
+ }
+
+ private ViewerFilter[] appendFilter( ViewerFilter[] filters, ViewerFilter moreFilter )
+ {
+ ArrayList mergedFilters = new ArrayList();
+ if( filters != null )
+ {
+ for( int i=0; i < filters.length; i++ )
+ {
+ mergedFilters.add( filters[i] );
+ }
+ }
+
+ mergedFilters.add( moreFilter );
+ return (ViewerFilter[]) mergedFilters.toArray( new ViewerFilter[ mergedFilters.size() ] );
+ }
+
+}
diff --git a/examples/org.eclipse.datatools.connectivity.oda.jdbc.dbprofile.sample.ui/src/org/eclipse/datatools/connectivity/oda/jdbc/dbprofile/sample/ui/filter/DbProfileActionProvider.java b/examples/org.eclipse.datatools.connectivity.oda.jdbc.dbprofile.sample.ui/src/org/eclipse/datatools/connectivity/oda/jdbc/dbprofile/sample/ui/filter/DbProfileActionProvider.java
new file mode 100644
index 0000000..eab6543
--- /dev/null
+++ b/examples/org.eclipse.datatools.connectivity.oda.jdbc.dbprofile.sample.ui/src/org/eclipse/datatools/connectivity/oda/jdbc/dbprofile/sample/ui/filter/DbProfileActionProvider.java
@@ -0,0 +1,37 @@
+/*
+ *************************************************************************
+ * Copyright (c) 2008 Actuate Corporation.
+ * 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:
+ * Actuate Corporation - initial API and implementation
+ *
+ *************************************************************************
+ */
+
+package org.eclipse.datatools.connectivity.oda.jdbc.dbprofile.sample.ui.filter;
+
+import org.eclipse.datatools.connectivity.ui.actions.AddProfileViewAction;
+import org.eclipse.datatools.connectivity.ui.navigator.actions.ProfileActionsActionProvider;
+
+/**
+ * Extends the DTP Data Source Explorer's Default Profile Action Provider
+ * to provide own extended action(s).
+ */
+public class DbProfileActionProvider extends
+ ProfileActionsActionProvider
+{
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.datatools.connectivity.ui.navigator.actions.ProfileActionsActionProvider#createAddProfileViewAction()
+ */
+ protected AddProfileViewAction createAddProfileViewAction()
+ {
+ return new AddDbProfileViewAction();
+ }
+
+}
diff --git a/examples/org.eclipse.datatools.connectivity.oda.jdbc.dbprofile.sample.ui/src/org/eclipse/datatools/connectivity/oda/jdbc/dbprofile/sample/ui/filter/DbProfileCategoryFilter.java b/examples/org.eclipse.datatools.connectivity.oda.jdbc.dbprofile.sample.ui/src/org/eclipse/datatools/connectivity/oda/jdbc/dbprofile/sample/ui/filter/DbProfileCategoryFilter.java
new file mode 100644
index 0000000..2827b0a
--- /dev/null
+++ b/examples/org.eclipse.datatools.connectivity.oda.jdbc.dbprofile.sample.ui/src/org/eclipse/datatools/connectivity/oda/jdbc/dbprofile/sample/ui/filter/DbProfileCategoryFilter.java
@@ -0,0 +1,65 @@
+/*
+ *************************************************************************
+ * Copyright (c) 2008 Actuate Corporation.
+ * 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:
+ * Actuate Corporation - initial API and implementation
+ *
+ *************************************************************************
+ */
+
+package org.eclipse.datatools.connectivity.oda.jdbc.dbprofile.sample.ui.filter;
+
+import org.eclipse.datatools.connectivity.ICategory;
+import org.eclipse.datatools.connectivity.internal.ui.wizards.CPWizardNode;
+import org.eclipse.datatools.connectivity.oda.jdbc.dbprofile.sample.Activator;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.jface.viewers.ViewerFilter;
+import org.eclipse.ui.navigator.CommonViewer;
+
+/**
+ * A filter that hides the ODA DB Profile wrapper in the Data Source Explorer view.
+ */
+public class DbProfileCategoryFilter extends ViewerFilter
+{
+ private static String sm_runtimePluginId;
+
+ public DbProfileCategoryFilter()
+ {
+ super();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.viewers.ViewerFilter#select(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)
+ */
+ public boolean select( Viewer viewer, Object parentElement, Object element )
+ {
+ if( ! (viewer instanceof CommonViewer) )
+ {
+ if( ! (element instanceof CPWizardNode) )
+ return true;
+
+ String wizardProviderId = ((CPWizardNode) element).getProvider().getId();
+ return ! getRuntimePluginId().equalsIgnoreCase( wizardProviderId );
+ }
+
+ if( ! (element instanceof ICategory) )
+ return true;
+
+ // filters out this oda data source id in the DSE
+ String categoryId = ((ICategory) element).getId();
+ return ! categoryId.equalsIgnoreCase( getRuntimePluginId() );
+ }
+
+ private static String getRuntimePluginId()
+ {
+ if( sm_runtimePluginId == null )
+ sm_runtimePluginId = Activator.getBundleId();
+ return sm_runtimePluginId;
+ }
+
+}
diff --git a/examples/org.eclipse.datatools.connectivity.oda.jdbc.dbprofile.sample.ui/src/org/eclipse/datatools/connectivity/oda/jdbc/dbprofile/sample/ui/filter/package.html b/examples/org.eclipse.datatools.connectivity.oda.jdbc.dbprofile.sample.ui/src/org/eclipse/datatools/connectivity/oda/jdbc/dbprofile/sample/ui/filter/package.html
new file mode 100644
index 0000000..bbe5564
--- /dev/null
+++ b/examples/org.eclipse.datatools.connectivity.oda.jdbc.dbprofile.sample.ui/src/org/eclipse/datatools/connectivity/oda/jdbc/dbprofile/sample/ui/filter/package.html
@@ -0,0 +1,37 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
+<html>
+<head>
+<!--
+
+ *************************************************************************
+ * Copyright (c) 2008 Actuate Corporation.
+ * 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:
+ * Actuate Corporation - initial API and implementation
+ *
+ *************************************************************************
+
+-->
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+</head>
+<body bgcolor="white">
+
+This package provides an exemplary implementation of an ODA driver's designer
+that adopts the integrated ODA Database Connection Profile framework.
+See the extensions defined in the plugin.xml.
+It contributes to the ODA framework's UI pages for an user to create an ODA
+data source design that links to a DTP Database (JDBC) connection profile.
+<p>
+Its scope focus on designing an ODA data source connection.
+It uses the auto-generated ODA data set designer page, included for demo purpose only.
+<p>
+
+<!-- Put @see and @since tags down here. -->
+@since DTP 1.6
+
+</body>
+</html>
diff --git a/examples/org.eclipse.datatools.connectivity.oda.jdbc.dbprofile.sample.ui/src/org/eclipse/datatools/connectivity/oda/jdbc/dbprofile/sample/ui/impl/CustomDataSetWizardPage.java b/examples/org.eclipse.datatools.connectivity.oda.jdbc.dbprofile.sample.ui/src/org/eclipse/datatools/connectivity/oda/jdbc/dbprofile/sample/ui/impl/CustomDataSetWizardPage.java
new file mode 100644
index 0000000..d707c8a
--- /dev/null
+++ b/examples/org.eclipse.datatools.connectivity.oda.jdbc.dbprofile.sample.ui/src/org/eclipse/datatools/connectivity/oda/jdbc/dbprofile/sample/ui/impl/CustomDataSetWizardPage.java
@@ -0,0 +1,396 @@
+/*
+ *************************************************************************
+ * Copyright (c) 2008 Actuate Corporation.
+ * 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:
+ * Actuate Corporation - initial API and implementation
+ *
+ *************************************************************************
+ */
+
+package org.eclipse.datatools.connectivity.oda.jdbc.dbprofile.sample.ui.impl;
+
+import org.eclipse.datatools.connectivity.oda.IConnection;
+import org.eclipse.datatools.connectivity.oda.IDriver;
+import org.eclipse.datatools.connectivity.oda.IParameterMetaData;
+import org.eclipse.datatools.connectivity.oda.IQuery;
+import org.eclipse.datatools.connectivity.oda.IResultSetMetaData;
+import org.eclipse.datatools.connectivity.oda.OdaException;
+import org.eclipse.datatools.connectivity.oda.design.DataSetDesign;
+import org.eclipse.datatools.connectivity.oda.design.DataSetParameters;
+import org.eclipse.datatools.connectivity.oda.design.DesignFactory;
+import org.eclipse.datatools.connectivity.oda.design.ParameterDefinition;
+import org.eclipse.datatools.connectivity.oda.design.ResultSetColumns;
+import org.eclipse.datatools.connectivity.oda.design.ResultSetDefinition;
+import org.eclipse.datatools.connectivity.oda.design.ui.designsession.DesignSessionUtil;
+import org.eclipse.datatools.connectivity.oda.design.ui.wizards.DataSetWizardPage;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Text;
+
+/**
+ * Auto-generated implementation of an ODA data set designer page
+ * for an user to create or edit an ODA data set design instance.
+ * This custom page provides a simple Query Text control for user input.
+ * It further extends the DTP design-time framework to update
+ * an ODA data set design instance based on the query's derived meta-data.
+ * <br>
+ * A custom ODA designer is expected to change this exemplary implementation
+ * as appropriate.
+ */
+public class CustomDataSetWizardPage extends DataSetWizardPage
+{
+
+ private static String DEFAULT_MESSAGE = "Define the query text for the data set";
+
+ private transient Text m_queryTextField;
+
+ /**
+ * Constructor
+ * @param pageName
+ */
+ public CustomDataSetWizardPage( String pageName )
+ {
+ super( pageName );
+ setTitle( pageName );
+ setMessage( DEFAULT_MESSAGE );
+
+ setPageComplete( false );
+ }
+
+ /**
+ * Constructor
+ * @param pageName
+ * @param title
+ * @param titleImage
+ */
+ public CustomDataSetWizardPage( String pageName, String title,
+ ImageDescriptor titleImage )
+ {
+ super( pageName, title, titleImage );
+ setMessage( DEFAULT_MESSAGE );
+ setPageComplete( false );
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.datatools.connectivity.oda.design.ui.wizards.DataSetWizardPage#createPageCustomControl(org.eclipse.swt.widgets.Composite)
+ */
+ public void createPageCustomControl( Composite parent )
+ {
+ setControl( createPageControl( parent ) );
+ initializeControl();
+ }
+
+ /**
+ * Creates custom control for user-defined query text.
+ */
+ private Control createPageControl( Composite parent )
+ {
+ Composite composite = new Composite( parent, SWT.NONE );
+ composite.setLayout( new GridLayout( 1, false ) );
+ GridData gridData = new GridData( GridData.HORIZONTAL_ALIGN_FILL
+ | GridData.VERTICAL_ALIGN_FILL );
+
+ composite.setLayoutData( gridData );
+
+ Label fieldLabel = new Label( composite, SWT.NONE );
+ fieldLabel.setText( "&Query Text:" );
+
+ m_queryTextField = new Text( composite, SWT.BORDER
+ | SWT.V_SCROLL | SWT.H_SCROLL );
+ GridData data = new GridData( GridData.FILL_HORIZONTAL );
+ data.heightHint = 100;
+ m_queryTextField.setLayoutData( data );
+ m_queryTextField.addModifyListener( new ModifyListener( )
+ {
+ public void modifyText( ModifyEvent e )
+ {
+ validateData();
+ }
+ } );
+
+ return composite;
+ }
+
+ /**
+ * Initializes the page control with the last edited data set design.
+ */
+ private void initializeControl( )
+ {
+ /*
+ * To optionally restore the designer state of the previous design session, use
+ * getInitializationDesignerState();
+ */
+
+ // Restores the last saved data set design
+ DataSetDesign dataSetDesign = getInitializationDesign();
+ if( dataSetDesign == null )
+ return; // nothing to initialize
+
+ String queryText = dataSetDesign.getQueryText();
+ if( queryText == null )
+ return; // nothing to initialize
+
+ // initialize control
+ m_queryTextField.setText( queryText );
+ validateData();
+ setMessage( DEFAULT_MESSAGE );
+
+ /*
+ * To optionally honor the request for an editable or
+ * read-only design session, use
+ * isSessionEditable();
+ */
+ }
+
+ /**
+ * Obtains the user-defined query text of this data set from page control.
+ * @return query text
+ */
+ private String getQueryText( )
+ {
+ return m_queryTextField.getText();
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.datatools.connectivity.oda.design.ui.wizards.DataSetWizardPage#collectDataSetDesign(org.eclipse.datatools.connectivity.oda.design.DataSetDesign)
+ */
+ protected DataSetDesign collectDataSetDesign( DataSetDesign design )
+ {
+ if( ! hasValidData() )
+ return design;
+ savePage( design );
+ return design;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.datatools.connectivity.oda.design.ui.wizards.DataSetWizardPage#collectResponseState()
+ */
+ protected void collectResponseState( )
+ {
+ super.collectResponseState( );
+ /*
+ * To optionally assign a custom response state, for inclusion in the ODA
+ * design session response, use
+ * setResponseSessionStatus( SessionStatus status );
+ * setResponseDesignerState( DesignerState customState );
+ */
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.datatools.connectivity.oda.design.ui.wizards.DataSetWizardPage#canLeave()
+ */
+ protected boolean canLeave( )
+ {
+ return isPageComplete();
+ }
+
+ /**
+ * Validates the user-defined value in the page control exists
+ * and not a blank text.
+ * Set page message accordingly.
+ */
+ private void validateData( )
+ {
+ boolean isValid = ( m_queryTextField != null &&
+ getQueryText() != null && getQueryText().trim().length() > 0 );
+
+ if( isValid )
+ setMessage( DEFAULT_MESSAGE );
+ else
+ setMessage( "Requires input value.", ERROR );
+
+ setPageComplete( isValid );
+ }
+
+ /**
+ * Indicates whether the custom page has valid data to proceed
+ * with defining a data set.
+ */
+ private boolean hasValidData( )
+ {
+ validateData( );
+
+ return canLeave();
+ }
+
+ /**
+ * Saves the user-defined value in this page, and updates the specified
+ * dataSetDesign with the latest design definition.
+ */
+ private void savePage( DataSetDesign dataSetDesign )
+ {
+ // save user-defined query text
+ String queryText = getQueryText();
+ dataSetDesign.setQueryText( queryText );
+
+ // obtain query's current runtime metadata, and maps it to the dataSetDesign
+ IConnection customConn = null;
+ try
+ {
+ // instantiate your custom ODA runtime driver class
+ /* Note: You may need to manually update your ODA runtime extension's
+ * plug-in manifest to export its package for visibility here.
+ */
+ IDriver customDriver = new org.eclipse.datatools.connectivity.oda.jdbc.dbprofile.sample.impl.Driver();
+
+ // obtain and open a live connection
+ customConn = customDriver.getConnection( null );
+ java.util.Properties connProps =
+ DesignSessionUtil.getEffectiveDataSourceProperties(
+ getInitializationDesign().getDataSourceDesign() );
+ customConn.open( connProps );
+
+ // update the data set design with the
+ // query's current runtime metadata
+ updateDesign( dataSetDesign, customConn, queryText );
+ }
+ catch( OdaException e )
+ {
+ // not able to get current metadata, reset previous derived metadata
+ dataSetDesign.setResultSets( null );
+ dataSetDesign.setParameters( null );
+
+ e.printStackTrace();
+ }
+ finally
+ {
+ closeConnection( customConn );
+ }
+ }
+
+ /**
+ * Updates the given dataSetDesign with the queryText and its derived metadata
+ * obtained from the ODA runtime connection.
+ */
+ private void updateDesign( DataSetDesign dataSetDesign,
+ IConnection conn, String queryText )
+ throws OdaException
+ {
+ IQuery query = conn.newQuery( null );
+ query.prepare( queryText );
+
+ // TODO a runtime driver might require a query to first execute before
+ // its metadata is available
+// query.setMaxRows( 1 );
+// query.executeQuery();
+
+ try
+ {
+ IResultSetMetaData md = query.getMetaData();
+ updateResultSetDesign( md, dataSetDesign );
+ }
+ catch( OdaException e )
+ {
+ // no result set definition available, reset previous derived metadata
+ dataSetDesign.setResultSets( null );
+ e.printStackTrace();
+ }
+
+ // proceed to get parameter design definition
+ try
+ {
+ IParameterMetaData paramMd = query.getParameterMetaData();
+ updateParameterDesign( paramMd, dataSetDesign );
+ }
+ catch( OdaException ex )
+ {
+ // no parameter definition available, reset previous derived metadata
+ dataSetDesign.setParameters( null );
+ ex.printStackTrace();
+ }
+
+ /*
+ * See DesignSessionUtil for more convenience methods
+ * to define a data set design instance.
+ */
+ }
+
+ /**
+ * Updates the specified data set design's result set definition based on the
+ * specified runtime metadata.
+ * @param md runtime result set metadata instance
+ * @param dataSetDesign data set design instance to update
+ * @throws OdaException
+ */
+ private void updateResultSetDesign( IResultSetMetaData md,
+ DataSetDesign dataSetDesign )
+ throws OdaException
+ {
+ ResultSetColumns columns = DesignSessionUtil.toResultSetColumnsDesign( md );
+
+ ResultSetDefinition resultSetDefn = DesignFactory.eINSTANCE
+ .createResultSetDefinition();
+ // resultSetDefn.setName( value ); // result set name
+ resultSetDefn.setResultSetColumns( columns );
+
+ // no exception in conversion; go ahead and assign to specified dataSetDesign
+ dataSetDesign.setPrimaryResultSet( resultSetDefn );
+ dataSetDesign.getResultSets().setDerivedMetaData( true );
+ }
+
+ /**
+ * Updates the specified data set design's parameter definition based on the
+ * specified runtime metadata.
+ * @param paramMd runtime parameter metadata instance
+ * @param dataSetDesign data set design instance to update
+ * @throws OdaException
+ */
+ private void updateParameterDesign( IParameterMetaData paramMd,
+ DataSetDesign dataSetDesign )
+ throws OdaException
+ {
+ DataSetParameters paramDesign =
+ DesignSessionUtil.toDataSetParametersDesign( paramMd,
+ DesignSessionUtil.toParameterModeDesign( IParameterMetaData.parameterModeIn ) );
+
+ // no exception in conversion; go ahead and assign to specified dataSetDesign
+ dataSetDesign.setParameters( paramDesign );
+ if( paramDesign == null )
+ return; // no parameter definitions; done with update
+
+ paramDesign.setDerivedMetaData( true );
+
+ // TODO replace below with data source specific implementation;
+ // hard-coded parameter's default value for demo purpose
+ if( paramDesign.getParameterDefinitions().size() > 0 )
+ {
+ ParameterDefinition paramDef =
+ (ParameterDefinition) paramDesign.getParameterDefinitions().get( 0 );
+ if( paramDef != null )
+ paramDef.setDefaultScalarValue( "dummy default value" );
+ }
+ }
+
+ /**
+ * Attempts to close given ODA connection.
+ */
+ private void closeConnection( IConnection conn )
+ {
+ try
+ {
+ if( conn != null && conn.isOpen() )
+ conn.close();
+ }
+ catch ( OdaException e )
+ {
+ // ignore
+ e.printStackTrace();
+ }
+ }
+
+}
diff --git a/examples/org.eclipse.datatools.connectivity.oda.jdbc.dbprofile.sample.ui/src/org/eclipse/datatools/connectivity/oda/jdbc/dbprofile/sample/ui/impl/ProfilePropertyProvider.java b/examples/org.eclipse.datatools.connectivity.oda.jdbc.dbprofile.sample.ui/src/org/eclipse/datatools/connectivity/oda/jdbc/dbprofile/sample/ui/impl/ProfilePropertyProvider.java
new file mode 100644
index 0000000..54b23bc
--- /dev/null
+++ b/examples/org.eclipse.datatools.connectivity.oda.jdbc.dbprofile.sample.ui/src/org/eclipse/datatools/connectivity/oda/jdbc/dbprofile/sample/ui/impl/ProfilePropertyProvider.java
@@ -0,0 +1,46 @@
+/*
+ *************************************************************************
+ * Copyright (c) 2009 Actuate Corporation.
+ * 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:
+ * Actuate Corporation - initial API and implementation
+ *
+ *************************************************************************
+ */
+
+package org.eclipse.datatools.connectivity.oda.jdbc.dbprofile.sample.ui.impl;
+
+import java.util.Properties;
+
+import org.eclipse.datatools.connectivity.oda.OdaException;
+import org.eclipse.datatools.connectivity.oda.consumer.services.IPropertyProvider;
+
+/**
+ * Sample template implementation of IPropertyProvider that gets called
+ * when a data source design is exported to an external connection profile.
+ */
+public class ProfilePropertyProvider implements IPropertyProvider
+{
+
+ /* (non-Javadoc)
+ * @see org.eclipse.datatools.connectivity.oda.consumer.services.IPropertyProvider#getDataSourceProperties(java.util.Properties, java.lang.Object)
+ */
+ public Properties getDataSourceProperties( Properties candidateProperties, Object appContext )
+ throws OdaException
+ {
+ // exporting data source properties to be saved in an external db profile
+
+ // makes a copy of the specified properties
+ Properties profileProps = new Properties();
+ profileProps.putAll( candidateProperties );
+
+ // TODO - adjust the profile properties returned to be saved in an external connection profile
+
+ return profileProps;
+ }
+
+}
diff --git a/examples/org.eclipse.datatools.connectivity.oda.jdbc.dbprofile.sample/.classpath b/examples/org.eclipse.datatools.connectivity.oda.jdbc.dbprofile.sample/.classpath
new file mode 100644
index 0000000..751c8f2
--- /dev/null
+++ b/examples/org.eclipse.datatools.connectivity.oda.jdbc.dbprofile.sample/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/examples/org.eclipse.datatools.connectivity.oda.jdbc.dbprofile.sample/.gitignore b/examples/org.eclipse.datatools.connectivity.oda.jdbc.dbprofile.sample/.gitignore
new file mode 100644
index 0000000..6ec8be4
--- /dev/null
+++ b/examples/org.eclipse.datatools.connectivity.oda.jdbc.dbprofile.sample/.gitignore
@@ -0,0 +1,4 @@
+bin
+download
+*.jar
+*.zip
diff --git a/examples/org.eclipse.datatools.connectivity.oda.jdbc.dbprofile.sample/.project b/examples/org.eclipse.datatools.connectivity.oda.jdbc.dbprofile.sample/.project
new file mode 100644
index 0000000..dcd43da
--- /dev/null
+++ b/examples/org.eclipse.datatools.connectivity.oda.jdbc.dbprofile.sample/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.datatools.connectivity.oda.jdbc.dbprofile.sample</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/examples/org.eclipse.datatools.connectivity.oda.jdbc.dbprofile.sample/META-INF/MANIFEST.MF b/examples/org.eclipse.datatools.connectivity.oda.jdbc.dbprofile.sample/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..df029a0
--- /dev/null
+++ b/examples/org.eclipse.datatools.connectivity.oda.jdbc.dbprofile.sample/META-INF/MANIFEST.MF
@@ -0,0 +1,16 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %plugin.name
+Bundle-SymbolicName: org.eclipse.datatools.connectivity.oda.jdbc.dbprofile.sample; singleton:=true
+Bundle-Version: 1.0.1
+Bundle-ClassPath: .,
+ src
+Bundle-Activator: org.eclipse.datatools.connectivity.oda.jdbc.dbprofile.sample.Activator
+Bundle-Vendor: Eclipse.org
+Bundle-Localization: plugin
+Export-Package: org.eclipse.datatools.connectivity.oda.jdbc.dbprofile.sample,
+ org.eclipse.datatools.connectivity.oda.jdbc.dbprofile.sample.impl
+Require-Bundle: org.eclipse.core.runtime,
+ org.eclipse.datatools.connectivity.oda;bundle-version="[3.2.2,4.0.0)",
+ org.eclipse.datatools.connectivity.oda.profile;bundle-version="[3.0.7,4.0.0)"
+Eclipse-LazyStart: true
diff --git a/examples/org.eclipse.datatools.connectivity.oda.jdbc.dbprofile.sample/about.html b/examples/org.eclipse.datatools.connectivity.oda.jdbc.dbprofile.sample/about.html
new file mode 100644
index 0000000..129db9d
--- /dev/null
+++ b/examples/org.eclipse.datatools.connectivity.oda.jdbc.dbprofile.sample/about.html
@@ -0,0 +1,28 @@
+<!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>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>June 15, 2009</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is 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, "Program" will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party ("Redistributor") and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/examples/org.eclipse.datatools.connectivity.oda.jdbc.dbprofile.sample/build.properties b/examples/org.eclipse.datatools.connectivity.oda.jdbc.dbprofile.sample/build.properties
new file mode 100644
index 0000000..6e16e40
--- /dev/null
+++ b/examples/org.eclipse.datatools.connectivity.oda.jdbc.dbprofile.sample/build.properties
@@ -0,0 +1,8 @@
+source.. = src/
+output.. = bin/
+bin.includes = plugin.xml,\
+ META-INF/,\
+ .,\
+ plugin.properties,\
+ about.html
+src.includes = about.html
diff --git a/examples/org.eclipse.datatools.connectivity.oda.jdbc.dbprofile.sample/plugin.properties b/examples/org.eclipse.datatools.connectivity.oda.jdbc.dbprofile.sample/plugin.properties
new file mode 100644
index 0000000..0a7453c
--- /dev/null
+++ b/examples/org.eclipse.datatools.connectivity.oda.jdbc.dbprofile.sample/plugin.properties
@@ -0,0 +1,24 @@
+###############################################################################
+# Copyright (c) 2008 Actuate Corporation.
+# 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:
+# Actuate Corporation - initial API and implementation
+#
+###############################################################################
+# Plug-in Configuration
+#
+oda.data.source.id=org.eclipse.datatools.connectivity.oda.jdbc.dbprofile.sample
+parent.category.id=org.eclipse.datatools.connectivity.db.category
+#
+###############################################################################
+# NLS String
+###############################################################################
+#
+plugin.name=ODA Databases Profile Sample Wrapper Data Source Runtime Driver
+data.source.name=ODA Databases Profile Sample Wrapper Data Source
+data.set.name=ODA Databases Profile Sample Wrapper Data Set
+connection.profile.name=ODA Databases Profile Sample Wrapper Data Source Connection Profile
diff --git a/examples/org.eclipse.datatools.connectivity.oda.jdbc.dbprofile.sample/plugin.xml b/examples/org.eclipse.datatools.connectivity.oda.jdbc.dbprofile.sample/plugin.xml
new file mode 100644
index 0000000..1971252
--- /dev/null
+++ b/examples/org.eclipse.datatools.connectivity.oda.jdbc.dbprofile.sample/plugin.xml
@@ -0,0 +1,87 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.2"?>
+<plugin>
+
+ <extension
+ id="%oda.data.source.id"
+ point="org.eclipse.datatools.connectivity.oda.dataSource">
+ <dataSource
+ defaultDisplayName="%data.source.name"
+ driverClass="org.eclipse.datatools.connectivity.oda.jdbc.dbprofile.sample.impl.Driver"
+ id="%oda.data.source.id"
+ odaVersion="3.1"
+ overrideExplorerFiltering="true"
+ setThreadContextClassLoader="false">
+ <properties></properties>
+ <relationship
+ relatedId="%parent.category.id"
+ type="wrapperOf">
+ </relationship>
+ </dataSource>
+ <dataSet
+ defaultDisplayName="%data.set.name"
+ id="org.eclipse.datatools.connectivity.oda.jdbc.dbprofile.sample.dataSet">
+ <dataTypeMapping
+ nativeDataTypeCode="1"
+ odaScalarDataType="String"
+ nativeDataType="String">
+ </dataTypeMapping>
+ <dataTypeMapping
+ nativeDataTypeCode="4"
+ odaScalarDataType="Integer"
+ nativeDataType="Integer">
+ </dataTypeMapping>
+ <dataTypeMapping
+ nativeDataTypeCode="8"
+ odaScalarDataType="Double"
+ nativeDataType="Double">
+ </dataTypeMapping>
+ <dataTypeMapping
+ nativeDataTypeCode="3"
+ odaScalarDataType="Decimal"
+ nativeDataType="BigDecimal">
+ </dataTypeMapping>
+ <dataTypeMapping
+ nativeDataTypeCode="91"
+ odaScalarDataType="Date"
+ nativeDataType="Date">
+ </dataTypeMapping>
+ <dataTypeMapping
+ nativeDataTypeCode="92"
+ odaScalarDataType="Time"
+ nativeDataType="Time">
+ </dataTypeMapping>
+ <dataTypeMapping
+ nativeDataTypeCode="93"
+ odaScalarDataType="Timestamp"
+ nativeDataType="Timestamp">
+ </dataTypeMapping>
+ <dataTypeMapping
+ nativeDataTypeCode="16"
+ odaScalarDataType="Boolean"
+ nativeDataType="Boolean">
+ </dataTypeMapping>
+ </dataSet>
+ </extension>
+ <extension
+ point="org.eclipse.datatools.connectivity.connectionProfile">
+ <category
+ id="%oda.data.source.id"
+ name="%data.source.name"
+ parentCategory="%parent.category.id">
+ </category>
+ <connectionProfile
+ pingFactory="org.eclipse.datatools.connectivity.oda.profile.OdaConnectionFactory"
+ name="%connection.profile.name"
+ category="%oda.data.source.id"
+ id="%oda.data.source.id">
+ </connectionProfile>
+ <connectionFactory
+ name="ODA Connection Factory"
+ profile="%oda.data.source.id"
+ class="org.eclipse.datatools.connectivity.oda.profile.OdaConnectionFactory"
+ id="org.eclipse.datatools.connectivity.oda.IConnection">
+ </connectionFactory>
+ </extension>
+
+</plugin>
diff --git a/examples/org.eclipse.datatools.connectivity.oda.jdbc.dbprofile.sample/src/org/eclipse/datatools/connectivity/oda/jdbc/dbprofile/sample/Activator.java b/examples/org.eclipse.datatools.connectivity.oda.jdbc.dbprofile.sample/src/org/eclipse/datatools/connectivity/oda/jdbc/dbprofile/sample/Activator.java
new file mode 100644
index 0000000..b2c4ae0
--- /dev/null
+++ b/examples/org.eclipse.datatools.connectivity.oda.jdbc.dbprofile.sample/src/org/eclipse/datatools/connectivity/oda/jdbc/dbprofile/sample/Activator.java
@@ -0,0 +1,70 @@
+/*
+ *************************************************************************
+ * Copyright (c) 2008 Actuate Corporation.
+ * 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:
+ * Actuate Corporation - initial API and implementation
+ *
+ *************************************************************************
+ */
+
+package org.eclipse.datatools.connectivity.oda.jdbc.dbprofile.sample;
+
+import org.eclipse.core.runtime.Plugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator extends Plugin
+{
+ // The shared instance
+ private static Activator sm_plugin;
+
+ /**
+ * The constructor
+ */
+ public Activator()
+ {
+ super();
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.core.runtime.Plugins#start(org.osgi.framework.BundleContext)
+ */
+ public void start( BundleContext context ) throws Exception
+ {
+ super.start( context );
+ sm_plugin = this;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.core.runtime.Plugin#stop(org.osgi.framework.BundleContext)
+ */
+ public void stop( BundleContext context ) throws Exception
+ {
+ sm_plugin = null;
+ super.stop( context );
+ }
+
+ /**
+ * Returns the shared instance.
+ * @return the shared instance
+ */
+ public static Activator getDefault()
+ {
+ return sm_plugin;
+ }
+
+ public static String getBundleId()
+ {
+ return getDefault().getBundle().getSymbolicName();
+ }
+
+}
diff --git a/examples/org.eclipse.datatools.connectivity.oda.jdbc.dbprofile.sample/src/org/eclipse/datatools/connectivity/oda/jdbc/dbprofile/sample/impl/Connection.java b/examples/org.eclipse.datatools.connectivity.oda.jdbc.dbprofile.sample/src/org/eclipse/datatools/connectivity/oda/jdbc/dbprofile/sample/impl/Connection.java
new file mode 100644
index 0000000..76d678c
--- /dev/null
+++ b/examples/org.eclipse.datatools.connectivity.oda.jdbc.dbprofile.sample/src/org/eclipse/datatools/connectivity/oda/jdbc/dbprofile/sample/impl/Connection.java
@@ -0,0 +1,119 @@
+/*
+ *************************************************************************
+ * Copyright (c) 2008, 2009 Actuate Corporation.
+ * 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:
+ * Actuate Corporation - initial API and implementation
+ *
+ *************************************************************************
+ */
+
+package org.eclipse.datatools.connectivity.oda.jdbc.dbprofile.sample.impl;
+
+import java.util.Properties;
+import org.eclipse.datatools.connectivity.oda.IConnection;
+import org.eclipse.datatools.connectivity.oda.IDataSetMetaData;
+import org.eclipse.datatools.connectivity.oda.IQuery;
+import org.eclipse.datatools.connectivity.oda.OdaException;
+
+import com.ibm.icu.util.ULocale;
+
+/**
+ * Implementation class of IConnection for an ODA runtime driver.
+ */
+public class Connection implements IConnection
+{
+ private boolean m_isOpen = false;
+
+ /*
+ * @see org.eclipse.datatools.connectivity.oda.IConnection#open(java.util.Properties)
+ */
+ public void open( Properties connProperties ) throws OdaException
+ {
+ // TODO replace with data source specific implementation
+ m_isOpen = true;
+ }
+
+ /*
+ * @see org.eclipse.datatools.connectivity.oda.IConnection#setAppContext(java.lang.Object)
+ */
+ public void setAppContext( Object context ) throws OdaException
+ {
+ // do nothing; assumes no support for pass-through context
+ }
+
+ /*
+ * @see org.eclipse.datatools.connectivity.oda.IConnection#close()
+ */
+ public void close() throws OdaException
+ {
+ // TODO replace with data source specific implementation
+ m_isOpen = false;
+ }
+
+ /*
+ * @see org.eclipse.datatools.connectivity.oda.IConnection#isOpen()
+ */
+ public boolean isOpen() throws OdaException
+ {
+ // TODO Auto-generated method stub
+ return m_isOpen;
+ }
+
+ /*
+ * @see org.eclipse.datatools.connectivity.oda.IConnection#getMetaData(java.lang.String)
+ */
+ public IDataSetMetaData getMetaData( String dataSetType ) throws OdaException
+ {
+ // assumes that this driver supports only one type of data set,
+ // ignores the specified dataSetType
+ return new DataSetMetaData( this );
+ }
+
+ /*
+ * @see org.eclipse.datatools.connectivity.oda.IConnection#newQuery(java.lang.String)
+ */
+ public IQuery newQuery( String dataSetType ) throws OdaException
+ {
+ // assumes that this driver supports only one type of data set,
+ // ignores the specified dataSetType
+ return new Query();
+ }
+
+ /*
+ * @see org.eclipse.datatools.connectivity.oda.IConnection#getMaxQueries()
+ */
+ public int getMaxQueries() throws OdaException
+ {
+ return 0; // no limit
+ }
+
+ /*
+ * @see org.eclipse.datatools.connectivity.oda.IConnection#commit()
+ */
+ public void commit() throws OdaException
+ {
+ // do nothing; assumes no transaction support needed
+ }
+
+ /*
+ * @see org.eclipse.datatools.connectivity.oda.IConnection#rollback()
+ */
+ public void rollback() throws OdaException
+ {
+ // do nothing; assumes no transaction support needed
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.datatools.connectivity.oda.IConnection#setLocale(com.ibm.icu.util.ULocale)
+ */
+ public void setLocale( ULocale locale ) throws OdaException
+ {
+ // do nothing; assumes no locale support
+ }
+
+}
diff --git a/examples/org.eclipse.datatools.connectivity.oda.jdbc.dbprofile.sample/src/org/eclipse/datatools/connectivity/oda/jdbc/dbprofile/sample/impl/DataSetMetaData.java b/examples/org.eclipse.datatools.connectivity.oda.jdbc.dbprofile.sample/src/org/eclipse/datatools/connectivity/oda/jdbc/dbprofile/sample/impl/DataSetMetaData.java
new file mode 100644
index 0000000..fb9c7e0
--- /dev/null
+++ b/examples/org.eclipse.datatools.connectivity.oda.jdbc.dbprofile.sample/src/org/eclipse/datatools/connectivity/oda/jdbc/dbprofile/sample/impl/DataSetMetaData.java
@@ -0,0 +1,163 @@
+/*
+ *************************************************************************
+ * Copyright (c) 2008 Actuate Corporation.
+ * 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:
+ * Actuate Corporation - initial API and implementation
+ *
+ *************************************************************************
+ */
+
+package org.eclipse.datatools.connectivity.oda.jdbc.dbprofile.sample.impl;
+
+import org.eclipse.datatools.connectivity.oda.IConnection;
+import org.eclipse.datatools.connectivity.oda.IDataSetMetaData;
+import org.eclipse.datatools.connectivity.oda.IResultSet;
+import org.eclipse.datatools.connectivity.oda.OdaException;
+
+/**
+ * Implementation class of IDataSetMetaData for an ODA runtime driver.
+ * <br>
+ * For demo purpose, the auto-generated method stubs have
+ * hard-coded implementation that assume this custom ODA data set
+ * is capable of handling a query that returns a single result set and
+ * accepts scalar input parameters by index.
+ * A custom ODA driver is expected to implement own data set specific
+ * behavior in its place.
+ */
+public class DataSetMetaData implements IDataSetMetaData
+{
+ private IConnection m_connection;
+
+ DataSetMetaData( IConnection connection )
+ {
+ m_connection = connection;
+ }
+
+ /*
+ * @see org.eclipse.datatools.connectivity.oda.IDataSetMetaData#getConnection()
+ */
+ public IConnection getConnection() throws OdaException
+ {
+ // TODO Auto-generated method stub
+ return m_connection;
+ }
+
+ /*
+ * @see org.eclipse.datatools.connectivity.oda.IDataSetMetaData#getDataSourceObjects(java.lang.String, java.lang.String, java.lang.String, java.lang.String)
+ */
+ public IResultSet getDataSourceObjects( String catalog, String schema, String object, String version ) throws OdaException
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ /*
+ * @see org.eclipse.datatools.connectivity.oda.IDataSetMetaData#getDataSourceMajorVersion()
+ */
+ public int getDataSourceMajorVersion() throws OdaException
+ {
+ // TODO Auto-generated method stub
+ return 1;
+ }
+
+ /*
+ * @see org.eclipse.datatools.connectivity.oda.IDataSetMetaData#getDataSourceMinorVersion()
+ */
+ public int getDataSourceMinorVersion() throws OdaException
+ {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ /*
+ * @see org.eclipse.datatools.connectivity.oda.IDataSetMetaData#getDataSourceProductName()
+ */
+ public String getDataSourceProductName() throws OdaException
+ {
+ // TODO Auto-generated method stub
+ return "ODA Sample Databases Profile Wrapper Data Source";
+ }
+
+ /*
+ * @see org.eclipse.datatools.connectivity.oda.IDataSetMetaData#getDataSourceProductVersion()
+ */
+ public String getDataSourceProductVersion() throws OdaException
+ {
+ return Integer.toString( getDataSourceMajorVersion() ) + "." + //$NON-NLS-1$
+ Integer.toString( getDataSourceMinorVersion() );
+ }
+
+ /*
+ * @see org.eclipse.datatools.connectivity.oda.IDataSetMetaData#getSQLStateType()
+ */
+ public int getSQLStateType() throws OdaException
+ {
+ // TODO Auto-generated method stub
+ return IDataSetMetaData.sqlStateSQL99;
+ }
+
+ /*
+ * @see org.eclipse.datatools.connectivity.oda.IDataSetMetaData#supportsMultipleResultSets()
+ */
+ public boolean supportsMultipleResultSets() throws OdaException
+ {
+ return false;
+ }
+
+ /*
+ * @see org.eclipse.datatools.connectivity.oda.IDataSetMetaData#supportsMultipleOpenResults()
+ */
+ public boolean supportsMultipleOpenResults() throws OdaException
+ {
+ return false;
+ }
+
+ /*
+ * @see org.eclipse.datatools.connectivity.oda.IDataSetMetaData#supportsNamedResultSets()
+ */
+ public boolean supportsNamedResultSets() throws OdaException
+ {
+ return false;
+ }
+
+ /*
+ * @see org.eclipse.datatools.connectivity.oda.IDataSetMetaData#supportsNamedParameters()
+ */
+ public boolean supportsNamedParameters() throws OdaException
+ {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ /*
+ * @see org.eclipse.datatools.connectivity.oda.IDataSetMetaData#supportsInParameters()
+ */
+ public boolean supportsInParameters() throws OdaException
+ {
+ // TODO Auto-generated method stub
+ return true;
+ }
+
+ /*
+ * @see org.eclipse.datatools.connectivity.oda.IDataSetMetaData#supportsOutParameters()
+ */
+ public boolean supportsOutParameters() throws OdaException
+ {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ /*
+ * @see org.eclipse.datatools.connectivity.oda.IDataSetMetaData#getSortMode()
+ */
+ public int getSortMode()
+ {
+ // TODO Auto-generated method stub
+ return IDataSetMetaData.sortModeNone;
+ }
+
+}
diff --git a/examples/org.eclipse.datatools.connectivity.oda.jdbc.dbprofile.sample/src/org/eclipse/datatools/connectivity/oda/jdbc/dbprofile/sample/impl/Driver.java b/examples/org.eclipse.datatools.connectivity.oda.jdbc.dbprofile.sample/src/org/eclipse/datatools/connectivity/oda/jdbc/dbprofile/sample/impl/Driver.java
new file mode 100644
index 0000000..3f30e11
--- /dev/null
+++ b/examples/org.eclipse.datatools.connectivity.oda.jdbc.dbprofile.sample/src/org/eclipse/datatools/connectivity/oda/jdbc/dbprofile/sample/impl/Driver.java
@@ -0,0 +1,95 @@
+/*
+ *************************************************************************
+ * Copyright (c) 2008 Actuate Corporation.
+ * 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:
+ * Actuate Corporation - initial API and implementation
+ *
+ *************************************************************************
+ */
+
+package org.eclipse.datatools.connectivity.oda.jdbc.dbprofile.sample.impl;
+
+import org.eclipse.datatools.connectivity.oda.IConnection;
+import org.eclipse.datatools.connectivity.oda.IDriver;
+import org.eclipse.datatools.connectivity.oda.LogConfiguration;
+import org.eclipse.datatools.connectivity.oda.OdaException;
+import org.eclipse.datatools.connectivity.oda.util.manifest.DataTypeMapping;
+import org.eclipse.datatools.connectivity.oda.util.manifest.ExtensionManifest;
+import org.eclipse.datatools.connectivity.oda.util.manifest.ManifestExplorer;
+
+/**
+ * Implementation class of IDriver for an ODA runtime driver.
+ */
+public class Driver implements IDriver
+{
+ static String ODA_DATA_SOURCE_ID = "org.eclipse.datatools.connectivity.oda.jdbc.dbprofile.sample"; //$NON-NLS-1$
+
+ /*
+ * @see org.eclipse.datatools.connectivity.oda.IDriver#getConnection(java.lang.String)
+ */
+ public IConnection getConnection( String dataSourceType ) throws OdaException
+ {
+ // assumes that this driver supports only one type of data source,
+ // ignores the specified dataSourceType
+ return new Connection();
+ }
+
+ /*
+ * @see org.eclipse.datatools.connectivity.oda.IDriver#setLogConfiguration(org.eclipse.datatools.connectivity.oda.LogConfiguration)
+ */
+ public void setLogConfiguration( LogConfiguration logConfig ) throws OdaException
+ {
+ // do nothing; assumes simple driver has no logging
+ }
+
+ /*
+ * @see org.eclipse.datatools.connectivity.oda.IDriver#getMaxConnections()
+ */
+ public int getMaxConnections() throws OdaException
+ {
+ return 0; // no limit
+ }
+
+ /*
+ * @see org.eclipse.datatools.connectivity.oda.IDriver#setAppContext(java.lang.Object)
+ */
+ public void setAppContext( Object context ) throws OdaException
+ {
+ // do nothing; assumes no support for pass-through context
+ }
+
+ /**
+ * Returns the object that represents this extension's manifest.
+ * @throws OdaException
+ */
+ static ExtensionManifest getManifest()
+ throws OdaException
+ {
+ return ManifestExplorer.getInstance()
+ .getExtensionManifest( ODA_DATA_SOURCE_ID );
+ }
+
+ /**
+ * Returns the native data type name of the specified code, as
+ * defined in this data source extension's manifest.
+ * @param nativeTypeCode the native data type code
+ * @return corresponding native data type name
+ * @throws OdaException if lookup fails
+ */
+ static String getNativeDataTypeName( int nativeDataTypeCode )
+ throws OdaException
+ {
+ DataTypeMapping typeMapping =
+ getManifest().getDataSetType( null )
+ .getDataTypeMapping( nativeDataTypeCode );
+ if( typeMapping != null )
+ return typeMapping.getNativeType();
+ return "Non-defined";
+ }
+
+}
diff --git a/examples/org.eclipse.datatools.connectivity.oda.jdbc.dbprofile.sample/src/org/eclipse/datatools/connectivity/oda/jdbc/dbprofile/sample/impl/ParameterMetaData.java b/examples/org.eclipse.datatools.connectivity.oda.jdbc.dbprofile.sample/src/org/eclipse/datatools/connectivity/oda/jdbc/dbprofile/sample/impl/ParameterMetaData.java
new file mode 100644
index 0000000..815d52a
--- /dev/null
+++ b/examples/org.eclipse.datatools.connectivity.oda.jdbc.dbprofile.sample/src/org/eclipse/datatools/connectivity/oda/jdbc/dbprofile/sample/impl/ParameterMetaData.java
@@ -0,0 +1,108 @@
+/*
+ *************************************************************************
+ * Copyright (c) 2008 Actuate Corporation.
+ * 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:
+ * Actuate Corporation - initial API and implementation
+ *
+ *************************************************************************
+ */
+
+package org.eclipse.datatools.connectivity.oda.jdbc.dbprofile.sample.impl;
+
+import org.eclipse.datatools.connectivity.oda.IParameterMetaData;
+import org.eclipse.datatools.connectivity.oda.OdaException;
+
+/**
+ * Implementation class of IParameterMetaData for an ODA runtime driver.
+ * <br>
+ * For demo purpose, the auto-generated method stubs have
+ * hard-coded implementation that returns a pre-defined set
+ * of meta-data and query results.
+ * A custom ODA driver is expected to implement own data source specific
+ * behavior in its place.
+ */
+public class ParameterMetaData implements IParameterMetaData
+{
+
+ /*
+ * @see org.eclipse.datatools.connectivity.oda.IParameterMetaData#getParameterCount()
+ */
+ public int getParameterCount() throws OdaException
+ {
+ // TODO replace with data source specific implementation
+
+ // hard-coded for demo purpose
+ return 1;
+ }
+
+ /*
+ * @see org.eclipse.datatools.connectivity.oda.IParameterMetaData#getParameterMode(int)
+ */
+ public int getParameterMode( int param ) throws OdaException
+ {
+ // TODO Auto-generated method stub
+ return IParameterMetaData.parameterModeIn;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.datatools.connectivity.oda.IParameterMetaData#getParameterName(int)
+ */
+ public String getParameterName( int param ) throws OdaException
+ {
+ // TODO Auto-generated method stub
+ return null; // name is not available
+ }
+
+ /*
+ * @see org.eclipse.datatools.connectivity.oda.IParameterMetaData#getParameterType(int)
+ */
+ public int getParameterType( int param ) throws OdaException
+ {
+ // TODO replace with data source specific implementation
+
+ // hard-coded for demo purpose
+ return java.sql.Types.CHAR; // as defined in data set extension manifest
+ }
+
+ /*
+ * @see org.eclipse.datatools.connectivity.oda.IParameterMetaData#getParameterTypeName(int)
+ */
+ public String getParameterTypeName( int param ) throws OdaException
+ {
+ int nativeTypeCode = getParameterType( param );
+ return Driver.getNativeDataTypeName( nativeTypeCode );
+ }
+
+ /*
+ * @see org.eclipse.datatools.connectivity.oda.IParameterMetaData#getPrecision(int)
+ */
+ public int getPrecision( int param ) throws OdaException
+ {
+ // TODO Auto-generated method stub
+ return -1;
+ }
+
+ /*
+ * @see org.eclipse.datatools.connectivity.oda.IParameterMetaData#getScale(int)
+ */
+ public int getScale( int param ) throws OdaException
+ {
+ // TODO Auto-generated method stub
+ return -1;
+ }
+
+ /*
+ * @see org.eclipse.datatools.connectivity.oda.IParameterMetaData#isNullable(int)
+ */
+ public int isNullable( int param ) throws OdaException
+ {
+ // TODO Auto-generated method stub
+ return IParameterMetaData.parameterNullableUnknown;
+ }
+
+}
diff --git a/examples/org.eclipse.datatools.connectivity.oda.jdbc.dbprofile.sample/src/org/eclipse/datatools/connectivity/oda/jdbc/dbprofile/sample/impl/Query.java b/examples/org.eclipse.datatools.connectivity.oda.jdbc.dbprofile.sample/src/org/eclipse/datatools/connectivity/oda/jdbc/dbprofile/sample/impl/Query.java
new file mode 100644
index 0000000..f5c3ba5
--- /dev/null
+++ b/examples/org.eclipse.datatools.connectivity.oda.jdbc.dbprofile.sample/src/org/eclipse/datatools/connectivity/oda/jdbc/dbprofile/sample/impl/Query.java
@@ -0,0 +1,390 @@
+/*
+ *************************************************************************
+ * Copyright (c) 2008, 2009 Actuate Corporation.
+ * 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:
+ * Actuate Corporation - initial API and implementation
+ *
+ *************************************************************************
+ */
+
+package org.eclipse.datatools.connectivity.oda.jdbc.dbprofile.sample.impl;
+
+import java.math.BigDecimal;
+import java.sql.Date;
+import java.sql.Time;
+import java.sql.Timestamp;
+import org.eclipse.datatools.connectivity.oda.IParameterMetaData;
+import org.eclipse.datatools.connectivity.oda.IResultSet;
+import org.eclipse.datatools.connectivity.oda.IResultSetMetaData;
+import org.eclipse.datatools.connectivity.oda.IQuery;
+import org.eclipse.datatools.connectivity.oda.OdaException;
+import org.eclipse.datatools.connectivity.oda.SortSpec;
+import org.eclipse.datatools.connectivity.oda.spec.QuerySpecification;
+
+/**
+ * Implementation class of IQuery for an ODA runtime driver.
+ * <br>
+ * For demo purpose, the auto-generated method stubs have
+ * hard-coded implementation that returns a pre-defined set
+ * of meta-data and query results.
+ * A custom ODA driver is expected to implement own data source specific
+ * behavior in its place.
+ */
+public class Query implements IQuery
+{
+ private int m_maxRows;
+ private String m_preparedText;
+
+ /*
+ * @see org.eclipse.datatools.connectivity.oda.IQuery#prepare(java.lang.String)
+ */
+ public void prepare( String queryText ) throws OdaException
+ {
+ // TODO Auto-generated method stub
+ m_preparedText = queryText;
+ }
+
+ /*
+ * @see org.eclipse.datatools.connectivity.oda.IQuery#setAppContext(java.lang.Object)
+ */
+ public void setAppContext( Object context ) throws OdaException
+ {
+ // do nothing; assumes no support for pass-through context
+ }
+
+ /*
+ * @see org.eclipse.datatools.connectivity.oda.IQuery#close()
+ */
+ public void close() throws OdaException
+ {
+ // TODO Auto-generated method stub
+ m_preparedText = null;
+ }
+
+ /*
+ * @see org.eclipse.datatools.connectivity.oda.IQuery#getMetaData()
+ */
+ public IResultSetMetaData getMetaData() throws OdaException
+ {
+ /* TODO Auto-generated method stub
+ * Replace with implementation to return an instance
+ * based on this prepared query.
+ */
+ return new ResultSetMetaData();
+ }
+
+ /*
+ * @see org.eclipse.datatools.connectivity.oda.IQuery#executeQuery()
+ */
+ public IResultSet executeQuery() throws OdaException
+ {
+ /* TODO Auto-generated method stub
+ * Replace with implementation to return an instance
+ * based on this prepared query.
+ */
+ IResultSet resultSet = new ResultSet();
+ resultSet.setMaxRows( getMaxRows() );
+ return resultSet;
+ }
+
+ /*
+ * @see org.eclipse.datatools.connectivity.oda.IQuery#setProperty(java.lang.String, java.lang.String)
+ */
+ public void setProperty( String name, String value ) throws OdaException
+ {
+ // do nothing; assumes no data set query property
+ }
+
+ /*
+ * @see org.eclipse.datatools.connectivity.oda.IQuery#setMaxRows(int)
+ */
+ public void setMaxRows( int max ) throws OdaException
+ {
+ m_maxRows = max;
+ }
+
+ /*
+ * @see org.eclipse.datatools.connectivity.oda.IQuery#getMaxRows()
+ */
+ public int getMaxRows() throws OdaException
+ {
+ return m_maxRows;
+ }
+
+ /*
+ * @see org.eclipse.datatools.connectivity.oda.IQuery#clearInParameters()
+ */
+ public void clearInParameters() throws OdaException
+ {
+ // TODO Auto-generated method stub
+ // only applies to input parameter
+ }
+
+ /*
+ * @see org.eclipse.datatools.connectivity.oda.IQuery#setInt(java.lang.String, int)
+ */
+ public void setInt( String parameterName, int value ) throws OdaException
+ {
+ // TODO Auto-generated method stub
+ // only applies to named input parameter
+ }
+
+ /*
+ * @see org.eclipse.datatools.connectivity.oda.IQuery#setInt(int, int)
+ */
+ public void setInt( int parameterId, int value ) throws OdaException
+ {
+ // TODO Auto-generated method stub
+ // only applies to input parameter
+ }
+
+ /*
+ * @see org.eclipse.datatools.connectivity.oda.IQuery#setDouble(java.lang.String, double)
+ */
+ public void setDouble( String parameterName, double value ) throws OdaException
+ {
+ // TODO Auto-generated method stub
+ // only applies to named input parameter
+ }
+
+ /*
+ * @see org.eclipse.datatools.connectivity.oda.IQuery#setDouble(int, double)
+ */
+ public void setDouble( int parameterId, double value ) throws OdaException
+ {
+ // TODO Auto-generated method stub
+ // only applies to input parameter
+ }
+
+ /*
+ * @see org.eclipse.datatools.connectivity.oda.IQuery#setBigDecimal(java.lang.String, java.math.BigDecimal)
+ */
+ public void setBigDecimal( String parameterName, BigDecimal value ) throws OdaException
+ {
+ // TODO Auto-generated method stub
+ // only applies to named input parameter
+ }
+
+ /*
+ * @see org.eclipse.datatools.connectivity.oda.IQuery#setBigDecimal(int, java.math.BigDecimal)
+ */
+ public void setBigDecimal( int parameterId, BigDecimal value ) throws OdaException
+ {
+ // TODO Auto-generated method stub
+ // only applies to input parameter
+ }
+
+ /*
+ * @see org.eclipse.datatools.connectivity.oda.IQuery#setString(java.lang.String, java.lang.String)
+ */
+ public void setString( String parameterName, String value ) throws OdaException
+ {
+ // TODO Auto-generated method stub
+ // only applies to named input parameter
+ }
+
+ /*
+ * @see org.eclipse.datatools.connectivity.oda.IQuery#setString(int, java.lang.String)
+ */
+ public void setString( int parameterId, String value ) throws OdaException
+ {
+ // TODO Auto-generated method stub
+ // only applies to input parameter
+ }
+
+ /*
+ * @see org.eclipse.datatools.connectivity.oda.IQuery#setDate(java.lang.String, java.sql.Date)
+ */
+ public void setDate( String parameterName, Date value ) throws OdaException
+ {
+ // TODO Auto-generated method stub
+ // only applies to named input parameter
+ }
+
+ /*
+ * @see org.eclipse.datatools.connectivity.oda.IQuery#setDate(int, java.sql.Date)
+ */
+ public void setDate( int parameterId, Date value ) throws OdaException
+ {
+ // TODO Auto-generated method stub
+ // only applies to input parameter
+ }
+
+ /*
+ * @see org.eclipse.datatools.connectivity.oda.IQuery#setTime(java.lang.String, java.sql.Time)
+ */
+ public void setTime( String parameterName, Time value ) throws OdaException
+ {
+ // TODO Auto-generated method stub
+ // only applies to named input parameter
+ }
+
+ /*
+ * @see org.eclipse.datatools.connectivity.oda.IQuery#setTime(int, java.sql.Time)
+ */
+ public void setTime( int parameterId, Time value ) throws OdaException
+ {
+ // TODO Auto-generated method stub
+ // only applies to input parameter
+ }
+
+ /*
+ * @see org.eclipse.datatools.connectivity.oda.IQuery#setTimestamp(java.lang.String, java.sql.Timestamp)
+ */
+ public void setTimestamp( String parameterName, Timestamp value ) throws OdaException
+ {
+ // TODO Auto-generated method stub
+ // only applies to named input parameter
+ }
+
+ /*
+ * @see org.eclipse.datatools.connectivity.oda.IQuery#setTimestamp(int, java.sql.Timestamp)
+ */
+ public void setTimestamp( int parameterId, Timestamp value ) throws OdaException
+ {
+ // TODO Auto-generated method stub
+ // only applies to input parameter
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.datatools.connectivity.oda.IQuery#setBoolean(java.lang.String, boolean)
+ */
+ public void setBoolean( String parameterName, boolean value )
+ throws OdaException
+ {
+ // TODO Auto-generated method stub
+ // only applies to named input parameter
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.datatools.connectivity.oda.IQuery#setBoolean(int, boolean)
+ */
+ public void setBoolean( int parameterId, boolean value )
+ throws OdaException
+ {
+ // TODO Auto-generated method stub
+ // only applies to input parameter
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.datatools.connectivity.oda.IQuery#setObject(java.lang.String, java.lang.Object)
+ */
+ public void setObject( String parameterName, Object value )
+ throws OdaException
+ {
+ // TODO Auto-generated method stub
+ // only applies to named input parameter
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.datatools.connectivity.oda.IQuery#setObject(int, java.lang.Object)
+ */
+ public void setObject( int parameterId, Object value ) throws OdaException
+ {
+ // TODO Auto-generated method stub
+ // only applies to input parameter
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.datatools.connectivity.oda.IQuery#setNull(java.lang.String)
+ */
+ public void setNull( String parameterName ) throws OdaException
+ {
+ // TODO Auto-generated method stub
+ // only applies to named input parameter
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.datatools.connectivity.oda.IQuery#setNull(int)
+ */
+ public void setNull( int parameterId ) throws OdaException
+ {
+ // TODO Auto-generated method stub
+ // only applies to input parameter
+ }
+
+ /*
+ * @see org.eclipse.datatools.connectivity.oda.IQuery#findInParameter(java.lang.String)
+ */
+ public int findInParameter( String parameterName ) throws OdaException
+ {
+ // TODO Auto-generated method stub
+ // only applies to named input parameter
+ return 0;
+ }
+
+ /*
+ * @see org.eclipse.datatools.connectivity.oda.IQuery#getParameterMetaData()
+ */
+ public IParameterMetaData getParameterMetaData() throws OdaException
+ {
+ /* TODO Auto-generated method stub
+ * Replace with implementation to return an instance
+ * based on this prepared query.
+ */
+ return new ParameterMetaData();
+ }
+
+ /*
+ * @see org.eclipse.datatools.connectivity.oda.IQuery#setSortSpec(org.eclipse.datatools.connectivity.oda.SortSpec)
+ */
+ public void setSortSpec( SortSpec sortBy ) throws OdaException
+ {
+ // only applies to sorting, assumes not supported
+ throw new UnsupportedOperationException();
+ }
+
+ /*
+ * @see org.eclipse.datatools.connectivity.oda.IQuery#getSortSpec()
+ */
+ public SortSpec getSortSpec() throws OdaException
+ {
+ // only applies to sorting
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.datatools.connectivity.oda.IQuery#setSpecification(org.eclipse.datatools.connectivity.oda.spec.QuerySpecification)
+ */
+ @SuppressWarnings("restriction")
+ public void setSpecification( QuerySpecification querySpec )
+ throws OdaException, UnsupportedOperationException
+ {
+ // assumes no support
+ throw new UnsupportedOperationException();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.datatools.connectivity.oda.IQuery#getSpecification()
+ */
+ @SuppressWarnings("restriction")
+ public QuerySpecification getSpecification()
+ {
+ // assumes no support
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.datatools.connectivity.oda.IQuery#getEffectiveQueryText()
+ */
+ public String getEffectiveQueryText()
+ {
+ // TODO Auto-generated method stub
+ return m_preparedText;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.datatools.connectivity.oda.IQuery#cancel()
+ */
+ public void cancel() throws OdaException, UnsupportedOperationException
+ {
+ // assumes unable to cancel while executing a query
+ throw new UnsupportedOperationException();
+ }
+
+}
diff --git a/examples/org.eclipse.datatools.connectivity.oda.jdbc.dbprofile.sample/src/org/eclipse/datatools/connectivity/oda/jdbc/dbprofile/sample/impl/ResultSet.java b/examples/org.eclipse.datatools.connectivity.oda.jdbc.dbprofile.sample/src/org/eclipse/datatools/connectivity/oda/jdbc/dbprofile/sample/impl/ResultSet.java
new file mode 100644
index 0000000..9ce9702
--- /dev/null
+++ b/examples/org.eclipse.datatools.connectivity.oda.jdbc.dbprofile.sample/src/org/eclipse/datatools/connectivity/oda/jdbc/dbprofile/sample/impl/ResultSet.java
@@ -0,0 +1,334 @@
+/*
+ *************************************************************************
+ * Copyright (c) 2008, 2009 Actuate Corporation.
+ * 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:
+ * Actuate Corporation - initial API and implementation
+ *
+ *************************************************************************
+ */
+
+package org.eclipse.datatools.connectivity.oda.jdbc.dbprofile.sample.impl;
+
+import java.math.BigDecimal;
+import java.sql.Date;
+import java.sql.Time;
+import java.sql.Timestamp;
+
+import org.eclipse.datatools.connectivity.oda.IBlob;
+import org.eclipse.datatools.connectivity.oda.IClob;
+import org.eclipse.datatools.connectivity.oda.IResultSet;
+import org.eclipse.datatools.connectivity.oda.IResultSetMetaData;
+import org.eclipse.datatools.connectivity.oda.OdaException;
+
+/**
+ * Implementation class of IResultSet for an ODA runtime driver.
+ * <br>
+ * For demo purpose, the auto-generated method stubs have
+ * hard-coded implementation that returns a pre-defined set
+ * of meta-data and query results.
+ * A custom ODA driver is expected to implement own data source specific
+ * behavior in its place.
+ */
+public class ResultSet implements IResultSet
+{
+ private int m_maxRows;
+ private int m_currentRowId;
+
+ /*
+ * @see org.eclipse.datatools.connectivity.oda.IResultSet#getMetaData()
+ */
+ public IResultSetMetaData getMetaData() throws OdaException
+ {
+ /* TODO Auto-generated method stub
+ * Replace with implementation to return an instance
+ * based on this result set.
+ */
+ return new ResultSetMetaData();
+ }
+
+ /*
+ * @see org.eclipse.datatools.connectivity.oda.IResultSet#setMaxRows(int)
+ */
+ public void setMaxRows( int max ) throws OdaException
+ {
+ m_maxRows = max;
+ }
+
+ /**
+ * Returns the maximum number of rows that can be fetched from this result set.
+ * @return the maximum number of rows to fetch.
+ */
+ protected int getMaxRows()
+ {
+ return m_maxRows;
+ }
+
+ /*
+ * @see org.eclipse.datatools.connectivity.oda.IResultSet#next()
+ */
+ public boolean next() throws OdaException
+ {
+ // TODO replace with data source specific implementation
+
+ // simple implementation done below for demo purpose only
+ int maxRows = getMaxRows();
+ if( maxRows <= 0 ) // no limit is specified
+ maxRows = 5; // hard-coded for demo purpose
+
+ if( m_currentRowId < maxRows )
+ {
+ m_currentRowId++;
+ return true;
+ }
+
+ return false;
+ }
+
+ /*
+ * @see org.eclipse.datatools.connectivity.oda.IResultSet#close()
+ */
+ public void close() throws OdaException
+ {
+ // TODO Auto-generated method stub
+ m_currentRowId = 0; // reset row counter
+ }
+
+ /*
+ * @see org.eclipse.datatools.connectivity.oda.IResultSet#getRow()
+ */
+ public int getRow() throws OdaException
+ {
+ return m_currentRowId;
+ }
+
+ /*
+ * @see org.eclipse.datatools.connectivity.oda.IResultSet#getString(int)
+ */
+ public String getString( int index ) throws OdaException
+ {
+ // TODO replace with data source specific implementation
+
+ // hard-coded for demo purpose
+ return "row" + getRow() + "_column" + index + " value";
+ }
+
+ /*
+ * @see org.eclipse.datatools.connectivity.oda.IResultSet#getString(java.lang.String)
+ */
+ public String getString( String columnName ) throws OdaException
+ {
+ return getString( findColumn( columnName ) );
+ }
+
+ /*
+ * @see org.eclipse.datatools.connectivity.oda.IResultSet#getInt(int)
+ */
+ public int getInt( int index ) throws OdaException
+ {
+ // TODO replace with data source specific implementation
+
+ // hard-coded for demo purpose
+ return getRow();
+ }
+
+ /*
+ * @see org.eclipse.datatools.connectivity.oda.IResultSet#getInt(java.lang.String)
+ */
+ public int getInt( String columnName ) throws OdaException
+ {
+ return getInt( findColumn( columnName ) );
+ }
+
+ /*
+ * @see org.eclipse.datatools.connectivity.oda.IResultSet#getDouble(int)
+ */
+ public double getDouble( int index ) throws OdaException
+ {
+ // TODO Auto-generated method stub
+ throw new UnsupportedOperationException();
+ }
+
+ /*
+ * @see org.eclipse.datatools.connectivity.oda.IResultSet#getDouble(java.lang.String)
+ */
+ public double getDouble( String columnName ) throws OdaException
+ {
+ return getDouble( findColumn( columnName ) );
+ }
+
+ /*
+ * @see org.eclipse.datatools.connectivity.oda.IResultSet#getBigDecimal(int)
+ */
+ public BigDecimal getBigDecimal( int index ) throws OdaException
+ {
+ // TODO Auto-generated method stub
+ throw new UnsupportedOperationException();
+ }
+
+ /*
+ * @see org.eclipse.datatools.connectivity.oda.IResultSet#getBigDecimal(java.lang.String)
+ */
+ public BigDecimal getBigDecimal( String columnName ) throws OdaException
+ {
+ return getBigDecimal( findColumn( columnName ) );
+ }
+
+ /*
+ * @see org.eclipse.datatools.connectivity.oda.IResultSet#getDate(int)
+ */
+ public Date getDate( int index ) throws OdaException
+ {
+ // TODO Auto-generated method stub
+ throw new UnsupportedOperationException();
+ }
+
+ /*
+ * @see org.eclipse.datatools.connectivity.oda.IResultSet#getDate(java.lang.String)
+ */
+ public Date getDate( String columnName ) throws OdaException
+ {
+ return getDate( findColumn( columnName ) );
+ }
+
+ /*
+ * @see org.eclipse.datatools.connectivity.oda.IResultSet#getTime(int)
+ */
+ public Time getTime( int index ) throws OdaException
+ {
+ // TODO Auto-generated method stub
+ throw new UnsupportedOperationException();
+ }
+
+ /*
+ * @see org.eclipse.datatools.connectivity.oda.IResultSet#getTime(java.lang.String)
+ */
+ public Time getTime( String columnName ) throws OdaException
+ {
+ return getTime( findColumn( columnName ) );
+ }
+
+ /*
+ * @see org.eclipse.datatools.connectivity.oda.IResultSet#getTimestamp(int)
+ */
+ public Timestamp getTimestamp( int index ) throws OdaException
+ {
+ // TODO Auto-generated method stub
+ throw new UnsupportedOperationException();
+ }
+
+ /*
+ * @see org.eclipse.datatools.connectivity.oda.IResultSet#getTimestamp(java.lang.String)
+ */
+ public Timestamp getTimestamp( String columnName ) throws OdaException
+ {
+ return getTimestamp( findColumn( columnName ) );
+ }
+
+ /*
+ * @see org.eclipse.datatools.connectivity.oda.IResultSet#getBlob(int)
+ */
+ public IBlob getBlob( int index ) throws OdaException
+ {
+ // TODO Auto-generated method stub
+ throw new UnsupportedOperationException();
+ }
+
+ /*
+ * @see org.eclipse.datatools.connectivity.oda.IResultSet#getBlob(java.lang.String)
+ */
+ public IBlob getBlob( String columnName ) throws OdaException
+ {
+ return getBlob( findColumn( columnName ) );
+ }
+
+ /*
+ * @see org.eclipse.datatools.connectivity.oda.IResultSet#getClob(int)
+ */
+ public IClob getClob( int index ) throws OdaException
+ {
+ // TODO Auto-generated method stub
+ throw new UnsupportedOperationException();
+ }
+
+ /*
+ * @see org.eclipse.datatools.connectivity.oda.IResultSet#getClob(java.lang.String)
+ */
+ public IClob getClob( String columnName ) throws OdaException
+ {
+ return getClob( findColumn( columnName ) );
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.datatools.connectivity.oda.IResultSet#getBoolean(int)
+ */
+ public boolean getBoolean( int index ) throws OdaException
+ {
+ // TODO Auto-generated method stub
+ throw new UnsupportedOperationException();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.datatools.connectivity.oda.IResultSet#getBoolean(java.lang.String)
+ */
+ public boolean getBoolean( String columnName ) throws OdaException
+ {
+ return getBoolean( findColumn( columnName ) );
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.datatools.connectivity.oda.IResultSet#getObject(int)
+ */
+ public Object getObject( int index ) throws OdaException
+ {
+ // TODO Auto-generated method stub
+ throw new UnsupportedOperationException();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.datatools.connectivity.oda.IResultSet#getObject(java.lang.String)
+ */
+ public Object getObject( String columnName ) throws OdaException
+ {
+ return getObject( findColumn( columnName ) );
+ }
+
+ /*
+ * @see org.eclipse.datatools.connectivity.oda.IResultSet#wasNull()
+ */
+ public boolean wasNull() throws OdaException
+ {
+ // TODO Auto-generated method stub
+
+ // hard-coded for demo purpose
+ return false;
+ }
+
+ /*
+ * @see org.eclipse.datatools.connectivity.oda.IResultSet#findColumn(java.lang.String)
+ */
+ public int findColumn( String columnName ) throws OdaException
+ {
+ // TODO replace with data source specific implementation
+
+ // hard-coded for demo purpose
+ int columnId = 1; // dummy column id
+ if( columnName == null || columnName.length() == 0 )
+ return columnId;
+ String lastChar = columnName.substring( columnName.length()-1, 1 );
+ try
+ {
+ columnId = Integer.parseInt( lastChar );
+ }
+ catch( NumberFormatException e )
+ {
+ // ignore, use dummy column id
+ }
+ return columnId;
+ }
+
+}
diff --git a/examples/org.eclipse.datatools.connectivity.oda.jdbc.dbprofile.sample/src/org/eclipse/datatools/connectivity/oda/jdbc/dbprofile/sample/impl/ResultSetMetaData.java b/examples/org.eclipse.datatools.connectivity.oda.jdbc.dbprofile.sample/src/org/eclipse/datatools/connectivity/oda/jdbc/dbprofile/sample/impl/ResultSetMetaData.java
new file mode 100644
index 0000000..06718c6
--- /dev/null
+++ b/examples/org.eclipse.datatools.connectivity.oda.jdbc.dbprofile.sample/src/org/eclipse/datatools/connectivity/oda/jdbc/dbprofile/sample/impl/ResultSetMetaData.java
@@ -0,0 +1,122 @@
+/*
+ *************************************************************************
+ * Copyright (c) 2008 Actuate Corporation.
+ * 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:
+ * Actuate Corporation - initial API and implementation
+ *
+ *************************************************************************
+ */
+
+package org.eclipse.datatools.connectivity.oda.jdbc.dbprofile.sample.impl;
+
+import org.eclipse.datatools.connectivity.oda.IResultSetMetaData;
+import org.eclipse.datatools.connectivity.oda.OdaException;
+
+/**
+ * Implementation class of IResultSetMetaData for an ODA runtime driver.
+ * <br>
+ * For demo purpose, the auto-generated method stubs have
+ * hard-coded implementation that returns a pre-defined set
+ * of meta-data and query results.
+ * A custom ODA driver is expected to implement own data source specific
+ * behavior in its place.
+ */
+public class ResultSetMetaData implements IResultSetMetaData
+{
+
+ /*
+ * @see org.eclipse.datatools.connectivity.oda.IResultSetMetaData#getColumnCount()
+ */
+ public int getColumnCount() throws OdaException
+ {
+ // TODO replace with data source specific implementation
+
+ // hard-coded for demo purpose
+ return 2;
+ }
+
+ /*
+ * @see org.eclipse.datatools.connectivity.oda.IResultSetMetaData#getColumnName(int)
+ */
+ public String getColumnName( int index ) throws OdaException
+ {
+ // TODO replace with data source specific implementation
+
+ // hard-coded for demo purpose
+ return "Column" + index;
+ }
+
+ /*
+ * @see org.eclipse.datatools.connectivity.oda.IResultSetMetaData#getColumnLabel(int)
+ */
+ public String getColumnLabel( int index ) throws OdaException
+ {
+ return getColumnName( index ); // default
+ }
+
+ /*
+ * @see org.eclipse.datatools.connectivity.oda.IResultSetMetaData#getColumnType(int)
+ */
+ public int getColumnType( int index ) throws OdaException
+ {
+ // TODO replace with data source specific implementation
+
+ // hard-coded for demo purpose
+ if( index == 1 )
+ return java.sql.Types.INTEGER; // as defined in data set extension manifest
+ return java.sql.Types.CHAR; // as defined in data set extension manifest
+ }
+
+ /*
+ * @see org.eclipse.datatools.connectivity.oda.IResultSetMetaData#getColumnTypeName(int)
+ */
+ public String getColumnTypeName( int index ) throws OdaException
+ {
+ int nativeTypeCode = getColumnType( index );
+ return Driver.getNativeDataTypeName( nativeTypeCode );
+ }
+
+ /*
+ * @see org.eclipse.datatools.connectivity.oda.IResultSetMetaData#getColumnDisplayLength(int)
+ */
+ public int getColumnDisplayLength( int index ) throws OdaException
+ {
+ // TODO replace with data source specific implementation
+
+ // hard-coded for demo purpose
+ return 8;
+ }
+
+ /*
+ * @see org.eclipse.datatools.connectivity.oda.IResultSetMetaData#getPrecision(int)
+ */
+ public int getPrecision( int index ) throws OdaException
+ {
+ // TODO Auto-generated method stub
+ return -1;
+ }
+
+ /*
+ * @see org.eclipse.datatools.connectivity.oda.IResultSetMetaData#getScale(int)
+ */
+ public int getScale( int index ) throws OdaException
+ {
+ // TODO Auto-generated method stub
+ return -1;
+ }
+
+ /*
+ * @see org.eclipse.datatools.connectivity.oda.IResultSetMetaData#isNullable(int)
+ */
+ public int isNullable( int index ) throws OdaException
+ {
+ // TODO Auto-generated method stub
+ return IResultSetMetaData.columnNullableUnknown;
+ }
+
+}
diff --git a/examples/org.eclipse.datatools.connectivity.oda.jdbc.dbprofile.sample/src/org/eclipse/datatools/connectivity/oda/jdbc/dbprofile/sample/impl/package.html b/examples/org.eclipse.datatools.connectivity.oda.jdbc.dbprofile.sample/src/org/eclipse/datatools/connectivity/oda/jdbc/dbprofile/sample/impl/package.html
new file mode 100644
index 0000000..0cbb5aa
--- /dev/null
+++ b/examples/org.eclipse.datatools.connectivity.oda.jdbc.dbprofile.sample/src/org/eclipse/datatools/connectivity/oda/jdbc/dbprofile/sample/impl/package.html
@@ -0,0 +1,37 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
+<html>
+<head>
+<!--
+
+ *************************************************************************
+ * Copyright (c) 2008 Actuate Corporation.
+ * 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:
+ * Actuate Corporation - initial API and implementation
+ *
+ *************************************************************************
+
+-->
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+</head>
+<body bgcolor="white">
+
+This package provides an exemplary implementation of an ODA driver's runtime extensions
+that adopts the integrated ODA Database Connection Profile framework.
+See the extensions defined in the plugin.xml.
+It adopts the ODA framework to define an ODA data source type
+that links to a DTP Database (JDBC) connection profile.
+<p>
+Its scope focus on supporting the design of an ODA data source connection.
+It uses the auto-generated runtime classes of an ODA driver, included for demo purpose only.
+<p>
+
+<!-- Put @see and @since tags down here. -->
+@since DTP 1.6
+
+</body>
+</html>
diff --git a/examples/org.eclipse.datatools.connectivity.repository.file/.classpath b/examples/org.eclipse.datatools.connectivity.repository.file/.classpath
new file mode 100644
index 0000000..751c8f2
--- /dev/null
+++ b/examples/org.eclipse.datatools.connectivity.repository.file/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/examples/org.eclipse.datatools.connectivity.repository.file/.gitignore b/examples/org.eclipse.datatools.connectivity.repository.file/.gitignore
new file mode 100644
index 0000000..fe99505
--- /dev/null
+++ b/examples/org.eclipse.datatools.connectivity.repository.file/.gitignore
@@ -0,0 +1,2 @@
+bin
+
diff --git a/examples/org.eclipse.datatools.connectivity.repository.file/.project b/examples/org.eclipse.datatools.connectivity.repository.file/.project
new file mode 100644
index 0000000..894a21c
--- /dev/null
+++ b/examples/org.eclipse.datatools.connectivity.repository.file/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.datatools.connectivity.repository.file</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/examples/org.eclipse.datatools.connectivity.repository.file/.settings/org.eclipse.jdt.core.prefs b/examples/org.eclipse.datatools.connectivity.repository.file/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..73f4382
--- /dev/null
+++ b/examples/org.eclipse.datatools.connectivity.repository.file/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,12 @@
+#Fri Apr 13 14:14:14 PDT 2007
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=disabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.4
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.4
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
+org.eclipse.jdt.core.compiler.source=1.4
diff --git a/examples/org.eclipse.datatools.connectivity.repository.file/META-INF/MANIFEST.MF b/examples/org.eclipse.datatools.connectivity.repository.file/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..d45b98b
--- /dev/null
+++ b/examples/org.eclipse.datatools.connectivity.repository.file/META-INF/MANIFEST.MF
@@ -0,0 +1,16 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Connection Profile File Based Repository Plug-in
+Bundle-SymbolicName: org.eclipse.datatools.connectivity.repository.file;singleton:=true
+Bundle-Version: 1.0.0.200802261
+Bundle-Activator: org.eclipse.datatools.connectivity.repository.file.FileRepositoryPlugin
+Bundle-Vendor: Eclipse.org
+Bundle-Localization: plugin
+Require-Bundle: org.eclipse.ui;bundle-version="[3.2.0,4.0.0)",
+ org.eclipse.core.runtime;bundle-version="[3.2.0,4.0.0)",
+ org.eclipse.datatools.connectivity;bundle-version="[0.9.1,1.5.0)",
+ org.eclipse.datatools.connectivity.ui;bundle-version="[0.9.1,1.5.0)",
+ org.eclipse.datatools.help;bundle-version="[1.0.0,2.0.0)",
+ org.eclipse.help.base;bundle-version="[3.2.0,5.0.0)"
+Eclipse-LazyStart: true
+Bundle-RequiredExecutionEnvironment: JavaSE-1.8
diff --git a/examples/org.eclipse.datatools.connectivity.repository.file/build.properties b/examples/org.eclipse.datatools.connectivity.repository.file/build.properties
new file mode 100644
index 0000000..6c480f3
--- /dev/null
+++ b/examples/org.eclipse.datatools.connectivity.repository.file/build.properties
@@ -0,0 +1,6 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ plugin.xml,\
+ icons/
diff --git a/examples/org.eclipse.datatools.connectivity.repository.file/icons/local_file_repository.gif b/examples/org.eclipse.datatools.connectivity.repository.file/icons/local_file_repository.gif
new file mode 100644
index 0000000..309c5e9
--- /dev/null
+++ b/examples/org.eclipse.datatools.connectivity.repository.file/icons/local_file_repository.gif
Binary files differ
diff --git a/examples/org.eclipse.datatools.connectivity.repository.file/plugin.xml b/examples/org.eclipse.datatools.connectivity.repository.file/plugin.xml
new file mode 100644
index 0000000..0d89970
--- /dev/null
+++ b/examples/org.eclipse.datatools.connectivity.repository.file/plugin.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.2"?>
+<plugin>
+ <extension
+ point="org.eclipse.datatools.connectivity.connectionProfile">
+ <connectionProfile
+ category="org.eclipse.datatools.connectivity.connectionProfileRepositoryCategory"
+ icon="icons/local_file_repository.GIF"
+ id="org.eclipse.datatools.connectivity.repository.file.connectionProfile"
+ name="File Based Connection Profile Repository"
+ pingFactory="org.eclipse.datatools.connectivity.repository.file.FileRepositoryConnectionFactory"
+ propertiesPersistenceHook="org.eclipse.datatools.connectivity.repository.file.PropertiesPersistenceHook"/>
+ <connectionFactory
+ class="org.eclipse.datatools.connectivity.repository.file.FileRepositoryConnectionFactory"
+ id="org.eclipse.datatools.connectivity.internal.repository.IConnectionProfileRepository"
+ name="Connection Profile Repository Connection"
+ profile="org.eclipse.datatools.connectivity.repository.file.connectionProfile"/>
+ <newWizard
+ class="org.eclipse.datatools.connectivity.repository.file.NewFileRepositoryProfileWizard"
+ id="org.eclipse.datatools.connectivity.repository.file.newWizard1"
+ name="File Based Connection Profile Repository"
+ profile="org.eclipse.datatools.connectivity.repository.file.connectionProfile"/>
+ </extension>
+
+</plugin>
diff --git a/examples/org.eclipse.datatools.connectivity.repository.file/src/org/eclipse/datatools/connectivity/repository/file/FileBasedRepository.java b/examples/org.eclipse.datatools.connectivity.repository.file/src/org/eclipse/datatools/connectivity/repository/file/FileBasedRepository.java
new file mode 100644
index 0000000..f046cdb
--- /dev/null
+++ b/examples/org.eclipse.datatools.connectivity.repository.file/src/org/eclipse/datatools/connectivity/repository/file/FileBasedRepository.java
@@ -0,0 +1,74 @@
+/*******************************************************************************
+ * Copyright (c) 2006-2007 Sybase, Inc.
+ *
+ * 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: rcernich - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.datatools.connectivity.repository.file;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.datatools.connectivity.IConnectionProfile;
+import org.eclipse.datatools.connectivity.internal.ConnectionProfileMgmt;
+import org.eclipse.datatools.connectivity.internal.ConnectivityPlugin;
+import org.eclipse.datatools.connectivity.internal.repository.ConnectionProfileRepositoryBase;
+
+public class FileBasedRepository extends ConnectionProfileRepositoryBase {
+
+ public FileBasedRepository(IConnectionProfile profile) {
+ super(profile);
+ }
+
+ protected Collection loadProfiles() throws CoreException {
+ File repoFile = getRepositoryFile();
+ if (!repoFile.exists()) {
+ try {
+ ConnectionProfileMgmt.saveCPs(new IConnectionProfile[0],repoFile,null);
+ }
+ catch (CoreException e) {
+ // we can eat this since we'll be flagged as read-only
+ }
+ return new ArrayList();
+ }
+ return Arrays.asList(ConnectionProfileMgmt.loadCPs(repoFile));
+ }
+
+ public void save() {
+ try {
+ if (getRepositoryFile().canWrite())
+ ConnectionProfileMgmt.saveCPs(getProfiles(),getRepositoryFile(),null);
+ }
+ catch (CoreException e) {
+ ConnectivityPlugin.getDefault().log(e.getStatus());
+ }
+ }
+
+ public boolean isReadOnly() {
+ return !getRepositoryFile().canWrite();
+ }
+
+ public boolean supportsProfileType(String providerID) {
+ // we support 'em all
+ return true;
+ }
+
+ public boolean supportsCategory(String id) {
+ // we support 'em all
+ return true;
+ }
+
+ public File getRepositoryFile() {
+ String fileName = getRepositoryProfile().getBaseProperties()
+ .getProperty(FileRepositoryPlugin.FILE_NAME_PROP_ID);
+ return new File(fileName);
+ }
+
+}
diff --git a/examples/org.eclipse.datatools.connectivity.repository.file/src/org/eclipse/datatools/connectivity/repository/file/FileRepositoryConnection.java b/examples/org.eclipse.datatools.connectivity.repository.file/src/org/eclipse/datatools/connectivity/repository/file/FileRepositoryConnection.java
new file mode 100644
index 0000000..d16736f
--- /dev/null
+++ b/examples/org.eclipse.datatools.connectivity.repository.file/src/org/eclipse/datatools/connectivity/repository/file/FileRepositoryConnection.java
@@ -0,0 +1,48 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Sybase, Inc.
+ *
+ * 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: rcernich - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.datatools.connectivity.repository.file;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.datatools.connectivity.IConnection;
+import org.eclipse.datatools.connectivity.IConnectionProfile;
+
+public class FileRepositoryConnection implements IConnection {
+
+ private FileBasedRepository mRepository;
+ private CoreException mConnectException;
+
+ public FileRepositoryConnection(IConnectionProfile profile) {
+ mRepository = new FileBasedRepository(profile);
+ try {
+ mRepository.load();
+ }
+ catch (CoreException e) {
+ mConnectException = e;
+ }
+ }
+
+ public void close() {
+ mRepository.dispose();
+ }
+
+ public Throwable getConnectException() {
+ return mConnectException;
+ }
+
+ public IConnectionProfile getConnectionProfile() {
+ return mRepository.getRepositoryProfile();
+ }
+
+ public Object getRawConnection() {
+ return mRepository;
+ }
+
+}
diff --git a/examples/org.eclipse.datatools.connectivity.repository.file/src/org/eclipse/datatools/connectivity/repository/file/FileRepositoryConnectionFactory.java b/examples/org.eclipse.datatools.connectivity.repository.file/src/org/eclipse/datatools/connectivity/repository/file/FileRepositoryConnectionFactory.java
new file mode 100644
index 0000000..6ae8bbc
--- /dev/null
+++ b/examples/org.eclipse.datatools.connectivity.repository.file/src/org/eclipse/datatools/connectivity/repository/file/FileRepositoryConnectionFactory.java
@@ -0,0 +1,30 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Sybase, Inc.
+ *
+ * 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:
+ * rcernich - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.datatools.connectivity.repository.file;
+
+import org.eclipse.datatools.connectivity.IConnection;
+import org.eclipse.datatools.connectivity.IConnectionFactory;
+import org.eclipse.datatools.connectivity.IConnectionProfile;
+
+
+public class FileRepositoryConnectionFactory implements IConnectionFactory {
+
+ public IConnection createConnection(IConnectionProfile profile) {
+ return createConnection(profile,null,null);
+ }
+
+ public IConnection createConnection(IConnectionProfile profile, String uid,
+ String pwd) {
+ return new FileRepositoryConnection(profile);
+ }
+
+}
diff --git a/examples/org.eclipse.datatools.connectivity.repository.file/src/org/eclipse/datatools/connectivity/repository/file/FileRepositoryDetailsWizardPage.java b/examples/org.eclipse.datatools.connectivity.repository.file/src/org/eclipse/datatools/connectivity/repository/file/FileRepositoryDetailsWizardPage.java
new file mode 100644
index 0000000..0ea71aa
--- /dev/null
+++ b/examples/org.eclipse.datatools.connectivity.repository.file/src/org/eclipse/datatools/connectivity/repository/file/FileRepositoryDetailsWizardPage.java
@@ -0,0 +1,161 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2008 Sybase, Inc.
+ *
+ * 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: rcernich - initial API and implementation
+ * IBM Corporation - defect fix #213266
+ ******************************************************************************/
+package org.eclipse.datatools.connectivity.repository.file;
+
+import org.eclipse.datatools.connectivity.ui.wizards.ConnectionProfileDetailsPage;
+import org.eclipse.datatools.help.ContextProviderDelegate;
+import org.eclipse.datatools.help.HelpUtil;
+import org.eclipse.help.IContext;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+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.FileDialog;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Text;
+
+public class FileRepositoryDetailsWizardPage extends
+ ConnectionProfileDetailsPage {
+
+ private Text mPathText;
+// private Button mEncryptCheckbox;
+// private Text mPassword1Text;
+// private Text mPassword2Text;
+
+ public FileRepositoryDetailsWizardPage(String name) {
+ super(name);
+ setTitle("File Repository Details");
+ setDescription("Please specify a file location and password, if desired.");
+ }
+
+ public String getFileName() {
+ return mPathText.getText();
+ }
+
+ public boolean getEncrypt() {
+// return mEncryptCheckbox.getSelection();
+ return false;
+ }
+
+ public String getPassword() {
+// return mPassword1Text.getText();
+ return new String();
+ }
+
+ public void createCustomControl(Composite parent) {
+ Composite content = new Composite(parent, SWT.NULL);
+ GridLayout layout = new GridLayout(3, false);
+ content.setLayout(layout);
+
+ Label label = new Label(content, SWT.NULL);
+ label.setLayoutData(new GridData());
+ label.setText("Directory Path:");
+
+ mPathText = new Text(content, SWT.BORDER);
+ mPathText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+ mPathText.addModifyListener(new ModifyListener() {
+
+ public void modifyText(ModifyEvent e) {
+ handlePathModify();
+ }
+ });
+
+ Button button = new Button(content, SWT.PUSH);
+ button.setText("Browse...");
+ button.setLayoutData(new GridData());
+ button.addSelectionListener(new SelectionAdapter() {
+
+ public void widgetSelected(SelectionEvent e) {
+ handleBrowse();
+ }
+ });
+
+// mEncryptCheckbox = new Button(content, SWT.CHECK);
+// button.setText("Encrypt");
+// button.setLayoutData(new GridData());
+// button.addSelectionListener(new SelectionAdapter() {
+//
+// public void widgetSelected(SelectionEvent e) {
+// handleEncryptChecked();
+// }
+// });
+ }
+
+ private void handleBrowse() {
+ FileDialog dialog = new FileDialog(getShell());
+ String path = dialog.open();
+ if (path != null) {
+ mPathText.setText(path);
+ }
+ }
+
+ private void handlePathModify() {
+ validate();
+ }
+
+// private void handleEncryptChecked() {
+// mPassword1Text.setEnabled(mEncryptCheckbox.getSelection());
+// mPassword2Text.setEnabled(mEncryptCheckbox.getSelection());
+// validate();
+// }
+
+ private void validate() {
+ String errorMessage;
+ String path = mPathText.getText();
+ if (path == null) {
+ errorMessage = "Please specify repository location.";
+ }
+// else if (mEncryptCheckbox.getSelection()) {
+// if (mPassword1Text.getText().length() == 0
+// && mPassword2Text.getText().length() == 0) {
+// errorMessage = "Please specify a password";
+// }
+// else if (mPassword1Text.getText().equals(mPassword2Text.getText())) {
+// errorMessage = null;
+// }
+// else {
+// errorMessage = "Please verify password";
+// }
+// }
+ else {
+ errorMessage = null;
+ }
+ setErrorMessage(errorMessage);
+ setPageComplete(errorMessage == null);
+ }
+
+ private ContextProviderDelegate contextProviderDelegate =
+ new ContextProviderDelegate(FileRepositoryPlugin.getDefault().getBundle().getSymbolicName());
+
+ public IContext getContext(Object target) {
+ return contextProviderDelegate.getContext(target);
+ }
+
+ public int getContextChangeMask() {
+ return contextProviderDelegate.getContextChangeMask();
+ }
+
+ public String getSearchExpression(Object target) {
+ return contextProviderDelegate.getSearchExpression(target);
+ }
+
+ public void createControl(Composite parent) {
+ super.createControl(parent);
+ getShell().setData( HelpUtil.CONTEXT_PROVIDER_KEY, this);
+ HelpUtil.setHelp( getControl(), HelpUtil.getContextId(IHelpContextsRepositoryFile.FILE_REPOSITORY_PROFILE_WIZARD_PAGE, FileRepositoryPlugin.getDefault().getBundle().getSymbolicName()));
+ }
+}
diff --git a/examples/org.eclipse.datatools.connectivity.repository.file/src/org/eclipse/datatools/connectivity/repository/file/FileRepositoryPlugin.java b/examples/org.eclipse.datatools.connectivity.repository.file/src/org/eclipse/datatools/connectivity/repository/file/FileRepositoryPlugin.java
new file mode 100644
index 0000000..d6ef992
--- /dev/null
+++ b/examples/org.eclipse.datatools.connectivity.repository.file/src/org/eclipse/datatools/connectivity/repository/file/FileRepositoryPlugin.java
@@ -0,0 +1,53 @@
+package org.eclipse.datatools.connectivity.repository.file;
+
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class FileRepositoryPlugin extends AbstractUIPlugin {
+
+ // The plug-in ID
+ public static final String PLUGIN_ID = "org.eclipse.datatools.connectivity.repository.file";
+ public static final String FILE_NAME_PROP_ID = PLUGIN_ID + ".fileName";
+ public static final String ENCRYPT_PROP_ID = PLUGIN_ID + ".encrypt";
+ public static final String PASSWORD_PROP_ID = PLUGIN_ID + ".password";
+
+ // The shared instance
+ private static FileRepositoryPlugin plugin;
+
+ /**
+ * The constructor
+ */
+ public FileRepositoryPlugin() {
+ plugin = this;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ */
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ }
+
+ /*
+ * (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 FileRepositoryPlugin getDefault() {
+ return plugin;
+ }
+
+}
diff --git a/examples/org.eclipse.datatools.connectivity.repository.file/src/org/eclipse/datatools/connectivity/repository/file/IHelpContextsRepositoryFile.java b/examples/org.eclipse.datatools.connectivity.repository.file/src/org/eclipse/datatools/connectivity/repository/file/IHelpContextsRepositoryFile.java
new file mode 100644
index 0000000..a128a62
--- /dev/null
+++ b/examples/org.eclipse.datatools.connectivity.repository.file/src/org/eclipse/datatools/connectivity/repository/file/IHelpContextsRepositoryFile.java
@@ -0,0 +1,29 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Sybase, Inc.
+ *
+ * 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: brianf - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.datatools.connectivity.repository.file;
+
+public interface IHelpContextsRepositoryFile {
+
+ /**
+ * TPS_helpKey_constants_for_plug-in: org.eclipse.datatools.connectivity.repository.file
+ */
+
+ /*
+ * FILE_REPOSITORY_PROFILE_WIZARD_PAGE = the wizard page that collects details for the
+ * file repository profile
+ */
+ public static final String FILE_REPOSITORY_PROFILE_WIZARD_PAGE = "FILE_REPOSITORY_PROFILE_WIZARD_PAGE";
+
+ /*
+ * FILE_REPOSITORY_PROFILE_WIZARD = the actual New File Repository Profile wizard
+ */
+ public static final String FILE_REPOSITORY_PROFILE_WIZARD = "FILE_REPOSITORY_PROFILE_WIZARD";
+}
diff --git a/examples/org.eclipse.datatools.connectivity.repository.file/src/org/eclipse/datatools/connectivity/repository/file/NewFileRepositoryProfileWizard.java b/examples/org.eclipse.datatools.connectivity.repository.file/src/org/eclipse/datatools/connectivity/repository/file/NewFileRepositoryProfileWizard.java
new file mode 100644
index 0000000..93430a5
--- /dev/null
+++ b/examples/org.eclipse.datatools.connectivity.repository.file/src/org/eclipse/datatools/connectivity/repository/file/NewFileRepositoryProfileWizard.java
@@ -0,0 +1,70 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Sybase, Inc.
+ *
+ * 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: rcernich - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.datatools.connectivity.repository.file;
+
+import java.util.Properties;
+
+import org.eclipse.datatools.connectivity.ui.wizards.NewConnectionProfileWizard;
+import org.eclipse.datatools.help.ContextProviderDelegate;
+import org.eclipse.datatools.help.HelpUtil;
+import org.eclipse.help.IContext;
+import org.eclipse.jface.wizard.IWizard;
+import org.eclipse.swt.widgets.Composite;
+
+public class NewFileRepositoryProfileWizard extends NewConnectionProfileWizard
+ implements IWizard {
+
+ protected FileRepositoryDetailsWizardPage mPropPage;
+
+ public NewFileRepositoryProfileWizard() {
+ setWindowTitle("New Connection Profile File Repository");
+ }
+
+ public void addCustomPages() {
+ mPropPage = new FileRepositoryDetailsWizardPage("detailsPage"); //$NON-NLS-1$
+ addPage(mPropPage);
+ }
+
+ public Properties getProfileProperties() {
+ Properties props = new Properties();
+ props.setProperty(FileRepositoryPlugin.FILE_NAME_PROP_ID, mPropPage
+ .getFileName());
+ props.setProperty(FileRepositoryPlugin.ENCRYPT_PROP_ID, Boolean
+ .valueOf(mPropPage.getEncrypt()).toString());
+ if (mPropPage.getEncrypt()) {
+ props.setProperty(FileRepositoryPlugin.PASSWORD_PROP_ID, mPropPage
+ .getPassword());
+ }
+ return props;
+ }
+
+ private ContextProviderDelegate contextProviderDelegate =
+ new ContextProviderDelegate(FileRepositoryPlugin.getDefault().getBundle().getSymbolicName());
+
+ public IContext getContext(Object target) {
+ return contextProviderDelegate.getContext(target);
+ }
+
+ public int getContextChangeMask() {
+ return contextProviderDelegate.getContextChangeMask();
+ }
+
+ public String getSearchExpression(Object target) {
+ return contextProviderDelegate.getSearchExpression(target);
+ }
+ public void createPageControls(Composite pageContainer) {
+ super.createPageControls(pageContainer);
+ getShell().setData(HelpUtil.CONTEXT_PROVIDER_KEY, this);
+ HelpUtil.setHelp(getShell(), HelpUtil.getContextId(
+ IHelpContextsRepositoryFile.FILE_REPOSITORY_PROFILE_WIZARD,
+ FileRepositoryPlugin.getDefault().getBundle().getSymbolicName()));
+ }
+}
diff --git a/examples/org.eclipse.datatools.connectivity.repository.file/src/org/eclipse/datatools/connectivity/repository/file/PropertiesPersistenceHook.java b/examples/org.eclipse.datatools.connectivity.repository.file/src/org/eclipse/datatools/connectivity/repository/file/PropertiesPersistenceHook.java
new file mode 100644
index 0000000..2cfa89d
--- /dev/null
+++ b/examples/org.eclipse.datatools.connectivity.repository.file/src/org/eclipse/datatools/connectivity/repository/file/PropertiesPersistenceHook.java
@@ -0,0 +1,25 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Sybase, Inc.
+ *
+ * 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:
+ * rcernich - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.datatools.connectivity.repository.file;
+
+import org.eclipse.datatools.connectivity.IPropertiesPersistenceHook;
+
+
+public class PropertiesPersistenceHook extends
+ org.eclipse.datatools.connectivity.PropertiesPersistenceHook implements
+ IPropertiesPersistenceHook {
+
+ public PropertiesPersistenceHook() {
+ // RJC Auto-generated constructor stub
+ }
+
+}
diff --git a/examples/org.eclipse.datatools.connectivity.repository.uri/.classpath b/examples/org.eclipse.datatools.connectivity.repository.uri/.classpath
new file mode 100644
index 0000000..751c8f2
--- /dev/null
+++ b/examples/org.eclipse.datatools.connectivity.repository.uri/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/examples/org.eclipse.datatools.connectivity.repository.uri/.gitignore b/examples/org.eclipse.datatools.connectivity.repository.uri/.gitignore
new file mode 100644
index 0000000..fe99505
--- /dev/null
+++ b/examples/org.eclipse.datatools.connectivity.repository.uri/.gitignore
@@ -0,0 +1,2 @@
+bin
+
diff --git a/examples/org.eclipse.datatools.connectivity.repository.uri/.project b/examples/org.eclipse.datatools.connectivity.repository.uri/.project
new file mode 100644
index 0000000..280a940
--- /dev/null
+++ b/examples/org.eclipse.datatools.connectivity.repository.uri/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.datatools.connectivity.repository.uri</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/examples/org.eclipse.datatools.connectivity.repository.uri/.settings/org.eclipse.jdt.core.prefs b/examples/org.eclipse.datatools.connectivity.repository.uri/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..73f4382
--- /dev/null
+++ b/examples/org.eclipse.datatools.connectivity.repository.uri/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,12 @@
+#Fri Apr 13 14:14:14 PDT 2007
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=disabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.4
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.4
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
+org.eclipse.jdt.core.compiler.source=1.4
diff --git a/examples/org.eclipse.datatools.connectivity.repository.uri/META-INF/MANIFEST.MF b/examples/org.eclipse.datatools.connectivity.repository.uri/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..337939a
--- /dev/null
+++ b/examples/org.eclipse.datatools.connectivity.repository.uri/META-INF/MANIFEST.MF
@@ -0,0 +1,15 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Connection Profile URI Based Repository Plug-in
+Bundle-SymbolicName: org.eclipse.datatools.connectivity.repository.uri;singleton:=true
+Bundle-Version: 1.0.0.20081014
+Bundle-Activator: org.eclipse.datatools.connectivity.repository.uri.URIRepositoryPlugin
+Bundle-Vendor: Eclipse.org
+Bundle-Localization: plugin
+Require-Bundle: org.eclipse.ui;bundle-version="[3.2.0,4.0.0)",
+ org.eclipse.core.runtime;bundle-version="[3.2.0,4.0.0)",
+ org.eclipse.datatools.connectivity;bundle-version="[0.9.1,1.5.0)",
+ org.eclipse.datatools.connectivity.ui;bundle-version="[0.9.1,1.5.0)",
+ org.eclipse.datatools.help;bundle-version="[1.0.0,2.0.0)",
+ org.eclipse.help.base;bundle-version="[3.2.0,5.0.0)"
+Eclipse-LazyStart: true
diff --git a/examples/org.eclipse.datatools.connectivity.repository.uri/build.properties b/examples/org.eclipse.datatools.connectivity.repository.uri/build.properties
new file mode 100644
index 0000000..6c480f3
--- /dev/null
+++ b/examples/org.eclipse.datatools.connectivity.repository.uri/build.properties
@@ -0,0 +1,6 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ plugin.xml,\
+ icons/
diff --git a/examples/org.eclipse.datatools.connectivity.repository.uri/icons/local_file_repository.gif b/examples/org.eclipse.datatools.connectivity.repository.uri/icons/local_file_repository.gif
new file mode 100644
index 0000000..309c5e9
--- /dev/null
+++ b/examples/org.eclipse.datatools.connectivity.repository.uri/icons/local_file_repository.gif
Binary files differ
diff --git a/examples/org.eclipse.datatools.connectivity.repository.uri/plugin.xml b/examples/org.eclipse.datatools.connectivity.repository.uri/plugin.xml
new file mode 100644
index 0000000..40d2b2a
--- /dev/null
+++ b/examples/org.eclipse.datatools.connectivity.repository.uri/plugin.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.2"?>
+<plugin>
+ <extension
+ point="org.eclipse.datatools.connectivity.connectionProfile">
+ <connectionProfile
+ category="org.eclipse.datatools.connectivity.connectionProfileRepositoryCategory"
+ icon="icons/local_file_repository.GIF"
+ id="org.eclipse.datatools.connectivity.repository.uri.connectionProfile"
+ name="URI Based Connection Profile Repository"
+ pingFactory="org.eclipse.datatools.connectivity.repository.uri.URIRepositoryConnectionFactory"
+ propertiesPersistenceHook="org.eclipse.datatools.connectivity.repository.uri.PropertiesPersistenceHook"/>
+ <connectionFactory
+ class="org.eclipse.datatools.connectivity.repository.uri.URIRepositoryConnectionFactory"
+ id="org.eclipse.datatools.connectivity.internal.repository.IConnectionProfileRepository"
+ name="Connection Profile URI Repository Connection"
+ profile="org.eclipse.datatools.connectivity.repository.uri.connectionProfile"/>
+ <newWizard
+ class="org.eclipse.datatools.connectivity.repository.uri.NewURIRepositoryProfileWizard"
+ id="org.eclipse.datatools.connectivity.repository.uri.newWizard1"
+ name="URI Based Connection Profile Repository"
+ profile="org.eclipse.datatools.connectivity.repository.uri.connectionProfile"/>
+ </extension>
+
+</plugin>
diff --git a/examples/org.eclipse.datatools.connectivity.repository.uri/src/org/eclipse/datatools/connectivity/repository/uri/IHelpContextsRepositoryURI.java b/examples/org.eclipse.datatools.connectivity.repository.uri/src/org/eclipse/datatools/connectivity/repository/uri/IHelpContextsRepositoryURI.java
new file mode 100644
index 0000000..94912b8
--- /dev/null
+++ b/examples/org.eclipse.datatools.connectivity.repository.uri/src/org/eclipse/datatools/connectivity/repository/uri/IHelpContextsRepositoryURI.java
@@ -0,0 +1,29 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Sybase, Inc.
+ *
+ * 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: brianf - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.datatools.connectivity.repository.uri;
+
+public interface IHelpContextsRepositoryURI {
+
+ /**
+ * TPS_helpKey_constants_for_plug-in: org.eclipse.datatools.connectivity.repository.uri
+ */
+
+ /*
+ * URI_REPOSITORY_PROFILE_WIZARD_PAGE = the wizard page that collects details for the
+ * URI repository profile
+ */
+ public static final String URI_REPOSITORY_PROFILE_WIZARD_PAGE = "URI_REPOSITORY_PROFILE_WIZARD_PAGE";
+
+ /*
+ * URI_REPOSITORY_PROFILE_WIZARD = the actual New URI Repository Profile wizard
+ */
+ public static final String URI_REPOSITORY_PROFILE_WIZARD = "URI_REPOSITORY_PROFILE_WIZARD";
+}
diff --git a/examples/org.eclipse.datatools.connectivity.repository.uri/src/org/eclipse/datatools/connectivity/repository/uri/NewURIRepositoryProfileWizard.java b/examples/org.eclipse.datatools.connectivity.repository.uri/src/org/eclipse/datatools/connectivity/repository/uri/NewURIRepositoryProfileWizard.java
new file mode 100644
index 0000000..a299aa1
--- /dev/null
+++ b/examples/org.eclipse.datatools.connectivity.repository.uri/src/org/eclipse/datatools/connectivity/repository/uri/NewURIRepositoryProfileWizard.java
@@ -0,0 +1,64 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Sybase, Inc.
+ *
+ * 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: brianf - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.datatools.connectivity.repository.uri;
+
+import java.util.Properties;
+
+import org.eclipse.datatools.connectivity.ui.wizards.NewConnectionProfileWizard;
+import org.eclipse.datatools.help.ContextProviderDelegate;
+import org.eclipse.datatools.help.HelpUtil;
+import org.eclipse.help.IContext;
+import org.eclipse.jface.wizard.IWizard;
+import org.eclipse.swt.widgets.Composite;
+
+public class NewURIRepositoryProfileWizard extends NewConnectionProfileWizard
+ implements IWizard {
+
+ protected URIRepositoryDetailsWizardPage mPropPage;
+
+ public NewURIRepositoryProfileWizard() {
+ setWindowTitle("New Connection Profile URI Repository");
+ }
+
+ public void addCustomPages() {
+ mPropPage = new URIRepositoryDetailsWizardPage("detailsPage"); //$NON-NLS-1$
+ addPage(mPropPage);
+ }
+
+ public Properties getProfileProperties() {
+ Properties props = new Properties();
+ props.setProperty(URIRepositoryPlugin.URI_PATH_PROP_ID, mPropPage
+ .getFileName());
+ return props;
+ }
+
+ private ContextProviderDelegate contextProviderDelegate =
+ new ContextProviderDelegate(URIRepositoryPlugin.getDefault().getBundle().getSymbolicName());
+
+ public IContext getContext(Object target) {
+ return contextProviderDelegate.getContext(target);
+ }
+
+ public int getContextChangeMask() {
+ return contextProviderDelegate.getContextChangeMask();
+ }
+
+ public String getSearchExpression(Object target) {
+ return contextProviderDelegate.getSearchExpression(target);
+ }
+ public void createPageControls(Composite pageContainer) {
+ super.createPageControls(pageContainer);
+ getShell().setData(HelpUtil.CONTEXT_PROVIDER_KEY, this);
+ HelpUtil.setHelp(getShell(), HelpUtil.getContextId(
+ IHelpContextsRepositoryURI.URI_REPOSITORY_PROFILE_WIZARD,
+ URIRepositoryPlugin.getDefault().getBundle().getSymbolicName()));
+ }
+}
diff --git a/examples/org.eclipse.datatools.connectivity.repository.uri/src/org/eclipse/datatools/connectivity/repository/uri/PropertiesPersistenceHook.java b/examples/org.eclipse.datatools.connectivity.repository.uri/src/org/eclipse/datatools/connectivity/repository/uri/PropertiesPersistenceHook.java
new file mode 100644
index 0000000..e5b8c77
--- /dev/null
+++ b/examples/org.eclipse.datatools.connectivity.repository.uri/src/org/eclipse/datatools/connectivity/repository/uri/PropertiesPersistenceHook.java
@@ -0,0 +1,25 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Sybase, Inc.
+ *
+ * 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:
+ * brianf - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.datatools.connectivity.repository.uri;
+
+import org.eclipse.datatools.connectivity.IPropertiesPersistenceHook;
+
+
+public class PropertiesPersistenceHook extends
+ org.eclipse.datatools.connectivity.PropertiesPersistenceHook implements
+ IPropertiesPersistenceHook {
+
+ public PropertiesPersistenceHook() {
+ // RJC Auto-generated constructor stub
+ }
+
+}
diff --git a/examples/org.eclipse.datatools.connectivity.repository.uri/src/org/eclipse/datatools/connectivity/repository/uri/URIBasedRepository.java b/examples/org.eclipse.datatools.connectivity.repository.uri/src/org/eclipse/datatools/connectivity/repository/uri/URIBasedRepository.java
new file mode 100644
index 0000000..3178e49
--- /dev/null
+++ b/examples/org.eclipse.datatools.connectivity.repository.uri/src/org/eclipse/datatools/connectivity/repository/uri/URIBasedRepository.java
@@ -0,0 +1,91 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Sybase, Inc.
+ *
+ * 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: brianf - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.datatools.connectivity.repository.uri;
+
+import java.io.File;
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.datatools.connectivity.IConnectionProfile;
+import org.eclipse.datatools.connectivity.internal.ConnectionProfileMgmt;
+import org.eclipse.datatools.connectivity.internal.ConnectivityPlugin;
+import org.eclipse.datatools.connectivity.internal.repository.ConnectionProfileRepositoryBase;
+
+public class URIBasedRepository extends ConnectionProfileRepositoryBase {
+
+ public URIBasedRepository(IConnectionProfile profile) {
+ super(profile);
+ }
+
+ protected Collection loadProfiles() throws CoreException {
+ File repoFile = getRepositoryFile();
+ if (repoFile == null) {
+ // Houston, we have a problem here
+ return null;
+ }
+ if (!repoFile.exists()) {
+ try {
+ ConnectionProfileMgmt.saveCPs(new IConnectionProfile[0],repoFile,null);
+ }
+ catch (CoreException e) {
+ // we can eat this since we'll be flagged as read-only
+ }
+ return new ArrayList();
+ }
+ return Arrays.asList(ConnectionProfileMgmt.loadCPs(repoFile));
+ }
+
+ public void save() {
+ try {
+ if (getRepositoryFile().canWrite())
+ ConnectionProfileMgmt.saveCPs(getProfiles(),getRepositoryFile(),null);
+ }
+ catch (CoreException e) {
+ ConnectivityPlugin.getDefault().log(e.getStatus());
+ }
+ }
+
+ public boolean isReadOnly() {
+ return !getRepositoryFile().canWrite();
+ }
+
+ public boolean supportsProfileType(String providerID) {
+ // we support 'em all
+ return true;
+ }
+
+ public boolean supportsCategory(String id) {
+ // we support 'em all
+ return true;
+ }
+
+ public URI getRepositoryURI() throws URISyntaxException {
+ String URIString = getRepositoryProfile().getBaseProperties()
+ .getProperty(URIRepositoryPlugin.URI_PATH_PROP_ID);
+ return new URI(URIString);
+ }
+
+ public File getRepositoryFile() {
+ try {
+ URI repoURI = getRepositoryURI();
+ File repoFile = new File ( repoURI);
+ return repoFile;
+ } catch (URISyntaxException e) {
+ // catch and throw the exception?
+ return null;
+ }
+ }
+
+}
diff --git a/examples/org.eclipse.datatools.connectivity.repository.uri/src/org/eclipse/datatools/connectivity/repository/uri/URIRepositoryConnection.java b/examples/org.eclipse.datatools.connectivity.repository.uri/src/org/eclipse/datatools/connectivity/repository/uri/URIRepositoryConnection.java
new file mode 100644
index 0000000..6476d89
--- /dev/null
+++ b/examples/org.eclipse.datatools.connectivity.repository.uri/src/org/eclipse/datatools/connectivity/repository/uri/URIRepositoryConnection.java
@@ -0,0 +1,48 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Sybase, Inc.
+ *
+ * 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: brianf - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.datatools.connectivity.repository.uri;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.datatools.connectivity.IConnection;
+import org.eclipse.datatools.connectivity.IConnectionProfile;
+
+public class URIRepositoryConnection implements IConnection {
+
+ private URIBasedRepository mRepository;
+ private CoreException mConnectException;
+
+ public URIRepositoryConnection(IConnectionProfile profile) {
+ mRepository = new URIBasedRepository(profile);
+ try {
+ mRepository.load();
+ }
+ catch (CoreException e) {
+ mConnectException = e;
+ }
+ }
+
+ public void close() {
+ mRepository.dispose();
+ }
+
+ public Throwable getConnectException() {
+ return mConnectException;
+ }
+
+ public IConnectionProfile getConnectionProfile() {
+ return mRepository.getRepositoryProfile();
+ }
+
+ public Object getRawConnection() {
+ return mRepository;
+ }
+
+}
diff --git a/examples/org.eclipse.datatools.connectivity.repository.uri/src/org/eclipse/datatools/connectivity/repository/uri/URIRepositoryConnectionFactory.java b/examples/org.eclipse.datatools.connectivity.repository.uri/src/org/eclipse/datatools/connectivity/repository/uri/URIRepositoryConnectionFactory.java
new file mode 100644
index 0000000..6503532
--- /dev/null
+++ b/examples/org.eclipse.datatools.connectivity.repository.uri/src/org/eclipse/datatools/connectivity/repository/uri/URIRepositoryConnectionFactory.java
@@ -0,0 +1,30 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Sybase, Inc.
+ *
+ * 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:
+ * rcernich - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.datatools.connectivity.repository.uri;
+
+import org.eclipse.datatools.connectivity.IConnection;
+import org.eclipse.datatools.connectivity.IConnectionFactory;
+import org.eclipse.datatools.connectivity.IConnectionProfile;
+
+
+public class URIRepositoryConnectionFactory implements IConnectionFactory {
+
+ public IConnection createConnection(IConnectionProfile profile) {
+ return createConnection(profile,null,null);
+ }
+
+ public IConnection createConnection(IConnectionProfile profile, String uid,
+ String pwd) {
+ return new URIRepositoryConnection(profile);
+ }
+
+}
diff --git a/examples/org.eclipse.datatools.connectivity.repository.uri/src/org/eclipse/datatools/connectivity/repository/uri/URIRepositoryDetailsWizardPage.java b/examples/org.eclipse.datatools.connectivity.repository.uri/src/org/eclipse/datatools/connectivity/repository/uri/URIRepositoryDetailsWizardPage.java
new file mode 100644
index 0000000..c0d609c
--- /dev/null
+++ b/examples/org.eclipse.datatools.connectivity.repository.uri/src/org/eclipse/datatools/connectivity/repository/uri/URIRepositoryDetailsWizardPage.java
@@ -0,0 +1,120 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Sybase, Inc.
+ *
+ * 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: brianf - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.datatools.connectivity.repository.uri;
+
+import org.eclipse.datatools.connectivity.ui.wizards.ConnectionProfileDetailsPage;
+import org.eclipse.datatools.help.ContextProviderDelegate;
+import org.eclipse.datatools.help.HelpUtil;
+import org.eclipse.help.IContext;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+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.FileDialog;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Text;
+
+public class URIRepositoryDetailsWizardPage extends
+ ConnectionProfileDetailsPage {
+
+ private Text mPathText;
+
+ public URIRepositoryDetailsWizardPage(String name) {
+ super(name);
+ setTitle("URI Repository Details");
+ setDescription("Please specify a URI location.");
+ }
+
+ public String getFileName() {
+ return mPathText.getText();
+ }
+
+ public void createCustomControl(Composite parent) {
+ Composite content = new Composite(parent, SWT.NULL);
+ GridLayout layout = new GridLayout(3, false);
+ content.setLayout(layout);
+
+ Label label = new Label(content, SWT.NULL);
+ label.setLayoutData(new GridData());
+ label.setText("Directory Path:");
+
+ mPathText = new Text(content, SWT.BORDER);
+ mPathText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+ mPathText.addModifyListener(new ModifyListener() {
+
+ public void modifyText(ModifyEvent e) {
+ handlePathModify();
+ }
+ });
+
+ Button button = new Button(content, SWT.PUSH);
+ button.setText("Browse...");
+ button.setLayoutData(new GridData());
+ button.addSelectionListener(new SelectionAdapter() {
+
+ public void widgetSelected(SelectionEvent e) {
+ handleBrowse();
+ }
+ });
+
+ }
+
+ private void handleBrowse() {
+ FileDialog dialog = new FileDialog(getShell());
+ String path = dialog.open();
+ if (path != null) {
+ mPathText.setText(path);
+ }
+ }
+
+ private void handlePathModify() {
+ validate();
+ }
+
+ private void validate() {
+ String errorMessage;
+ String path = mPathText.getText();
+ if (path == null) {
+ errorMessage = "Please specify repository location.";
+ }
+ else {
+ errorMessage = null;
+ }
+ setErrorMessage(errorMessage);
+ setPageComplete(errorMessage == null);
+ }
+
+ private ContextProviderDelegate contextProviderDelegate =
+ new ContextProviderDelegate(URIRepositoryPlugin.getDefault().getBundle().getSymbolicName());
+
+ public IContext getContext(Object target) {
+ return contextProviderDelegate.getContext(target);
+ }
+
+ public int getContextChangeMask() {
+ return contextProviderDelegate.getContextChangeMask();
+ }
+
+ public String getSearchExpression(Object target) {
+ return contextProviderDelegate.getSearchExpression(target);
+ }
+
+ public void createControl(Composite parent) {
+ super.createControl(parent);
+ getShell().setData( HelpUtil.CONTEXT_PROVIDER_KEY, this);
+ HelpUtil.setHelp( getControl(), HelpUtil.getContextId(IHelpContextsRepositoryURI.URI_REPOSITORY_PROFILE_WIZARD_PAGE, URIRepositoryPlugin.getDefault().getBundle().getSymbolicName()));
+ }
+}
diff --git a/examples/org.eclipse.datatools.connectivity.repository.uri/src/org/eclipse/datatools/connectivity/repository/uri/URIRepositoryPlugin.java b/examples/org.eclipse.datatools.connectivity.repository.uri/src/org/eclipse/datatools/connectivity/repository/uri/URIRepositoryPlugin.java
new file mode 100644
index 0000000..1f81451
--- /dev/null
+++ b/examples/org.eclipse.datatools.connectivity.repository.uri/src/org/eclipse/datatools/connectivity/repository/uri/URIRepositoryPlugin.java
@@ -0,0 +1,61 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Sybase, Inc.
+ *
+ * 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: brianf - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.datatools.connectivity.repository.uri;
+
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class URIRepositoryPlugin extends AbstractUIPlugin {
+
+ // The plug-in ID
+ public static final String PLUGIN_ID = "org.eclipse.datatools.connectivity.repository.uri";
+ public static final String URI_PATH_PROP_ID = PLUGIN_ID + ".uriPath";
+
+ // The shared instance
+ private static URIRepositoryPlugin plugin;
+
+ /**
+ * The constructor
+ */
+ public URIRepositoryPlugin() {
+ plugin = this;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ */
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ }
+
+ /*
+ * (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 URIRepositoryPlugin getDefault() {
+ return plugin;
+ }
+
+}
diff --git a/examples/org.eclipse.datatools.connectivity.sample.cp/.classpath b/examples/org.eclipse.datatools.connectivity.sample.cp/.classpath
new file mode 100644
index 0000000..751c8f2
--- /dev/null
+++ b/examples/org.eclipse.datatools.connectivity.sample.cp/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/examples/org.eclipse.datatools.connectivity.sample.cp/.gitignore b/examples/org.eclipse.datatools.connectivity.sample.cp/.gitignore
new file mode 100644
index 0000000..ba077a4
--- /dev/null
+++ b/examples/org.eclipse.datatools.connectivity.sample.cp/.gitignore
@@ -0,0 +1 @@
+bin
diff --git a/examples/org.eclipse.datatools.connectivity.sample.cp/.project b/examples/org.eclipse.datatools.connectivity.sample.cp/.project
new file mode 100644
index 0000000..b78945f
--- /dev/null
+++ b/examples/org.eclipse.datatools.connectivity.sample.cp/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.datatools.connectivity.sample.cp</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/examples/org.eclipse.datatools.connectivity.sample.cp/.settings/org.eclipse.jdt.core.prefs b/examples/org.eclipse.datatools.connectivity.sample.cp/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..73f4382
--- /dev/null
+++ b/examples/org.eclipse.datatools.connectivity.sample.cp/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,12 @@
+#Fri Apr 13 14:14:14 PDT 2007
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=disabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.4
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.4
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
+org.eclipse.jdt.core.compiler.source=1.4
diff --git a/examples/org.eclipse.datatools.connectivity.sample.cp/META-INF/MANIFEST.MF b/examples/org.eclipse.datatools.connectivity.sample.cp/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..2ef89b0
--- /dev/null
+++ b/examples/org.eclipse.datatools.connectivity.sample.cp/META-INF/MANIFEST.MF
@@ -0,0 +1,22 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %Plugin.Name
+Bundle-SymbolicName: org.eclipse.datatools.connectivity.sample.cp; singleton:=true
+Bundle-Version: 1.0.1.200802261
+Bundle-Vendor: %Plugin.Provider.Name
+Bundle-Localization: plugin
+Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.2.0,4.0.0)",
+ org.eclipse.ui;bundle-version="[3.2.0,4.0.0)",
+ org.eclipse.datatools.connectivity;bundle-version="[0.9.1,1.5.0)",
+ org.eclipse.datatools.connectivity.ui;bundle-version="[0.9.1,1.5.0)",
+ org.eclipse.ui.navigator;bundle-version="[3.3.0,4.0.0)",
+ org.eclipse.ui.views;bundle-version="[3.2.0,4.0.0)",
+ org.eclipse.datatools.connectivity.ui.dse;bundle-version="[0.9.1,1.5.0)"
+Eclipse-LazyStart: true
+Bundle-ClassPath: cpsample.jar
+Export-Package: org.eclipse.datatools.connectivity.sample.cp,
+ org.eclipse.datatools.connectivity.sample.cp.ui,
+ org.eclipse.datatools.connectivity.sample.cp.ui.actions,
+ org.eclipse.datatools.connectivity.sample.cp.ui.handler,
+ org.eclipse.datatools.connectivity.sample.cp.ui.properties,
+ org.eclipse.datatools.connectivity.sample.cp.ui.wizards
diff --git a/examples/org.eclipse.datatools.connectivity.sample.cp/about.html b/examples/org.eclipse.datatools.connectivity.sample.cp/about.html
new file mode 100644
index 0000000..1b7d275
--- /dev/null
+++ b/examples/org.eclipse.datatools.connectivity.sample.cp/about.html
@@ -0,0 +1,28 @@
+<html>
+<head>
+<title>About This Content</title>
+</head>
+<body>
+<div>
+<h3>About This Content</h3>
+<p>May 2, 2006</p>
+<h3>License</h3>
+<p>The Eclipse Foundation makes available all content in this plug-in
+("Content"). Unless otherwise indicated below, the Content is
+provided to you under the terms and conditions of the Eclipse Public License
+Version 1.0 ("EPL"). A copy of the EPL is available at <a
+href="http://www.eclipse.org/org/documents/epl-v10.php">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, "Program" will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation,
+the Content is being redistributed by another party ("Redistributor")
+and different terms and conditions may apply to your use of any object code in
+the Content. Check the RedistributorÂ’s license that was provided with the
+Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source
+code in the Content and such source code may be obtained at <a
+href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+<p> </p>
+</div>
+</body>
+</html>
diff --git a/examples/org.eclipse.datatools.connectivity.sample.cp/build.properties b/examples/org.eclipse.datatools.connectivity.sample.cp/build.properties
new file mode 100644
index 0000000..7dbd707
--- /dev/null
+++ b/examples/org.eclipse.datatools.connectivity.sample.cp/build.properties
@@ -0,0 +1,11 @@
+bin.includes = plugin.xml,\
+ icons/,\
+ about.html,\
+ plugin.properties,\
+ SybaseLogo2_black_sml.jpg,\
+ cpsample.jar,\
+ META-INF/
+
+jars.compile.order = cpsample.jar
+source.cpsample.jar = src/
+output.cpsample.jar = bin/
diff --git a/examples/org.eclipse.datatools.connectivity.sample.cp/eclipse3_2_support_readme.txt b/examples/org.eclipse.datatools.connectivity.sample.cp/eclipse3_2_support_readme.txt
new file mode 100644
index 0000000..0702efd
--- /dev/null
+++ b/examples/org.eclipse.datatools.connectivity.sample.cp/eclipse3_2_support_readme.txt
@@ -0,0 +1,20 @@
+################################################################################
+# Copyright (c) 2007 Sybase, Inc.
+#
+# 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: Sybase, Inc. - initial API and implementation
+################################################################################
+
+To make this sample work in Eclipse 3.2.2, you will need to do the following:
+
+1) Change the Versions to Match for the Eclipse Platform dependencies in the
+ Manifest editor from 3.3 to 3.2
+
+2) Remove or comment out the sections of the plugin.xml headed with:
+ NOTE: This is supported in Eclipse 3.3 only
+
+It should then compile and work in 3.2.
\ No newline at end of file
diff --git a/examples/org.eclipse.datatools.connectivity.sample.cp/icons/file.gif b/examples/org.eclipse.datatools.connectivity.sample.cp/icons/file.gif
new file mode 100644
index 0000000..6b86d07
--- /dev/null
+++ b/examples/org.eclipse.datatools.connectivity.sample.cp/icons/file.gif
Binary files differ
diff --git a/examples/org.eclipse.datatools.connectivity.sample.cp/icons/file2.gif b/examples/org.eclipse.datatools.connectivity.sample.cp/icons/file2.gif
new file mode 100644
index 0000000..485440f
--- /dev/null
+++ b/examples/org.eclipse.datatools.connectivity.sample.cp/icons/file2.gif
Binary files differ
diff --git a/examples/org.eclipse.datatools.connectivity.sample.cp/plugin.properties b/examples/org.eclipse.datatools.connectivity.sample.cp/plugin.properties
new file mode 100644
index 0000000..500801b
--- /dev/null
+++ b/examples/org.eclipse.datatools.connectivity.sample.cp/plugin.properties
@@ -0,0 +1,22 @@
+################################################################################
+# Copyright (c) 2005 Sybase, Inc.
+#
+# 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: Sybase, Inc. - initial API and implementation
+################################################################################
+Plugin.Name = Connection Profile Sample Plug-in
+Plugin.Provider.Name = Eclipse.org
+
+Extension.PropertyPage.Name = File Server Example Properties
+Extension.ServerExtension.Name = Sample File Profile
+Extension.ServerExtension.Category.Name = Files (Example category)
+Extension.ServerExtension.ConnectionProfile.Name = File Server Example
+Extension.ServerExtension.ConfigurationType.Name = File Path (Example configuraiton type)
+Extension.ServerExtension.ConnectionFactory.Name = java.io.File Connection Factory
+Extension.NewWizard.Name = File Connection Profile (Example)
+Extension.NewWizard.Description = Create a sample file connection profile
+Extension.PopupAction.Name = Sample File Action
\ No newline at end of file
diff --git a/examples/org.eclipse.datatools.connectivity.sample.cp/plugin.xml b/examples/org.eclipse.datatools.connectivity.sample.cp/plugin.xml
new file mode 100644
index 0000000..047ff88
--- /dev/null
+++ b/examples/org.eclipse.datatools.connectivity.sample.cp/plugin.xml
@@ -0,0 +1,244 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.0"?>
+<plugin>
+
+ <extension
+ point="org.eclipse.ui.popupMenus">
+ <objectContribution
+ objectClass="java.io.File"
+ id="org.eclipse.datatools.connectivity.sample.connectionProfileSample.contribution1">
+ <action
+ label="%Extension.PopupAction.Name"
+ class="org.eclipse.datatools.connectivity.sample.cp.ui.actions.SampleFileAction"
+ menubarPath="additions"
+ enablesFor="1"
+ id="org.eclipse.datatools.connectivity.sample.connectionProfileSample.newAction">
+ </action>
+ </objectContribution>
+ </extension>
+
+ <extension
+ point="org.eclipse.ui.propertyPages">
+ <page
+ class="org.eclipse.datatools.connectivity.sample.cp.ui.properties.FileProfilePropetyPage"
+ id="org.eclipse.datatools.connectivity.sample.ui.properties.fileProfilePropertyPage"
+ name="%Extension.PropertyPage.Name">
+ <filter
+ name="org.eclipse.datatools.profile.property.id"
+ value="org.eclipse.datatools.connectivity.sample.fileProfile">
+ </filter>
+ <enabledWhen>
+ <instanceof
+ value="org.eclipse.datatools.connectivity.IConnectionProfile">
+ </instanceof>
+ </enabledWhen>
+ </page>
+ </extension>
+
+ <extension
+ id="fileProfile"
+ name="%Extension.ServerExtension.Name"
+ point="org.eclipse.datatools.connectivity.connectionProfile">
+ <category
+ name="%Extension.ServerExtension.Category.Name"
+ id="org.eclipse.datatools.connectivity.sample.fileCategory">
+ </category>
+ <configurationType
+ name="%Extension.ServerExtension.ConfigurationType.Name"
+ id="org.eclipse.datatools.connectivity.sample.pathConfiguration">
+ </configurationType>
+ <connectionFactory
+ name="%Extension.ServerExtension.ConnectionFactory.Name"
+ profile="org.eclipse.datatools.connectivity.sample.fileProfile"
+ class="org.eclipse.datatools.connectivity.sample.cp.FileConnectionFactory"
+ id="java.io.File">
+ </connectionFactory>
+ <connectionProfile
+ category="org.eclipse.datatools.connectivity.sample.fileCategory"
+ configurationType="org.eclipse.datatools.connectivity.sample.pathConfiguration"
+ icon="icons/file.gif"
+ id="org.eclipse.datatools.connectivity.sample.fileProfile"
+ name="%Extension.ServerExtension.ConnectionProfile.Name">
+ </connectionProfile>
+ <newWizard
+ name="%Extension.NewWizard.Name"
+ profile="org.eclipse.datatools.connectivity.sample.fileProfile"
+ icon="icons/file.gif"
+ description="%Extension.NewWizard.Description"
+ class="org.eclipse.datatools.connectivity.sample.cp.ui.wizards.FileConnectionProfileNewWizard"
+ id="org.eclipse.datatools.connectivity.sample.connectionProfileSample.wizard1">
+ </newWizard>
+ <connectionFactory
+ class="org.eclipse.datatools.connectivity.sample.cp.FileConnectionFactory"
+ id="org.eclipse.datatools.connectivity.connectionFactory.pingFactory"
+ name="Ping Factory"
+ profile="org.eclipse.datatools.connectivity.sample.fileProfile"/>
+ </extension>
+
+ <extension
+ point="org.eclipse.ui.navigator.navigatorContent">
+ <navigatorContent
+ contentProvider="org.eclipse.datatools.connectivity.sample.cp.DirectoryContentProviderExtension"
+ id="org.eclipse.datatools.connectivity.sample.directoryContent"
+ labelProvider="org.eclipse.datatools.connectivity.sample.cp.DirectoryLabelProviderExtension"
+ name="Directory Content Extension (Sample)">
+ <enablement>
+ <or>
+ <and>
+ <instanceof value="org.eclipse.datatools.connectivity.IConnectionProfile"/>
+ <test
+ property="org.eclipse.datatools.connectivity.profile.property.id"
+ value="org.eclipse.datatools.connectivity.sample.fileProfile"/>
+ </and>
+ <instanceof
+ value="java.io.File">
+ </instanceof>
+ <instanceof
+ value="org.eclipse.datatools.connectivity.sample.cp.DirectoryContentExtension">
+ </instanceof>
+ </or>
+ </enablement>
+ </navigatorContent>
+ </extension>
+
+ <extension
+ point="org.eclipse.core.runtime.adapters">
+ <factory
+ adaptableType="org.eclipse.datatools.connectivity.IConnectionProfile"
+ class="org.eclipse.datatools.connectivity.sample.cp.FileProfileAdapterFactory">
+ <adapter
+ type="org.eclipse.ui.views.properties.IPropertySourceProvider">
+ </adapter>
+ </factory>
+ </extension>
+
+ <extension
+ point="org.eclipse.ui.navigator.viewer">
+ <viewerContentBinding viewerId="org.eclipse.datatools.connectivity.DataSourceExplorerNavigator">
+ <includes>
+ <contentExtension pattern="org.eclipse.datatools.connectivity.sample.directoryContent"/>
+ </includes>
+ </viewerContentBinding>
+ </extension>
+
+<!-- This action provider will override the Refresh action
+for File profiles to pop up a simple dialog instead of actually
+refreshing the view
+ NOTE: This is supported in Eclipse 3.3 only -->
+
+<!--
+ <extension
+ point="org.eclipse.ui.navigator.navigatorContent">
+ <actionProvider
+ class="org.eclipse.datatools.connectivity.sample.cp.ui.actions.RefreshOverrideActionProvider"
+ id="org.eclipse.datatools.connectivity.ui.dse.actions.testbed2"
+ overrides="org.eclipse.datatools.connectivity.ui.dse.actions.RefreshActionProvider">
+ <enablement>
+ <and>
+ <instanceof
+ value="org.eclipse.datatools.connectivity.IConnectionProfile">
+ </instanceof>
+ <test
+ property="org.eclipse.datatools.connectivity.profile.property.id"
+ value="org.eclipse.datatools.connectivity.sample.fileProfile">
+ </test>
+ </and>
+ </enablement>
+ </actionProvider>
+ </extension>
+-->
+
+<!-- This action provider contributes an overriding Refresh action for
+directories appearing in connected file profiles -->
+
+<!-- NOTE: This is supported in Eclipse 3.3 only -->
+
+ <extension
+ point="org.eclipse.ui.navigator.navigatorContent">
+ <actionProvider
+ class="org.eclipse.datatools.connectivity.sample.cp.ui.actions.RefreshDirectoryActionProvider"
+ id="org.eclipse.datatools.connectivity.ui.dse.actions.testbed3"
+ overrides="org.eclipse.datatools.connectivity.ui.dse.actions.RefreshActionProvider">
+ <enablement>
+ <instanceof
+ value="java.io.File">
+ </instanceof>
+ </enablement>
+ </actionProvider>
+ </extension>
+ <extension
+ point="org.eclipse.datatools.connectivity.ui.connectionProfileImage">
+ <profileImage
+ icon="icons/file2.gif"
+ profileID="org.eclipse.datatools.connectivity.sample.fileProfile">
+ </profileImage>
+ </extension>
+ <extension
+ point="org.eclipse.ui.handlers">
+ <handler
+ class="org.eclipse.datatools.connectivity.sample.cp.ui.handler.NewCPSampleHandler"
+ commandId="org.eclipse.datatools.connectivity.commands.addprofile">
+ <enabledWhen>
+ <with variable="selection">
+ <count value="1" />
+ <iterate>
+ <or>
+ <and>
+ <instanceof
+ value="org.eclipse.datatools.connectivity.IConnectionProfile">
+ </instanceof>
+ <test
+ property="org.eclipse.datatools.connectivity.profile.property.id"
+ value="org.eclipse.datatools.connectivity.sample.fileProfile">
+ </test>
+ </and>
+ <instanceof
+ value="java.io.File">
+ </instanceof>
+ <instanceof
+ value="org.eclipse.datatools.connectivity.sample.cp.DirectoryContentExtension">
+ </instanceof>
+ </or>
+ </iterate>
+ </with>
+ </enabledWhen>
+ <activeWhen>
+ <and>
+ <with
+ variable="activeWorkbenchWindow">
+ <test
+ property="org.eclipse.datatools.connectivity.workbench.window.perspective.property.perspectiveID"
+ value="org.eclipse.ui.resourcePerspective">
+ </test>
+ </with>
+ <with
+ variable="selection">
+ <count
+ value="1">
+ </count>
+ <iterate
+ operator="or">
+ <or>
+ <and>
+ <instanceof
+ value="org.eclipse.datatools.connectivity.IConnectionProfile">
+ </instanceof>
+ <test
+ property="org.eclipse.datatools.connectivity.profile.property.id"
+ value="org.eclipse.datatools.connectivity.sample.fileProfile">
+ </test>
+ </and>
+ <instanceof
+ value="java.io.File">
+ </instanceof>
+ <instanceof
+ value="org.eclipse.datatools.connectivity.sample.cp.DirectoryContentExtension">
+ </instanceof>
+ </or>
+ </iterate>
+ </with>
+ </and>
+ </activeWhen>
+ </handler>
+ </extension>
+</plugin>
diff --git a/examples/org.eclipse.datatools.connectivity.sample.cp/src/org/eclipse/datatools/connectivity/sample/cp/DirectoryContentExtension.java b/examples/org.eclipse.datatools.connectivity.sample.cp/src/org/eclipse/datatools/connectivity/sample/cp/DirectoryContentExtension.java
new file mode 100644
index 0000000..0f586cc
--- /dev/null
+++ b/examples/org.eclipse.datatools.connectivity.sample.cp/src/org/eclipse/datatools/connectivity/sample/cp/DirectoryContentExtension.java
@@ -0,0 +1,42 @@
+/*******************************************************************************
+ * Copyright (c) 2005 Sybase, Inc.
+ *
+ * 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: Sybase, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.datatools.connectivity.sample.cp;
+
+import org.eclipse.datatools.connectivity.IConnectionProfile;
+import org.eclipse.datatools.connectivity.ui.IContentExtension;
+import org.eclipse.datatools.connectivity.ui.ManagedContentExtensionBase;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.ui.ISharedImages;
+import org.eclipse.ui.internal.WorkbenchPlugin;
+
+/**
+ * @see IContentExtension
+ */
+public class DirectoryContentExtension extends ManagedContentExtensionBase {
+
+ public DirectoryContentExtension(IConnectionProfile profile) {
+ super(profile, IFileProfileConstants.FILE_FACTORY_ID);
+ }
+
+ public Image getImage() {
+ return WorkbenchPlugin.getDefault().getSharedImages().getImage(
+ ISharedImages.IMG_OBJ_FILE);
+ }
+
+ public String getLabel() {
+ return "Directory Content (Sample Extension)";
+ }
+
+ public boolean isVisible() {
+ return true;
+ }
+
+}
diff --git a/examples/org.eclipse.datatools.connectivity.sample.cp/src/org/eclipse/datatools/connectivity/sample/cp/DirectoryContentProviderExtension.java b/examples/org.eclipse.datatools.connectivity.sample.cp/src/org/eclipse/datatools/connectivity/sample/cp/DirectoryContentProviderExtension.java
new file mode 100644
index 0000000..1ca8439
--- /dev/null
+++ b/examples/org.eclipse.datatools.connectivity.sample.cp/src/org/eclipse/datatools/connectivity/sample/cp/DirectoryContentProviderExtension.java
@@ -0,0 +1,34 @@
+/*******************************************************************************
+ * Copyright (c) 2005 Sybase, Inc.
+ *
+ * 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: Sybase, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.datatools.connectivity.sample.cp;
+
+import org.eclipse.datatools.connectivity.IConnectionProfile;
+import org.eclipse.datatools.connectivity.sample.cp.ui.FileContentProvider;
+import org.eclipse.datatools.connectivity.ui.CommonContentProviderBase;
+import org.eclipse.datatools.connectivity.ui.IContentExtension;
+
+/**
+ * This class implements the navigatorContent extension and supplies workspace
+ * resources.
+ *
+ */
+public class DirectoryContentProviderExtension extends
+ CommonContentProviderBase {
+
+ public DirectoryContentProviderExtension() {
+ super(new FileContentProvider());
+ }
+
+ protected IContentExtension createContentExtension(
+ IConnectionProfile profile) {
+ return new DirectoryContentExtension(profile);
+ }
+}
\ No newline at end of file
diff --git a/examples/org.eclipse.datatools.connectivity.sample.cp/src/org/eclipse/datatools/connectivity/sample/cp/DirectoryLabelProviderExtension.java b/examples/org.eclipse.datatools.connectivity.sample.cp/src/org/eclipse/datatools/connectivity/sample/cp/DirectoryLabelProviderExtension.java
new file mode 100644
index 0000000..81e99ff
--- /dev/null
+++ b/examples/org.eclipse.datatools.connectivity.sample.cp/src/org/eclipse/datatools/connectivity/sample/cp/DirectoryLabelProviderExtension.java
@@ -0,0 +1,22 @@
+/*******************************************************************************
+ * Copyright (c) 2005 Sybase, Inc.
+ *
+ * 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: rcernich - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.datatools.connectivity.sample.cp;
+
+import org.eclipse.datatools.connectivity.sample.cp.ui.FileLabelProvider;
+import org.eclipse.datatools.connectivity.ui.CommonLabelProviderBase;
+
+public class DirectoryLabelProviderExtension extends CommonLabelProviderBase {
+
+ public DirectoryLabelProviderExtension() {
+ super(new FileLabelProvider());
+ }
+
+}
diff --git a/examples/org.eclipse.datatools.connectivity.sample.cp/src/org/eclipse/datatools/connectivity/sample/cp/FileConnection.java b/examples/org.eclipse.datatools.connectivity.sample.cp/src/org/eclipse/datatools/connectivity/sample/cp/FileConnection.java
new file mode 100644
index 0000000..63dcfab
--- /dev/null
+++ b/examples/org.eclipse.datatools.connectivity.sample.cp/src/org/eclipse/datatools/connectivity/sample/cp/FileConnection.java
@@ -0,0 +1,96 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2005 Sybase, Inc.
+ *
+ * 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: rcernich - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.datatools.connectivity.sample.cp;
+
+import java.io.File;
+import java.util.Properties;
+
+import org.eclipse.datatools.connectivity.IConnection;
+import org.eclipse.datatools.connectivity.IConnectionProfile;
+import org.eclipse.datatools.connectivity.Version;
+import org.eclipse.datatools.connectivity.VersionProviderConnection;
+
+/**
+ * @author rcernich
+ *
+ * Created on Mar 15, 2004
+ */
+public class FileConnection extends VersionProviderConnection implements
+ IConnection {
+
+ private final static String TECHNOLOGY_ROOT_KEY = "fileSample";
+
+ private File mFile;
+ private Exception mConnectException;
+
+ public FileConnection(IConnectionProfile profile) {
+ super(profile, FileConnectionFactory.class);
+ Properties props = profile.getBaseProperties();
+ String path = props
+ .getProperty(IFileProfilePropertyConstants.FILE_PATH);
+ if (path == null) {
+ mFile = null;
+ }
+ else {
+ mFile = new File(path);
+ if (!mFile.isDirectory() || !mFile.exists()) {
+ mFile = null;
+ }
+ }
+ if (mFile == null) {
+ mConnectException = new Exception(
+ "Specified directory does not exist.");
+ clearVersionCache();
+ }
+ else {
+ updateVersionCache();
+ }
+ }
+
+ public Object getRawConnection() {
+ return mFile;
+ }
+
+ public void close() {
+ // Nothing to do here. We don't really open anything.
+ mFile = null;
+ mConnectException = null;
+ }
+
+ public Throwable getConnectException() {
+ return mConnectException;
+ }
+
+ protected String getTechnologyRootKey() {
+ return TECHNOLOGY_ROOT_KEY;
+ }
+
+ public String getProviderName() {
+ // We'll use the OS name for the technology type
+ return System.getProperty("os.name");
+ }
+
+ public Version getProviderVersion() {
+ // We'll use the OS version for the technology version
+ return Version.valueOf(System.getProperty("os.version"));
+ }
+
+ public String getTechnologyName() {
+ // We'll use the JVM name for the provider name
+ return System.getProperty("java.vendor");
+ }
+
+ public Version getTechnologyVersion() {
+ // We'll use the JVM version for the provider version
+ return Version.valueOf(System.getProperty("java.version"));
+ }
+
+}
\ No newline at end of file
diff --git a/examples/org.eclipse.datatools.connectivity.sample.cp/src/org/eclipse/datatools/connectivity/sample/cp/FileConnectionFactory.java b/examples/org.eclipse.datatools.connectivity.sample.cp/src/org/eclipse/datatools/connectivity/sample/cp/FileConnectionFactory.java
new file mode 100644
index 0000000..019a58b
--- /dev/null
+++ b/examples/org.eclipse.datatools.connectivity.sample.cp/src/org/eclipse/datatools/connectivity/sample/cp/FileConnectionFactory.java
@@ -0,0 +1,34 @@
+/*******************************************************************************
+ * Copyright (c) 2005 Sybase, Inc.
+ *
+ * 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: Sybase, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.datatools.connectivity.sample.cp;
+
+import org.eclipse.datatools.connectivity.IConnection;
+import org.eclipse.datatools.connectivity.IConnectionFactory;
+import org.eclipse.datatools.connectivity.IConnectionProfile;
+
+/**
+ */
+public class FileConnectionFactory implements IConnectionFactory {
+
+ /**
+ */
+ public FileConnectionFactory() {
+ }
+
+ public IConnection createConnection(IConnectionProfile profile, String uid,
+ String pwd) {
+ return createConnection(profile);
+ }
+
+ public IConnection createConnection(IConnectionProfile profile) {
+ return new FileConnection(profile);
+ }
+}
diff --git a/examples/org.eclipse.datatools.connectivity.sample.cp/src/org/eclipse/datatools/connectivity/sample/cp/FileProfileAdapterFactory.java b/examples/org.eclipse.datatools.connectivity.sample.cp/src/org/eclipse/datatools/connectivity/sample/cp/FileProfileAdapterFactory.java
new file mode 100644
index 0000000..0a1e5d9
--- /dev/null
+++ b/examples/org.eclipse.datatools.connectivity.sample.cp/src/org/eclipse/datatools/connectivity/sample/cp/FileProfileAdapterFactory.java
@@ -0,0 +1,49 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Sybase, Inc.
+ *
+ * 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: Sybase, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.datatools.connectivity.sample.cp;
+
+import org.eclipse.core.runtime.IAdapterFactory;
+import org.eclipse.datatools.connectivity.IConnectionProfile;
+import org.eclipse.datatools.connectivity.sample.cp.ui.FileCPPropertySource;
+import org.eclipse.ui.views.properties.IPropertySource;
+import org.eclipse.ui.views.properties.IPropertySourceProvider;
+
+public class FileProfileAdapterFactory implements IAdapterFactory {
+
+ public Class[] getAdapterList() {
+ Class[] c = new Class[1];
+ c[0] = IPropertySourceProvider.class;
+ return c;
+ }
+
+ public Object getAdapter(Object adaptableObject, Class adapterType) {
+
+ if (adapterType.isAssignableFrom(IPropertySourceProvider.class)) {
+ final IConnectionProfile icp = (IConnectionProfile) adaptableObject;
+ if (icp.getProviderId().equals("org.eclipse.datatools.connectivity.sample.fileProfile"))
+ return new FileProfilePropertySourceProvider();
+ }
+ return null;
+ }
+
+ private class FileProfilePropertySourceProvider implements IPropertySourceProvider {
+
+ public IPropertySource getPropertySource(Object adaptableObject) {
+ if (adaptableObject instanceof IConnectionProfile) {
+ final IConnectionProfile icp = (IConnectionProfile) adaptableObject;
+ if (icp.getProviderId().equals("org.eclipse.datatools.connectivity.sample.fileProfile"))
+ return new FileCPPropertySource(icp);
+ }
+ return null;
+ }
+
+ }
+}
diff --git a/examples/org.eclipse.datatools.connectivity.sample.cp/src/org/eclipse/datatools/connectivity/sample/cp/IFileProfileConstants.java b/examples/org.eclipse.datatools.connectivity.sample.cp/src/org/eclipse/datatools/connectivity/sample/cp/IFileProfileConstants.java
new file mode 100644
index 0000000..87197de
--- /dev/null
+++ b/examples/org.eclipse.datatools.connectivity.sample.cp/src/org/eclipse/datatools/connectivity/sample/cp/IFileProfileConstants.java
@@ -0,0 +1,26 @@
+/*******************************************************************************
+ * Copyright (c) 2005 Sybase, Inc.
+ *
+ * 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: rcernich - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.datatools.connectivity.sample.cp;
+
+import java.io.File;
+
+/**
+ * @author rcernich
+ *
+ * Created on Mar 15, 2004
+ */
+public interface IFileProfileConstants extends IFileProfilePropertyConstants {
+
+ public static final String FILE_PROFILE_ID = "org.eclipse.datatools.connectivity.sample.fileProfile";
+ public static final String FILE_CONTENT_EXTENSION_ID = "org.eclipse.datatools.connectivity.sample.directoryContent";
+ public static final String FILE_FACTORY_ID = File.class.getName();
+
+}
diff --git a/examples/org.eclipse.datatools.connectivity.sample.cp/src/org/eclipse/datatools/connectivity/sample/cp/IFileProfilePropertyConstants.java b/examples/org.eclipse.datatools.connectivity.sample.cp/src/org/eclipse/datatools/connectivity/sample/cp/IFileProfilePropertyConstants.java
new file mode 100644
index 0000000..814197d
--- /dev/null
+++ b/examples/org.eclipse.datatools.connectivity.sample.cp/src/org/eclipse/datatools/connectivity/sample/cp/IFileProfilePropertyConstants.java
@@ -0,0 +1,22 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2005 Sybase, Inc.
+ *
+ * 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: rcernich - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.datatools.connectivity.sample.cp;
+
+/**
+ * @author rcernich
+ *
+ * Created on Mar 15, 2004
+ */
+public interface IFileProfilePropertyConstants {
+
+ public static final String FILE_PATH = "filePath";
+
+}
diff --git a/examples/org.eclipse.datatools.connectivity.sample.cp/src/org/eclipse/datatools/connectivity/sample/cp/ui/FileCPPropertySource.java b/examples/org.eclipse.datatools.connectivity.sample.cp/src/org/eclipse/datatools/connectivity/sample/cp/ui/FileCPPropertySource.java
new file mode 100644
index 0000000..00566c8
--- /dev/null
+++ b/examples/org.eclipse.datatools.connectivity.sample.cp/src/org/eclipse/datatools/connectivity/sample/cp/ui/FileCPPropertySource.java
@@ -0,0 +1,116 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Sybase, Inc.
+ *
+ * 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: brianf - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.datatools.connectivity.sample.cp.ui;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+import org.eclipse.datatools.connectivity.IConnectionProfile;
+import org.eclipse.datatools.connectivity.internal.ui.ConnectionProfilePropertySource;
+import org.eclipse.datatools.connectivity.sample.cp.IFileProfilePropertyConstants;
+import org.eclipse.ui.views.properties.IPropertyDescriptor;
+import org.eclipse.ui.views.properties.PropertyDescriptor;
+
+/**
+ * @author brianf
+ */
+public class FileCPPropertySource extends ConnectionProfilePropertySource {
+
+ private static final String P_ID_FILEPATH = "org.eclipse.datatools.connectivity.properties.sample.profile.filepath"; //$NON-NLS-1$
+
+ private IConnectionProfile mCP;
+
+ public FileCPPropertySource(IConnectionProfile cp) {
+ super(cp);
+ mCP = cp;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.views.properties.IPropertySource#getEditableValue()
+ */
+ public Object getEditableValue() {
+ return mCP;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.views.properties.IPropertySource#getPropertyDescriptors()
+ */
+ public IPropertyDescriptor[] getPropertyDescriptors() {
+
+ IPropertyDescriptor[] superDescriptors =
+ super.getPropertyDescriptors();
+
+ List descList = Arrays.asList(superDescriptors);
+ ArrayList fullList = new ArrayList();
+ fullList.addAll(descList);
+
+ PropertyDescriptor desFilePath = new PropertyDescriptor(P_ID_FILEPATH,
+ "File Path"); //$NON-NLS-1$
+ desFilePath.setCategory("Core"); //$NON-NLS-1$
+
+ fullList.add(desFilePath);
+
+ return (IPropertyDescriptor[]) fullList.toArray( new IPropertyDescriptor[ fullList.size() ]);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.views.properties.IPropertySource#getPropertyValue(java.lang.Object)
+ */
+ public Object getPropertyValue(Object id) {
+ Object value =
+ super.getPropertyValue(id);
+ if (value == null) {
+ if (id.equals(P_ID_FILEPATH)) {
+ return mCP.getBaseProperties().getProperty(IFileProfilePropertyConstants.FILE_PATH);
+ }
+ else {
+ return null;
+ }
+ }
+ else
+ return value;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.views.properties.IPropertySource#isPropertySet(java.lang.Object)
+ */
+ public boolean isPropertySet(Object id) {
+ return true;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.views.properties.IPropertySource#resetPropertyValue(java.lang.Object)
+ */
+ public void resetPropertyValue(Object id) {
+ // Do nothing
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.views.properties.IPropertySource#setPropertyValue(java.lang.Object,
+ * java.lang.Object)
+ */
+ public void setPropertyValue(Object id, Object value) {
+ // Do nothing
+ }
+}
diff --git a/examples/org.eclipse.datatools.connectivity.sample.cp/src/org/eclipse/datatools/connectivity/sample/cp/ui/FileContentProvider.java b/examples/org.eclipse.datatools.connectivity.sample.cp/src/org/eclipse/datatools/connectivity/sample/cp/ui/FileContentProvider.java
new file mode 100644
index 0000000..9248a6e
--- /dev/null
+++ b/examples/org.eclipse.datatools.connectivity.sample.cp/src/org/eclipse/datatools/connectivity/sample/cp/ui/FileContentProvider.java
@@ -0,0 +1,111 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2005 Sybase, Inc.
+ *
+ * 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: Sybase, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.datatools.connectivity.sample.cp.ui;
+
+import java.io.File;
+
+import org.eclipse.jface.viewers.ITreeContentProvider;
+import org.eclipse.jface.viewers.Viewer;
+
+/**
+ * This represents an existing content provider used for working the object type
+ * representing connections for this profile (java.io.File).
+ *
+ * @author rcernich
+ *
+ * Created on Mar 15, 2004
+ */
+public class FileContentProvider implements ITreeContentProvider {
+
+ /**
+ *
+ */
+ public FileContentProvider() {
+ super();
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.jface.viewers.ITreeContentProvider#getChildren(java.lang.Object)
+ */
+ public Object[] getChildren(Object parentElement) {
+ Object[] children;
+ if (parentElement instanceof File) {
+ File file = (File) parentElement;
+ if (file.isDirectory()) {
+ children = file.listFiles();
+ }
+ else {
+ children = new Object[0];
+ }
+ }
+ else {
+ children = new Object[0];
+ }
+ return children;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.jface.viewers.ITreeContentProvider#getParent(java.lang.Object)
+ */
+ public Object getParent(Object element) {
+ Object parent;
+ if (element instanceof File) {
+ parent = ((File) element).getParentFile();
+ }
+ else {
+ parent = null;
+ }
+ return parent;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.jface.viewers.ITreeContentProvider#hasChildren(java.lang.Object)
+ */
+ public boolean hasChildren(Object element) {
+ return getChildren(element).length > 0;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.jface.viewers.IStructuredContentProvider#getElements(java.lang.Object)
+ */
+ public Object[] getElements(Object inputElement) {
+ return getChildren(inputElement);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.jface.viewers.IContentProvider#dispose()
+ */
+ public void dispose() {
+ // Release any listeners. Other cleanup.
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.jface.viewers.IContentProvider#inputChanged(org.eclipse.jface.viewers.Viewer,
+ * java.lang.Object, java.lang.Object)
+ */
+ public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
+ // Register listeners on newInput, remove listeners on oldInput, other
+ // initialization.
+ }
+
+}
diff --git a/examples/org.eclipse.datatools.connectivity.sample.cp/src/org/eclipse/datatools/connectivity/sample/cp/ui/FileLabelProvider.java b/examples/org.eclipse.datatools.connectivity.sample.cp/src/org/eclipse/datatools/connectivity/sample/cp/ui/FileLabelProvider.java
new file mode 100644
index 0000000..2558abd
--- /dev/null
+++ b/examples/org.eclipse.datatools.connectivity.sample.cp/src/org/eclipse/datatools/connectivity/sample/cp/ui/FileLabelProvider.java
@@ -0,0 +1,73 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2005 Sybase, Inc.
+ *
+ * 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: Sybase, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.datatools.connectivity.sample.cp.ui;
+
+import java.io.File;
+
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.ui.ISharedImages;
+import org.eclipse.ui.internal.WorkbenchPlugin;
+
+/**
+ * This represents an existing label provider used for working the object type
+ * representing connections for this profile (java.io.File).
+ *
+ * @author rcernich
+ *
+ * Created on Mar 15, 2004
+ */
+public class FileLabelProvider extends LabelProvider {
+
+ public FileLabelProvider() {
+ super();
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.jface.viewers.ILabelProvider#getImage(java.lang.Object)
+ */
+ public Image getImage(Object element) {
+ Image image;
+ if (element instanceof File) {
+ File file = (File) element;
+ if (file.isDirectory()) {
+ image = WorkbenchPlugin.getDefault().getSharedImages()
+ .getImage(ISharedImages.IMG_OBJ_FOLDER);
+ }
+ else {
+ image = WorkbenchPlugin.getDefault().getSharedImages()
+ .getImage(ISharedImages.IMG_OBJ_FILE);
+ }
+ }
+ else {
+ image = super.getImage(element);
+ }
+ return image;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.jface.viewers.ILabelProvider#getText(java.lang.Object)
+ */
+ public String getText(Object element) {
+ String text;
+ if (element instanceof File) {
+ text = ((File) element).getName();
+ }
+ else {
+ text = super.getText(element);
+ }
+ return text;
+ }
+}
diff --git a/examples/org.eclipse.datatools.connectivity.sample.cp/src/org/eclipse/datatools/connectivity/sample/cp/ui/actions/RefreshDirectoryAction.java b/examples/org.eclipse.datatools.connectivity.sample.cp/src/org/eclipse/datatools/connectivity/sample/cp/ui/actions/RefreshDirectoryAction.java
new file mode 100644
index 0000000..7fb6b4e
--- /dev/null
+++ b/examples/org.eclipse.datatools.connectivity.sample.cp/src/org/eclipse/datatools/connectivity/sample/cp/ui/actions/RefreshDirectoryAction.java
@@ -0,0 +1,49 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Sybase, Inc.
+ *
+ * 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: Sybase, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.datatools.connectivity.sample.cp.ui.actions;
+
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.StructuredViewer;
+import org.eclipse.ui.actions.ActionContext;
+import org.eclipse.ui.navigator.CommonViewer;
+
+public class RefreshDirectoryAction extends Action {
+
+ private ActionContext context = null;
+ private StructuredViewer viewer = null;
+
+ public void setActionContext ( ActionContext context ) {
+ this.context = context;
+ }
+
+ public ActionContext getActionContext() {
+ return this.context;
+ }
+
+ public void setViewer ( StructuredViewer viewer ) {
+ this.viewer = viewer;
+ }
+
+ public StructuredViewer getViewer () {
+ return this.viewer;
+ }
+
+ public void run() {
+ IStructuredSelection ssel =
+ (IStructuredSelection) getActionContext().getSelection();
+ getViewer().refresh(ssel.getFirstElement());
+ if (getViewer() instanceof CommonViewer) {
+ CommonViewer cv = (CommonViewer) getViewer();
+ cv.collapseToLevel(ssel.getFirstElement(), 1);
+ }
+ }
+}
diff --git a/examples/org.eclipse.datatools.connectivity.sample.cp/src/org/eclipse/datatools/connectivity/sample/cp/ui/actions/RefreshDirectoryActionProvider.java b/examples/org.eclipse.datatools.connectivity.sample.cp/src/org/eclipse/datatools/connectivity/sample/cp/ui/actions/RefreshDirectoryActionProvider.java
new file mode 100644
index 0000000..6db3dbe
--- /dev/null
+++ b/examples/org.eclipse.datatools.connectivity.sample.cp/src/org/eclipse/datatools/connectivity/sample/cp/ui/actions/RefreshDirectoryActionProvider.java
@@ -0,0 +1,74 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Sybase, Inc.
+ *
+ * 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: Sybase, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.datatools.connectivity.sample.cp.ui.actions;
+
+import java.io.File;
+
+import org.eclipse.datatools.connectivity.ui.navigator.actions.RefreshActionProvider;
+import org.eclipse.jface.action.IMenuManager;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.ui.IActionBars;
+import org.eclipse.ui.actions.ActionFactory;
+import org.eclipse.ui.navigator.ICommonActionExtensionSite;
+
+public class RefreshDirectoryActionProvider extends RefreshActionProvider {
+
+ private RefreshDirectoryAction addRefreshAction;
+
+ public RefreshDirectoryActionProvider() {
+ super();
+ }
+
+ public void fillContextMenu(IMenuManager manager) {
+ IStructuredSelection selection =
+ (IStructuredSelection) getContext().getSelection();
+ if (selection.getFirstElement() instanceof File) {
+ File file = (File) selection.getFirstElement();
+ if (file.isDirectory()) {
+ this.addRefreshAction.setActionContext(getContext());
+ this.addRefreshAction.setViewer(getViewer());
+ manager.appendToGroup("slot3", this.addRefreshAction);
+ }
+ }
+ return;
+ }
+
+ public void fillActionBars(IActionBars bars) {
+ bars.setGlobalActionHandler(ActionFactory.REFRESH.getId(),
+ this.addRefreshAction);
+ updateActionBars();
+ return;
+ }
+
+ public void init(ICommonActionExtensionSite config) {
+ super.init(config);
+ makeActions();
+ }
+
+ /**
+ *
+ */
+ private void makeActions() {
+ this.addRefreshAction = new RefreshDirectoryAction();
+ this.addRefreshAction.setActionDefinitionId("org.eclipse.ui.file.refresh"); //$NON-NLS-1$
+ this.addRefreshAction.setText("Refresh Directory");
+ this.addRefreshAction.setViewer(getViewer());
+
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.actions.ActionGroup#updateActionBars()
+ */
+ public void updateActionBars() {
+ this.addRefreshAction.setActionContext(getContext());
+ this.addRefreshAction.setViewer(getViewer());
+ }
+}
diff --git a/examples/org.eclipse.datatools.connectivity.sample.cp/src/org/eclipse/datatools/connectivity/sample/cp/ui/actions/RefreshOverrideAction.java b/examples/org.eclipse.datatools.connectivity.sample.cp/src/org/eclipse/datatools/connectivity/sample/cp/ui/actions/RefreshOverrideAction.java
new file mode 100644
index 0000000..b4a913b
--- /dev/null
+++ b/examples/org.eclipse.datatools.connectivity.sample.cp/src/org/eclipse/datatools/connectivity/sample/cp/ui/actions/RefreshOverrideAction.java
@@ -0,0 +1,25 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Sybase, Inc.
+ *
+ * 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: Sybase, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.datatools.connectivity.sample.cp.ui.actions;
+
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.swt.widgets.Shell;
+
+public class RefreshOverrideAction extends Action {
+
+ public void run() {
+ MessageDialog.openInformation(new Shell(),
+ "Override Refresh",
+ "This action has been overridden to pop up this dialog.");
+ }
+
+}
diff --git a/examples/org.eclipse.datatools.connectivity.sample.cp/src/org/eclipse/datatools/connectivity/sample/cp/ui/actions/RefreshOverrideActionProvider.java b/examples/org.eclipse.datatools.connectivity.sample.cp/src/org/eclipse/datatools/connectivity/sample/cp/ui/actions/RefreshOverrideActionProvider.java
new file mode 100644
index 0000000..29151db
--- /dev/null
+++ b/examples/org.eclipse.datatools.connectivity.sample.cp/src/org/eclipse/datatools/connectivity/sample/cp/ui/actions/RefreshOverrideActionProvider.java
@@ -0,0 +1,59 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Sybase, Inc.
+ *
+ * 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: Sybase, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.datatools.connectivity.sample.cp.ui.actions;
+
+import org.eclipse.datatools.connectivity.ui.navigator.actions.RefreshActionProvider;
+import org.eclipse.jface.action.IMenuManager;
+import org.eclipse.ui.IActionBars;
+import org.eclipse.ui.actions.ActionFactory;
+import org.eclipse.ui.navigator.ICommonActionExtensionSite;
+
+public class RefreshOverrideActionProvider extends RefreshActionProvider {
+
+ private RefreshOverrideAction addRefreshAction;
+
+ public RefreshOverrideActionProvider() {
+ super();
+ }
+
+ public void fillContextMenu(IMenuManager manager) {
+ manager.appendToGroup("slot3", this.addRefreshAction);
+ return;
+ }
+
+ public void fillActionBars(IActionBars bars) {
+ bars.setGlobalActionHandler(ActionFactory.REFRESH.getId(),
+ this.addRefreshAction);
+ updateActionBars();
+ return;
+ }
+
+ /**
+ *
+ */
+ private void makeActions() {
+ this.addRefreshAction = new RefreshOverrideAction();
+ this.addRefreshAction.setActionDefinitionId("org.eclipse.ui.file.refresh"); //$NON-NLS-1$
+ this.addRefreshAction.setText("Override Refresh");
+
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.actions.ActionGroup#updateActionBars()
+ */
+ public void updateActionBars() {
+ }
+
+ public void init(ICommonActionExtensionSite config) {
+ super.init(config);
+ makeActions();
+ }
+}
diff --git a/examples/org.eclipse.datatools.connectivity.sample.cp/src/org/eclipse/datatools/connectivity/sample/cp/ui/actions/SampleFileAction.java b/examples/org.eclipse.datatools.connectivity.sample.cp/src/org/eclipse/datatools/connectivity/sample/cp/ui/actions/SampleFileAction.java
new file mode 100644
index 0000000..72f9aea
--- /dev/null
+++ b/examples/org.eclipse.datatools.connectivity.sample.cp/src/org/eclipse/datatools/connectivity/sample/cp/ui/actions/SampleFileAction.java
@@ -0,0 +1,53 @@
+/*******************************************************************************
+ * Copyright (c) 2005 Sybase, Inc.
+ *
+ * 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: Sybase, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.datatools.connectivity.sample.cp.ui.actions;
+
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.ui.IActionDelegate;
+import org.eclipse.ui.IObjectActionDelegate;
+import org.eclipse.ui.IWorkbenchPart;
+
+public class SampleFileAction implements IObjectActionDelegate {
+
+ private IWorkbenchPart mTargetPart;
+
+ /**
+ * Constructor for Action1.
+ */
+ public SampleFileAction() {
+ super();
+ }
+
+ /**
+ * @see IObjectActionDelegate#setActivePart(IAction, IWorkbenchPart)
+ */
+ public void setActivePart(IAction action, IWorkbenchPart targetPart) {
+ mTargetPart = targetPart;
+ }
+
+ /**
+ * @see IActionDelegate#run(IAction)
+ */
+ public void run(IAction action) {
+ MessageDialog.openInformation(mTargetPart.getSite().getShell(),
+ "Connection Profile Sample Plug-in",
+ "Sample Action was executed.");
+ }
+
+ /**
+ * @see IActionDelegate#selectionChanged(IAction, ISelection)
+ */
+ public void selectionChanged(IAction action, ISelection selection) {
+ }
+
+}
diff --git a/examples/org.eclipse.datatools.connectivity.sample.cp/src/org/eclipse/datatools/connectivity/sample/cp/ui/handler/NewCPSampleHandler.java b/examples/org.eclipse.datatools.connectivity.sample.cp/src/org/eclipse/datatools/connectivity/sample/cp/ui/handler/NewCPSampleHandler.java
new file mode 100644
index 0000000..a0802cf
--- /dev/null
+++ b/examples/org.eclipse.datatools.connectivity.sample.cp/src/org/eclipse/datatools/connectivity/sample/cp/ui/handler/NewCPSampleHandler.java
@@ -0,0 +1,24 @@
+package org.eclipse.datatools.connectivity.sample.cp.ui.handler;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.handlers.HandlerUtil;
+
+public class NewCPSampleHandler extends AbstractHandler {
+
+ public NewCPSampleHandler() {
+ super();
+ }
+
+ public Object execute(ExecutionEvent event) throws ExecutionException {
+ Shell shell = HandlerUtil.getActiveShell(event);
+ MessageDialog.openInformation(shell,
+ "Overridden by Sample CP",
+ "New profile handler was overridden by the Sample CP");
+ return null;
+ }
+
+}
diff --git a/examples/org.eclipse.datatools.connectivity.sample.cp/src/org/eclipse/datatools/connectivity/sample/cp/ui/properties/FileProfilePropetyPage.java b/examples/org.eclipse.datatools.connectivity.sample.cp/src/org/eclipse/datatools/connectivity/sample/cp/ui/properties/FileProfilePropetyPage.java
new file mode 100644
index 0000000..d3322e0
--- /dev/null
+++ b/examples/org.eclipse.datatools.connectivity.sample.cp/src/org/eclipse/datatools/connectivity/sample/cp/ui/properties/FileProfilePropetyPage.java
@@ -0,0 +1,121 @@
+/*******************************************************************************
+ * Copyright (c) 2005 Sybase, Inc.
+ *
+ * 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: Sybase, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.datatools.connectivity.sample.cp.ui.properties;
+
+import java.util.Properties;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.datatools.connectivity.IConnectionProfile;
+import org.eclipse.datatools.connectivity.sample.cp.IFileProfileConstants;
+import org.eclipse.datatools.connectivity.ui.wizards.ProfileDetailsPropertyPage;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+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.DirectoryDialog;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Text;
+
+public class FileProfilePropetyPage extends ProfileDetailsPropertyPage {
+
+ private Text mPathText;
+
+ /**
+ * Constructor for FileProfilePropetyPage.
+ */
+ public FileProfilePropetyPage() {
+ super();
+ noDefaultAndApplyButton();
+ }
+
+ protected void createCustomContents(Composite parent) {
+ Composite content = new Composite(parent, SWT.NULL);
+ GridLayout layout = new GridLayout(3, false);
+ content.setLayout(layout);
+
+ Label label;
+
+ label = new Label(content, SWT.NULL);
+ label.setLayoutData(new GridData());
+ label.setText("Directory Path:");
+
+ mPathText = new Text(content, SWT.BORDER);
+ mPathText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+ mPathText.addModifyListener(new ModifyListener() {
+
+ public void modifyText(ModifyEvent e) {
+ handlePathModify();
+ }
+ });
+
+ Button button = new Button(content, SWT.PUSH);
+ button.setText("Browse...");
+ button.setLayoutData(new GridData());
+ button.addSelectionListener(new SelectionAdapter() {
+
+ public void widgetSelected(SelectionEvent e) {
+ handleBrowse();
+ }
+ });
+
+ initControls();
+ }
+
+ public Properties collectProperties() {
+ Properties props = new Properties();
+ props.setProperty(IFileProfileConstants.FILE_PATH, mPathText.getText());
+ return props;
+ }
+
+ private void initControls() {
+ IConnectionProfile profile = getConnectionProfile();
+ Assert.isTrue(profile.getProviderId().equals(
+ IFileProfileConstants.FILE_PROFILE_ID));
+ String path = profile.getBaseProperties().getProperty(
+ IFileProfileConstants.FILE_PATH);
+ if (path != null) {
+ mPathText.setText(path);
+ }
+ validate();
+ setErrorMessage(null);
+ }
+
+ private void handleBrowse() {
+ DirectoryDialog dialog = new DirectoryDialog(getShell());
+ String path = dialog.open();
+ if (path != null) {
+ mPathText.setText(path);
+ }
+ }
+
+ private void handlePathModify() {
+ validate();
+ }
+
+ private void validate() {
+ String errorMessage;
+ String path = mPathText.getText();
+ if (path == null || path.length() == 0) {
+ errorMessage = "Please specify server path.";
+ }
+ else {
+ errorMessage = null;
+ }
+ setErrorMessage(errorMessage);
+ setValid(errorMessage == null);
+ }
+
+}
\ No newline at end of file
diff --git a/examples/org.eclipse.datatools.connectivity.sample.cp/src/org/eclipse/datatools/connectivity/sample/cp/ui/wizards/FileConnectionProfileNewWizard.java b/examples/org.eclipse.datatools.connectivity.sample.cp/src/org/eclipse/datatools/connectivity/sample/cp/ui/wizards/FileConnectionProfileNewWizard.java
new file mode 100644
index 0000000..aacc248
--- /dev/null
+++ b/examples/org.eclipse.datatools.connectivity.sample.cp/src/org/eclipse/datatools/connectivity/sample/cp/ui/wizards/FileConnectionProfileNewWizard.java
@@ -0,0 +1,53 @@
+/*******************************************************************************
+ * Copyright (c) 2005 Sybase, Inc.
+ *
+ * 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: Sybase, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.datatools.connectivity.sample.cp.ui.wizards;
+
+import java.util.Properties;
+
+import org.eclipse.datatools.connectivity.sample.cp.IFileProfileConstants;
+import org.eclipse.datatools.connectivity.sample.cp.IFileProfilePropertyConstants;
+import org.eclipse.datatools.connectivity.ui.wizards.NewConnectionProfileWizard;
+import org.eclipse.jface.wizard.Wizard;
+
+/**
+ * @see Wizard
+ */
+public class FileConnectionProfileNewWizard extends NewConnectionProfileWizard {
+
+ private FilePathPropertyWizardPage mPropPage;
+
+ /**
+ *
+ */
+ public FileConnectionProfileNewWizard() {
+ setWindowTitle("New File Server Connection Profile");
+ setNeedsProgressMonitor(true);
+ mProviderID = IFileProfileConstants.FILE_PROFILE_ID;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.jface.wizard.IWizard#addPages()
+ */
+ public void addCustomPages() {
+ mPropPage = new FilePathPropertyWizardPage("propPage");
+ addPage(mPropPage);
+ }
+
+ public Properties getProfileProperties() {
+ Properties props = new Properties();
+ props.setProperty(IFileProfilePropertyConstants.FILE_PATH, mPropPage
+ .getProperty());
+ return props;
+ }
+
+}
\ No newline at end of file
diff --git a/examples/org.eclipse.datatools.connectivity.sample.cp/src/org/eclipse/datatools/connectivity/sample/cp/ui/wizards/FilePathPropertyWizardPage.java b/examples/org.eclipse.datatools.connectivity.sample.cp/src/org/eclipse/datatools/connectivity/sample/cp/ui/wizards/FilePathPropertyWizardPage.java
new file mode 100644
index 0000000..6a96325
--- /dev/null
+++ b/examples/org.eclipse.datatools.connectivity.sample.cp/src/org/eclipse/datatools/connectivity/sample/cp/ui/wizards/FilePathPropertyWizardPage.java
@@ -0,0 +1,118 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2005, 2008 Sybase, Inc.
+ *
+ * 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: Sybase, Inc. - initial API and implementation
+ * IBM Corporation - defect fix #213266
+ ******************************************************************************/
+package org.eclipse.datatools.connectivity.sample.cp.ui.wizards;
+
+import org.eclipse.datatools.connectivity.ui.wizards.ConnectionProfileDetailsPage;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+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.DirectoryDialog;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Text;
+
+/**
+ * @author rcernich
+ *
+ * Created on Mar 11, 2004
+ */
+public class FilePathPropertyWizardPage extends ConnectionProfileDetailsPage {
+
+ private Text mPathText;
+
+ /**
+ * @param pageName
+ */
+ public FilePathPropertyWizardPage(String pageName) {
+ super(pageName);
+ }
+
+ /**
+ * @param pageName
+ * @param title
+ * @param titleImage
+ */
+ public FilePathPropertyWizardPage(String pageName, String title,
+ ImageDescriptor titleImage) {
+ super(pageName, title, titleImage);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets.Composite)
+ */
+ public void createCustomControl(Composite parent) {
+ Composite content = new Composite(parent, SWT.NULL);
+ GridLayout layout = new GridLayout(3, false);
+ content.setLayout(layout);
+
+ Label label = new Label(content, SWT.NULL);
+ label.setLayoutData(new GridData());
+ label.setText("Directory Path:");
+
+ mPathText = new Text(content, SWT.BORDER);
+ mPathText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+ mPathText.addModifyListener(new ModifyListener() {
+
+ public void modifyText(ModifyEvent e) {
+ handlePathModify();
+ }
+ });
+
+ Button button = new Button(content, SWT.PUSH);
+ button.setText("Browse...");
+ button.setLayoutData(new GridData());
+ button.addSelectionListener(new SelectionAdapter() {
+
+ public void widgetSelected(SelectionEvent e) {
+ handleBrowse();
+ }
+ });
+ }
+
+ public String getProperty() {
+ return mPathText.getText();
+ }
+
+ private void handleBrowse() {
+ DirectoryDialog dialog = new DirectoryDialog(getShell());
+ String path = dialog.open();
+ if (path != null) {
+ mPathText.setText(path);
+ }
+ }
+
+ private void handlePathModify() {
+ validate();
+ }
+
+ private void validate() {
+ String errorMessage;
+ String path = mPathText.getText();
+ if (path == null) {
+ errorMessage = "Please specify server path.";
+ }
+ else {
+ errorMessage = null;
+ }
+ setErrorMessage(errorMessage);
+ setPageComplete(errorMessage == null);
+ }
+
+}
diff --git a/examples/org.eclipse.datatools.connectivity.sample.ftp/.classpath b/examples/org.eclipse.datatools.connectivity.sample.ftp/.classpath
new file mode 100644
index 0000000..065ac06
--- /dev/null
+++ b/examples/org.eclipse.datatools.connectivity.sample.ftp/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/examples/org.eclipse.datatools.connectivity.sample.ftp/.project b/examples/org.eclipse.datatools.connectivity.sample.ftp/.project
new file mode 100644
index 0000000..c470ab6
--- /dev/null
+++ b/examples/org.eclipse.datatools.connectivity.sample.ftp/.project
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.datatools.connectivity.sample.ftp</name>
+ <comment></comment>
+ <projects>
+ <project>com.sybase.suade.common</project>
+ <project>com.sybase.suade.servers.core</project>
+ </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/examples/org.eclipse.datatools.connectivity.sample.ftp/META-INF/MANIFEST.MF b/examples/org.eclipse.datatools.connectivity.sample.ftp/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..ed4ff92
--- /dev/null
+++ b/examples/org.eclipse.datatools.connectivity.sample.ftp/META-INF/MANIFEST.MF
@@ -0,0 +1,21 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %Plugin.name
+Bundle-SymbolicName: org.eclipse.datatools.connectivity.sample.ftp;singleton:=true
+Bundle-Version: 2.0.0
+Bundle-Activator: org.eclipse.datatools.connectivity.sample.ftp.Activator
+Bundle-Vendor: %Plugin.Provider.name
+Bundle-Localization: plugin
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.eclipse.ui.navigator,
+ org.apache.oro;visibility:=reexport,
+ org.apache.commons.net;visibility:=reexport,
+ org.eclipse.datatools.connectivity.ui.dse
+Eclipse-LazyStart: true
+Export-Package: org.eclipse.datatools.connectivity.sample.ftp,
+ org.eclipse.datatools.connectivity.sample.ftp.internal,
+ org.eclipse.datatools.connectivity.sample.ftp.properties,
+ org.eclipse.datatools.connectivity.sample.ftp.wizards
+Bundle-ClassPath: cpftpsample.jar
+Bundle-RequiredExecutionEnvironment: J2SE-1.4
diff --git a/examples/org.eclipse.datatools.connectivity.sample.ftp/about.html b/examples/org.eclipse.datatools.connectivity.sample.ftp/about.html
new file mode 100644
index 0000000..1b7d275
--- /dev/null
+++ b/examples/org.eclipse.datatools.connectivity.sample.ftp/about.html
@@ -0,0 +1,28 @@
+<html>
+<head>
+<title>About This Content</title>
+</head>
+<body>
+<div>
+<h3>About This Content</h3>
+<p>May 2, 2006</p>
+<h3>License</h3>
+<p>The Eclipse Foundation makes available all content in this plug-in
+("Content"). Unless otherwise indicated below, the Content is
+provided to you under the terms and conditions of the Eclipse Public License
+Version 1.0 ("EPL"). A copy of the EPL is available at <a
+href="http://www.eclipse.org/org/documents/epl-v10.php">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, "Program" will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation,
+the Content is being redistributed by another party ("Redistributor")
+and different terms and conditions may apply to your use of any object code in
+the Content. Check the RedistributorÂ’s license that was provided with the
+Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source
+code in the Content and such source code may be obtained at <a
+href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+<p> </p>
+</div>
+</body>
+</html>
diff --git a/examples/org.eclipse.datatools.connectivity.sample.ftp/build.properties b/examples/org.eclipse.datatools.connectivity.sample.ftp/build.properties
new file mode 100644
index 0000000..4090c0f
--- /dev/null
+++ b/examples/org.eclipse.datatools.connectivity.sample.ftp/build.properties
@@ -0,0 +1,10 @@
+bin.includes = plugin.xml,\
+ icons/,\
+ about.html,\
+ plugin.properties,\
+ cpftpsample.jar,\
+ META-INF/
+
+jars.compile.order = cpftpsample.jar
+source.cpftpsample.jar = src/
+output.cpftpsample.jar = bin/
diff --git a/examples/org.eclipse.datatools.connectivity.sample.ftp/icons/file.gif b/examples/org.eclipse.datatools.connectivity.sample.ftp/icons/file.gif
new file mode 100644
index 0000000..6b86d07
--- /dev/null
+++ b/examples/org.eclipse.datatools.connectivity.sample.ftp/icons/file.gif
Binary files differ
diff --git a/examples/org.eclipse.datatools.connectivity.sample.ftp/plugin.properties b/examples/org.eclipse.datatools.connectivity.sample.ftp/plugin.properties
new file mode 100644
index 0000000..128d90d
--- /dev/null
+++ b/examples/org.eclipse.datatools.connectivity.sample.ftp/plugin.properties
@@ -0,0 +1,16 @@
+Plugin.name = Sample FTP Profile Plug-in
+Plugin.Provider.name = Sybase, Inc.
+
+NewWizard.name = Sample FTP Connection Profile
+NewWizard.description = Create a Sample FTP connection profile
+
+PropertyPage.name = Sample FTP Connection Profile
+
+ServerExtension.name = Sample FTP Connection Profile
+ServerExtension.Category.name = FTP
+ServerExtension.ConnectionProfile.name = Sample FTP Connection Profile
+ServerExtension.ConfigurationType.name = Sample FTP Configuration Type
+ServerExtension.PingFactory.name = Sample FTP Ping Connection Factory
+ServerExtension.ConnectionFactory.name = Sample FTP Provider Connection Factory
+
+Navigator.extension.name = FTP Content Extension (Sample)
\ No newline at end of file
diff --git a/examples/org.eclipse.datatools.connectivity.sample.ftp/plugin.xml b/examples/org.eclipse.datatools.connectivity.sample.ftp/plugin.xml
new file mode 100644
index 0000000..5f9fabb
--- /dev/null
+++ b/examples/org.eclipse.datatools.connectivity.sample.ftp/plugin.xml
@@ -0,0 +1,75 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.2"?>
+<plugin>
+ <extension
+ point="org.eclipse.datatools.connectivity.connectionProfile">
+ <category
+ id="org.eclipse.datatools.connectivity.sample.ftp.category"
+ name="FTP"/>
+ <connectionProfile
+ category="org.eclipse.datatools.connectivity.sample.ftp.category"
+ icon="icons/file.gif"
+ id="org.eclipse.datatools.connectivity.sample.ftp.profile"
+ name="%ServerExtension.ConnectionProfile.name"
+ pingFactory="org.eclipse.datatools.connectivity.sample.ftp.internal.FtpConnectionFactory"/>
+ <connectionFactory
+ name="%ServerExtension.ConnectionFactory.name"
+ profile="org.eclipse.datatools.connectivity.sample.ftp.profile"
+ class="org.eclipse.datatools.connectivity.sample.ftp.internal.FtpConnectionFactory"
+ id="org.eclipse.datatools.connectivity.sample.ftp.profile.connectionFactory">
+ </connectionFactory>
+ <newWizard
+ class="org.eclipse.datatools.connectivity.sample.ftp.wizards.FtpConnectionProfileWizard"
+ description="%NewWizard.description"
+ icon="icons/file.gif"
+ id="org.eclipse.datatools.connectivity.sample.ftp.profile.wizards.ftpConnectionProfileWizard"
+ name="%NewWizard.name"
+ profile="org.eclipse.datatools.connectivity.sample.ftp.profile">
+ </newWizard>
+ </extension>
+ <extension
+ point="org.eclipse.ui.navigator.navigatorContent">
+ <navigatorContent
+ contentProvider="org.eclipse.datatools.connectivity.sample.ftp.internal.FTPContentProviderExtension"
+ icon="icons/file.gif"
+ id="org.eclipse.datatools.connectivity.sample.ftp.content"
+ labelProvider="org.eclipse.datatools.connectivity.sample.ftp.internal.FTPLabelProviderExtension"
+ name="%Navigator.extension.name"
+ priority="normal">
+ <enablement>
+ <or>
+ <and>
+ <instanceof value="org.eclipse.datatools.connectivity.IConnectionProfile"/>
+ <test
+ property="org.eclipse.datatools.connectivity.profile.property.id"
+ value="org.eclipse.datatools.connectivity.sample.ftp.profile"/>
+ </and>
+ <instanceof
+ value="org.eclipse.datatools.connectivity.sample.ftp.internal.FTPClientObject">
+ </instanceof>
+ </or>
+ </enablement>
+ </navigatorContent>
+ </extension>
+ <extension
+ point="org.eclipse.ui.navigator.viewer">
+ <viewerContentBinding viewerId="org.eclipse.datatools.connectivity.DataSourceExplorerNavigator">
+ <includes>
+ <contentExtension pattern="org.eclipse.datatools.connectivity.sample.ftp.content"/>
+ </includes>
+ </viewerContentBinding>
+ </extension>
+ <extension
+ point="org.eclipse.ui.propertyPages">
+ <page
+ class="org.eclipse.datatools.connectivity.sample.ftp.properties.FtpProfilePropertyPage"
+ id="org.eclipse.datatools.connectivity.sample.ftp.profile.properties.ftpProfilePropertyPage"
+ name="%PropertyPage.name"
+ objectClass="org.eclipse.datatools.connectivity.IConnectionProfile">
+ <filter
+ name="org.eclipse.datatools.profile.property.id"
+ value="org.eclipse.datatools.connectivity.sample.ftp.profile">
+ </filter>
+ </page>
+ </extension>
+</plugin>
diff --git a/examples/org.eclipse.datatools.connectivity.sample.ftp/readme.txt b/examples/org.eclipse.datatools.connectivity.sample.ftp/readme.txt
new file mode 100644
index 0000000..6cbe1b1
--- /dev/null
+++ b/examples/org.eclipse.datatools.connectivity.sample.ftp/readme.txt
@@ -0,0 +1,22 @@
+FTP Connection Profile Sample
+
+In order to use this sample, you need to grab a couple
+of plug-ins from the latest Orbit bundle.
+
+http://download.eclipse.org/tools/orbit/downloads/
+
+You need to find:
+ org.apache.oro
+ org.apache.commons.net
+
+The sample will not compile or run without them.
+
+This sample focuses mainly on creating a profile,
+providing unique values (like a FTP system name,
+user id, password, etc), and populating the tree
+once the profile is created or edited.
+
+It is VERY basic functionality that could be extended
+easily to handle drag/drop of a file from the FTP site
+into a project or adding the ability to open/edit a file
+on an FTP server, etc.
\ No newline at end of file
diff --git a/examples/org.eclipse.datatools.connectivity.sample.ftp/src/org/eclipse/datatools/connectivity/sample/ftp/Activator.java b/examples/org.eclipse.datatools.connectivity.sample.ftp/src/org/eclipse/datatools/connectivity/sample/ftp/Activator.java
new file mode 100644
index 0000000..9afe142
--- /dev/null
+++ b/examples/org.eclipse.datatools.connectivity.sample.ftp/src/org/eclipse/datatools/connectivity/sample/ftp/Activator.java
@@ -0,0 +1,62 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Sybase, Inc.
+ *
+ * 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: brianf - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.datatools.connectivity.sample.ftp;
+
+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.datatools.connectivity.sample.ftp";
+ // The registered id for the ftp connection profile
+ public final static String PROVIDER_ID = "org.eclipse.datatools.connectivity.sample.ftp.profile"; //$NON-NLS-1$
+
+ // The shared instance
+ private static Activator plugin;
+
+ /**
+ * The constructor
+ */
+ public Activator() {
+ plugin = this;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ */
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ }
+
+ /*
+ * (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/examples/org.eclipse.datatools.connectivity.sample.ftp/src/org/eclipse/datatools/connectivity/sample/ftp/FTPProfileMessages.java b/examples/org.eclipse.datatools.connectivity.sample.ftp/src/org/eclipse/datatools/connectivity/sample/ftp/FTPProfileMessages.java
new file mode 100644
index 0000000..52e6cc9
--- /dev/null
+++ b/examples/org.eclipse.datatools.connectivity.sample.ftp/src/org/eclipse/datatools/connectivity/sample/ftp/FTPProfileMessages.java
@@ -0,0 +1,69 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Sybase, Inc.
+ *
+ * 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: brianf - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.datatools.connectivity.sample.ftp;
+
+import java.text.MessageFormat;
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+
+/**
+ * Utility class which helps managing messages
+ */
+public class FTPProfileMessages {
+ private static final String RESOURCE_BUNDLE= "org.eclipse.datatools.connectivity.sample.ftp.messages";//$NON-NLS-1$
+ private static ResourceBundle bundle = ResourceBundle.getBundle(RESOURCE_BUNDLE);
+
+ private FTPProfileMessages(){
+ // prevent instantiation of class
+ }
+ /**
+ * Returns the formatted message for the given key in
+ * the resource bundle.
+ *
+ * @param key the resource name
+ * @param args the message arguments
+ * @return the string
+ */
+ public static String format(String key, Object[] args) {
+ return MessageFormat.format(getString(key),args);
+ }
+ /**
+ * Returns the resource object with the given key in
+ * the resource bundle. If there isn't any value under
+ * the given key, the key is returned.
+ *
+ * @param key the resource name
+ * @return the string
+ */
+ public static String getString(String key) {
+ try {
+ return bundle.getString(key);
+ } catch (MissingResourceException e) {
+ return key;
+ }
+ }
+ /**
+ * Returns the resource object with the given key in
+ * the resource bundle. If there isn't any value under
+ * the given key, the default value is returned.
+ *
+ * @param key the resource name
+ * @param def the default value
+ * @return the string
+ */
+ public static String getString(String key, String def) {
+ try {
+ return bundle.getString(key);
+ } catch (MissingResourceException e) {
+ return def;
+ }
+ }
+}
diff --git a/examples/org.eclipse.datatools.connectivity.sample.ftp/src/org/eclipse/datatools/connectivity/sample/ftp/FtpProfilePlugin.java b/examples/org.eclipse.datatools.connectivity.sample.ftp/src/org/eclipse/datatools/connectivity/sample/ftp/FtpProfilePlugin.java
new file mode 100644
index 0000000..55ac67f
--- /dev/null
+++ b/examples/org.eclipse.datatools.connectivity.sample.ftp/src/org/eclipse/datatools/connectivity/sample/ftp/FtpProfilePlugin.java
@@ -0,0 +1,52 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Sybase, Inc.
+ *
+ * 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: brianf - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.datatools.connectivity.sample.ftp;
+
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+
+/**
+ * The main plugin class to be used in the desktop.
+ */
+public class FtpProfilePlugin extends AbstractUIPlugin {
+ // The shared instance.
+ private static FtpProfilePlugin plugin;
+
+ // The registered id for the ftp connection profile
+ public final static String PROVIDER_ID = "org.eclipse.datatools.connectivity.sample.ftp"; //$NON-NLS-1$
+
+ /**
+ * The constructor.
+ */
+ public FtpProfilePlugin() {
+ super();
+ plugin = this;
+ }
+
+ /**
+ * Returns the shared instance.
+ */
+ public static FtpProfilePlugin getDefault() {
+ return plugin;
+ }
+
+ /**
+ * @return
+ * @throws MissingResourceException
+ */
+ public ResourceBundle loadResourceBundle() throws MissingResourceException {
+ return ResourceBundle
+ .getBundle("org.eclipse.datatools.connectivity.sample.ftp.messages"); //$NON-NLS-1$
+ }
+
+}
\ No newline at end of file
diff --git a/examples/org.eclipse.datatools.connectivity.sample.ftp/src/org/eclipse/datatools/connectivity/sample/ftp/IFtpProfileConstants.java b/examples/org.eclipse.datatools.connectivity.sample.ftp/src/org/eclipse/datatools/connectivity/sample/ftp/IFtpProfileConstants.java
new file mode 100644
index 0000000..251217d
--- /dev/null
+++ b/examples/org.eclipse.datatools.connectivity.sample.ftp/src/org/eclipse/datatools/connectivity/sample/ftp/IFtpProfileConstants.java
@@ -0,0 +1,44 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Sybase, Inc.
+ *
+ * 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: brianf & mdow - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.datatools.connectivity.sample.ftp;
+
+/**
+ * This class exposes the property names for FTP connection profiles.
+ *
+ * @author mdow and brianf
+ */
+public interface IFtpProfileConstants {
+
+ // Property name for the base path of the file
+ public static final String BASE_PATH = "basePath"; //$NON-NLS-1$
+
+ // Property name for the name of the file
+ public static final String FILE_NAME = "name"; //$NON-NLS-1$
+
+ // Property name for the message delimiter within the file
+ public static final String MESSAGE_DELIMITER = "delimiter"; //$NON-NLS-1$
+
+ // The id of the file connection factory
+ public static final String FTP_FACTORY_ID = "org.eclipse.datatools.connectivity.sample.ftp.profile.connectionFactory"; //$NON-NLS-1$
+
+ // the name of the FTP server
+ public static final String FTP_SERVER = "serverName"; //$NON-NLS-1$
+ public static final String FTP_PORT = "port"; //$NON-NLS-1$
+
+ // the user name and password for the FTP server
+ public static final String FTP_UID = "userId"; //$NON-NLS-1$
+ public static final String FTP_PWD = "password"; //$NON-NLS-1$
+
+ public static final String FTP_PROVIDER_ID = "org.eclipse.datatools.connectivity.sample.ftp.profile"; //$NON-NLS-1$
+
+ // Phantom property for directory
+ public static final String FTP_PHANTOM_PROPERTY_IS_DIRECTORY = "org.eclipse.datatools.connectivity.ftp.isdirectory";
+}
\ No newline at end of file
diff --git a/examples/org.eclipse.datatools.connectivity.sample.ftp/src/org/eclipse/datatools/connectivity/sample/ftp/internal/FTPClientObject.java b/examples/org.eclipse.datatools.connectivity.sample.ftp/src/org/eclipse/datatools/connectivity/sample/ftp/internal/FTPClientObject.java
new file mode 100644
index 0000000..bada265
--- /dev/null
+++ b/examples/org.eclipse.datatools.connectivity.sample.ftp/src/org/eclipse/datatools/connectivity/sample/ftp/internal/FTPClientObject.java
@@ -0,0 +1,45 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Sybase, Inc.
+ *
+ * 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: brianf & mdow - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.datatools.connectivity.sample.ftp.internal;
+
+import org.apache.commons.net.ftp.FTPClient;
+
+import org.eclipse.datatools.connectivity.IConnectionProfile;
+
+/**
+ * Wrapper class for FTPClient
+ */
+public class FTPClientObject {
+ private IConnectionProfile profile;
+ private FTPClient ftpClient;
+
+ /**
+ * @param profile
+ * @param ftpClient
+ */
+ public FTPClientObject(IConnectionProfile profile, FTPClient ftpClient) {
+ super();
+ this.profile = profile;
+ this.ftpClient = ftpClient;
+ }
+ /**
+ * @return Returns the ftpClient.
+ */
+ public FTPClient getFtpClient() {
+ return ftpClient;
+ }
+ /**
+ * @return Returns the profile.
+ */
+ public IConnectionProfile getProfile() {
+ return profile;
+ }
+}
diff --git a/examples/org.eclipse.datatools.connectivity.sample.ftp/src/org/eclipse/datatools/connectivity/sample/ftp/internal/FTPContentExtension.java b/examples/org.eclipse.datatools.connectivity.sample.ftp/src/org/eclipse/datatools/connectivity/sample/ftp/internal/FTPContentExtension.java
new file mode 100644
index 0000000..5b51a30
--- /dev/null
+++ b/examples/org.eclipse.datatools.connectivity.sample.ftp/src/org/eclipse/datatools/connectivity/sample/ftp/internal/FTPContentExtension.java
@@ -0,0 +1,43 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Sybase, Inc.
+ *
+ * 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: brianf & shongxum - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.datatools.connectivity.sample.ftp.internal;
+
+import org.eclipse.datatools.connectivity.IConnectionProfile;
+import org.eclipse.datatools.connectivity.sample.ftp.IFtpProfileConstants;
+import org.eclipse.datatools.connectivity.ui.IContentExtension;
+import org.eclipse.datatools.connectivity.ui.ManagedContentExtensionBase;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.ui.ISharedImages;
+import org.eclipse.ui.internal.WorkbenchPlugin;
+
+/**
+ * @see IContentExtension
+ */
+public class FTPContentExtension extends ManagedContentExtensionBase {
+
+ public FTPContentExtension(IConnectionProfile profile) {
+ super(profile, IFtpProfileConstants.FTP_FACTORY_ID);
+ }
+
+ public Image getImage() {
+ return WorkbenchPlugin.getDefault().getSharedImages().getImage(
+ ISharedImages.IMG_OBJ_FILE);
+ }
+
+ public String getLabel() {
+ return "FTP Content (Sample Extension)";
+ }
+
+ public boolean isVisible() {
+ return true;
+ }
+
+}
diff --git a/examples/org.eclipse.datatools.connectivity.sample.ftp/src/org/eclipse/datatools/connectivity/sample/ftp/internal/FTPContentProviderExtension.java b/examples/org.eclipse.datatools.connectivity.sample.ftp/src/org/eclipse/datatools/connectivity/sample/ftp/internal/FTPContentProviderExtension.java
new file mode 100644
index 0000000..c63dc5b
--- /dev/null
+++ b/examples/org.eclipse.datatools.connectivity.sample.ftp/src/org/eclipse/datatools/connectivity/sample/ftp/internal/FTPContentProviderExtension.java
@@ -0,0 +1,33 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Sybase, Inc.
+ *
+ * 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: brianf & mdow - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.datatools.connectivity.sample.ftp.internal;
+
+import org.eclipse.datatools.connectivity.IConnectionProfile;
+import org.eclipse.datatools.connectivity.ui.CommonContentProviderBase;
+import org.eclipse.datatools.connectivity.ui.IContentExtension;
+
+/**
+ * This class implements the navigatorContent extension and supplies workspace
+ * resources.
+ *
+ */
+public class FTPContentProviderExtension extends
+ CommonContentProviderBase {
+
+ public FTPContentProviderExtension() {
+ super(new FtpContentProvider());
+ }
+
+ protected IContentExtension createContentExtension(
+ IConnectionProfile profile) {
+ return new FTPContentExtension(profile);
+ }
+}
\ No newline at end of file
diff --git a/examples/org.eclipse.datatools.connectivity.sample.ftp/src/org/eclipse/datatools/connectivity/sample/ftp/internal/FTPFileObject.java b/examples/org.eclipse.datatools.connectivity.sample.ftp/src/org/eclipse/datatools/connectivity/sample/ftp/internal/FTPFileObject.java
new file mode 100644
index 0000000..cdb665b
--- /dev/null
+++ b/examples/org.eclipse.datatools.connectivity.sample.ftp/src/org/eclipse/datatools/connectivity/sample/ftp/internal/FTPFileObject.java
@@ -0,0 +1,112 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Sybase, Inc.
+ *
+ * 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: brianf & mdow - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.datatools.connectivity.sample.ftp.internal;
+
+import org.apache.commons.net.ftp.FTPFile;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.ui.IActionFilter;
+import org.eclipse.datatools.connectivity.IConnectionProfile;
+import org.eclipse.datatools.connectivity.sample.ftp.IFtpProfileConstants;
+
+
+/**
+ * Wrapper class for FTPFile which stores the connection
+ * profile
+ */
+public class FTPFileObject implements IAdaptable {
+ private Object parent;
+
+ private FTPFile file;
+
+ private IConnectionProfile profile;
+
+ public FTPFileObject(Object parent, IConnectionProfile profile, FTPFile file) {
+ this.parent = parent;
+ this.profile = profile;
+ this.file = file;
+ }
+
+ /**
+ * @return Returns the parent.
+ */
+ public Object getParent() {
+ return parent;
+ }
+
+ /**
+ * @return Returns the file.
+ */
+ public FTPFile getFTPFile() {
+ return file;
+ }
+
+ public String getName() {
+ StringBuffer sb = new StringBuffer();
+ FTPFileObject parent = this;
+ while(parent != null) {
+ sb.insert(0, "/" + parent.getFTPFile().getName());
+ if (parent.getParent() instanceof FTPFileObject) {
+ parent = (FTPFileObject) parent.getParent();
+ } else {
+ parent = null;
+ }
+ }
+ while (sb.charAt(0) == '/') {
+ sb.deleteCharAt(0);
+ }
+ return sb.toString();
+ }
+
+ /**
+ * @return Returns the profile.
+ */
+ public IConnectionProfile getProfile() {
+ return profile;
+ }
+
+ /**
+ * Utility method
+ */
+ public static FTPFileObject[] convert(Object parent,
+ IConnectionProfile profile, FTPFile[] files) {
+ if (files == null) return new FTPFileObject[0];
+ FTPFileObject[] fileobjs = new FTPFileObject[files.length];
+ for (int i = 0; i < files.length; i++) {
+ fileobjs[i] = new FTPFileObject(parent, profile, files[i]);
+ }
+ return fileobjs;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
+ */
+ public Object getAdapter(Class adapter) {
+ if (adapter == IActionFilter.class)
+ return new IActionFilter() {
+ public boolean testAttribute(Object target, String name,
+ String value) {
+ if (target == null || !(target instanceof FTPFileObject))
+ return false;
+ FTPFileObject fo = (FTPFileObject) target;
+ if (name
+ .equals(IFtpProfileConstants.FTP_PHANTOM_PROPERTY_IS_DIRECTORY)
+ && fo.getFTPFile().isDirectory())
+ return true;
+ else
+ return false;
+ }
+ };
+ else
+ return null;
+ }
+}
\ No newline at end of file
diff --git a/examples/org.eclipse.datatools.connectivity.sample.ftp/src/org/eclipse/datatools/connectivity/sample/ftp/internal/FTPLabelProviderExtension.java b/examples/org.eclipse.datatools.connectivity.sample.ftp/src/org/eclipse/datatools/connectivity/sample/ftp/internal/FTPLabelProviderExtension.java
new file mode 100644
index 0000000..1631e85
--- /dev/null
+++ b/examples/org.eclipse.datatools.connectivity.sample.ftp/src/org/eclipse/datatools/connectivity/sample/ftp/internal/FTPLabelProviderExtension.java
@@ -0,0 +1,21 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Sybase, Inc.
+ *
+ * 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: brianf & mdow - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.datatools.connectivity.sample.ftp.internal;
+
+import org.eclipse.datatools.connectivity.ui.CommonLabelProviderBase;
+
+public class FTPLabelProviderExtension extends CommonLabelProviderBase {
+
+ public FTPLabelProviderExtension() {
+ super(new FtpLabelProvider());
+ }
+
+}
diff --git a/examples/org.eclipse.datatools.connectivity.sample.ftp/src/org/eclipse/datatools/connectivity/sample/ftp/internal/FtpConnection.java b/examples/org.eclipse.datatools.connectivity.sample.ftp/src/org/eclipse/datatools/connectivity/sample/ftp/internal/FtpConnection.java
new file mode 100644
index 0000000..9f54bbc
--- /dev/null
+++ b/examples/org.eclipse.datatools.connectivity.sample.ftp/src/org/eclipse/datatools/connectivity/sample/ftp/internal/FtpConnection.java
@@ -0,0 +1,153 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Sybase, Inc.
+ *
+ * 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: brianf & mdow - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.datatools.connectivity.sample.ftp.internal;
+
+import java.io.IOException;
+import java.util.Properties;
+
+import org.apache.commons.net.ftp.FTPClient;
+import org.apache.commons.net.ftp.FTPReply;
+
+import org.eclipse.datatools.connectivity.IConnection;
+import org.eclipse.datatools.connectivity.IConnectionProfile;
+import org.eclipse.datatools.connectivity.IServerVersionProvider;
+import org.eclipse.datatools.connectivity.Version;
+import org.eclipse.datatools.connectivity.sample.ftp.FTPProfileMessages;
+import org.eclipse.datatools.connectivity.sample.ftp.IFtpProfileConstants;
+
+/**
+ * @author mdow
+ */
+public class FtpConnection implements IConnection, IServerVersionProvider {
+
+ private static int counter = 0;
+
+ private Throwable mException;
+
+ private FTPClient mFtpClient;
+
+ private FTPClientObject mFtpClientObject;
+
+ private IConnectionProfile mProfile;
+
+ /**
+ * Constructor
+ * @param profile
+ */
+ public FtpConnection(IConnectionProfile profile) {
+ this.mProfile = profile;
+ Properties props = profile.getBaseProperties();
+
+ String server = props.getProperty(IFtpProfileConstants.FTP_SERVER);
+ String port = props.getProperty(IFtpProfileConstants.FTP_PORT);
+ String user = props.getProperty(IFtpProfileConstants.FTP_UID);
+ String pass = props.getProperty(IFtpProfileConstants.FTP_PWD);
+
+ try {
+ int reply;
+ this.mFtpClient = new FTPClient();
+ this.mFtpClientObject = new FTPClientObject(profile,
+ this.mFtpClient);
+ if (port != null && port.length() != 0)
+ this.mFtpClient.setDefaultPort(new Integer(port).intValue());
+ this.mFtpClient.setDefaultTimeout(2 * 60 * 1000);
+ this.mFtpClient.setDataTimeout(2 * 60 * 1000);
+ this.mFtpClient.connect(server);
+ if (!this.mFtpClient.login(user, pass)) {
+ throw new Exception(mFtpClient.getReplyString());
+ }
+ reply = this.mFtpClient.getReplyCode();
+ if (!FTPReply.isPositiveCompletion(reply)) {
+ this.mFtpClient.disconnect();
+ throw new Exception(FTPProfileMessages
+ .getString("FtpConnection.errormessage")); //$NON-NLS-1$
+ }
+ } catch (Exception e) {
+ this.mException = e;
+ return;
+ }
+ this.mFtpClient.enterLocalPassiveMode();
+ FtpConnection.counter++;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.datatools.connectivity.IConnection#getRawConnection()
+ */
+ public Object getRawConnection() {
+ return this.mFtpClientObject;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.datatools.connectivity.IConnection#close()
+ */
+ public void close() {
+ if (this.mFtpClient != null) {
+ if (this.mFtpClient.isConnected()) {
+ try {
+ this.mFtpClient.disconnect();
+ FtpConnection.counter--;
+ } catch (IOException e) {
+ // Guess we can't disconnect.
+ e.printStackTrace();
+ }
+ }
+ this.mFtpClient = null;
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.datatools.connectivity.IConnection#getConnectException()
+ */
+ public Throwable getConnectException() {
+ return this.mException;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.datatools.connectivity.IConnection#getConnectionProfile()
+ */
+ public IConnectionProfile getConnectionProfile() {
+ return this.mProfile;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.datatools.connectivity.IServerVersionProvider#getProviderName()
+ */
+ public String getProviderName() {
+ try {
+ if (mFtpClient != null && mFtpClient.isConnected())
+ return mFtpClient.getSystemName();
+ } catch (IOException e) {
+ // do nothing
+ }
+ return "Not Available";
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.datatools.connectivity.IServerVersionProvider#getProviderVersion()
+ */
+ public Version getProviderVersion() {
+ return new Version(0,0,0,"0");
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.datatools.connectivity.IServerVersionProvider#getTechnologyName()
+ */
+ public String getTechnologyName() {
+ return "FTP";
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.datatools.connectivity.IServerVersionProvider#getTechnologyVersion()
+ */
+ public Version getTechnologyVersion() {
+ return new Version(0,0,0,"0");
+ }
+}
\ No newline at end of file
diff --git a/examples/org.eclipse.datatools.connectivity.sample.ftp/src/org/eclipse/datatools/connectivity/sample/ftp/internal/FtpConnectionFactory.java b/examples/org.eclipse.datatools.connectivity.sample.ftp/src/org/eclipse/datatools/connectivity/sample/ftp/internal/FtpConnectionFactory.java
new file mode 100644
index 0000000..9808508
--- /dev/null
+++ b/examples/org.eclipse.datatools.connectivity.sample.ftp/src/org/eclipse/datatools/connectivity/sample/ftp/internal/FtpConnectionFactory.java
@@ -0,0 +1,51 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Sybase, Inc.
+ *
+ * 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: mdow - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.datatools.connectivity.sample.ftp.internal;
+
+import org.eclipse.datatools.connectivity.IConnection;
+import org.eclipse.datatools.connectivity.IConnectionFactory;
+import org.eclipse.datatools.connectivity.IConnectionProfile;
+
+/**
+ * @author mdow
+ */
+public class FtpConnectionFactory implements IConnectionFactory {
+
+ /*
+ * Constructor
+ */
+ public FtpConnectionFactory() {
+ super();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.datatools.connectivity.IConnectionFactory#createConnection(org.eclipse.datatools.connectivity.IConnectionProfile)
+ */
+ public IConnection createConnection(IConnectionProfile profile) {
+ FtpConnection connect = new FtpConnection(profile);
+// if (connect.getConnectException() != null) {
+// return null;
+// }
+ return connect;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.datatools.connectivity.IConnectionFactory#createConnection(org.eclipse.datatools.connectivity.IConnectionProfile, java.lang.String, java.lang.String)
+ */
+ public IConnection createConnection(IConnectionProfile profile, String uid,
+ String pwd) {
+ FtpConnection connect = new FtpConnection(profile);
+ if (connect.getConnectException() != null) {
+ return null;
+ }
+ return connect;
+ }
+}
diff --git a/examples/org.eclipse.datatools.connectivity.sample.ftp/src/org/eclipse/datatools/connectivity/sample/ftp/internal/FtpContentProvider.java b/examples/org.eclipse.datatools.connectivity.sample.ftp/src/org/eclipse/datatools/connectivity/sample/ftp/internal/FtpContentProvider.java
new file mode 100644
index 0000000..1b13fe4
--- /dev/null
+++ b/examples/org.eclipse.datatools.connectivity.sample.ftp/src/org/eclipse/datatools/connectivity/sample/ftp/internal/FtpContentProvider.java
@@ -0,0 +1,177 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Sybase, Inc.
+ *
+ * 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: brianf & mdow - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.datatools.connectivity.sample.ftp.internal;
+
+import org.apache.commons.net.ftp.FTPClient;
+import org.apache.commons.net.ftp.FTPFile;
+import org.apache.commons.net.ftp.FTPListParseEngine;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.jface.viewers.ITreeContentProvider;
+import org.eclipse.jface.viewers.Viewer;
+
+/**
+ * @author mdow and brianf
+ */
+public class FtpContentProvider implements ITreeContentProvider,
+ IAdaptable {
+
+ /**
+ * Constructor
+ */
+ public FtpContentProvider() {
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.jface.viewers.ITreeContentProvider#getChildren(java.lang.Object)
+ */
+ public Object[] getChildren(Object parent) {
+ try {
+ if (parent instanceof FTPClientObject) {
+ FTPClient ftpClient = ((FTPClientObject) parent).getFtpClient();
+ if (ftpClient.isConnected()) {
+ FTPListParseEngine engine = ftpClient.initiateListParsing();
+ FTPFile[] files = engine.getFiles();
+ return FTPFileObject.convert(parent, ((FTPClientObject) parent).getProfile(), files);
+ }
+ } else if (parent instanceof FTPFileObject) {
+ FTPFile ftpFile = ((FTPFileObject) parent).getFTPFile();
+ FTPClient ftpClient = getFTPClient(parent);
+ if (ftpFile.isDirectory() && ftpClient.isConnected()) {
+ FTPListParseEngine engine = ftpClient
+ .initiateListParsing(getDirectory((FTPFileObject) parent));
+ FTPFile[] files = engine.getFiles();
+ return FTPFileObject.convert(parent, ((FTPFileObject) parent).getProfile(), files);
+ }
+ }
+ } catch (Exception e) {
+ e.printStackTrace();
+ FTPClient ftpClient = getFTPClient(parent);
+ try {
+ if (ftpClient != null)
+ ftpClient.disconnect();
+ } catch (Exception ex) {
+ }
+ }
+ return new Object[0];
+ }
+
+ private String getDirectory(FTPFileObject file) {
+ StringBuffer sb = new StringBuffer();
+ FTPFileObject fileobj = file;
+ Object obj;
+ FTPFile ftpFile;
+ while (fileobj != null) {
+ ftpFile = fileobj.getFTPFile();
+ sb.insert(0, ftpFile.getName());
+ sb.insert(0, "/");
+ obj = getParent(fileobj);
+ if (obj instanceof FTPFileObject) {
+ fileobj = (FTPFileObject) obj;
+ } else {
+ fileobj = null;
+ }
+ }
+ return sb.toString();
+ }
+
+ private FTPClient getFTPClient(Object element) {
+ Object obj = element;
+ while (obj != null && !(obj instanceof FTPClientObject)) {
+ obj = ((FTPFileObject) obj).getParent();
+ }
+ if (obj != null)
+ return ((FTPClientObject) obj).getFtpClient();
+ else
+ return null;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.jface.viewers.ITreeContentProvider#getParent(java.lang.Object)
+ */
+ public Object getParent(Object element) {
+ Object parent = null;
+ if (element instanceof FTPFileObject) {
+ parent = ((FTPFileObject) element).getParent();
+ }
+ return parent;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.jface.viewers.ITreeContentProvider#hasChildren(java.lang.Object)
+ */
+ public boolean hasChildren(Object element) {
+ if (element instanceof FTPClientObject) {
+ return true;
+ } else if (element instanceof FTPFileObject) {
+ FTPFile ftpFile = ((FTPFileObject) element).getFTPFile();
+ if (ftpFile.isDirectory()) {
+ return true;
+ } else {
+ return false;
+ }
+ } else {
+ return false;
+ }
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.jface.viewers.IStructuredContentProvider#getElements(java.lang.Object)
+ */
+ public Object[] getElements(Object inputElement) {
+ return getChildren(inputElement);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.jface.viewers.IContentProvider#dispose()
+ */
+ public void dispose() {
+ // Release any listeners. Other cleanup.
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.jface.viewers.IContentProvider#inputChanged(org.eclipse.jface.viewers.Viewer,
+ * java.lang.Object, java.lang.Object)
+ */
+ public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
+ // Register listeners on newInput, remove listeners on oldInput, other
+ // initialization.
+ }
+
+ /**
+ * @param oldInput
+ * @param newInput
+ */
+ public void init(Object oldInput, Object newInput) {
+ // Auto-generated method stub
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
+ */
+ public Object getAdapter(Class adapter) {
+ return Platform.getAdapterManager().getAdapter(this, adapter);
+ }
+}
\ No newline at end of file
diff --git a/examples/org.eclipse.datatools.connectivity.sample.ftp/src/org/eclipse/datatools/connectivity/sample/ftp/internal/FtpLabelProvider.java b/examples/org.eclipse.datatools.connectivity.sample.ftp/src/org/eclipse/datatools/connectivity/sample/ftp/internal/FtpLabelProvider.java
new file mode 100644
index 0000000..034d817
--- /dev/null
+++ b/examples/org.eclipse.datatools.connectivity.sample.ftp/src/org/eclipse/datatools/connectivity/sample/ftp/internal/FtpLabelProvider.java
@@ -0,0 +1,68 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Sybase, Inc.
+ *
+ * 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: brianf & mdow - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.datatools.connectivity.sample.ftp.internal;
+
+import org.apache.commons.net.ftp.FTPFile;
+import org.eclipse.datatools.connectivity.ui.navigator.ConnectionProfileLabelProvider;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.ui.ISharedImages;
+import org.eclipse.ui.internal.WorkbenchPlugin;
+
+/**
+ * @author mdow and brianf
+ */
+public class FtpLabelProvider extends ConnectionProfileLabelProvider {
+
+ /**
+ * Constructor
+ */
+ public FtpLabelProvider() {
+ super();
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.jface.viewers.ILabelProvider#getImage(java.lang.Object)
+ */
+ public Image getImage(Object element) {
+ Image image;
+ if (element instanceof FTPFileObject) {
+ FTPFile file = ((FTPFileObject) element).getFTPFile();
+ if (file.isDirectory()) {
+ image = WorkbenchPlugin.getDefault().getSharedImages()
+ .getImage(ISharedImages.IMG_OBJ_FOLDER);
+ } else {
+ image = WorkbenchPlugin.getDefault().getSharedImages()
+ .getImage(ISharedImages.IMG_OBJ_FILE);
+ }
+ } else {
+ image = super.getImage(element);
+ }
+ return image;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.jface.viewers.ILabelProvider#getText(java.lang.Object)
+ */
+ public String getText(Object element) {
+ String text;
+ if (element instanceof FTPFileObject) {
+ FTPFile file = ((FTPFileObject) element).getFTPFile();
+ text = file.getName();
+ } else {
+ text = super.getText(element);
+ }
+ return text;
+ }
+}
diff --git a/examples/org.eclipse.datatools.connectivity.sample.ftp/src/org/eclipse/datatools/connectivity/sample/ftp/messages.properties b/examples/org.eclipse.datatools.connectivity.sample.ftp/src/org/eclipse/datatools/connectivity/sample/ftp/messages.properties
new file mode 100644
index 0000000..9df72de
--- /dev/null
+++ b/examples/org.eclipse.datatools.connectivity.sample.ftp/src/org/eclipse/datatools/connectivity/sample/ftp/messages.properties
@@ -0,0 +1,30 @@
+#*******************************************************************************
+#* Copyright (c) 2008 Sybase, Inc.
+#*
+#* 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: brianf & mdow - initial API and implementation
+ ******************************************************************************/
+wizardpage.title = FTP Transport Location
+wizardpage.text = Specify the FTP server name, user name, and password.
+wizardpage.label.servername = Server Name:
+wizardpage.label.username = User Name:
+wizardpage.label.password = Password:
+wizardpage.summary.label.servername = Server Name
+wizardpage.summary.label.username = User Name
+wizardpage.summary.label.password = Password
+
+wizard.title = New FTP Connection Profile
+wizard.error.title = Error
+
+propertypage.label.servername = Server Name:
+propertypage.label.username = User Name:
+propertypage.label.password = Password:
+
+ce.node.label = Server Content
+
+FtpWSMFConnection.connectmessage = Connected to
+FtpWSMFConnection.errormessage = FTP server refused connection.
\ No newline at end of file
diff --git a/examples/org.eclipse.datatools.connectivity.sample.ftp/src/org/eclipse/datatools/connectivity/sample/ftp/properties/FtpProfilePropertyPage.java b/examples/org.eclipse.datatools.connectivity.sample.ftp/src/org/eclipse/datatools/connectivity/sample/ftp/properties/FtpProfilePropertyPage.java
new file mode 100644
index 0000000..f2f691f
--- /dev/null
+++ b/examples/org.eclipse.datatools.connectivity.sample.ftp/src/org/eclipse/datatools/connectivity/sample/ftp/properties/FtpProfilePropertyPage.java
@@ -0,0 +1,182 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Sybase, Inc.
+ *
+ * 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: brianf & mdow - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.datatools.connectivity.sample.ftp.properties;
+
+import java.util.Properties;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Text;
+
+import org.eclipse.datatools.connectivity.IConnectionProfile;
+import org.eclipse.datatools.connectivity.sample.ftp.FTPProfileMessages;
+import org.eclipse.datatools.connectivity.sample.ftp.IFtpProfileConstants;
+import org.eclipse.datatools.connectivity.ui.wizards.ProfileDetailsPropertyPage;
+
+
+/**
+ * FTP Profile properties
+ * @author brianf
+ */
+public class FtpProfilePropertyPage extends ProfileDetailsPropertyPage {
+
+ // ui pieces
+ private Text mServerText;
+ private Text mUIDText;
+ private Text mPWDText;
+
+ /**
+ * Constructor for FtpProfilePropertyPage.
+ */
+ public FtpProfilePropertyPage() {
+ super();
+ noDefaultAndApplyButton();
+ }
+
+ /**
+ * Return the name of the FTP Server
+ * @return
+ */
+ public String getServerName() {
+ return this.mServerText.getText();
+ }
+
+ /**
+ * Set the name of the FTP Server
+ * @param server
+ */
+ public void setServerName(String server) {
+ this.mServerText.setText(server);
+ }
+
+ /**
+ * Return the user name for the FTP Server
+ * @return
+ */
+ public String getUserName() {
+ return this.mUIDText.getText();
+ }
+
+ /**
+ * Set the user name for the FTP Server
+ * @param user
+ */
+ public void setUserName(String user) {
+ this.mUIDText.setText(user);
+ }
+
+ /**
+ * Return the password for the FTP Server
+ * @return
+ */
+ public String getPassword() {
+ return this.mPWDText.getText();
+ }
+
+ /**
+ * Set the password for the FTP Server
+ * @param pwd
+ */
+ public void setPassword(String pwd) {
+ this.mPWDText.setText(pwd);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.preference.IPreferencePage#performOk()
+ */
+ public boolean performOk() {
+ IConnectionProfile profile = getConnectionProfile();
+ Properties props = new Properties();
+ props.setProperty(IFtpProfileConstants.FTP_SERVER, getServerName());
+ props.setProperty(IFtpProfileConstants.FTP_UID, getUserName());
+ props.setProperty(IFtpProfileConstants.FTP_PWD, getPassword());
+ profile.setBaseProperties(props);
+ return true;
+ }
+
+ /**
+ * Initialize the controls from the profile
+ */
+ private void initControls() {
+ IConnectionProfile profile = getConnectionProfile();
+ String server = profile.getBaseProperties().getProperty(IFtpProfileConstants.FTP_SERVER);
+ if (server != null) {
+ setServerName(server);
+ }
+ String uid = profile.getBaseProperties().getProperty(IFtpProfileConstants.FTP_UID);
+ if (uid != null) {
+ setUserName(uid);
+ }
+ String pwd = profile.getBaseProperties().getProperty(IFtpProfileConstants.FTP_PWD);
+ if (pwd != null) {
+ setPassword(pwd);
+ }
+ setErrorMessage(null);
+ }
+
+ protected Properties collectProperties() {
+ Properties props = new Properties();
+ props.setProperty(IFtpProfileConstants.FTP_SERVER, getServerName());
+ props.setProperty(IFtpProfileConstants.FTP_UID, getUserName());
+ props.setProperty(IFtpProfileConstants.FTP_PWD, getPassword());
+ return props;
+ }
+
+ protected void createCustomContents(Composite parent) {
+ Composite content = new Composite(parent, SWT.NULL);
+ GridLayout layout = new GridLayout(2, false);
+ content.setLayout(layout);
+
+ Label label = new Label(content, SWT.NULL);
+ label.setLayoutData(new GridData());
+ label.setText(FTPProfileMessages.getString("propertypage.label.servername")); //$NON-NLS-1$
+
+ this.mServerText = new Text(content, SWT.BORDER);
+ this.mServerText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+ this.mServerText.addModifyListener(new ModifyListener() {
+ public void modifyText(ModifyEvent e) {
+ // empty
+ }
+ });
+
+ label = new Label(content, SWT.NULL);
+ label.setLayoutData(new GridData());
+ label.setText(FTPProfileMessages.getString("propertypage.label.username")); //$NON-NLS-1$
+
+ this.mUIDText = new Text(content, SWT.BORDER);
+ this.mUIDText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+ this.mUIDText.addModifyListener(new ModifyListener() {
+ public void modifyText(ModifyEvent e) {
+ // empty
+ }
+ });
+
+ label = new Label(content, SWT.NULL);
+ label.setLayoutData(new GridData());
+ label.setText(FTPProfileMessages.getString("propertypage.label.password")); //$NON-NLS-1$
+
+ this.mPWDText = new Text(content, SWT.BORDER);
+ this.mPWDText.setEchoChar('*');
+ this.mPWDText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+ this.mPWDText.addModifyListener(new ModifyListener() {
+ public void modifyText(ModifyEvent e) {
+ // empty
+ }
+ });
+
+ initControls();
+ }
+}
\ No newline at end of file
diff --git a/examples/org.eclipse.datatools.connectivity.sample.ftp/src/org/eclipse/datatools/connectivity/sample/ftp/wizards/FtpConnectionProfileWizard.java b/examples/org.eclipse.datatools.connectivity.sample.ftp/src/org/eclipse/datatools/connectivity/sample/ftp/wizards/FtpConnectionProfileWizard.java
new file mode 100644
index 0000000..1fe4c8c
--- /dev/null
+++ b/examples/org.eclipse.datatools.connectivity.sample.ftp/src/org/eclipse/datatools/connectivity/sample/ftp/wizards/FtpConnectionProfileWizard.java
@@ -0,0 +1,118 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Sybase, Inc.
+ *
+ * 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: brianf & mdow - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.datatools.connectivity.sample.ftp.wizards;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Properties;
+
+import org.eclipse.datatools.connectivity.internal.ui.wizards.ISummaryDataSource;
+import org.eclipse.datatools.connectivity.internal.ui.wizards.SummaryWizardPage;
+import org.eclipse.datatools.connectivity.sample.ftp.FTPProfileMessages;
+import org.eclipse.datatools.connectivity.sample.ftp.IFtpProfileConstants;
+import org.eclipse.datatools.connectivity.ui.wizards.NewConnectionProfileWizard;
+import org.eclipse.jface.wizard.Wizard;
+
+
+/**
+ * This class is the wizard for creating new ftp connection profiles.
+ *
+ * @author mdow
+ * @see Wizard
+ */
+public class FtpConnectionProfileWizard extends NewConnectionProfileWizard {
+
+ // The file property page
+ private FtpPropertyWizardPage mPropPage;
+
+ // The summary page
+ private SummaryWizardPage mSummaryPage;
+
+ private Wizard mParentWizard;
+
+ private boolean showProjectPage = true;
+
+ /**
+ * Default constructor
+ */
+ public FtpConnectionProfileWizard() {
+ super();
+ setWindowTitle(FTPProfileMessages.getString("wizard.title")); //$NON-NLS-1$
+// setDefaultPageImageDescriptor(FtpProfilePlugin.getDefault().getImageDescriptor("syb_banner.gif")); //$NON-NLS-1$
+ }
+
+ public void setShowProjectPage ( boolean flag ) {
+ this.showProjectPage = flag;
+ }
+
+ public boolean getShowProjectPage() {
+ return this.showProjectPage;
+ }
+
+ /**
+ * @see Wizard#performFinish
+ */
+ public boolean performFinish() {
+
+ boolean flag = super.performFinish();
+
+ if (!flag) return flag;
+
+ return flag;
+ }
+
+ /**
+ * @param parent
+ */
+ public void setParentWizard(Wizard parent) {
+ this.mParentWizard = parent;
+ }
+
+ /**
+ * @return
+ */
+ public Wizard getParentWizard() {
+ return this.mParentWizard;
+ }
+
+ public List getSummaryData() {
+ List data = new ArrayList();
+ if (this.mParentWizard != null && this.mParentWizard instanceof ISummaryDataSource) {
+ ISummaryDataSource wiz = (ISummaryDataSource) this.mParentWizard;
+ data.addAll(wiz.getSummaryData());
+ }
+ data.addAll(super.getSummaryData());
+ return data;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.datatools.connectivity.ui.wizards.NewConnectionProfileWizard#addCustomPages()
+ */
+ public void addCustomPages() {
+ this.mPropPage = new FtpPropertyWizardPage("PropertyPage"); //$NON-NLS-1$
+ addPage(this.mPropPage);
+
+ this.mSummaryPage = new SummaryWizardPage(this);
+ addPage(this.mSummaryPage);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.datatools.connectivity.ui.wizards.NewConnectionProfileWizard#getProfileProperties()
+ */
+ public Properties getProfileProperties() {
+ Properties props = new Properties();
+ props.setProperty(IFtpProfileConstants.FTP_SERVER, this.mPropPage.getServerName());
+ props.setProperty(IFtpProfileConstants.FTP_UID, this.mPropPage.getUserName());
+ props.setProperty(IFtpProfileConstants.FTP_PWD, this.mPropPage.getPassword());
+
+ return props;
+ }
+}
\ No newline at end of file
diff --git a/examples/org.eclipse.datatools.connectivity.sample.ftp/src/org/eclipse/datatools/connectivity/sample/ftp/wizards/FtpPropertyWizardPage.java b/examples/org.eclipse.datatools.connectivity.sample.ftp/src/org/eclipse/datatools/connectivity/sample/ftp/wizards/FtpPropertyWizardPage.java
new file mode 100644
index 0000000..06a98f9
--- /dev/null
+++ b/examples/org.eclipse.datatools.connectivity.sample.ftp/src/org/eclipse/datatools/connectivity/sample/ftp/wizards/FtpPropertyWizardPage.java
@@ -0,0 +1,181 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Sybase, Inc.
+ *
+ * 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: brianf & mdow - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.datatools.connectivity.sample.ftp.wizards;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.datatools.connectivity.sample.ftp.FTPProfileMessages;
+import org.eclipse.datatools.connectivity.ui.wizards.ConnectionProfileDetailsPage;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Text;
+
+
+/**
+ * FTP Profile Property wizard page
+ * @author mdow & brianf
+ */
+public class FtpPropertyWizardPage extends ConnectionProfileDetailsPage {
+
+ // various UI components
+ private Text mServerText;
+ private Text mUIDText;
+ private Text mPWDText;
+
+ /**
+ * Constructor
+ * @param pageName
+ */
+ public FtpPropertyWizardPage(String pageName) {
+ super(pageName);
+ setTitle(FTPProfileMessages.getString("wizardpage.title")); //$NON-NLS-1$
+ setDescription(FTPProfileMessages.getString("wizardpage.text")); //$NON-NLS-1$
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.datatools.connectivity.ui.wizards.ConnectionProfileDetailsPage#createCustomControl(org.eclipse.swt.widgets.Composite)
+ */
+ public void createCustomControl(Composite parent) {
+ Composite content = new Composite(parent, SWT.NULL);
+ GridLayout layout = new GridLayout(2, false);
+ content.setLayout(layout);
+
+ Label label = new Label(content, SWT.NULL);
+ label.setLayoutData(new GridData());
+ label.setText(FTPProfileMessages.getString("wizardpage.label.servername")); //$NON-NLS-1$
+
+ this.mServerText = new Text(content, SWT.BORDER);
+ this.mServerText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+ this.mServerText.addModifyListener(new ModifyListener() {
+ public void modifyText(ModifyEvent e) {
+ validate();
+ }
+ });
+
+ label = new Label(content, SWT.NULL);
+ label.setLayoutData(new GridData());
+ label.setText(FTPProfileMessages.getString("wizardpage.label.username")); //$NON-NLS-1$
+
+ this.mUIDText = new Text(content, SWT.BORDER);
+ this.mUIDText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+ this.mUIDText.addModifyListener(new ModifyListener() {
+ public void modifyText(ModifyEvent e) {
+ validate();
+ }
+ });
+
+ label = new Label(content, SWT.NULL);
+ label.setLayoutData(new GridData());
+ label.setText(FTPProfileMessages.getString("wizardpage.label.password")); //$NON-NLS-1$
+
+ this.mPWDText = new Text(content, SWT.BORDER);
+ this.mPWDText.setEchoChar('*');
+ this.mPWDText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+ this.mPWDText.addModifyListener(new ModifyListener() {
+ public void modifyText(ModifyEvent e) {
+ validate();
+ }
+ });
+
+// setControl(content);
+ setPageComplete(false);
+ }
+
+ /**
+ * Return the name of the FTP Server
+ * @return
+ */
+ public String getServerName() {
+ return this.mServerText.getText();
+ }
+
+ /**
+ * Set the name of the FTP Server
+ * @param server
+ */
+ public void setServerName(String server) {
+ this.mServerText.setText(server);
+ }
+
+ /**
+ * Return the user name for the FTP Server
+ * @return
+ */
+ public String getUserName() {
+ return this.mUIDText.getText();
+ }
+
+ /**
+ * Set the user name for the FTP Server
+ * @param user
+ */
+ public void setUserName(String user) {
+ this.mUIDText.setText(user);
+ }
+
+ /**
+ * Return the password for the FTP Server
+ * @return
+ */
+ public String getPassword() {
+ return this.mPWDText.getText();
+ }
+
+ /**
+ * Set the password for the FTP Server
+ * @param pwd
+ */
+ public void setPassword(String pwd) {
+ this.mPWDText.setText(pwd);
+ }
+
+ /**
+ * Validate the profile
+ */
+ private void validate() {
+ String server = getServerName();
+ String uid = getUserName();
+ String pwd = getPassword();
+
+ if (server != null && uid != null && pwd != null) {
+ setPageComplete(true);
+ }
+ else {
+ setPageComplete(false);
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.datatools.connectivity.internal.ui.wizards.BaseWizardPage#getSummaryData()
+ */
+ public List getSummaryData() {
+ List data = new ArrayList();
+ data.add(new String[] {FTPProfileMessages.getString("wizardpage.summary.label.servername"), //$NON-NLS-1$
+ this.getServerName()});
+ data.add(new String[] {FTPProfileMessages.getString("wizardpage.summary.label.username"), //$NON-NLS-1$
+ this.getUserName()});
+ String pwd = this.getPassword();
+ String mask = ""; //$NON-NLS-1$
+ for (int i = 0; i < pwd.length(); i++) {
+ mask = mask + "*"; //$NON-NLS-1$
+ }
+ data.add(new String[] {FTPProfileMessages.getString("wizardpage.summary.label.password"), //$NON-NLS-1$
+ mask});
+ return data;
+ }
+
+}
diff --git a/examples/org.eclipse.datatools.connectivity.sample/.classpath b/examples/org.eclipse.datatools.connectivity.sample/.classpath
new file mode 100644
index 0000000..751c8f2
--- /dev/null
+++ b/examples/org.eclipse.datatools.connectivity.sample/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/examples/org.eclipse.datatools.connectivity.sample/.gitignore b/examples/org.eclipse.datatools.connectivity.sample/.gitignore
new file mode 100644
index 0000000..ba077a4
--- /dev/null
+++ b/examples/org.eclipse.datatools.connectivity.sample/.gitignore
@@ -0,0 +1 @@
+bin
diff --git a/examples/org.eclipse.datatools.connectivity.sample/.project b/examples/org.eclipse.datatools.connectivity.sample/.project
new file mode 100644
index 0000000..c4936d2
--- /dev/null
+++ b/examples/org.eclipse.datatools.connectivity.sample/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.datatools.connectivity.sample</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/examples/org.eclipse.datatools.connectivity.sample/.settings/org.eclipse.jdt.core.prefs b/examples/org.eclipse.datatools.connectivity.sample/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..15288e5
--- /dev/null
+++ b/examples/org.eclipse.datatools.connectivity.sample/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,12 @@
+#Thu Sep 20 15:32:39 PDT 2007
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.4
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.4
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
+org.eclipse.jdt.core.compiler.source=1.4
diff --git a/examples/org.eclipse.datatools.connectivity.sample/META-INF/MANIFEST.MF b/examples/org.eclipse.datatools.connectivity.sample/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..62bdf99
--- /dev/null
+++ b/examples/org.eclipse.datatools.connectivity.sample/META-INF/MANIFEST.MF
@@ -0,0 +1,12 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Sample Plug-in
+Bundle-SymbolicName: org.eclipse.datatools.connectivity.sample; singleton:=true
+Bundle-Version: 1.0.0
+Bundle-Activator: org.eclipse.datatools.connectivity.sample.Activator
+Bundle-Vendor: Eclipse.org
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.eclipse.core.resources,
+ org.eclipse.datatools.connectivity.ui.dse
+Eclipse-LazyStart: true
diff --git a/examples/org.eclipse.datatools.connectivity.sample/build.properties b/examples/org.eclipse.datatools.connectivity.sample/build.properties
new file mode 100644
index 0000000..2b0d95b
--- /dev/null
+++ b/examples/org.eclipse.datatools.connectivity.sample/build.properties
@@ -0,0 +1,5 @@
+source.. = src/
+output.. = bin/
+bin.includes = plugin.xml,\
+ META-INF/,\
+ .
diff --git a/examples/org.eclipse.datatools.connectivity.sample/plugin.xml b/examples/org.eclipse.datatools.connectivity.sample/plugin.xml
new file mode 100644
index 0000000..4cf1e3b
--- /dev/null
+++ b/examples/org.eclipse.datatools.connectivity.sample/plugin.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.2"?>
+<plugin>
+
+ <extension
+ point="org.eclipse.ui.popupMenus">
+ <objectContribution
+ objectClass="org.eclipse.core.resources.IFile"
+ id="org.eclipse.datatools.connectivity.sample.contribution1">
+ <menu
+ label="Connectivity Sample"
+ path="additions"
+ id="org.eclipse.datatools.connectivity.sample.menu1">
+ <separator
+ name="group1">
+ </separator>
+ </menu>
+ <action
+ label="Launch Sample"
+ class="org.eclipse.datatools.connectivity.sample.popup.actions.LaunchSample"
+ menubarPath="org.eclipse.datatools.connectivity.sample.menu1/group1"
+ enablesFor="*"
+ id="org.eclipse.datatools.connectivity.sample.LaunchSample">
+ </action>
+ <action
+ label="Create Connection"
+ class="org.eclipse.datatools.connectivity.sample.popup.actions.CreateConnection"
+ menubarPath="org.eclipse.datatools.connectivity.sample.menu1/group1"
+ enablesFor="*"
+ id="org.eclipse.datatools.connectivity.sample.CreateConnection">
+ </action>
+ </objectContribution>
+ </extension>
+
+</plugin>
diff --git a/examples/org.eclipse.datatools.connectivity.sample/src/org/eclipse/datatools/connectivity/sample/Activator.java b/examples/org.eclipse.datatools.connectivity.sample/src/org/eclipse/datatools/connectivity/sample/Activator.java
new file mode 100644
index 0000000..762f029
--- /dev/null
+++ b/examples/org.eclipse.datatools.connectivity.sample/src/org/eclipse/datatools/connectivity/sample/Activator.java
@@ -0,0 +1,71 @@
+/*******************************************************************************
+ * Copyright (c) 2007 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
+ *******************************************************************************/
+package org.eclipse.datatools.connectivity.sample;
+
+import org.eclipse.jface.resource.ImageDescriptor;
+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.datatools.connectivity.sample";
+
+ // 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;
+ }
+
+ /**
+ * Returns an image descriptor for the image file at the given
+ * plug-in relative path
+ *
+ * @param path the path
+ * @return the image descriptor
+ */
+ public static ImageDescriptor getImageDescriptor(String path) {
+ return imageDescriptorFromPlugin(PLUGIN_ID, path);
+ }
+}
diff --git a/examples/org.eclipse.datatools.connectivity.sample/src/org/eclipse/datatools/connectivity/sample/popup/actions/CreateConnection.java b/examples/org.eclipse.datatools.connectivity.sample/src/org/eclipse/datatools/connectivity/sample/popup/actions/CreateConnection.java
new file mode 100644
index 0000000..c2e1b76
--- /dev/null
+++ b/examples/org.eclipse.datatools.connectivity.sample/src/org/eclipse/datatools/connectivity/sample/popup/actions/CreateConnection.java
@@ -0,0 +1,104 @@
+/*******************************************************************************
+ * Copyright (c) 2007 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
+ *******************************************************************************/
+package org.eclipse.datatools.connectivity.sample.popup.actions;
+
+import java.io.File;
+import java.util.Properties;
+
+import org.eclipse.datatools.connectivity.ConnectionProfileConstants;
+import org.eclipse.datatools.connectivity.ConnectionProfileException;
+import org.eclipse.datatools.connectivity.ProfileManager;
+import org.eclipse.datatools.connectivity.drivers.DriverInstance;
+import org.eclipse.datatools.connectivity.drivers.DriverManager;
+import org.eclipse.datatools.connectivity.drivers.jdbc.IJDBCDriverDefinitionConstants;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.ui.IObjectActionDelegate;
+import org.eclipse.ui.IWorkbenchPart;
+
+public class CreateConnection implements IObjectActionDelegate {
+
+ public CreateConnection() {
+ super();
+ }
+
+ public void setActivePart(IAction action, IWorkbenchPart targetPart) {
+ }
+
+ public void run(IAction action) {
+ // Create new driver instance
+ String jarlist = System.getProperty("user.home") + File.separator
+ + "derby.jar";
+ String uniqueDriverInstanceName = generateUniqueDriverDefinitionName();
+ DriverInstance driverInstance = DriverManager
+ .getInstance()
+ .createNewDriverInstance(
+ "org.eclipse.datatools.connectivity.db.derby101.genericDriverTemplate",
+ uniqueDriverInstanceName, jarlist);
+
+ // Create new connection profile using the new driver instance
+ String uniqueConnectionProfileName = generateUniqueConnectionProfileName();
+
+ Properties connectionProfileProperties = driverInstance
+ .getPropertySet().getBaseProperties();
+ String databaseName = "SAMPLE";
+ connectionProfileProperties.setProperty(
+ ConnectionProfileConstants.PROP_DRIVER_DEFINITION_ID,
+ driverInstance.getId());
+ connectionProfileProperties.setProperty(
+ IJDBCDriverDefinitionConstants.DATABASE_NAME_PROP_ID, databaseName);
+ connectionProfileProperties.setProperty(
+ IJDBCDriverDefinitionConstants.USERNAME_PROP_ID, "");
+ connectionProfileProperties.setProperty(
+ IJDBCDriverDefinitionConstants.PASSWORD_PROP_ID, "");
+ String databaseLocation = System.getProperty("user.home")
+ + File.separator + "DerbyDB" + File.separator;
+ connectionProfileProperties.setProperty(
+ IJDBCDriverDefinitionConstants.URL_PROP_ID, "jdbc:derby:"
+ + databaseLocation + databaseName + ";create=true");
+ try {
+ ProfileManager
+ .getInstance()
+ .createProfile(
+ uniqueConnectionProfileName,
+ "",
+ "org.eclipse.datatools.connectivity.db.derby.embedded.connectionProfile",
+ connectionProfileProperties, "", false);
+ } catch (ConnectionProfileException e) {
+ e.printStackTrace();
+ }
+ }
+
+ private String generateUniqueDriverDefinitionName() {
+ String baseDriverInstanceName = "SampleDriver";
+ int index = 1;
+ String testName = baseDriverInstanceName + String.valueOf(index);
+ while (DriverManager.getInstance().getDriverInstanceByName(testName) != null) {
+ index++;
+ testName = baseDriverInstanceName + String.valueOf(index);
+ }
+ return testName;
+ }
+
+ private String generateUniqueConnectionProfileName() {
+ String baseConnectionProfileName = "SampleConnection";
+ int index = 1;
+ String testName = baseConnectionProfileName + String.valueOf(index);
+ while (ProfileManager.getInstance().getProfileByName(testName) != null) {
+ index++;
+ testName = baseConnectionProfileName + String.valueOf(index);
+ }
+ return testName;
+ }
+
+ public void selectionChanged(IAction action, ISelection selection) {
+ }
+}
diff --git a/examples/org.eclipse.datatools.connectivity.sample/src/org/eclipse/datatools/connectivity/sample/popup/actions/LaunchSample.java b/examples/org.eclipse.datatools.connectivity.sample/src/org/eclipse/datatools/connectivity/sample/popup/actions/LaunchSample.java
new file mode 100644
index 0000000..d17fc86
--- /dev/null
+++ b/examples/org.eclipse.datatools.connectivity.sample/src/org/eclipse/datatools/connectivity/sample/popup/actions/LaunchSample.java
@@ -0,0 +1,59 @@
+/*******************************************************************************
+ * Copyright (c) 2007 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
+ *******************************************************************************/
+package org.eclipse.datatools.connectivity.sample.popup.actions;
+
+import org.eclipse.datatools.connectivity.sample.wizards.SampleConnectionWizard;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.wizard.WizardDialog;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.IActionDelegate;
+import org.eclipse.ui.IObjectActionDelegate;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.PlatformUI;
+
+public class LaunchSample implements IObjectActionDelegate {
+
+ /**
+ * Constructor for Action1.
+ */
+ public LaunchSample() {
+ super();
+ }
+
+ /**
+ * @see IObjectActionDelegate#setActivePart(IAction, IWorkbenchPart)
+ */
+ public void setActivePart(IAction action, IWorkbenchPart targetPart) {
+ }
+
+ /**
+ * @see IActionDelegate#run(IAction)
+ */
+ public void run(IAction action) {
+ SampleConnectionWizard wizard = new SampleConnectionWizard();
+ wizard.setNeedsProgressMonitor(true);
+
+ WizardDialog dialog = new WizardDialog(Display.getCurrent()
+ .getActiveShell(), wizard);
+ dialog.setMinimumPageSize(300, 350);
+ dialog.create();
+ dialog.open();
+ }
+
+ /**
+ * @see IActionDelegate#selectionChanged(IAction, ISelection)
+ */
+ public void selectionChanged(IAction action, ISelection selection) {
+ }
+
+}
diff --git a/examples/org.eclipse.datatools.connectivity.sample/src/org/eclipse/datatools/connectivity/sample/wizards/SampleConnectionWizard.java b/examples/org.eclipse.datatools.connectivity.sample/src/org/eclipse/datatools/connectivity/sample/wizards/SampleConnectionWizard.java
new file mode 100644
index 0000000..10a2f76
--- /dev/null
+++ b/examples/org.eclipse.datatools.connectivity.sample/src/org/eclipse/datatools/connectivity/sample/wizards/SampleConnectionWizard.java
@@ -0,0 +1,168 @@
+/*******************************************************************************
+ * Copyright (c) 2007 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
+ *******************************************************************************/
+package org.eclipse.datatools.connectivity.sample.wizards;
+
+import java.sql.Connection;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.datatools.connectivity.IConnectionProfile;
+import org.eclipse.datatools.connectivity.IManagedConnection;
+import org.eclipse.datatools.connectivity.internal.ConnectionProfileProvider;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.preference.PreferenceDialog;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.ISelectionProvider;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.jface.window.SameShellProvider;
+import org.eclipse.jface.wizard.Wizard;
+import org.eclipse.ui.dialogs.PropertyDialogAction;
+import org.eclipse.ui.preferences.IWorkbenchPreferenceContainer;
+
+public class SampleConnectionWizard extends Wizard {
+
+ private SelectExistingConnectionWizardPage myExistingConnectionPage;
+
+ private static final String EXISTING_CONNECTION_PAGE_NAME = "org.eclipse.datatools.connectivity.sample.SelectExistingConnectionWizardPage";
+
+ private static final String WIZARD_TITLE = "Connectivity Sample Wizard";
+
+ public SampleConnectionWizard() {
+ super();
+ setWindowTitle(WIZARD_TITLE);
+ }
+
+ public boolean performFinish() {
+ IConnectionProfile connectionProfile = myExistingConnectionPage
+ .getSelectedConnection();
+ if (connectionProfile != null) {
+ Connection connection = getActiveConnection(connectionProfile);
+ try {
+ if (connection != null && !connection.isClosed()) {
+ new DisplayMessage(WIZARD_TITLE, connectionProfile
+ .getName()
+ + " : Keywords : "
+ + connection.getMetaData().getSQLKeywords()).run();
+ } else {
+ return false;
+ }
+ } catch (Exception e) {
+ e.printStackTrace();
+ return false;
+ }
+ }
+ return true;
+ }
+
+ private Connection getActiveConnection(IConnectionProfile connectionProfile) {
+ Connection activeConnection = null;
+ IManagedConnection connection = null;
+ IStatus connectionStatus = null;
+
+ if (connectionProfile.getConnectionState() == IConnectionProfile.CONNECTED_STATE) {
+ activeConnection = (Connection) connectionProfile.getManagedConnection("java.sql.Connection").getConnection().getRawConnection();
+ } else {
+ connectionStatus = connectionProfile.connectWithoutJob();
+ if (connectionProfile.getConnectionState() == IConnectionProfile.CONNECTED_STATE) {
+ return (Connection) connectionProfile.getManagedConnection("java.sql.Connection").getConnection().getRawConnection();
+ }
+ while (connectionProfile.getConnectionState() != IConnectionProfile.CONNECTED_STATE) {
+ // display error message
+ new DisplayMessage(WIZARD_TITLE, connectionStatus
+ .getChildren()[0].getException().getLocalizedMessage()).run();
+
+ // Prompt to fix properties
+ PropertyDialogAction propertyDialogAction = new PropertyDialogAction(
+ new SameShellProvider(this.getShell()),
+ new SampleWizardSelectionProvider(connectionProfile));
+
+ StructuredSelection selection = new StructuredSelection(
+ connectionProfile);
+ propertyDialogAction.selectionChanged(selection);
+ if (propertyDialogAction.isApplicableForSelection()) {
+ PreferenceDialog dialog = propertyDialogAction
+ .createDialog();
+ String initialPage = ((ConnectionProfileProvider) connectionProfile
+ .getProvider()).getPropertiesPersistenceHook()
+ .getConnectionPropertiesPageID();
+ if (initialPage != null) {
+ ((IWorkbenchPreferenceContainer) dialog).openPage(
+ initialPage, null);
+ }
+ if (dialog.open() == Dialog.CANCEL) {
+ return activeConnection;
+ }
+ }
+ connectionStatus = connectionProfile.connectWithoutJob();
+ connection = connectionProfile.getManagedConnection("java.sql.Connection");
+ }
+ activeConnection = (Connection) connection.getConnection().getRawConnection();
+ }
+
+ return activeConnection;
+ }
+
+ private class SampleWizardSelectionProvider implements ISelectionProvider {
+
+ private IStructuredSelection selection;
+
+ public SampleWizardSelectionProvider(
+ IConnectionProfile connectionProfile) {
+ selection = new StructuredSelection(connectionProfile);
+ }
+
+ public void addSelectionChangedListener(
+ ISelectionChangedListener listener) {
+ }
+
+ public ISelection getSelection() {
+ return selection;
+ }
+
+ public void removeSelectionChangedListener(
+ ISelectionChangedListener listener) {
+ }
+
+ public void setSelection(ISelection selection) {
+ }
+ }
+
+ public void addPages() {
+ super.addPages();
+
+ myExistingConnectionPage = new SelectExistingConnectionWizardPage(
+ EXISTING_CONNECTION_PAGE_NAME);
+ addPage(myExistingConnectionPage);
+ }
+
+ public boolean canFinish() {
+ boolean canFinish = false;
+ if (myExistingConnectionPage.getSelectedConnection() != null) {
+ canFinish = true;
+ }
+ return canFinish;
+ }
+
+ public class DisplayMessage implements Runnable {
+ String title, message;
+
+ public DisplayMessage(String title, String message) {
+ this.title = title;
+ this.message = message;
+ }
+
+ public void run() {
+ MessageDialog.openInformation(getShell(), title, message);
+ }
+ }
+}
diff --git a/examples/org.eclipse.datatools.connectivity.sample/src/org/eclipse/datatools/connectivity/sample/wizards/SelectExistingConnectionProfileDialogPage.java b/examples/org.eclipse.datatools.connectivity.sample/src/org/eclipse/datatools/connectivity/sample/wizards/SelectExistingConnectionProfileDialogPage.java
new file mode 100644
index 0000000..ea6af70
--- /dev/null
+++ b/examples/org.eclipse.datatools.connectivity.sample/src/org/eclipse/datatools/connectivity/sample/wizards/SelectExistingConnectionProfileDialogPage.java
@@ -0,0 +1,112 @@
+/*******************************************************************************
+ * Copyright (c) 2007 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
+ *******************************************************************************/
+package org.eclipse.datatools.connectivity.sample.wizards;
+
+import java.util.Arrays;
+import java.util.Map;
+import java.util.Properties;
+import java.util.Vector;
+
+import org.eclipse.datatools.connectivity.ConnectionProfileConstants;
+import org.eclipse.datatools.connectivity.IConnectionProfile;
+import org.eclipse.datatools.connectivity.ProfileManager;
+import org.eclipse.datatools.connectivity.drivers.DriverInstance;
+import org.eclipse.datatools.connectivity.drivers.DriverManager;
+import org.eclipse.datatools.connectivity.drivers.jdbc.IJDBCDriverDefinitionConstants;
+import org.eclipse.datatools.connectivity.ui.dse.dialogs.ConnectionDisplayProperty;
+import org.eclipse.datatools.connectivity.ui.dse.dialogs.ExistingConnectionProfilesDialogPage;
+import org.eclipse.swt.widgets.Event;
+
+public class SelectExistingConnectionProfileDialogPage extends
+ ExistingConnectionProfilesDialogPage {
+ private SelectExistingConnectionWizardPage page;
+
+ public SelectExistingConnectionProfileDialogPage(SelectExistingConnectionWizardPage page, boolean isShowProperties, boolean isPropertiesSectionExpanded){
+ super(isShowProperties, isPropertiesSectionExpanded);
+ this.page = page;
+ }
+
+ protected ConnectionDisplayProperty[] updateConnectionDisplayProperties(
+ IConnectionProfile connectionProfile,
+ ConnectionDisplayProperty[] defaultDisplayProperties) {
+ ConnectionDisplayProperty[] properties = null;
+ Vector propertiesCollection = new Vector();
+ propertiesCollection.addAll(Arrays.asList(defaultDisplayProperties));
+
+ Properties baseProperties = connectionProfile.getBaseProperties();
+
+ propertiesCollection
+ .add(new ConnectionDisplayProperty(
+ "Database",
+ (String) baseProperties
+ .get(IJDBCDriverDefinitionConstants.DATABASE_NAME_PROP_ID)));
+ propertiesCollection
+ .add(new ConnectionDisplayProperty(
+ "JDBC Driver Class",
+ (String) baseProperties
+ .get(IJDBCDriverDefinitionConstants.DRIVER_CLASS_PROP_ID)));
+ propertiesCollection.add(new ConnectionDisplayProperty(
+ "Class Location", getJarList(connectionProfile)));
+ propertiesCollection.add(new ConnectionDisplayProperty(
+ "Connection URL", (String) baseProperties
+ .get(IJDBCDriverDefinitionConstants.URL_PROP_ID)));
+ propertiesCollection.add(new ConnectionDisplayProperty("User ID",
+ (String) baseProperties
+ .get(IJDBCDriverDefinitionConstants.USERNAME_PROP_ID)));
+ properties = new ConnectionDisplayProperty[propertiesCollection.size()];
+ propertiesCollection.toArray(properties);
+
+ return properties;
+ }
+
+ protected IConnectionProfile[] getConnectionsToDisplay() {
+ Vector filteredProfilesCollection = new Vector();
+ IConnectionProfile[] filteredProfiles = new IConnectionProfile[] {};
+ IConnectionProfile[] allProfiles = ProfileManager.getInstance()
+ .getProfiles(false);
+ final int infoLength = allProfiles.length;
+ if (infoLength > 0) {
+ for (int index = 0; index < infoLength; index++) {
+ Map factories = allProfiles[index]
+ .getProvider().getConnectionFactories();
+ if ((factories != null)
+ && (factories.containsKey("java.sql.Connection"))) {
+ filteredProfilesCollection.add(allProfiles[index]);
+ }
+ filteredProfiles = new IConnectionProfile[filteredProfilesCollection
+ .size()];
+ filteredProfilesCollection.copyInto(filteredProfiles);
+ }
+ }
+ return filteredProfiles;
+ }
+
+ private String getJarList(IConnectionProfile connectionProfile) {
+ String jarList = "";
+ DriverInstance driverInstance = null;
+ String driverID = connectionProfile.getBaseProperties().getProperty(
+ ConnectionProfileConstants.PROP_DRIVER_DEFINITION_ID);
+ if (driverID != null) {
+ driverInstance = DriverManager.getInstance().getDriverInstanceByID(
+ driverID);
+ if (driverInstance != null) {
+ jarList = driverInstance.getJarList();
+ }
+ }
+ return jarList;
+ }
+
+ public void handleEvent(Event event) {
+ super.handleEvent(event);
+ page.handleEvent(event);
+ }
+
+}
diff --git a/examples/org.eclipse.datatools.connectivity.sample/src/org/eclipse/datatools/connectivity/sample/wizards/SelectExistingConnectionWizardPage.java b/examples/org.eclipse.datatools.connectivity.sample/src/org/eclipse/datatools/connectivity/sample/wizards/SelectExistingConnectionWizardPage.java
new file mode 100644
index 0000000..c122932
--- /dev/null
+++ b/examples/org.eclipse.datatools.connectivity.sample/src/org/eclipse/datatools/connectivity/sample/wizards/SelectExistingConnectionWizardPage.java
@@ -0,0 +1,61 @@
+/*******************************************************************************
+ * Copyright (c) 2007 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
+ *******************************************************************************/
+package org.eclipse.datatools.connectivity.sample.wizards;
+
+import org.eclipse.datatools.connectivity.IConnectionProfile;
+import org.eclipse.jface.wizard.WizardPage;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Event;
+
+public class SelectExistingConnectionWizardPage extends WizardPage {
+
+ SelectExistingConnectionProfileDialogPage dialogPage;
+
+ protected SelectExistingConnectionWizardPage(String pageName) {
+ super(pageName);
+ }
+
+ public void createControl(Composite parent) {
+ setTitle("Sample Page"); //$NON-NLS-1$
+ setMessage("Select a connection. This sample wizard will only display JDBC connections \nto demonstrate the filter capabilities of the dialog page.");
+
+ Composite container = new Composite(parent, SWT.NULL);
+ GridLayout gridLayout = new GridLayout();
+ gridLayout.horizontalSpacing = 0;
+ gridLayout.marginWidth = 0;
+ gridLayout.marginHeight = 0;
+ container.setLayout(gridLayout);
+
+ GridData gridData = new GridData(GridData.FILL_BOTH);
+ gridData.grabExcessHorizontalSpace = true;
+ gridData.grabExcessVerticalSpace = true;
+ container.setLayoutData(gridData);
+
+ dialogPage = new SelectExistingConnectionProfileDialogPage (this, true, true);
+ dialogPage.createControl(container);
+ setControl(container);
+ }
+
+ public void handleEvent(Event event) {
+ this.getContainer().updateButtons();
+ }
+
+ public IConnectionProfile getSelectedConnection(){
+ IConnectionProfile connection =null;
+ if(dialogPage != null){
+ connection = dialogPage.getSelectedConnection();
+ }
+ return connection;
+ }
+}
diff --git a/examples/org.eclipse.datatools.enablement.rcp/.classpath b/examples/org.eclipse.datatools.enablement.rcp/.classpath
new file mode 100644
index 0000000..2d1a430
--- /dev/null
+++ b/examples/org.eclipse.datatools.enablement.rcp/.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/examples/org.eclipse.datatools.enablement.rcp/.project b/examples/org.eclipse.datatools.enablement.rcp/.project
new file mode 100644
index 0000000..29ae241
--- /dev/null
+++ b/examples/org.eclipse.datatools.enablement.rcp/.project
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.datatools.enablement.rcp</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/examples/org.eclipse.datatools.enablement.rcp/.settings/org.eclipse.jdt.core.prefs b/examples/org.eclipse.datatools.enablement.rcp/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..52122d7
--- /dev/null
+++ b/examples/org.eclipse.datatools.enablement.rcp/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,7 @@
+#Fri Dec 05 13:47:17 GMT-07:00 2008
+eclipse.preferences.version=1
+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/examples/org.eclipse.datatools.enablement.rcp/META-INF/MANIFEST.MF b/examples/org.eclipse.datatools.enablement.rcp/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..4a8014d
--- /dev/null
+++ b/examples/org.eclipse.datatools.enablement.rcp/META-INF/MANIFEST.MF
@@ -0,0 +1,12 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Rcp Plug-in
+Bundle-SymbolicName: org.eclipse.datatools.enablement.rcp; singleton:=true
+Bundle-Version: 1.1.0.qualifier
+Bundle-Activator: org.eclipse.datatools.enablement.rcp.Activator
+Bundle-ActivationPolicy: lazy
+Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Require-Bundle: org.eclipse.debug.ui;bundle-version="[3.2.0,4.0.0)",
+ org.eclipse.emf.ecore.editor;bundle-version="[2.2.0,3.0.0)",
+ org.eclipse.help.ui;bundle-version="[3.2.0,4.0.0)",
+ org.eclipse.ui.views.properties.tabbed;bundle-version="[3.2.0,4.0.0)"
diff --git a/examples/org.eclipse.datatools.enablement.rcp/build.properties b/examples/org.eclipse.datatools.enablement.rcp/build.properties
new file mode 100644
index 0000000..e64cd75
--- /dev/null
+++ b/examples/org.eclipse.datatools.enablement.rcp/build.properties
@@ -0,0 +1,8 @@
+source.. = src/
+output.. = bin/
+bin.includes = plugin.xml,\
+ META-INF/,\
+ .,\
+ icons/,\
+ splash.bmp,\
+ plugin_customization.ini
diff --git a/examples/org.eclipse.datatools.enablement.rcp/dtprcp.product b/examples/org.eclipse.datatools.enablement.rcp/dtprcp.product
new file mode 100644
index 0000000..4513b99
--- /dev/null
+++ b/examples/org.eclipse.datatools.enablement.rcp/dtprcp.product
@@ -0,0 +1,230 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?pde version="3.5"?>
+
+<product name="DTP Enablement RCP" uid="org.eclipse.datatools.enablement.rcp" id="org.eclipse.datatools.enablement.rcp.product" application="org.eclipse.datatools.enablement.rcp.application" version="1.0.0.qualifier" useFeatures="false" includeLaunchers="true">
+
+ <aboutInfo>
+ <image path="/org.eclipse.datatools.enablement.rcp/icons/alt_about.gif"/>
+ </aboutInfo>
+
+ <configIni use="default">
+ </configIni>
+
+ <launcherArgs>
+ <programArgs>-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -clean</programArgs>
+ <vmArgsMac>-XstartOnFirstThread -Dorg.eclipse.swt.internal.carbon.smallFonts</vmArgsMac>
+ </launcherArgs>
+
+ <windowImages i16="icons/alt_window_16.gif" i32="icons/alt_window_32.gif"/>
+
+ <splash
+ startupProgressRect="5,275,445,15"
+ startupMessageRect="7,252,445,20"
+ startupForegroundColor="000000" />
+ <launcher name="dtprcp">
+ <linux icon="/org.eclipse.datatools.enablement.rcp/icons/alt_launcher.xpm"/>
+ <solaris/>
+ <win useIco="false">
+ <bmp/>
+ </win>
+ </launcher>
+
+ <vm>
+ <linux>org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/OSGi%Minimum-1.0</linux>
+ </vm>
+
+ <plugins>
+ <plugin id="com.ibm.icu"/>
+ <plugin id="javax.servlet"/>
+ <plugin id="javax.servlet.jsp"/>
+ <plugin id="javax.transaction" fragment="true"/>
+ <plugin id="net.sourceforge.lpg.lpgjavaruntime"/>
+ <plugin id="org.apache.ant"/>
+ <plugin id="org.apache.commons.el"/>
+ <plugin id="org.apache.commons.logging"/>
+ <plugin id="org.apache.jasper"/>
+ <plugin id="org.apache.lucene"/>
+ <plugin id="org.apache.lucene.analysis"/>
+ <plugin id="org.eclipse.ant.core"/>
+ <plugin id="org.eclipse.compare"/>
+ <plugin id="org.eclipse.compare.core"/>
+ <plugin id="org.eclipse.core.commands"/>
+ <plugin id="org.eclipse.core.contenttype"/>
+ <plugin id="org.eclipse.core.databinding"/>
+ <plugin id="org.eclipse.core.databinding.observable"/>
+ <plugin id="org.eclipse.core.databinding.property"/>
+ <plugin id="org.eclipse.core.expressions"/>
+ <plugin id="org.eclipse.core.filebuffers"/>
+ <plugin id="org.eclipse.core.filesystem"/>
+ <plugin id="org.eclipse.core.filesystem.linux.x86" fragment="true"/>
+ <plugin id="org.eclipse.core.jobs"/>
+ <plugin id="org.eclipse.core.net"/>
+ <plugin id="org.eclipse.core.net.linux.x86" fragment="true"/>
+ <plugin id="org.eclipse.core.resources"/>
+ <plugin id="org.eclipse.core.resources.compatibility" fragment="true"/>
+ <plugin id="org.eclipse.core.runtime"/>
+ <plugin id="org.eclipse.core.runtime.compatibility"/>
+ <plugin id="org.eclipse.core.runtime.compatibility.auth"/>
+ <plugin id="org.eclipse.core.runtime.compatibility.registry" fragment="true"/>
+ <plugin id="org.eclipse.core.variables"/>
+ <plugin id="org.eclipse.datatools.connectivity"/>
+ <plugin id="org.eclipse.datatools.connectivity.apache.derby"/>
+ <plugin id="org.eclipse.datatools.connectivity.apache.derby.dbdefinition"/>
+ <plugin id="org.eclipse.datatools.connectivity.apache.derby.ui"/>
+ <plugin id="org.eclipse.datatools.connectivity.db.generic"/>
+ <plugin id="org.eclipse.datatools.connectivity.db.generic.ui"/>
+ <plugin id="org.eclipse.datatools.connectivity.sqm.core"/>
+ <plugin id="org.eclipse.datatools.connectivity.sqm.core.ui"/>
+ <plugin id="org.eclipse.datatools.connectivity.sqm.server.ui"/>
+ <plugin id="org.eclipse.datatools.connectivity.ui"/>
+ <plugin id="org.eclipse.datatools.connectivity.ui.dse"/>
+ <plugin id="org.eclipse.datatools.enablement.hsqldb"/>
+ <plugin id="org.eclipse.datatools.enablement.hsqldb.dbdefinition"/>
+ <plugin id="org.eclipse.datatools.enablement.hsqldb.ui"/>
+ <plugin id="org.eclipse.datatools.enablement.ibm.db2.iseries"/>
+ <plugin id="org.eclipse.datatools.enablement.ibm.db2.iseries.dbdefinition"/>
+ <plugin id="org.eclipse.datatools.enablement.ibm.db2.iseries.ui"/>
+ <plugin id="org.eclipse.datatools.enablement.ibm.db2.luw"/>
+ <plugin id="org.eclipse.datatools.enablement.ibm.db2.luw.dbdefinition"/>
+ <plugin id="org.eclipse.datatools.enablement.ibm.db2.luw.ui"/>
+ <plugin id="org.eclipse.datatools.enablement.ibm.db2.zseries"/>
+ <plugin id="org.eclipse.datatools.enablement.ibm.db2.zseries.dbdefinition"/>
+ <plugin id="org.eclipse.datatools.enablement.ibm.db2.zseries.ui"/>
+ <plugin id="org.eclipse.datatools.enablement.ibm.informix"/>
+ <plugin id="org.eclipse.datatools.enablement.ibm.informix.dbdefinition"/>
+ <plugin id="org.eclipse.datatools.enablement.ibm.informix.ui"/>
+ <plugin id="org.eclipse.datatools.enablement.ibm.ui"/>
+ <plugin id="org.eclipse.datatools.enablement.ingres"/>
+ <plugin id="org.eclipse.datatools.enablement.ingres.dbdefinition"/>
+ <plugin id="org.eclipse.datatools.enablement.ingres.ui"/>
+ <plugin id="org.eclipse.datatools.enablement.msft.sqlserver"/>
+ <plugin id="org.eclipse.datatools.enablement.msft.sqlserver.dbdefinition"/>
+ <plugin id="org.eclipse.datatools.enablement.msft.sqlserver.ui"/>
+ <plugin id="org.eclipse.datatools.enablement.mysql"/>
+ <plugin id="org.eclipse.datatools.enablement.mysql.dbdefinition"/>
+ <plugin id="org.eclipse.datatools.enablement.mysql.ui"/>
+ <plugin id="org.eclipse.datatools.enablement.rcp"/>
+ <plugin id="org.eclipse.datatools.enablement.sap.maxdb"/>
+ <plugin id="org.eclipse.datatools.enablement.sap.maxdb.dbdefinition"/>
+ <plugin id="org.eclipse.datatools.enablement.sap.maxdb.ui"/>
+ <plugin id="org.eclipse.datatools.enablement.sybase"/>
+ <plugin id="org.eclipse.datatools.enablement.sybase.asa"/>
+ <plugin id="org.eclipse.datatools.enablement.sybase.asa.dbdefinition"/>
+ <plugin id="org.eclipse.datatools.enablement.sybase.asa.models"/>
+ <plugin id="org.eclipse.datatools.enablement.sybase.asa.ui"/>
+ <plugin id="org.eclipse.datatools.enablement.sybase.ase"/>
+ <plugin id="org.eclipse.datatools.enablement.sybase.ase.dbdefinition"/>
+ <plugin id="org.eclipse.datatools.enablement.sybase.ase.models"/>
+ <plugin id="org.eclipse.datatools.enablement.sybase.ase.ui"/>
+ <plugin id="org.eclipse.datatools.enablement.sybase.models"/>
+ <plugin id="org.eclipse.datatools.enablement.sybase.ui"/>
+ <plugin id="org.eclipse.datatools.help"/>
+ <plugin id="org.eclipse.datatools.modelbase.dbdefinition"/>
+ <plugin id="org.eclipse.datatools.modelbase.derby"/>
+ <plugin id="org.eclipse.datatools.modelbase.sql"/>
+ <plugin id="org.eclipse.datatools.modelbase.sql.edit"/>
+ <plugin id="org.eclipse.datatools.modelbase.sql.query"/>
+ <plugin id="org.eclipse.datatools.modelbase.sql.query.edit"/>
+ <plugin id="org.eclipse.datatools.modelbase.sql.xml.query"/>
+ <plugin id="org.eclipse.datatools.sqltools.common.ui"/>
+ <plugin id="org.eclipse.datatools.sqltools.data.core"/>
+ <plugin id="org.eclipse.datatools.sqltools.data.ui"/>
+ <plugin id="org.eclipse.datatools.sqltools.db.derby"/>
+ <plugin id="org.eclipse.datatools.sqltools.db.generic"/>
+ <plugin id="org.eclipse.datatools.sqltools.ddlgen.ui"/>
+ <plugin id="org.eclipse.datatools.sqltools.editor.core"/>
+ <plugin id="org.eclipse.datatools.sqltools.editor.core.ui"/>
+ <plugin id="org.eclipse.datatools.sqltools.parsers.sql"/>
+ <plugin id="org.eclipse.datatools.sqltools.parsers.sql.lexer"/>
+ <plugin id="org.eclipse.datatools.sqltools.parsers.sql.query"/>
+ <plugin id="org.eclipse.datatools.sqltools.parsers.sql.xml.query"/>
+ <plugin id="org.eclipse.datatools.sqltools.plan"/>
+ <plugin id="org.eclipse.datatools.sqltools.result"/>
+ <plugin id="org.eclipse.datatools.sqltools.result.ui"/>
+ <plugin id="org.eclipse.datatools.sqltools.routineeditor"/>
+ <plugin id="org.eclipse.datatools.sqltools.routineeditor.ui"/>
+ <plugin id="org.eclipse.datatools.sqltools.sql"/>
+ <plugin id="org.eclipse.datatools.sqltools.sql.ui"/>
+ <plugin id="org.eclipse.datatools.sqltools.sqlbuilder"/>
+ <plugin id="org.eclipse.datatools.sqltools.sqleditor"/>
+ <plugin id="org.eclipse.datatools.sqltools.sqlscrapbook"/>
+ <plugin id="org.eclipse.datatools.sqltools.tabledataeditor"/>
+ <plugin id="org.eclipse.debug.core"/>
+ <plugin id="org.eclipse.debug.ui"/>
+ <plugin id="org.eclipse.draw2d"/>
+ <plugin id="org.eclipse.ecf"/>
+ <plugin id="org.eclipse.ecf.filetransfer"/>
+ <plugin id="org.eclipse.ecf.identity"/>
+ <plugin id="org.eclipse.ecf.provider.filetransfer"/>
+ <plugin id="org.eclipse.ecf.provider.filetransfer.ssl" fragment="true"/>
+ <plugin id="org.eclipse.ecf.ssl" fragment="true"/>
+ <plugin id="org.eclipse.emf.codegen"/>
+ <plugin id="org.eclipse.emf.codegen.ecore"/>
+ <plugin id="org.eclipse.emf.common"/>
+ <plugin id="org.eclipse.emf.common.ui"/>
+ <plugin id="org.eclipse.emf.ecore"/>
+ <plugin id="org.eclipse.emf.ecore.change"/>
+ <plugin id="org.eclipse.emf.ecore.edit"/>
+ <plugin id="org.eclipse.emf.ecore.editor"/>
+ <plugin id="org.eclipse.emf.ecore.xmi"/>
+ <plugin id="org.eclipse.emf.edit"/>
+ <plugin id="org.eclipse.emf.edit.ui"/>
+ <plugin id="org.eclipse.equinox.app"/>
+ <plugin id="org.eclipse.equinox.common"/>
+ <plugin id="org.eclipse.equinox.concurrent"/>
+ <plugin id="org.eclipse.equinox.http.jetty"/>
+ <plugin id="org.eclipse.equinox.http.servlet"/>
+ <plugin id="org.eclipse.equinox.launcher"/>
+ <plugin id="org.eclipse.equinox.launcher.gtk.linux.x86" fragment="true"/>
+ <plugin id="org.eclipse.equinox.p2.artifact.repository"/>
+ <plugin id="org.eclipse.equinox.p2.core"/>
+ <plugin id="org.eclipse.equinox.p2.engine"/>
+ <plugin id="org.eclipse.equinox.p2.jarprocessor"/>
+ <plugin id="org.eclipse.equinox.p2.metadata"/>
+ <plugin id="org.eclipse.equinox.p2.metadata.repository"/>
+ <plugin id="org.eclipse.equinox.p2.repository"/>
+ <plugin id="org.eclipse.equinox.preferences"/>
+ <plugin id="org.eclipse.equinox.registry"/>
+ <plugin id="org.eclipse.equinox.security"/>
+ <plugin id="org.eclipse.gef"/>
+ <plugin id="org.eclipse.help"/>
+ <plugin id="org.eclipse.help.base"/>
+ <plugin id="org.eclipse.help.ui"/>
+ <plugin id="org.eclipse.jdt.compiler.apt" fragment="true"/>
+ <plugin id="org.eclipse.jdt.compiler.tool" fragment="true"/>
+ <plugin id="org.eclipse.jdt.core"/>
+ <plugin id="org.eclipse.jdt.debug"/>
+ <plugin id="org.eclipse.jdt.launching"/>
+ <plugin id="org.eclipse.jface"/>
+ <plugin id="org.eclipse.jface.databinding"/>
+ <plugin id="org.eclipse.jface.text"/>
+ <plugin id="org.eclipse.ltk.core.refactoring"/>
+ <plugin id="org.eclipse.ltk.ui.refactoring"/>
+ <plugin id="org.eclipse.osgi"/>
+ <plugin id="org.eclipse.osgi.services"/>
+ <plugin id="org.eclipse.persistence.jpa.equinox.weaving" fragment="true"/>
+ <plugin id="org.eclipse.search"/>
+ <plugin id="org.eclipse.swt"/>
+ <plugin id="org.eclipse.swt.gtk.linux.x86" fragment="true"/>
+ <plugin id="org.eclipse.team.core"/>
+ <plugin id="org.eclipse.team.ui"/>
+ <plugin id="org.eclipse.text"/>
+ <plugin id="org.eclipse.ui"/>
+ <plugin id="org.eclipse.ui.console"/>
+ <plugin id="org.eclipse.ui.editors"/>
+ <plugin id="org.eclipse.ui.forms"/>
+ <plugin id="org.eclipse.ui.ide"/>
+ <plugin id="org.eclipse.ui.navigator"/>
+ <plugin id="org.eclipse.ui.navigator.resources"/>
+ <plugin id="org.eclipse.ui.views"/>
+ <plugin id="org.eclipse.ui.views.properties.tabbed"/>
+ <plugin id="org.eclipse.ui.workbench"/>
+ <plugin id="org.eclipse.ui.workbench.texteditor"/>
+ <plugin id="org.eclipse.update.configurator"/>
+ <plugin id="org.jboss.tools.xulrunner.initializer" fragment="true"/>
+ <plugin id="org.mortbay.jetty.server"/>
+ <plugin id="org.mortbay.jetty.util"/>
+ </plugins>
+
+
+</product>
diff --git a/examples/org.eclipse.datatools.enablement.rcp/icons/alt_about.gif b/examples/org.eclipse.datatools.enablement.rcp/icons/alt_about.gif
new file mode 100644
index 0000000..20d9ad2
--- /dev/null
+++ b/examples/org.eclipse.datatools.enablement.rcp/icons/alt_about.gif
Binary files differ
diff --git a/examples/org.eclipse.datatools.enablement.rcp/icons/alt_launcher.icns b/examples/org.eclipse.datatools.enablement.rcp/icons/alt_launcher.icns
new file mode 100644
index 0000000..b77a6a6
--- /dev/null
+++ b/examples/org.eclipse.datatools.enablement.rcp/icons/alt_launcher.icns
Binary files differ
diff --git a/examples/org.eclipse.datatools.enablement.rcp/icons/alt_launcher.ico b/examples/org.eclipse.datatools.enablement.rcp/icons/alt_launcher.ico
new file mode 100644
index 0000000..d548f71
--- /dev/null
+++ b/examples/org.eclipse.datatools.enablement.rcp/icons/alt_launcher.ico
Binary files differ
diff --git a/examples/org.eclipse.datatools.enablement.rcp/icons/alt_launcher.xpm b/examples/org.eclipse.datatools.enablement.rcp/icons/alt_launcher.xpm
new file mode 100644
index 0000000..b0c139e
--- /dev/null
+++ b/examples/org.eclipse.datatools.enablement.rcp/icons/alt_launcher.xpm
@@ -0,0 +1,307 @@
+/* XPM */
+static char * icon48_xpm[] = {
+"48 48 256 2",
+" c #4B4B3B3B9090",
+". c #0D0D0E0E5454",
+"X c #11110E0E5B5B",
+"o c #17170F0F6363",
+"O c #1D1D13136969",
+"+ c #212114146C6C",
+"@ c #252514147171",
+"# c #282811116C6C",
+"$ c #26260D0D6363",
+"% c #22220B0B5E5E",
+"& c #1C1C0B0B5A5A",
+"* c #1C1C0B0B5252",
+"= c #1B1B05055353",
+"- c #161606064D4D",
+"; c #161605054949",
+": c #111104044848",
+"> c #131304044545",
+", c #131305054242",
+"< c #141410105E5E",
+"1 c #2C2C15157373",
+"2 c #2B2B1B1B7575",
+"3 c #343416167272",
+"4 c #313113136E6E",
+"5 c #222209095757",
+"6 c #1B1B06064D4D",
+"7 c #15150B0B4242",
+"8 c #13130C0C5555",
+"9 c #2E2E1B1B7878",
+"0 c #33331F1F7C7C",
+"q c #343418187878",
+"w c #3B3B1C1C7575",
+"e c #2E2E10106767",
+"r c #1B1B07074747",
+"t c #18180B0B4646",
+"y c #151513136262",
+"u c #1A1A15156464",
+"i c #34341F1F7777",
+"p c #40401E1E8080",
+"a c #42421B1B7A7A",
+"s c #3B3B15157474",
+"d c #2B2B0B0B5B5B",
+"f c #222207075252",
+"g c #373727277A7A",
+"h c #474724248484",
+"j c #393915156E6E",
+"k c #373711116A6A",
+"l c #343413136363",
+"z c #232319196E6E",
+"x c #292919197070",
+"c c #3C3C2C2C8282",
+"v c #444431318585",
+"b c #494934348A8A",
+"n c #505026268A8A",
+"m c #3D3D1B1B6E6E",
+"M c #31310E0E5C5C",
+"N c #2B2B0D0D5353",
+"B c #222207074A4A",
+"V c #52523C3C9292",
+"C c #58583C3C9494",
+"Z c #5D5D44449797",
+"A c #5C5C2E2E9292",
+"S c #676733339595",
+"D c #424228287575",
+"F c #29290A0A4F4F",
+"G c #6C6C4A4A9E9E",
+"H c #72725454A7A7",
+"J c #8C8C6D6DB2B2",
+"K c #343424246E6E",
+"L c #3A3A23236A6A",
+"P c #3A3A1C1C6767",
+"I c #24240A0A4B4B",
+"U c #151518186161",
+"Y c #76766F6FA5A5",
+"T c #ADAD9191CCCC",
+"R c #98988989D3D3",
+"E c #45453B3B8686",
+"W c #3C3C35357979",
+"Q c #363631317575",
+"! c #32322D2D6B6B",
+"~ c #323229296363",
+"^ c #30301F1F6262",
+"/ c #323218185E5E",
+"( c #272707074B4B",
+") c #202028286C6C",
+"_ c #1E1E1D1D6868",
+"` c #9A9A8282BBBB",
+"' c #C8C8B3B3D3D3",
+"] c #B3B3AFAFE7E7",
+"[ c #84847272C6C6",
+"{ c #58585757A3A3",
+"} c #3F3F3C3C8A8A",
+"| c #3B3B3A3A8484",
+" . c #414139397D7D",
+".. c #3D3D39397A7A",
+"X. c #37372E2E6E6E",
+"o. c #2C2C21215A5A",
+"O. c #2E2E1B1B5B5B",
+"+. c #F5F5EFEFF5F5",
+"@. c #656566669A9A",
+"#. c #47474B4B8E8E",
+"$. c #3C3C44447B7B",
+"%. c #444442428080",
+"&. c #45453E3E8181",
+"*. c #40403C3C8181",
+"=. c #3D3D33337474",
+"-. c #3B3B30306E6E",
+";. c #38382D2D6969",
+":. c #303026265D5D",
+">. c #2C2C15155A5A",
+",. c #1F1F1C1C7070",
+"<. c #25251E1E7171",
+"1. c #59595C5C9191",
+"2. c #4D4D53538989",
+"3. c #4C4C49498484",
+"4. c #484845458585",
+"5. c #494941418585",
+"6. c #494940408181",
+"7. c #2F2F1C1C5353",
+"8. c #2B2B28287676",
+"9. c #323231317F7F",
+"0. c #545452528B8B",
+"q. c #51514E4E8989",
+"w. c #4E4E4B4B8C8C",
+"e. c #4C4C47478686",
+"r. c #46463D3D7E7E",
+"t. c #434336367A7A",
+"y. c #2B2B13135555",
+"u. c #47473D3D8D8D",
+"i. c #575757578E8E",
+"p. c #48483E3E7F7F",
+"a. c #46463A3A7D7D",
+"s. c #424235357575",
+"d. c #404034347171",
+"f. c #BFBFCBCBFAFA",
+"g. c #B8B8A8A8DDDD",
+"h. c #5E5E60609292",
+"j. c #565655558C8C",
+"k. c #4B4B44448282",
+"l. c #454539397B7B",
+"z. c #434338387878",
+"x. c #3F3F32326D6D",
+"c. c #3D3D30306969",
+"v. c #3A3A2E2E6363",
+"b. c #36362A2A5C5C",
+"n. c #343424245555",
+"m. c #30301E1E4D4D",
+"M. c #49493C3C8282",
+"N. c #5E5E4F4F8C8C",
+"B. c #56563B3B8B8B",
+"V. c #545407078585",
+"C. c #424234347272",
+"Z. c #9797A4A4F7F7",
+"A. c #444436367676",
+"S. c #7D7D7979D5D5",
+"D. c #464640408A8A",
+"F. c #44444B4B8282",
+"G. c #414107077777",
+"H. c #71716161C1C1",
+"J. c #303039397979",
+"K. c #8E8E8E8EE6E6",
+"L. c #404033338B8B",
+"P. c #4A4A45458C8C",
+"I. c #46463A3A8080",
+"U. c #363629295454",
+"Y. c #303022224848",
+"T. c #424237377575",
+"R. c #2E2E1D1D6363",
+"E. c #79798383EAEA",
+"W. c #74747B7BE4E4",
+"Q. c #6D6D7676D6D6",
+"!. c #6A6A7171CECE",
+"~. c #66666969C6C6",
+"^. c #62626565BCBC",
+"/. c #5F5F6060B5B5",
+"(. c #5B5B5B5BACAC",
+"). c #535353539898",
+"_. c #4F4F4F4FA4A4",
+"`. c #54544D4DA4A4",
+"'. c #323204046B6B",
+"]. c #303035357979",
+"[. c #313122224343",
+"{. c #5A5A5B5BB7B7",
+"}. c #484846468080",
+"|. c #454541417575",
+" X c #4B4B31318282",
+".X c #47473C3C8484",
+"XX c #3E3E35356E6E",
+"oX c #2F2F26264040",
+"OX c #2B2B23233A3A",
+"+X c #262619195C5C",
+"@X c #252515155A5A",
+"#X c #55555151B3B3",
+"$X c #3C3C2D2D5D5D",
+"%X c #39392F2F5656",
+"&X c #37372D2D5050",
+"*X c #25251F1F3030",
+"=X c #24241D1D4343",
+"-X c #202013135656",
+";X c #41413B3B6C6C",
+":X c #444442429696",
+">X c #212100005E5E",
+",X c #444436367272",
+"<X c #444436366F6F",
+"1X c #424236366868",
+"2X c #3F3F34346161",
+"3X c #3C3C32325A5A",
+"4X c #34342A2A4A4A",
+"5X c #21211B1B2121",
+"6X c #22221C1C6363",
+"7X c #2D2D01015E5E",
+"8X c #20201B1B2525",
+"9X c #49492F2F7B7B",
+"0X c #434334346C6C",
+"qX c #323229294545",
+"wX c #1C1C10104F4F",
+"eX c #222217176363",
+"rX c #37371E1E6B6B",
+"tX c #424232326E6E",
+"yX c #444433336969",
+"uX c #424233336565",
+"iX c #1E1E1A1A1E1E",
+"pX c #161601014C4C",
+"aX c #1C1C11115454",
+"sX c #252503035B5B",
+"dX c #414131316A6A",
+"fX c #22221F1F7878",
+"gX c #272724246767",
+"hX c #1D1D16165E5E",
+"jX c #131305055151",
+"kX c #40402F2F6464",
+"lX c #111107074E4E",
+"zX c #0C0C05054B4B",
+"xX c #22221E1E5757",
+"cX c #1A1A0D0D4D4D",
+"vX c #16160B0B4D4D",
+"bX c #060604044747",
+"nX c #040403034343",
+"mX c #3B3B27276565",
+"MX c #0E0E03034141",
+"NX c #111106064A4A",
+"BX c #0E0E04044646",
+"VX c #111105053B3B",
+"CX c #0D0D01013A3A",
+"ZX c #030305053F3F",
+"AX c #0F0F0F0F4C4C",
+"SX c #020207073B3B",
+"DX c #0D0D03034646",
+"FX c #0B0B02023F3F",
+"GX c #0D0D02023434",
+"HX c #0A0A0E0E4444",
+"JX c #161614145252",
+"KX c #0B0B04044646",
+"LX c #0A0A03034444",
+"PX c #1D1D21215757",
+"IX c #090910104040",
+"UX c #18181E1E5353",
+" ",
+" . . . . X X o o o o O + + @ @ @ @ @ @ @ # # # # # # $ $ % % & & & & * = - - - ; : > > , , , ",
+" . . X X < < o o O O + @ 1 2 2 1 1 1 1 1 1 1 1 3 4 # # $ $ $ % % % 5 = = 6 6 - ; ; > > , , 7 ",
+" . 8 < < < o O O + @ @ 2 9 9 0 0 q q q q q q q w 3 4 4 e e $ $ $ $ % 5 = = 6 6 6 ; ; > > r t ",
+" . X < y u O O + @ 1 2 i 0 0 p p p p p p p a a p a s 3 4 4 e e e e d 5 5 f f 6 6 6 ; ; r r t ",
+" X < y u O + + @ 2 9 0 g p p h h h h h h h p h h a a s s j k k j l d d 5 5 f f 6 6 r r r r r ",
+" X < y O z x x 9 0 g c v b n n n n n n n n n n n h a a s s j j m l M d d N f f B B B B r r r ",
+" < y u + z 2 0 c c b V C Z C C A A A A A S S S n h D w w m m m m k l M d d N f F F F B r r r ",
+" < y O z z 9 c b V Z G H H H G S G G J J H V v c g g K K K K L P l l l M M N N N N I B B r r ",
+" U u + z x i v C H Y J J J J H J T R H V E W W Q Q Q Q ! ! ! ~ ^ ^ / / M M M M M N ( B B r r ",
+" ) _ z x 9 g b Z Y ` ' ' ' T T ] [ { } | .........W W Q Q X.! ~ ~ o.O./ / / / N F ( B B B r ",
+" ) ) z x i c V G J ' +.+.+.+.] [ @.#.$.%.%.%.&.*. . .....W =.-.X.;.~ :.o.O.^ >.N F ( B B B B ",
+" ) ,.<.2 g v C H J ' +.+.+.+.T Y 1.2.3.4.4.4.5.6.&.&. . ...W =.=.-.;.~ :.o.7.>.N F F ( B I I ",
+" ) ,.<.8.9.b C H J T +.+.+.' J @.1.0.q.q.w.e.4.5.6.&.r. . .t.W =.=.-.;.~ :.o.7.y.N F ( ( I I ",
+" 8.8.8.9.| u.C G J T +.+.' ` Y @.1.i.0.q.q.e.e.5.6.p.r.a. .t.t.s.d.d.-.;.~ :.7.7.y.F F ( I I ",
+" 9.c c c v b A S H ' f.g.` Y @.h.1.i.j.0.q.q.e.k.6.p.r.a.l.t.z.s.s.d.x.c.v.b.n.m.7.N F F F I ",
+" <.g M.N.B.B.n V.J f.R J @.h.h.1.i.i.j.j.0.q.3.k.6.p.r.a.l.l.z.s.C.d.x.x.c.v.b.n.m.y.N F F F ",
+" + x i v B.Z Z G g.Z.[ @.2.i.i.j.j.j.j.j.0.q.3.k.6.p.p.a.l.l.A.s.C.C.d.x.c.v.b.n.m.7.y.N N y. ",
+" O # 3 w p n Z ` f.S.H D.F.q.0.0.0.0.j.0.q.q.3.k.6.p.r.a.a.l.A.s.s.C.d.x.x.c.v.b.n.m.y.y.y.y. ",
+" O # 4 s a G.V.T Z.H.V J.%.e.w.q.0.0.0.0.q.q.e.k.6.p.r.a.a.l.z.A.s.C.d.d.x.c.v.b.n.m.7.>.y.y. ",
+" O # 4 s w G.A f.K.H L...4.P.w.w.w.q.q.q.q.e.e.5.6.M.I.I.a.a.l.z.A.s.d.d.x.c.v.v.U.Y.7.O.>.y. ",
+" $ # 4 3 s G.G f.S.Z 9.*.D.P.P.w.w.w.w.w.e.e.5.5.M.M.I.I.a.a.l.z.T.s.d.d.x.x.c.v.U.Y.m.R.>.>. ",
+" E.E.W.W.W.W.E.Z.E.W.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.!.!.!.!.!.~.~.~.~.~.~.^.^.^.^.^./././.(.{ { )._.`._. ",
+" + # 3 w s '.` f.H.V ].*.D.P.P.P.P.P.P.P.5.5.5.M.M.M.I.I.a.l.z.z.T.T.s.d.d.x.c.v.U.Y.[.^ O.>. ",
+" ~.~.~.~.~.~.K.Z.S.~.{.^.^.^.^.^.^.^.^././././././.(.(.(.(.(.(.{ { { { { ).).).w.w.}.|.P.u.} ",
+" .I.6. X X XT f.H.b ].*.E D.D.D.D.5.5..X.XM.M.I.I.a.a.l.l.z.z.T.T.T.d.XXx.c.v.b.U.oXOXR.+X@X ",
+" E.E.E.W.W.W.K.Z.E.W.Q.Q.Q.Q.Q.Q.Q.Q.!.!.!.!.!.!.~.~.~.~.~.~.^.^.^.^.^./././.(.{ { ).).#X_._. ",
+" & % $ e '.= H f.H.b 8.W *.E E E .X.X.XI.I.I.I.a.a.l.l.z.z.T.T.T.C.XXXXc.v.$X%X&XY.*X=X2 @X-X ",
+" {.{.{.{.{.#X~.Z.W.~.{.{./././././././././.(.(.(.(.(.(.(.{ { { { { { ).).).w.w.3.}.;X%.:X} } ",
+" & & % $ e >XV.f.S.C K X.W t. . .l.l.t.t.t.t.A.A.A.,X,X,X,X,X<X;X1X1X2X3X%X&X4XoX*X5Xo.6X-X-X ",
+" & & % $ $ >X7X` Z.Z D ! =.=.s.t.t.t.A.A.s.A.,X,X,X,X<X<X<X<X;X1X2X2X3X%X&X4XoXOX8X5X<.@X-X-X ",
+" 8 & & $ e K 9XJ f.^. XK X.=.=.s.s.s.s.s.C.C.C.C.<X0X0X0X1X1X1X2X2X3X%X&X4XqXOX*X8X=X<.-X-XwX ",
+" 8 & eXK k.@.M. Xg.E.B.rX~ -.d.d.C.C.C.C.C.tX0X0X0XyXyX1X1XuX2X2X3X%X&X4XqXoXOX8XiX6XeX-X-XwX ",
+" 6XQ h.Y N.K e pXB.f./.9Xo.;.-.x.d.tXtXtXtXtX0X0XyXyXyXuXuX2X2X3X%X&X4XqXoXOX*XiX=X_ aX-XaXwX ",
+" Y Y .R.@X% sX= 7XT Z.V P :.;.c.x.x.x.tXdXdXdXyXyXuXuX2X2X3X3X%X&X4XqXoXOX*X8X*XfXaXaXaXwXwX ",
+" gXhX& * & 5 5 sXjXa ] S.9X/ ~ v.c.dXdXdXdXdXuXuXuXkX2X2X3X%X%X&X4XqXoXOX*X8XiX<.hXwXwXaXwXwX ",
+" 8 lXlXjX= * 5 5 = zX9X] H.D 7.b.v.v.kXc.kXkXkXkXkX2X$X3X%X&X&X4XqXoXOX*X8XiXxXhXwXcXcXwXwXwX ",
+" zXzXlXlXjX= = f f sXD Y ] ~.D 7.n.b.v.v.kXkXkXkX$X$X%X%X&X4XqXoXoXOX*X8X5XgXu cXvXvXcXcXwXwX ",
+" bXbXzXlXlX- = * @XX.h.e D T S.D n.m.b.$X$X$X$X$X%X%X&X&X4XqXoXOX*X8X8X*X<.hXvX; ; vXvXvXcXwX ",
+" nXbXzXzXlXlX- -XX.Y R.pXpXP J K.Z mXm.n.U.U.U.U.U.4X4XY.oXOX*X8X8X8X=X,.aXvX; > > > t t t cX ",
+" nXbXbXzXzXlXaXXXY +Xf = f = 7XtXR R mXn.Y.[.[.[.[.OX*X*X8X5X*X=X,.u vXvX; > > MXMX, 7 t t ",
+" nXnXnXbXzXvX-.Y +XcX6 6 = = = d L B.G H `.X.:.7.m.=X=X=X=X=X6X,.u cXvXNX: BX> MXVXCXVX7 7 7 ",
+" ZXZXnXbXAXgX@.+XvX; - - - - * @XR.>.sX>.R.i 0 x eXeXeXeXO hXaXcXvXNX: BXMXMXMXVXCXCXCXVX7 7 ",
+" SXZXZXAXgXN.aXNX: : NXNXNX- * +X+X* 6 6 6 * * * * * * * vXvX- NX: DXBXMXMXFXCXCXCXCXGXVXVX7 ",
+" SXSXHXgX0.JXKXLXKXKXDX: : NX* @X-X- - - - - - - - - - - NX: DXDXDXMXMXFXFXCXCXCXCXGXGXGXVXVX ",
+" SXHXPX3.JXnXnXnXnXbXLXKXKXNXaX-XvX: : NX: : : : : : : BXDXDXLXMXMXFXFXCXCXCXCXGXGXGXGXGXGXGX ",
+" IXUX$.AXZXZXZXZXnXnXnXLXLXNXJXvXBXDXBXBXBXBXDXDXDXDXLXDXLXLXFXFXFXFXCXCXCXCXGXGXGXGXGXGXGXGX ",
+" "};
diff --git a/examples/org.eclipse.datatools.enablement.rcp/icons/alt_window_16.gif b/examples/org.eclipse.datatools.enablement.rcp/icons/alt_window_16.gif
new file mode 100644
index 0000000..05626b1
--- /dev/null
+++ b/examples/org.eclipse.datatools.enablement.rcp/icons/alt_window_16.gif
Binary files differ
diff --git a/examples/org.eclipse.datatools.enablement.rcp/icons/alt_window_32.gif b/examples/org.eclipse.datatools.enablement.rcp/icons/alt_window_32.gif
new file mode 100644
index 0000000..b432f88
--- /dev/null
+++ b/examples/org.eclipse.datatools.enablement.rcp/icons/alt_window_32.gif
Binary files differ
diff --git a/examples/org.eclipse.datatools.enablement.rcp/icons/enablementrcp.product b/examples/org.eclipse.datatools.enablement.rcp/icons/enablementrcp.product
new file mode 100644
index 0000000..deefa2a
--- /dev/null
+++ b/examples/org.eclipse.datatools.enablement.rcp/icons/enablementrcp.product
@@ -0,0 +1,245 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?pde version="3.5"?>
+
+<product name="DTP Enablement RCP" uid="org.eclipse.datatools.enablement.rcp" id="org.eclipse.datatools.enablement.rcp.product" application="org.eclipse.datatools.enablement.rcp.application" version="1.0.0" useFeatures="false" includeLaunchers="false">
+
+ <configIni use="default">
+ </configIni>
+
+ <launcherArgs>
+ <programArgs>-clean</programArgs>
+ <vmArgsMac>-XstartOnFirstThread -Dorg.eclipse.swt.internal.carbon.smallFonts</vmArgsMac>
+ </launcherArgs>
+
+ <windowImages i16="icons/alt_window_16.gif" i32="icons/alt_window_32.gif"/>
+
+ <splash
+ startupProgressRect="5,275,445,15" />
+ <launcher name="dtprcp">
+ <linux icon="/org.eclipse.datatools.enablement.rcp/icons/alt_launcher.xpm"/>
+ <solaris/>
+ <win useIco="false">
+ <bmp/>
+ </win>
+ </launcher>
+
+ <vm>
+ <linux>org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/OSGi%Minimum-1.0</linux>
+ </vm>
+
+ <plugins>
+ <plugin id="com.ibm.icu"/>
+ <plugin id="javax.servlet"/>
+ <plugin id="javax.servlet.jsp"/>
+ <plugin id="net.sourceforge.lpg.lpgjavaruntime"/>
+ <plugin id="org.apache.ant"/>
+ <plugin id="org.apache.commons.el"/>
+ <plugin id="org.apache.commons.logging"/>
+ <plugin id="org.apache.jasper"/>
+ <plugin id="org.apache.lucene"/>
+ <plugin id="org.apache.lucene.analysis"/>
+ <plugin id="org.eclipse.ant.core"/>
+ <plugin id="org.eclipse.compare"/>
+ <plugin id="org.eclipse.compare.core"/>
+ <plugin id="org.eclipse.core.commands"/>
+ <plugin id="org.eclipse.core.contenttype"/>
+ <plugin id="org.eclipse.core.databinding"/>
+ <plugin id="org.eclipse.core.databinding.observable"/>
+ <plugin id="org.eclipse.core.databinding.property"/>
+ <plugin id="org.eclipse.core.expressions"/>
+ <plugin id="org.eclipse.core.filebuffers"/>
+ <plugin id="org.eclipse.core.filesystem"/>
+ <plugin id="org.eclipse.core.filesystem.linux.x86" fragment="true"/>
+ <plugin id="org.eclipse.core.jobs"/>
+ <plugin id="org.eclipse.core.net"/>
+ <plugin id="org.eclipse.core.net.linux.x86" fragment="true"/>
+ <plugin id="org.eclipse.core.resources"/>
+ <plugin id="org.eclipse.core.resources.compatibility" fragment="true"/>
+ <plugin id="org.eclipse.core.runtime"/>
+ <plugin id="org.eclipse.core.runtime.compatibility.auth"/>
+ <plugin id="org.eclipse.core.runtime.compatibility.registry" fragment="true"/>
+ <plugin id="org.eclipse.core.variables"/>
+ <plugin id="org.eclipse.datatools.common.doc.user"/>
+ <plugin id="org.eclipse.datatools.connectivity"/>
+ <plugin id="org.eclipse.datatools.connectivity.apache.derby"/>
+ <plugin id="org.eclipse.datatools.connectivity.apache.derby.dbdefinition"/>
+ <plugin id="org.eclipse.datatools.connectivity.apache.derby.dbdefinition.source"/>
+ <plugin id="org.eclipse.datatools.connectivity.apache.derby.ui"/>
+ <plugin id="org.eclipse.datatools.connectivity.db.generic"/>
+ <plugin id="org.eclipse.datatools.connectivity.db.generic.ui"/>
+ <plugin id="org.eclipse.datatools.connectivity.dbdefinition.genericJDBC"/>
+ <plugin id="org.eclipse.datatools.connectivity.doc.user"/>
+ <plugin id="org.eclipse.datatools.connectivity.doc.user.contexts"/>
+ <plugin id="org.eclipse.datatools.connectivity.sqm.core"/>
+ <plugin id="org.eclipse.datatools.connectivity.sqm.core.ui"/>
+ <plugin id="org.eclipse.datatools.connectivity.sqm.server.ui"/>
+ <plugin id="org.eclipse.datatools.connectivity.ui"/>
+ <plugin id="org.eclipse.datatools.connectivity.ui.dse"/>
+ <plugin id="org.eclipse.datatools.doc.isv"/>
+ <plugin id="org.eclipse.datatools.doc.user"/>
+ <plugin id="org.eclipse.datatools.enablement.hsqldb"/>
+ <plugin id="org.eclipse.datatools.enablement.hsqldb.dbdefinition"/>
+ <plugin id="org.eclipse.datatools.enablement.hsqldb.ui"/>
+ <plugin id="org.eclipse.datatools.enablement.ibm.db2.iseries"/>
+ <plugin id="org.eclipse.datatools.enablement.ibm.db2.iseries.dbdefinition"/>
+ <plugin id="org.eclipse.datatools.enablement.ibm.db2.iseries.ui"/>
+ <plugin id="org.eclipse.datatools.enablement.ibm.db2.luw"/>
+ <plugin id="org.eclipse.datatools.enablement.ibm.db2.luw.dbdefinition"/>
+ <plugin id="org.eclipse.datatools.enablement.ibm.db2.luw.ui"/>
+ <plugin id="org.eclipse.datatools.enablement.ibm.db2.zseries"/>
+ <plugin id="org.eclipse.datatools.enablement.ibm.db2.zseries.dbdefinition"/>
+ <plugin id="org.eclipse.datatools.enablement.ibm.db2.zseries.ui"/>
+ <plugin id="org.eclipse.datatools.enablement.ibm.informix"/>
+ <plugin id="org.eclipse.datatools.enablement.ibm.informix.dbdefinition"/>
+ <plugin id="org.eclipse.datatools.enablement.ibm.informix.ui"/>
+ <plugin id="org.eclipse.datatools.enablement.ibm.ui"/>
+ <plugin id="org.eclipse.datatools.enablement.ingres"/>
+ <plugin id="org.eclipse.datatools.enablement.ingres.dbdefinition"/>
+ <plugin id="org.eclipse.datatools.enablement.ingres.ui"/>
+ <plugin id="org.eclipse.datatools.enablement.msft.sqlserver"/>
+ <plugin id="org.eclipse.datatools.enablement.msft.sqlserver.dbdefinition"/>
+ <plugin id="org.eclipse.datatools.enablement.msft.sqlserver.ui"/>
+ <plugin id="org.eclipse.datatools.enablement.mysql"/>
+ <plugin id="org.eclipse.datatools.enablement.mysql.dbdefinition"/>
+ <plugin id="org.eclipse.datatools.enablement.mysql.ui"/>
+ <plugin id="org.eclipse.datatools.enablement.oracle"/>
+ <plugin id="org.eclipse.datatools.enablement.oracle.dbdefinition"/>
+ <plugin id="org.eclipse.datatools.enablement.oracle.ui"/>
+ <plugin id="org.eclipse.datatools.enablement.postgresql"/>
+ <plugin id="org.eclipse.datatools.enablement.postgresql.dbdefinition"/>
+ <plugin id="org.eclipse.datatools.enablement.postgresql.ui"/>
+ <plugin id="org.eclipse.datatools.enablement.sap.maxdb"/>
+ <plugin id="org.eclipse.datatools.enablement.sap.maxdb.dbdefinition"/>
+ <plugin id="org.eclipse.datatools.enablement.sap.maxdb.ui"/>
+ <plugin id="org.eclipse.datatools.enablement.sqlite"/>
+ <plugin id="org.eclipse.datatools.enablement.sqlite.dbdefinition"/>
+ <plugin id="org.eclipse.datatools.enablement.sqlite.ui"/>
+ <plugin id="org.eclipse.datatools.enablement.sybase"/>
+ <plugin id="org.eclipse.datatools.enablement.sybase.asa"/>
+ <plugin id="org.eclipse.datatools.enablement.sybase.asa.dbdefinition"/>
+ <plugin id="org.eclipse.datatools.enablement.sybase.asa.models"/>
+ <plugin id="org.eclipse.datatools.enablement.sybase.asa.schemaobjecteditor.examples"/>
+ <plugin id="org.eclipse.datatools.enablement.sybase.asa.ui"/>
+ <plugin id="org.eclipse.datatools.enablement.sybase.ase"/>
+ <plugin id="org.eclipse.datatools.enablement.sybase.ase.dbdefinition"/>
+ <plugin id="org.eclipse.datatools.enablement.sybase.ase.models"/>
+ <plugin id="org.eclipse.datatools.enablement.sybase.ase.ui"/>
+ <plugin id="org.eclipse.datatools.enablement.sybase.models"/>
+ <plugin id="org.eclipse.datatools.enablement.sybase.ui"/>
+ <plugin id="org.eclipse.datatools.help"/>
+ <plugin id="org.eclipse.datatools.intro"/>
+ <plugin id="org.eclipse.datatools.modelbase.dbdefinition"/>
+ <plugin id="org.eclipse.datatools.modelbase.derby"/>
+ <plugin id="org.eclipse.datatools.modelbase.sql"/>
+ <plugin id="org.eclipse.datatools.modelbase.sql.edit"/>
+ <plugin id="org.eclipse.datatools.modelbase.sql.query"/>
+ <plugin id="org.eclipse.datatools.modelbase.sql.query.edit"/>
+ <plugin id="org.eclipse.datatools.modelbase.sql.xml.query"/>
+ <plugin id="org.eclipse.datatools.sqltools.common.ui"/>
+ <plugin id="org.eclipse.datatools.sqltools.data.core"/>
+ <plugin id="org.eclipse.datatools.sqltools.data.ui"/>
+ <plugin id="org.eclipse.datatools.sqltools.db.derby"/>
+ <plugin id="org.eclipse.datatools.sqltools.db.derby.ui"/>
+ <plugin id="org.eclipse.datatools.sqltools.db.generic"/>
+ <plugin id="org.eclipse.datatools.sqltools.db.generic.ui"/>
+ <plugin id="org.eclipse.datatools.sqltools.ddlgen.ui"/>
+ <plugin id="org.eclipse.datatools.sqltools.debugger.core"/>
+ <plugin id="org.eclipse.datatools.sqltools.debugger.core.ui"/>
+ <plugin id="org.eclipse.datatools.sqltools.doc.user"/>
+ <plugin id="org.eclipse.datatools.sqltools.doc.user.contexts"/>
+ <plugin id="org.eclipse.datatools.sqltools.editor.core"/>
+ <plugin id="org.eclipse.datatools.sqltools.editor.core.ui"/>
+ <plugin id="org.eclipse.datatools.sqltools.parsers.sql"/>
+ <plugin id="org.eclipse.datatools.sqltools.parsers.sql.lexer"/>
+ <plugin id="org.eclipse.datatools.sqltools.parsers.sql.query"/>
+ <plugin id="org.eclipse.datatools.sqltools.parsers.sql.source"/>
+ <plugin id="org.eclipse.datatools.sqltools.parsers.sql.xml.query"/>
+ <plugin id="org.eclipse.datatools.sqltools.plan"/>
+ <plugin id="org.eclipse.datatools.sqltools.result"/>
+ <plugin id="org.eclipse.datatools.sqltools.result.ui"/>
+ <plugin id="org.eclipse.datatools.sqltools.routineeditor"/>
+ <plugin id="org.eclipse.datatools.sqltools.routineeditor.ui"/>
+ <plugin id="org.eclipse.datatools.sqltools.schemaobjecteditor"/>
+ <plugin id="org.eclipse.datatools.sqltools.schemaobjecteditor.ui"/>
+ <plugin id="org.eclipse.datatools.sqltools.schemaobjecteditor.ui.pages"/>
+ <plugin id="org.eclipse.datatools.sqltools.sql"/>
+ <plugin id="org.eclipse.datatools.sqltools.sql.ui"/>
+ <plugin id="org.eclipse.datatools.sqltools.sqlbuilder"/>
+ <plugin id="org.eclipse.datatools.sqltools.sqleditor"/>
+ <plugin id="org.eclipse.datatools.sqltools.sqlscrapbook"/>
+ <plugin id="org.eclipse.datatools.sqltools.tabledataeditor"/>
+ <plugin id="org.eclipse.debug.core"/>
+ <plugin id="org.eclipse.debug.ui"/>
+ <plugin id="org.eclipse.draw2d"/>
+ <plugin id="org.eclipse.ecf"/>
+ <plugin id="org.eclipse.ecf.filetransfer"/>
+ <plugin id="org.eclipse.ecf.identity"/>
+ <plugin id="org.eclipse.ecf.provider.filetransfer"/>
+ <plugin id="org.eclipse.ecf.provider.filetransfer.ssl" fragment="true"/>
+ <plugin id="org.eclipse.ecf.ssl" fragment="true"/>
+ <plugin id="org.eclipse.emf.common"/>
+ <plugin id="org.eclipse.emf.common.ui"/>
+ <plugin id="org.eclipse.emf.ecore"/>
+ <plugin id="org.eclipse.emf.ecore.change"/>
+ <plugin id="org.eclipse.emf.ecore.edit"/>
+ <plugin id="org.eclipse.emf.ecore.xmi"/>
+ <plugin id="org.eclipse.emf.edit"/>
+ <plugin id="org.eclipse.emf.edit.ui"/>
+ <plugin id="org.eclipse.equinox.app"/>
+ <plugin id="org.eclipse.equinox.common"/>
+ <plugin id="org.eclipse.equinox.concurrent"/>
+ <plugin id="org.eclipse.equinox.http.jetty"/>
+ <plugin id="org.eclipse.equinox.http.servlet"/>
+ <plugin id="org.eclipse.equinox.p2.artifact.repository"/>
+ <plugin id="org.eclipse.equinox.p2.core"/>
+ <plugin id="org.eclipse.equinox.p2.engine"/>
+ <plugin id="org.eclipse.equinox.p2.jarprocessor"/>
+ <plugin id="org.eclipse.equinox.p2.metadata"/>
+ <plugin id="org.eclipse.equinox.p2.metadata.repository"/>
+ <plugin id="org.eclipse.equinox.p2.repository"/>
+ <plugin id="org.eclipse.equinox.preferences"/>
+ <plugin id="org.eclipse.equinox.registry"/>
+ <plugin id="org.eclipse.equinox.security"/>
+ <plugin id="org.eclipse.gef"/>
+ <plugin id="org.eclipse.help"/>
+ <plugin id="org.eclipse.help.base"/>
+ <plugin id="org.eclipse.help.ui"/>
+ <plugin id="org.eclipse.jdt.compiler.apt" fragment="true"/>
+ <plugin id="org.eclipse.jdt.compiler.tool" fragment="true"/>
+ <plugin id="org.eclipse.jdt.core"/>
+ <plugin id="org.eclipse.jdt.core.manipulation"/>
+ <plugin id="org.eclipse.jdt.debug"/>
+ <plugin id="org.eclipse.jdt.debug.ui"/>
+ <plugin id="org.eclipse.jdt.launching"/>
+ <plugin id="org.eclipse.jdt.ui"/>
+ <plugin id="org.eclipse.jface"/>
+ <plugin id="org.eclipse.jface.databinding"/>
+ <plugin id="org.eclipse.jface.text"/>
+ <plugin id="org.eclipse.ltk.core.refactoring"/>
+ <plugin id="org.eclipse.ltk.ui.refactoring"/>
+ <plugin id="org.eclipse.osgi"/>
+ <plugin id="org.eclipse.osgi.services"/>
+ <plugin id="org.eclipse.search"/>
+ <plugin id="org.eclipse.swt"/>
+ <plugin id="org.eclipse.swt.gtk.linux.x86" fragment="true"/>
+ <plugin id="org.eclipse.team.core"/>
+ <plugin id="org.eclipse.team.ui"/>
+ <plugin id="org.eclipse.text"/>
+ <plugin id="org.eclipse.ui"/>
+ <plugin id="org.eclipse.ui.cheatsheets"/>
+ <plugin id="org.eclipse.ui.console"/>
+ <plugin id="org.eclipse.ui.editors"/>
+ <plugin id="org.eclipse.ui.forms"/>
+ <plugin id="org.eclipse.ui.ide"/>
+ <plugin id="org.eclipse.ui.navigator"/>
+ <plugin id="org.eclipse.ui.navigator.resources"/>
+ <plugin id="org.eclipse.ui.views"/>
+ <plugin id="org.eclipse.ui.views.properties.tabbed"/>
+ <plugin id="org.eclipse.ui.workbench"/>
+ <plugin id="org.eclipse.ui.workbench.texteditor"/>
+ <plugin id="org.mortbay.jetty.server"/>
+ <plugin id="org.mortbay.jetty.util"/>
+ </plugins>
+
+
+</product>
diff --git a/examples/org.eclipse.datatools.enablement.rcp/plugin.xml b/examples/org.eclipse.datatools.enablement.rcp/plugin.xml
new file mode 100644
index 0000000..ca99d4a
--- /dev/null
+++ b/examples/org.eclipse.datatools.enablement.rcp/plugin.xml
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.2"?>
+<plugin>
+
+ <extension
+ id="application"
+ point="org.eclipse.core.runtime.applications">
+ <application
+ icon="icons/alt_launcher.ico"
+ visible="true">
+ <run
+ class="org.eclipse.datatools.enablement.rcp.Application">
+ </run>
+ </application>
+ </extension>
+ <extension
+ point="org.eclipse.ui.perspectives">
+ <perspective
+ name="RCP Perspective"
+ class="org.eclipse.datatools.enablement.rcp.Perspective"
+ id="org.eclipse.datatools.enablement.rcp.perspective">
+ </perspective>
+ </extension>
+ <extension
+ id="product"
+ point="org.eclipse.core.runtime.products">
+ <product
+ application="org.eclipse.datatools.enablement.rcp.application"
+ name="DTP Enablement RCP">
+ <property
+ name="windowImages"
+ value="icons/alt_window_16.gif,icons/alt_window_32.gif">
+ </property>
+ <property
+ name="appName"
+ value="DTP Enablement RCP">
+ </property>
+ <property
+ name="startupProgressRect"
+ value="5,275,445,15">
+ </property>
+ <property
+ name="preferenceCustomization"
+ value="plugin_customization.ini">
+ </property>
+ <property
+ name="startupForegroundColor"
+ value="000000">
+ </property>
+ <property
+ name="startupMessageRect"
+ value="7,252,445,20">
+ </property>
+ <property
+ name="aboutImage"
+ value="icons/alt_about.gif">
+ </property>
+ </product>
+ </extension>
+
+</plugin>
diff --git a/examples/org.eclipse.datatools.enablement.rcp/plugin_customization.ini b/examples/org.eclipse.datatools.enablement.rcp/plugin_customization.ini
new file mode 100644
index 0000000..ecdf68e
--- /dev/null
+++ b/examples/org.eclipse.datatools.enablement.rcp/plugin_customization.ini
@@ -0,0 +1 @@
+org.eclipse.ui/SHOW_PROGRESS_ON_STARTUP = true
diff --git a/examples/org.eclipse.datatools.enablement.rcp/readme.txt b/examples/org.eclipse.datatools.enablement.rcp/readme.txt
new file mode 100644
index 0000000..71f5edd
--- /dev/null
+++ b/examples/org.eclipse.datatools.enablement.rcp/readme.txt
@@ -0,0 +1,7 @@
+#Readme added March 12, 2010
+When exporting a RCP product on linux, there seems to be an issue with running the
+generated command-line executable without explicit arguments. So when you run it,
+run with arguments appropriate for your environment such as:
+
+ ./[myexecutable] -os linux -ws gtk -arch x86
+
diff --git a/examples/org.eclipse.datatools.enablement.rcp/splash.bmp b/examples/org.eclipse.datatools.enablement.rcp/splash.bmp
new file mode 100644
index 0000000..abd6b76
--- /dev/null
+++ b/examples/org.eclipse.datatools.enablement.rcp/splash.bmp
Binary files differ
diff --git a/examples/org.eclipse.datatools.enablement.rcp/src/org/eclipse/datatools/enablement/rcp/Activator.java b/examples/org.eclipse.datatools.enablement.rcp/src/org/eclipse/datatools/enablement/rcp/Activator.java
new file mode 100644
index 0000000..bd424ab
--- /dev/null
+++ b/examples/org.eclipse.datatools.enablement.rcp/src/org/eclipse/datatools/enablement/rcp/Activator.java
@@ -0,0 +1,72 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Sybase, Inc. and others
+ *
+ * All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License v1.0 which
+ * accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors: Ingres - initial API and implementation
+ * brianf - a few tweaks
+ ******************************************************************************/
+package org.eclipse.datatools.enablement.rcp;
+
+import org.eclipse.jface.resource.ImageDescriptor;
+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.datatools.enablement.rcp"; //$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;
+ }
+
+ /**
+ * Returns an image descriptor for the image file at the given
+ * plug-in relative path
+ *
+ * @param path the path
+ * @return the image descriptor
+ */
+ public static ImageDescriptor getImageDescriptor(String path) {
+ return imageDescriptorFromPlugin(PLUGIN_ID, path);
+ }
+}
diff --git a/examples/org.eclipse.datatools.enablement.rcp/src/org/eclipse/datatools/enablement/rcp/Application.java b/examples/org.eclipse.datatools.enablement.rcp/src/org/eclipse/datatools/enablement/rcp/Application.java
new file mode 100644
index 0000000..7b0bbc5
--- /dev/null
+++ b/examples/org.eclipse.datatools.enablement.rcp/src/org/eclipse/datatools/enablement/rcp/Application.java
@@ -0,0 +1,57 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Sybase, Inc. and others
+ *
+ * All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License v1.0 which
+ * accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors: Ingres - initial API and implementation
+ * brianf - a few tweaks
+ ******************************************************************************/
+package org.eclipse.datatools.enablement.rcp;
+
+import org.eclipse.equinox.app.IApplication;
+import org.eclipse.equinox.app.IApplicationContext;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.PlatformUI;
+
+/**
+ * This class controls all aspects of the application's execution
+ */
+public class Application implements IApplication {
+
+ /* (non-Javadoc)
+ * @see org.eclipse.equinox.app.IApplication#start(org.eclipse.equinox.app.IApplicationContext)
+ */
+ public Object start(IApplicationContext context) throws Exception {
+ Display display = PlatformUI.createDisplay();
+ try {
+ int returnCode = PlatformUI.createAndRunWorkbench(display, new ApplicationWorkbenchAdvisor());
+ if (returnCode == PlatformUI.RETURN_RESTART)
+ return IApplication.EXIT_RESTART;
+ else
+ return IApplication.EXIT_OK;
+ } finally {
+ display.dispose();
+ }
+
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.equinox.app.IApplication#stop()
+ */
+ public void stop() {
+ final IWorkbench workbench = PlatformUI.getWorkbench();
+ if (workbench == null)
+ return;
+ final Display display = workbench.getDisplay();
+ display.syncExec(new Runnable() {
+ public void run() {
+ if (!display.isDisposed())
+ workbench.close();
+ }
+ });
+ }
+}
diff --git a/examples/org.eclipse.datatools.enablement.rcp/src/org/eclipse/datatools/enablement/rcp/ApplicationActionBarAdvisor.java b/examples/org.eclipse.datatools.enablement.rcp/src/org/eclipse/datatools/enablement/rcp/ApplicationActionBarAdvisor.java
new file mode 100644
index 0000000..5420069
--- /dev/null
+++ b/examples/org.eclipse.datatools.enablement.rcp/src/org/eclipse/datatools/enablement/rcp/ApplicationActionBarAdvisor.java
@@ -0,0 +1,1496 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Sybase, Inc. and others
+ *
+ * All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License v1.0 which
+ * accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors: Ingres - initial API and implementation
+ * brianf - a few tweaks
+ ******************************************************************************/
+package org.eclipse.datatools.enablement.rcp;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResourceChangeEvent;
+import org.eclipse.core.resources.IResourceChangeListener;
+import org.eclipse.core.resources.IResourceDelta;
+import org.eclipse.core.resources.IWorkspace;
+import org.eclipse.core.resources.IncrementalProjectBuilder;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.Preferences;
+import org.eclipse.jface.action.ActionContributionItem;
+import org.eclipse.jface.action.GroupMarker;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.action.IContributionItem;
+import org.eclipse.jface.action.ICoolBarManager;
+import org.eclipse.jface.action.IMenuManager;
+import org.eclipse.jface.action.IStatusLineManager;
+import org.eclipse.jface.action.IToolBarManager;
+import org.eclipse.jface.action.MenuManager;
+import org.eclipse.jface.action.Separator;
+import org.eclipse.jface.action.StatusLineContributionItem;
+import org.eclipse.jface.internal.provisional.action.IToolBarContributionItem;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.util.IPropertyChangeListener;
+import org.eclipse.jface.util.PropertyChangeEvent;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.IPageListener;
+import org.eclipse.ui.ISharedImages;
+import org.eclipse.ui.IWorkbenchActionConstants;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.actions.ActionFactory;
+import org.eclipse.ui.actions.BuildAction;
+import org.eclipse.ui.actions.ContributionItemFactory;
+import org.eclipse.ui.actions.NewWizardMenu;
+import org.eclipse.ui.actions.ActionFactory.IWorkbenchAction;
+import org.eclipse.ui.application.ActionBarAdvisor;
+import org.eclipse.ui.application.IActionBarConfigurer;
+import org.eclipse.ui.ide.IDEActionFactory;
+import org.eclipse.ui.ide.IIDEActionConstants;
+import org.eclipse.ui.internal.IPreferenceConstants;
+import org.eclipse.ui.internal.IWorkbenchHelpContextIds;
+import org.eclipse.ui.internal.WorkbenchMessages;
+import org.eclipse.ui.internal.WorkbenchPlugin;
+import org.eclipse.ui.internal.handlers.IActionCommandMappingService;
+import org.eclipse.ui.internal.ide.AboutInfo;
+import org.eclipse.ui.internal.ide.IDEInternalWorkbenchImages;
+import org.eclipse.ui.internal.ide.IDEWorkbenchMessages;
+import org.eclipse.ui.internal.ide.IDEWorkbenchPlugin;
+import org.eclipse.ui.internal.ide.actions.BuildSetMenu;
+import org.eclipse.ui.internal.ide.actions.BuildUtilities;
+import org.eclipse.ui.internal.ide.actions.QuickMenuAction;
+import org.eclipse.ui.internal.ide.actions.RetargetActionWithDefault;
+import org.eclipse.ui.internal.provisional.application.IActionBarConfigurer2;
+import org.eclipse.ui.menus.CommandContributionItem;
+import org.eclipse.ui.menus.CommandContributionItemParameter;
+import org.eclipse.ui.menus.IMenuService;
+
+public class ApplicationActionBarAdvisor extends ActionBarAdvisor {
+
+ private final IWorkbenchWindow window;
+
+ // generic actions
+ private IWorkbenchAction closeAction;
+
+ private IWorkbenchAction closeAllAction;
+
+ private IWorkbenchAction closeOthersAction;
+
+ private IWorkbenchAction closeAllSavedAction;
+
+ private IWorkbenchAction saveAction;
+
+ private IWorkbenchAction saveAllAction;
+
+ private IWorkbenchAction newWindowAction;
+
+ private IWorkbenchAction newEditorAction;
+
+ private IWorkbenchAction helpContentsAction;
+
+ private IWorkbenchAction helpSearchAction;
+
+ private IWorkbenchAction dynamicHelpAction;
+
+ private IWorkbenchAction aboutAction;
+
+ private IWorkbenchAction openPreferencesAction;
+
+ private IWorkbenchAction saveAsAction;
+
+ private IWorkbenchAction hideShowEditorAction;
+
+ private IWorkbenchAction savePerspectiveAction;
+
+ private IWorkbenchAction resetPerspectiveAction;
+
+ private IWorkbenchAction editActionSetAction;
+
+ private IWorkbenchAction closePerspAction;
+
+ private IWorkbenchAction lockToolBarAction;
+
+ private IWorkbenchAction closeAllPerspsAction;
+
+ private IWorkbenchAction showViewMenuAction;
+
+ private IWorkbenchAction showPartPaneMenuAction;
+
+ private IWorkbenchAction nextPartAction;
+
+ private IWorkbenchAction prevPartAction;
+
+ private IWorkbenchAction nextEditorAction;
+
+ private IWorkbenchAction prevEditorAction;
+
+ private IWorkbenchAction nextPerspectiveAction;
+
+ private IWorkbenchAction prevPerspectiveAction;
+
+ private IWorkbenchAction activateEditorAction;
+
+ private IWorkbenchAction maximizePartAction;
+
+ private IWorkbenchAction minimizePartAction;
+
+ private IWorkbenchAction switchToEditorAction;
+
+ private IWorkbenchAction workbookEditorsAction;
+
+ private IWorkbenchAction quickAccessAction;
+
+ private IWorkbenchAction backwardHistoryAction;
+
+ private IWorkbenchAction forwardHistoryAction;
+
+ // generic retarget actions
+ private IWorkbenchAction undoAction;
+
+ private IWorkbenchAction redoAction;
+
+ private IWorkbenchAction quitAction;
+
+ private IWorkbenchAction goIntoAction;
+
+ private IWorkbenchAction backAction;
+
+ private IWorkbenchAction forwardAction;
+
+ private IWorkbenchAction upAction;
+
+ private IWorkbenchAction nextAction;
+
+ private IWorkbenchAction previousAction;
+
+ // IDE-specific actions
+ private IWorkbenchAction openWorkspaceAction;
+
+ private IWorkbenchAction projectPropertyDialogAction;
+
+ private IWorkbenchAction newWizardAction;
+
+ private IWorkbenchAction newWizardDropDownAction;
+
+ private IWorkbenchAction importResourcesAction;
+
+ private IWorkbenchAction exportResourcesAction;
+
+ IWorkbenchAction buildAllAction; // Incremental workspace build
+
+ private IWorkbenchAction cleanAction;
+
+ private IWorkbenchAction toggleAutoBuildAction;
+
+ MenuManager buildWorkingSetMenu;
+
+ private IWorkbenchAction quickStartAction;
+
+ private IWorkbenchAction tipsAndTricksAction;
+
+ private QuickMenuAction showInQuickMenu;
+
+ private QuickMenuAction newQuickMenu;
+
+ private IWorkbenchAction introAction;
+
+ // IDE-specific retarget actions
+ IWorkbenchAction buildProjectAction;
+
+ // contribution items
+ // @issue should obtain from ContributionItemFactory
+ private NewWizardMenu newWizardMenu;
+
+ private IContributionItem pinEditorContributionItem;
+
+// private IContributionItem searchComboItem;
+
+ // @issue class is workbench internal
+ private StatusLineContributionItem statusLineItem;
+
+ private Preferences.IPropertyChangeListener prefListener;
+
+ // listener for the "close editors automatically"
+ // preference change
+ private IPropertyChangeListener propPrefListener;
+
+ private IPageListener pageListener;
+
+ private IResourceChangeListener resourceListener;
+
+ /**
+ * Indicates if the action builder has been disposed
+ */
+ private boolean isDisposed = false;
+
+ /**
+ * The coolbar context menu manager.
+ * @since 3.3
+ */
+ private MenuManager coolbarPopupMenuManager;
+
+ /**
+ * Constructs a new action builder which contributes actions
+ * to the given window.
+ *
+ * @param configurer the action bar configurer for the window
+ */
+ public ApplicationActionBarAdvisor(IActionBarConfigurer configurer) {
+ super(configurer);
+ window = configurer.getWindowConfigurer().getWindow();
+ }
+
+ /**
+ * Returns the window to which this action builder is contributing.
+ */
+ private IWorkbenchWindow getWindow() {
+ return window;
+ }
+
+ /**
+ * Hooks listeners on the preference store and the window's page, perspective and selection services.
+ */
+ private void hookListeners() {
+
+ pageListener = new IPageListener() {
+ public void pageActivated(IWorkbenchPage page) {
+ // do nothing
+ }
+
+ public void pageClosed(IWorkbenchPage page) {
+ // do nothing
+ }
+
+ public void pageOpened(IWorkbenchPage page) {
+ // set default build handler -- can't be done until the shell is available
+ IAction buildHandler = new BuildAction(page.getWorkbenchWindow(), IncrementalProjectBuilder.INCREMENTAL_BUILD);
+ ((RetargetActionWithDefault)buildProjectAction).setDefaultHandler(buildHandler);
+ }
+ };
+ getWindow().addPageListener(pageListener);
+
+ prefListener = new Preferences.IPropertyChangeListener() {
+ public void propertyChange(Preferences.PropertyChangeEvent event) {
+ if (event.getProperty().equals(
+ ResourcesPlugin.PREF_AUTO_BUILDING)) {
+ updateBuildActions(false);
+ }
+ }
+ };
+ ResourcesPlugin.getPlugin().getPluginPreferences()
+ .addPropertyChangeListener(prefListener);
+
+ // listener for the "close editors automatically"
+ // preference change
+ propPrefListener = new IPropertyChangeListener() {
+ public void propertyChange(PropertyChangeEvent event) {
+ if (event.getProperty().equals(
+ IPreferenceConstants.REUSE_EDITORS_BOOLEAN)) {
+ if (window.getShell() != null
+ && !window.getShell().isDisposed()) {
+ // this property change notification could be from a non-ui thread
+ window.getShell().getDisplay().syncExec(new Runnable() {
+ public void run() {
+ updatePinActionToolbar();
+ }
+ });
+ }
+ }
+ }
+ };
+ /*
+ * In order to ensure that the pin action toolbar sets its size
+ * correctly, the pin action should set its visiblity before we call updatePinActionToolbar().
+ *
+ * In other words we always want the PinActionContributionItem to be notified before the
+ * WorkbenchActionBuilder.
+ */
+ WorkbenchPlugin.getDefault().getPreferenceStore()
+ .addPropertyChangeListener(propPrefListener);
+ //listen for project description changes, which can affect enablement of build actions
+ resourceListener = new IResourceChangeListener() {
+ public void resourceChanged(IResourceChangeEvent event) {
+ IResourceDelta delta = event.getDelta();
+ if (delta == null) {
+ return;
+ }
+ IResourceDelta[] projectDeltas = delta.getAffectedChildren();
+ for (int i = 0; i < projectDeltas.length; i++) {
+ int kind = projectDeltas[i].getKind();
+ //affected by projects being opened/closed or description changes
+ boolean changed = (projectDeltas[i].getFlags() & (IResourceDelta.DESCRIPTION | IResourceDelta.OPEN)) != 0;
+ if (kind != IResourceDelta.CHANGED || changed) {
+ updateBuildActions(false);
+ return;
+ }
+ }
+ }
+ };
+ ResourcesPlugin.getWorkspace().addResourceChangeListener(resourceListener, IResourceChangeEvent.POST_CHANGE);
+ }
+
+ public void fillActionBars(int flags) {
+ super.fillActionBars(flags);
+ if ((flags & FILL_PROXY) == 0) {
+ updateBuildActions(true);
+ hookListeners();
+ }
+ }
+
+ /**
+ * Fills the coolbar with the workbench actions.
+ */
+ protected void fillCoolBar(ICoolBarManager coolBar) {
+
+ IActionBarConfigurer2 actionBarConfigurer = (IActionBarConfigurer2) getActionBarConfigurer();
+ { // Set up the context Menu
+ coolbarPopupMenuManager = new MenuManager();
+ coolbarPopupMenuManager.add(new ActionContributionItem(lockToolBarAction));
+ coolbarPopupMenuManager.add(new ActionContributionItem(editActionSetAction));
+ coolBar.setContextMenuManager(coolbarPopupMenuManager);
+ IMenuService menuService = (IMenuService) window.getService(IMenuService.class);
+ menuService.populateContributionManager(coolbarPopupMenuManager, "popup:windowCoolbarContextMenu"); //$NON-NLS-1$
+ }
+ coolBar.add(new GroupMarker(IIDEActionConstants.GROUP_FILE));
+ { // File Group
+ IToolBarManager fileToolBar = actionBarConfigurer.createToolBarManager();
+// fileToolBar.add(new Separator(IWorkbenchActionConstants.NEW_GROUP));
+// fileToolBar.add(newWizardDropDownAction);
+ fileToolBar.add(new GroupMarker(IWorkbenchActionConstants.NEW_EXT));
+ fileToolBar.add(new GroupMarker(
+ IWorkbenchActionConstants.SAVE_GROUP));
+ fileToolBar.add(saveAction);
+ fileToolBar
+ .add(new GroupMarker(IWorkbenchActionConstants.SAVE_EXT));
+ fileToolBar.add(getPrintItem());
+ fileToolBar
+ .add(new GroupMarker(IWorkbenchActionConstants.PRINT_EXT));
+
+ fileToolBar
+ .add(new Separator(IWorkbenchActionConstants.BUILD_GROUP));
+ fileToolBar
+ .add(new GroupMarker(IWorkbenchActionConstants.BUILD_EXT));
+ fileToolBar.add(new Separator(
+ IWorkbenchActionConstants.MB_ADDITIONS));
+
+ // Add to the cool bar manager
+ coolBar.add(actionBarConfigurer.createToolBarContributionItem(fileToolBar,
+ IWorkbenchActionConstants.TOOLBAR_FILE));
+ }
+
+ coolBar.add(new GroupMarker(IWorkbenchActionConstants.MB_ADDITIONS));
+
+ coolBar.add(new GroupMarker(IIDEActionConstants.GROUP_NAV));
+ { // Navigate group
+ IToolBarManager navToolBar = actionBarConfigurer.createToolBarManager();
+ navToolBar.add(new Separator(
+ IWorkbenchActionConstants.HISTORY_GROUP));
+ navToolBar
+ .add(new GroupMarker(IWorkbenchActionConstants.GROUP_APP));
+ navToolBar.add(backwardHistoryAction);
+ navToolBar.add(forwardHistoryAction);
+ navToolBar.add(new Separator(IWorkbenchActionConstants.PIN_GROUP));
+ navToolBar.add(pinEditorContributionItem);
+
+ // Add to the cool bar manager
+ coolBar.add(actionBarConfigurer.createToolBarContributionItem(navToolBar,
+ IWorkbenchActionConstants.TOOLBAR_NAVIGATE));
+ }
+
+ coolBar.add(new GroupMarker(IWorkbenchActionConstants.GROUP_EDITOR));
+
+ coolBar.add(new GroupMarker(IWorkbenchActionConstants.GROUP_HELP));
+
+ { // Help group
+ IToolBarManager helpToolBar = actionBarConfigurer.createToolBarManager();
+ helpToolBar.add(new Separator(IWorkbenchActionConstants.GROUP_HELP));
+// helpToolBar.add(searchComboItem);
+ // Add the group for applications to contribute
+ helpToolBar.add(new GroupMarker(IWorkbenchActionConstants.GROUP_APP));
+ // Add to the cool bar manager
+ coolBar.add(actionBarConfigurer.createToolBarContributionItem(helpToolBar,
+ IWorkbenchActionConstants.TOOLBAR_HELP));
+ }
+
+ }
+
+ /**
+ * Fills the menu bar with the workbench actions.
+ */
+ protected void fillMenuBar(IMenuManager menuBar) {
+ menuBar.add(createFileMenu());
+ menuBar.add(createEditMenu());
+// menuBar.add(createNavigateMenu());
+// menuBar.add(createProjectMenu());
+ menuBar.add(new GroupMarker(IWorkbenchActionConstants.MB_ADDITIONS));
+ menuBar.add(createWindowMenu());
+ menuBar.add(createHelpMenu());
+ }
+
+ /**
+ * Creates and returns the File menu.
+ */
+ private MenuManager createFileMenu() {
+ MenuManager menu = new MenuManager(IDEWorkbenchMessages.Workbench_file, IWorkbenchActionConstants.M_FILE);
+ menu.add(new GroupMarker(IWorkbenchActionConstants.FILE_START));
+ {
+ // create the New submenu, using the same id for it as the New action
+ String newText = IDEWorkbenchMessages.Workbench_new;
+ String newId = ActionFactory.NEW.getId();
+ MenuManager newMenu = new MenuManager(newText, newId);
+ newMenu.setActionDefinitionId("org.eclipse.ui.file.newQuickMenu"); //$NON-NLS-1$
+ newMenu.add(new Separator(newId));
+ this.newWizardMenu = new NewWizardMenu(getWindow());
+ newMenu.add(this.newWizardMenu);
+ newMenu.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS));
+ menu.add(newMenu);
+ }
+
+ menu.add(new GroupMarker(IWorkbenchActionConstants.NEW_EXT));
+ menu.add(new Separator());
+
+ menu.add(closeAction);
+ menu.add(closeAllAction);
+ // menu.add(closeAllSavedAction);
+ menu.add(new GroupMarker(IWorkbenchActionConstants.CLOSE_EXT));
+ menu.add(new Separator());
+ menu.add(saveAction);
+ menu.add(saveAsAction);
+ menu.add(saveAllAction);
+ menu.add(getRevertItem());
+ menu.add(new Separator());
+ menu.add(getMoveItem());
+ menu.add(getRenameItem());
+ menu.add(getRefreshItem());
+
+ menu.add(new GroupMarker(IWorkbenchActionConstants.SAVE_EXT));
+ menu.add(new Separator());
+ menu.add(getPrintItem());
+ menu.add(new GroupMarker(IWorkbenchActionConstants.PRINT_EXT));
+ menu.add(new Separator());
+// menu.add(openWorkspaceAction);
+// menu.add(new GroupMarker(IWorkbenchActionConstants.OPEN_EXT));
+// menu.add(new Separator());
+// menu.add(importResourcesAction);
+// menu.add(exportResourcesAction);
+ menu.add(new GroupMarker(IWorkbenchActionConstants.IMPORT_EXT));
+ menu.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS));
+
+ menu.add(new Separator());
+ menu.add(getPropertiesItem());
+
+ menu.add(ContributionItemFactory.REOPEN_EDITORS.create(getWindow()));
+ menu.add(new GroupMarker(IWorkbenchActionConstants.MRU));
+ menu.add(new Separator());
+
+ // If we're on OS X we shouldn't show this command in the File menu. It
+ // should be invisible to the user. However, we should not remove it -
+ // the carbon UI code will do a search through our menu structure
+ // looking for it when Cmd-Q is invoked (or Quit is chosen from the
+ // application menu.
+ ActionContributionItem quitItem = new ActionContributionItem(quitAction);
+ quitItem.setVisible(!"carbon".equals(SWT.getPlatform())); //$NON-NLS-1$
+ menu.add(quitItem);
+ menu.add(new GroupMarker(IWorkbenchActionConstants.FILE_END));
+ return menu;
+ }
+
+ /**
+ * Creates and returns the Edit menu.
+ */
+ private MenuManager createEditMenu() {
+ MenuManager menu = new MenuManager(IDEWorkbenchMessages.Workbench_edit, IWorkbenchActionConstants.M_EDIT);
+ menu.add(new GroupMarker(IWorkbenchActionConstants.EDIT_START));
+
+ menu.add(undoAction);
+ menu.add(redoAction);
+ menu.add(new GroupMarker(IWorkbenchActionConstants.UNDO_EXT));
+ menu.add(new Separator());
+
+ menu.add(getCutItem());
+ menu.add(getCopyItem());
+ menu.add(getPasteItem());
+ menu.add(new GroupMarker(IWorkbenchActionConstants.CUT_EXT));
+ menu.add(new Separator());
+
+ menu.add(getDeleteItem());
+ menu.add(getSelectAllItem());
+ menu.add(new Separator());
+
+ menu.add(getFindItem());
+ menu.add(new GroupMarker(IWorkbenchActionConstants.FIND_EXT));
+ menu.add(new Separator());
+
+// menu.add(getBookmarkItem());
+// menu.add(getTaskItem());
+ menu.add(new GroupMarker(IWorkbenchActionConstants.ADD_EXT));
+
+ menu.add(new GroupMarker(IWorkbenchActionConstants.EDIT_END));
+ menu.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS));
+ return menu;
+ }
+
+ /**
+ * Creates and returns the Navigate menu.
+ */
+ private MenuManager createNavigateMenu() {
+ MenuManager menu = new MenuManager(
+ IDEWorkbenchMessages.Workbench_navigate, IWorkbenchActionConstants.M_NAVIGATE);
+ menu.add(new GroupMarker(IWorkbenchActionConstants.NAV_START));
+ menu.add(goIntoAction);
+
+ MenuManager goToSubMenu = new MenuManager(IDEWorkbenchMessages.Workbench_goTo, IWorkbenchActionConstants.GO_TO);
+ menu.add(goToSubMenu);
+ goToSubMenu.add(backAction);
+ goToSubMenu.add(forwardAction);
+ goToSubMenu.add(upAction);
+ goToSubMenu.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS));
+
+ menu.add(new Separator(IWorkbenchActionConstants.OPEN_EXT));
+ for (int i = 2; i < 5; ++i) {
+ menu.add(new Separator(IWorkbenchActionConstants.OPEN_EXT + i));
+ }
+ menu.add(new Separator(IWorkbenchActionConstants.SHOW_EXT));
+ {
+ MenuManager showInSubMenu = new MenuManager(
+ IDEWorkbenchMessages.Workbench_showIn, "showIn"); //$NON-NLS-1$
+ showInSubMenu.setActionDefinitionId(showInQuickMenu
+ .getActionDefinitionId());
+ showInSubMenu.add(ContributionItemFactory.VIEWS_SHOW_IN
+ .create(getWindow()));
+ menu.add(showInSubMenu);
+ }
+ for (int i = 2; i < 5; ++i) {
+ menu.add(new Separator(IWorkbenchActionConstants.SHOW_EXT + i));
+ }
+ menu.add(new Separator());
+ menu.add(nextAction);
+ menu.add(previousAction);
+ menu.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS));
+ menu.add(new GroupMarker(IWorkbenchActionConstants.NAV_END));
+
+ //TBD: Location of this actions
+ menu.add(new Separator());
+ menu.add(backwardHistoryAction);
+ menu.add(forwardHistoryAction);
+ return menu;
+ }
+
+ /**
+ * Creates and returns the Project menu.
+ */
+ private MenuManager createProjectMenu() {
+ MenuManager menu = new MenuManager(
+ IDEWorkbenchMessages.Workbench_project, IWorkbenchActionConstants.M_PROJECT);
+ menu.add(new Separator(IWorkbenchActionConstants.PROJ_START));
+
+ menu.add(getOpenProjectItem());
+ menu.add(getCloseProjectItem());
+ menu.add(new GroupMarker(IWorkbenchActionConstants.OPEN_EXT));
+ menu.add(new Separator());
+// menu.add(buildAllAction);
+// menu.add(buildProjectAction);
+// addWorkingSetBuildActions(menu);
+// menu.add(cleanAction);
+// menu.add(toggleAutoBuildAction);
+// menu.add(new GroupMarker(IWorkbenchActionConstants.BUILD_EXT));
+// menu.add(new Separator());
+
+ menu.add(new GroupMarker(IWorkbenchActionConstants.MB_ADDITIONS));
+ menu.add(new GroupMarker(IWorkbenchActionConstants.PROJ_END));
+ menu.add(new Separator());
+ menu.add(projectPropertyDialogAction);
+ return menu;
+ }
+
+ /**
+ * Creates and returns the Window menu.
+ */
+ private MenuManager createWindowMenu() {
+ MenuManager menu = new MenuManager(
+ IDEWorkbenchMessages.Workbench_window, IWorkbenchActionConstants.M_WINDOW);
+
+// menu.add(newWindowAction);
+// menu.add(newEditorAction);
+//
+// menu.add(new Separator());
+ addPerspectiveActions(menu);
+ menu.add(new Separator());
+ addKeyboardShortcuts(menu);
+ Separator sep = new Separator(IWorkbenchActionConstants.MB_ADDITIONS);
+ sep.setVisible(!"carbon".equals(SWT.getPlatform())); //$NON-NLS-1$
+ menu.add(sep);
+
+ // See the comment for quit in createFileMenu
+ ActionContributionItem openPreferencesItem = new ActionContributionItem(openPreferencesAction);
+ openPreferencesItem.setVisible(!"carbon".equals(SWT.getPlatform())); //$NON-NLS-1$
+ menu.add(openPreferencesItem);
+
+ menu.add(ContributionItemFactory.OPEN_WINDOWS.create(getWindow()));
+ return menu;
+ }
+
+ /**
+ * Adds the perspective actions to the specified menu.
+ */
+ private void addPerspectiveActions(MenuManager menu) {
+ {
+// String openText = IDEWorkbenchMessages.Workbench_openPerspective;
+// MenuManager changePerspMenuMgr = new MenuManager(openText,
+// "openPerspective"); //$NON-NLS-1$
+// IContributionItem changePerspMenuItem = ContributionItemFactory.PERSPECTIVES_SHORTLIST
+// .create(getWindow());
+// changePerspMenuMgr.add(changePerspMenuItem);
+// menu.add(changePerspMenuMgr);
+ }
+ {
+ MenuManager showViewMenuMgr = new MenuManager(IDEWorkbenchMessages.Workbench_showView, "showView"); //$NON-NLS-1$
+ IContributionItem showViewMenu = ContributionItemFactory.VIEWS_SHORTLIST
+ .create(getWindow());
+ showViewMenuMgr.add(showViewMenu);
+ menu.add(showViewMenuMgr);
+ }
+ menu.add(new Separator());
+// menu.add(editActionSetAction);
+// menu.add(savePerspectiveAction);
+ menu.add(resetPerspectiveAction);
+// menu.add(closePerspAction);
+// menu.add(closeAllPerspsAction);
+ }
+
+ /**
+ * Adds the keyboard navigation submenu to the specified menu.
+ */
+ private void addWorkingSetBuildActions(MenuManager menu) {
+ buildWorkingSetMenu = new MenuManager(IDEWorkbenchMessages.Workbench_buildSet);
+ IContributionItem workingSetBuilds = new BuildSetMenu(window,
+ getActionBarConfigurer());
+ buildWorkingSetMenu.add(workingSetBuilds);
+ menu.add(buildWorkingSetMenu);
+ }
+
+ /**
+ * Adds the keyboard navigation submenu to the specified menu.
+ */
+ private void addKeyboardShortcuts(MenuManager menu) {
+ MenuManager subMenu = new MenuManager(IDEWorkbenchMessages.Workbench_shortcuts, "shortcuts"); //$NON-NLS-1$
+ menu.add(subMenu);
+ subMenu.add(showPartPaneMenuAction);
+ subMenu.add(showViewMenuAction);
+ subMenu.add(quickAccessAction);
+ subMenu.add(new Separator());
+ subMenu.add(maximizePartAction);
+ subMenu.add(minimizePartAction);
+ subMenu.add(new Separator());
+ subMenu.add(activateEditorAction);
+ subMenu.add(nextEditorAction);
+ subMenu.add(prevEditorAction);
+ subMenu.add(switchToEditorAction);
+ subMenu.add(new Separator());
+ subMenu.add(nextPartAction);
+ subMenu.add(prevPartAction);
+// subMenu.add(new Separator());
+// subMenu.add(nextPerspectiveAction);
+// subMenu.add(prevPerspectiveAction);
+ }
+
+ /**
+ * Creates and returns the Help menu.
+ */
+ private MenuManager createHelpMenu() {
+ MenuManager menu = new MenuManager(IDEWorkbenchMessages.Workbench_help, IWorkbenchActionConstants.M_HELP);
+ addSeparatorOrGroupMarker(menu, "group.intro"); //$NON-NLS-1$
+ // See if a welcome or intro page is specified
+ if (introAction != null) {
+ menu.add(introAction);
+ } else if (quickStartAction != null) {
+ menu.add(quickStartAction);
+ }
+ menu.add(new GroupMarker("group.intro.ext")); //$NON-NLS-1$
+ addSeparatorOrGroupMarker(menu, "group.main"); //$NON-NLS-1$
+ menu.add(helpContentsAction);
+ menu.add(helpSearchAction);
+ menu.add(dynamicHelpAction);
+ addSeparatorOrGroupMarker(menu, "group.assist"); //$NON-NLS-1$
+ // See if a tips and tricks page is specified
+ if (tipsAndTricksAction != null) {
+ menu.add(tipsAndTricksAction);
+ }
+ // HELP_START should really be the first item, but it was after
+ // quickStartAction and tipsAndTricksAction in 2.1.
+ menu.add(new GroupMarker(IWorkbenchActionConstants.HELP_START));
+ menu.add(new GroupMarker("group.main.ext")); //$NON-NLS-1$
+ addSeparatorOrGroupMarker(menu, "group.tutorials"); //$NON-NLS-1$
+ addSeparatorOrGroupMarker(menu, "group.tools"); //$NON-NLS-1$
+ addSeparatorOrGroupMarker(menu, "group.updates"); //$NON-NLS-1$
+ menu.add(new GroupMarker(IWorkbenchActionConstants.HELP_END));
+ addSeparatorOrGroupMarker(menu, IWorkbenchActionConstants.MB_ADDITIONS);
+ // about should always be at the bottom
+ menu.add(new Separator("group.about")); //$NON-NLS-1$
+
+ ActionContributionItem aboutItem = new ActionContributionItem(aboutAction);
+ aboutItem.setVisible(!"carbon".equals(SWT.getPlatform())); //$NON-NLS-1$
+ menu.add(aboutItem);
+ menu.add(new GroupMarker("group.about.ext")); //$NON-NLS-1$
+ return menu;
+ }
+
+ /**
+ * Adds a <code>GroupMarker</code> or <code>Separator</code> to a menu.
+ * The test for whether a separator should be added is done by checking for
+ * the existence of a preference matching the string
+ * useSeparator.MENUID.GROUPID that is set to <code>true</code>.
+ *
+ * @param menu
+ * the menu to add to
+ * @param groupId
+ * the group id for the added separator or group marker
+ */
+ private void addSeparatorOrGroupMarker(MenuManager menu, String groupId) {
+ String prefId = "useSeparator." + menu.getId() + "." + groupId; //$NON-NLS-1$ //$NON-NLS-2$
+ boolean addExtraSeparators = IDEWorkbenchPlugin.getDefault()
+ .getPreferenceStore().getBoolean(prefId);
+ if (addExtraSeparators) {
+ menu.add(new Separator(groupId));
+ } else {
+ menu.add(new GroupMarker(groupId));
+ }
+ }
+
+ /**
+ * Disposes any resources and unhooks any listeners that are no longer needed.
+ * Called when the window is closed.
+ */
+ public void dispose() {
+ if (isDisposed) {
+ return;
+ }
+ isDisposed = true;
+ IMenuService menuService = (IMenuService) window.getService(IMenuService.class);
+ menuService.releaseContributions(coolbarPopupMenuManager);
+ coolbarPopupMenuManager.dispose();
+
+ getActionBarConfigurer().getStatusLineManager().remove(statusLineItem);
+ if (pageListener != null) {
+ window.removePageListener(pageListener);
+ pageListener = null;
+ }
+ if (prefListener != null) {
+ ResourcesPlugin.getPlugin().getPluginPreferences()
+ .removePropertyChangeListener(prefListener);
+ prefListener = null;
+ }
+ if (propPrefListener != null) {
+ WorkbenchPlugin.getDefault().getPreferenceStore()
+ .removePropertyChangeListener(propPrefListener);
+ propPrefListener = null;
+ }
+ if (resourceListener != null) {
+ ResourcesPlugin.getWorkspace().removeResourceChangeListener(resourceListener);
+ resourceListener = null;
+ }
+
+ pinEditorContributionItem.dispose();
+ showInQuickMenu.dispose();
+ newQuickMenu.dispose();
+// searchComboItem.dispose();
+
+ // null out actions to make leak debugging easier
+ closeAction = null;
+ closeAllAction = null;
+ closeAllSavedAction = null;
+ closeOthersAction = null;
+ saveAction = null;
+ saveAllAction = null;
+ newWindowAction = null;
+ newEditorAction = null;
+ helpContentsAction = null;
+ helpSearchAction = null;
+ dynamicHelpAction = null;
+ aboutAction = null;
+ openPreferencesAction = null;
+ saveAsAction = null;
+ hideShowEditorAction = null;
+ savePerspectiveAction = null;
+ resetPerspectiveAction = null;
+ editActionSetAction = null;
+ closePerspAction = null;
+ lockToolBarAction = null;
+ closeAllPerspsAction = null;
+ showViewMenuAction = null;
+ showPartPaneMenuAction = null;
+ nextPartAction = null;
+ prevPartAction = null;
+ nextEditorAction = null;
+ prevEditorAction = null;
+ nextPerspectiveAction = null;
+ prevPerspectiveAction = null;
+ activateEditorAction = null;
+ maximizePartAction = null;
+ minimizePartAction = null;
+ switchToEditorAction = null;
+ quickAccessAction.dispose();
+ quickAccessAction = null;
+ backwardHistoryAction = null;
+ forwardHistoryAction = null;
+ undoAction = null;
+ redoAction = null;
+ quitAction = null;
+ goIntoAction = null;
+ backAction = null;
+ forwardAction = null;
+ upAction = null;
+ nextAction = null;
+ previousAction = null;
+ openWorkspaceAction = null;
+ projectPropertyDialogAction = null;
+ newWizardAction = null;
+ newWizardDropDownAction = null;
+ importResourcesAction = null;
+ exportResourcesAction = null;
+ buildAllAction = null;
+ cleanAction = null;
+ toggleAutoBuildAction = null;
+ buildWorkingSetMenu = null;
+ quickStartAction = null;
+ tipsAndTricksAction = null;
+ showInQuickMenu = null;
+ newQuickMenu = null;
+ buildProjectAction = null;
+ newWizardMenu = null;
+ pinEditorContributionItem = null;
+// searchComboItem = null;
+ statusLineItem = null;
+ prefListener = null;
+ propPrefListener = null;
+ introAction = null;
+
+ super.dispose();
+ }
+
+ void updateModeLine(final String text) {
+ statusLineItem.setText(text);
+ }
+
+ /**
+ * Returns true if the menu with the given ID should
+ * be considered as an OLE container menu. Container menus
+ * are preserved in OLE menu merging.
+ */
+ public boolean isApplicationMenu(String menuId) {
+ if (menuId.equals(IWorkbenchActionConstants.M_FILE)) {
+ return true;
+ }
+ if (menuId.equals(IWorkbenchActionConstants.M_WINDOW)) {
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * Return whether or not given id matches the id of the coolitems that
+ * the workbench creates.
+ */
+ public boolean isWorkbenchCoolItemId(String id) {
+ if (IWorkbenchActionConstants.TOOLBAR_FILE.equalsIgnoreCase(id)) {
+ return true;
+ }
+ if (IWorkbenchActionConstants.TOOLBAR_NAVIGATE.equalsIgnoreCase(id)) {
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * Fills the status line with the workbench contribution items.
+ */
+ protected void fillStatusLine(IStatusLineManager statusLine) {
+ statusLine.add(statusLineItem);
+ }
+
+ /**
+ * Creates actions (and contribution items) for the menu bar, toolbar and status line.
+ */
+ protected void makeActions(final IWorkbenchWindow window) {
+ // @issue should obtain from ConfigurationItemFactory
+ statusLineItem = new StatusLineContributionItem("ModeContributionItem"); //$NON-NLS-1$
+
+ newWizardAction = ActionFactory.NEW.create(window);
+ register(newWizardAction);
+
+ newWizardDropDownAction = IDEActionFactory.NEW_WIZARD_DROP_DOWN
+ .create(window);
+ register(newWizardDropDownAction);
+
+ importResourcesAction = ActionFactory.IMPORT.create(window);
+ register(importResourcesAction);
+
+ exportResourcesAction = ActionFactory.EXPORT.create(window);
+ register(exportResourcesAction);
+
+ buildAllAction = IDEActionFactory.BUILD.create(window);
+ register(buildAllAction);
+
+ cleanAction = IDEActionFactory.BUILD_CLEAN.create(window);
+ register(cleanAction);
+
+ toggleAutoBuildAction = IDEActionFactory.BUILD_AUTOMATICALLY
+ .create(window);
+ register(toggleAutoBuildAction);
+
+ saveAction = ActionFactory.SAVE.create(window);
+ register(saveAction);
+
+ saveAsAction = ActionFactory.SAVE_AS.create(window);
+ register(saveAsAction);
+
+ saveAllAction = ActionFactory.SAVE_ALL.create(window);
+ register(saveAllAction);
+
+ newWindowAction = ActionFactory.OPEN_NEW_WINDOW.create(getWindow());
+ newWindowAction.setText(IDEWorkbenchMessages.Workbench_openNewWindow);
+ register(newWindowAction);
+
+ newEditorAction = ActionFactory.NEW_EDITOR.create(window);
+ register(newEditorAction);
+
+ undoAction = ActionFactory.UNDO.create(window);
+ register(undoAction);
+
+ redoAction = ActionFactory.REDO.create(window);
+ register(redoAction);
+
+
+
+
+
+
+ closeAction = ActionFactory.CLOSE.create(window);
+ register(closeAction);
+
+ closeAllAction = ActionFactory.CLOSE_ALL.create(window);
+ register(closeAllAction);
+
+ closeOthersAction = ActionFactory.CLOSE_OTHERS.create(window);
+ register(closeOthersAction);
+
+ closeAllSavedAction = ActionFactory.CLOSE_ALL_SAVED.create(window);
+ register(closeAllSavedAction);
+
+ helpContentsAction = ActionFactory.HELP_CONTENTS.create(window);
+ register(helpContentsAction);
+
+ helpSearchAction = ActionFactory.HELP_SEARCH.create(window);
+ register(helpSearchAction);
+
+ dynamicHelpAction = ActionFactory.DYNAMIC_HELP.create(window);
+ register(dynamicHelpAction);
+
+ aboutAction = ActionFactory.ABOUT.create(window);
+ aboutAction
+ .setImageDescriptor(IDEInternalWorkbenchImages
+ .getImageDescriptor(IDEInternalWorkbenchImages.IMG_OBJS_DEFAULT_PROD));
+ register(aboutAction);
+
+ openPreferencesAction = ActionFactory.PREFERENCES.create(window);
+ register(openPreferencesAction);
+
+
+
+
+
+ makeFeatureDependentActions(window);
+
+ // Actions for invisible accelerators
+ showViewMenuAction = ActionFactory.SHOW_VIEW_MENU.create(window);
+ register(showViewMenuAction);
+
+ showPartPaneMenuAction = ActionFactory.SHOW_PART_PANE_MENU
+ .create(window);
+ register(showPartPaneMenuAction);
+
+ nextEditorAction = ActionFactory.NEXT_EDITOR.create(window);
+ register(nextEditorAction);
+ prevEditorAction = ActionFactory.PREVIOUS_EDITOR.create(window);
+ register(prevEditorAction);
+ ActionFactory.linkCycleActionPair(nextEditorAction, prevEditorAction);
+
+ nextPartAction = ActionFactory.NEXT_PART.create(window);
+ register(nextPartAction);
+ prevPartAction = ActionFactory.PREVIOUS_PART.create(window);
+ register(prevPartAction);
+ ActionFactory.linkCycleActionPair(nextPartAction, prevPartAction);
+
+ nextPerspectiveAction = ActionFactory.NEXT_PERSPECTIVE
+ .create(window);
+ register(nextPerspectiveAction);
+ prevPerspectiveAction = ActionFactory.PREVIOUS_PERSPECTIVE
+ .create(window);
+ register(prevPerspectiveAction);
+ ActionFactory.linkCycleActionPair(nextPerspectiveAction,
+ prevPerspectiveAction);
+
+ activateEditorAction = ActionFactory.ACTIVATE_EDITOR
+ .create(window);
+ register(activateEditorAction);
+
+ maximizePartAction = ActionFactory.MAXIMIZE.create(window);
+ register(maximizePartAction);
+
+ minimizePartAction = ActionFactory.MINIMIZE.create(window);
+ register(minimizePartAction);
+
+ switchToEditorAction = ActionFactory.SHOW_OPEN_EDITORS
+ .create(window);
+ register(switchToEditorAction);
+
+ workbookEditorsAction = ActionFactory.SHOW_WORKBOOK_EDITORS
+ .create(window);
+ register(workbookEditorsAction);
+
+ quickAccessAction = ActionFactory.SHOW_QUICK_ACCESS
+ .create(window);
+
+ hideShowEditorAction = ActionFactory.SHOW_EDITOR.create(window);
+ register(hideShowEditorAction);
+ savePerspectiveAction = ActionFactory.SAVE_PERSPECTIVE
+ .create(window);
+ register(savePerspectiveAction);
+ editActionSetAction = ActionFactory.EDIT_ACTION_SETS
+ .create(window);
+ register(editActionSetAction);
+ lockToolBarAction = ActionFactory.LOCK_TOOL_BAR.create(window);
+ register(lockToolBarAction);
+ resetPerspectiveAction = ActionFactory.RESET_PERSPECTIVE
+ .create(window);
+ register(resetPerspectiveAction);
+ closePerspAction = ActionFactory.CLOSE_PERSPECTIVE.create(window);
+ register(closePerspAction);
+ closeAllPerspsAction = ActionFactory.CLOSE_ALL_PERSPECTIVES
+ .create(window);
+ register(closeAllPerspsAction);
+
+ forwardHistoryAction = ActionFactory.FORWARD_HISTORY
+ .create(window);
+ register(forwardHistoryAction);
+
+ backwardHistoryAction = ActionFactory.BACKWARD_HISTORY
+ .create(window);
+ register(backwardHistoryAction);
+
+
+
+
+ quitAction = ActionFactory.QUIT.create(window);
+ register(quitAction);
+
+
+
+ goIntoAction = ActionFactory.GO_INTO.create(window);
+ register(goIntoAction);
+
+ backAction = ActionFactory.BACK.create(window);
+ register(backAction);
+
+ forwardAction = ActionFactory.FORWARD.create(window);
+ register(forwardAction);
+
+ upAction = ActionFactory.UP.create(window);
+ register(upAction);
+
+ nextAction = ActionFactory.NEXT.create(window);
+ nextAction
+ .setImageDescriptor(IDEInternalWorkbenchImages
+ .getImageDescriptor(IDEInternalWorkbenchImages.IMG_ETOOL_NEXT_NAV));
+ register(nextAction);
+
+ previousAction = ActionFactory.PREVIOUS.create(window);
+ previousAction
+ .setImageDescriptor(IDEInternalWorkbenchImages
+ .getImageDescriptor(IDEInternalWorkbenchImages.IMG_ETOOL_PREVIOUS_NAV));
+ register(previousAction);
+
+ buildProjectAction = IDEActionFactory.BUILD_PROJECT.create(window);
+ register(buildProjectAction);
+
+ openWorkspaceAction = IDEActionFactory.OPEN_WORKSPACE
+ .create(window);
+ register(openWorkspaceAction);
+
+ projectPropertyDialogAction = IDEActionFactory.OPEN_PROJECT_PROPERTIES
+ .create(window);
+ register(projectPropertyDialogAction);
+
+ if (window.getWorkbench().getIntroManager().hasIntro()) {
+ introAction = ActionFactory.INTRO.create(window);
+ register(introAction);
+ }
+
+ String showInQuickMenuId = "org.eclipse.ui.navigate.showInQuickMenu"; //$NON-NLS-1$
+ showInQuickMenu = new QuickMenuAction(showInQuickMenuId) {
+ protected void fillMenu(IMenuManager menu) {
+ menu.add(ContributionItemFactory.VIEWS_SHOW_IN
+ .create(window));
+ }
+ };
+ register(showInQuickMenu);
+
+ final String newQuickMenuId = "org.eclipse.ui.file.newQuickMenu"; //$NON-NLS-1$
+ newQuickMenu = new QuickMenuAction(newQuickMenuId) {
+ protected void fillMenu(IMenuManager menu) {
+ menu.add(new NewWizardMenu(window));
+ }
+ };
+ register(newQuickMenu);
+
+ pinEditorContributionItem = ContributionItemFactory.PIN_EDITOR
+ .create(window);
+
+// searchComboItem = ContributionItemFactory.HELP_SEARCH.create(window);
+ }
+
+ /**
+ * Creates the feature-dependent actions for the menu bar.
+ */
+ private void makeFeatureDependentActions(IWorkbenchWindow window) {
+ AboutInfo[] infos = null;
+
+ IPreferenceStore prefs = IDEWorkbenchPlugin.getDefault().getPreferenceStore();
+
+ // Optimization: avoid obtaining the about infos if the platform state is
+ // unchanged from last time. See bug 75130 for details.
+ String stateKey = "platformState"; //$NON-NLS-1$
+ String prevState = prefs.getString(stateKey);
+ String currentState = String.valueOf(Platform.getStateStamp());
+ boolean sameState = currentState.equals(prevState);
+ if (!sameState) {
+ prefs.putValue(stateKey, currentState);
+ }
+
+ // See if a welcome page is specified.
+ // Optimization: if welcome pages were found on a previous run, then just add the action.
+ String quickStartKey = IDEActionFactory.QUICK_START.getId();
+ String showQuickStart = prefs.getString(quickStartKey);
+ if (sameState && "true".equals(showQuickStart)) { //$NON-NLS-1$
+ quickStartAction = IDEActionFactory.QUICK_START.create(window);
+ register(quickStartAction);
+ }
+ else if (sameState && "false".equals(showQuickStart)) { //$NON-NLS-1$
+ // do nothing
+ }
+ else {
+ // do the work
+ infos = IDEWorkbenchPlugin.getDefault().getFeatureInfos();
+ boolean found = hasWelcomePage(infos);
+ prefs.setValue(quickStartKey, found);
+ if (found) {
+ quickStartAction = IDEActionFactory.QUICK_START.create(window);
+ register(quickStartAction);
+ }
+ }
+
+ // See if a tips and tricks page is specified.
+ // Optimization: if tips and tricks were found on a previous run, then just add the action.
+ String tipsAndTricksKey = IDEActionFactory.TIPS_AND_TRICKS.getId();
+ String showTipsAndTricks = prefs.getString(tipsAndTricksKey);
+ if (sameState && "true".equals(showTipsAndTricks)) { //$NON-NLS-1$
+ tipsAndTricksAction = IDEActionFactory.TIPS_AND_TRICKS
+ .create(window);
+ register(tipsAndTricksAction);
+ }
+ else if (sameState && "false".equals(showTipsAndTricks)) { //$NON-NLS-1$
+ // do nothing
+ }
+ else {
+ // do the work
+ if (infos == null) {
+ infos = IDEWorkbenchPlugin.getDefault().getFeatureInfos();
+ }
+ boolean found = hasTipsAndTricks(infos);
+ prefs.setValue(tipsAndTricksKey, found);
+ if (found) {
+ tipsAndTricksAction = IDEActionFactory.TIPS_AND_TRICKS
+ .create(window);
+ register(tipsAndTricksAction);
+ }
+ }
+ }
+
+ /**
+ * Returns whether any of the given infos have a welcome page.
+ *
+ * @param infos the infos
+ * @return <code>true</code> if a welcome page was found, <code>false</code> if not
+ */
+ private boolean hasWelcomePage(AboutInfo[] infos) {
+ for (int i = 0; i < infos.length; i++) {
+ if (infos[i].getWelcomePageURL() != null) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ /**
+ * Returns whether any of the given infos have tips and tricks.
+ *
+ * @param infos the infos
+ * @return <code>true</code> if tips and tricks were found, <code>false</code> if not
+ */
+ private boolean hasTipsAndTricks(AboutInfo[] infos) {
+ for (int i = 0; i < infos.length; i++) {
+ if (infos[i].getTipsAndTricksHref() != null) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ /**
+ * Update the build actions on the toolbar and menu bar based on the current
+ * state of autobuild. This method can be called from any thread.
+ *
+ * @param immediately
+ * <code>true</code> to update the actions immediately,
+ * <code>false</code> to queue the update to be run in the
+ * event loop
+ */
+ void updateBuildActions(boolean immediately) {
+ // this can be triggered by property or resource change notifications
+ Runnable update = new Runnable() {
+ public void run() {
+ if (isDisposed) {
+ return;
+ }
+ IWorkspace workspace = ResourcesPlugin.getWorkspace();
+ IProject[] projects = workspace.getRoot().getProjects();
+ boolean enabled = BuildUtilities.isEnabled(projects, IncrementalProjectBuilder.INCREMENTAL_BUILD);
+ //update menu bar actions in project menu
+ buildAllAction.setEnabled(enabled);
+ buildProjectAction.setEnabled(enabled);
+ toggleAutoBuildAction.setChecked(workspace.isAutoBuilding());
+ cleanAction.setEnabled(BuildUtilities.isEnabled(projects, IncrementalProjectBuilder.CLEAN_BUILD));
+
+ //update the cool bar build button
+ ICoolBarManager coolBarManager = getActionBarConfigurer()
+ .getCoolBarManager();
+ IContributionItem cbItem = coolBarManager
+ .find(IWorkbenchActionConstants.TOOLBAR_FILE);
+ if (!(cbItem instanceof IToolBarContributionItem)) {
+ // This should not happen
+ IDEWorkbenchPlugin.log("File toolbar contribution item is missing"); //$NON-NLS-1$
+ return;
+ }
+ IToolBarContributionItem toolBarItem = (IToolBarContributionItem) cbItem;
+ IToolBarManager toolBarManager = toolBarItem.getToolBarManager();
+ if (toolBarManager == null) {
+ // error if this happens, file toolbar assumed to always exist
+ IDEWorkbenchPlugin.log("File toolbar is missing"); //$NON-NLS-1$
+ return;
+ }
+ //add the build button if build actions are enabled, and remove it otherwise
+ boolean found = toolBarManager.find(buildAllAction.getId()) != null;
+ if (enabled && !found) {
+ toolBarManager.appendToGroup(IWorkbenchActionConstants.BUILD_GROUP,
+ buildAllAction);
+ toolBarManager.update(false);
+ toolBarItem.update(ICoolBarManager.SIZE);
+ } else if (buildAllAction != null && found && !enabled) {
+ toolBarManager.remove(buildAllAction.getId());
+ toolBarManager.update(false);
+ toolBarItem.update(ICoolBarManager.SIZE);
+ }
+ }
+ };
+ if (immediately) {
+ update.run();
+ }
+ else {
+ // Dispatch the update to be run later in the UI thread.
+ // This helps to reduce flicker if autobuild is being temporarily disabled programmatically.
+ Shell shell = window.getShell();
+ if (shell != null && !shell.isDisposed()) {
+ shell.getDisplay().asyncExec(update);
+ }
+ }
+ }
+
+ /**
+ * Update the pin action's tool bar
+ */
+ void updatePinActionToolbar() {
+
+ ICoolBarManager coolBarManager = getActionBarConfigurer()
+ .getCoolBarManager();
+ IContributionItem cbItem = coolBarManager
+ .find(IWorkbenchActionConstants.TOOLBAR_NAVIGATE);
+ if (!(cbItem instanceof IToolBarContributionItem)) {
+ // This should not happen
+ IDEWorkbenchPlugin
+ .log("Navigation toolbar contribution item is missing"); //$NON-NLS-1$
+ return;
+ }
+ IToolBarContributionItem toolBarItem = (IToolBarContributionItem) cbItem;
+ IToolBarManager toolBarManager = toolBarItem.getToolBarManager();
+ if (toolBarManager == null) {
+ // error if this happens, navigation toolbar assumed to always exist
+ IDEWorkbenchPlugin.log("Navigate toolbar is missing"); //$NON-NLS-1$
+ return;
+ }
+
+ toolBarManager.update(false);
+ toolBarItem.update(ICoolBarManager.SIZE);
+ }
+
+ private IContributionItem getCutItem() {
+ return getItem(
+ ActionFactory.CUT.getId(),
+ "org.eclipse.ui.edit.cut", //$NON-NLS-1$
+ ISharedImages.IMG_TOOL_CUT,
+ ISharedImages.IMG_TOOL_CUT_DISABLED,
+ WorkbenchMessages.Workbench_cut,
+ WorkbenchMessages.Workbench_cutToolTip, null);
+ }
+
+ private IContributionItem getCopyItem() {
+ return getItem(
+ ActionFactory.COPY.getId(),
+ "org.eclipse.ui.edit.copy", //$NON-NLS-1$
+ ISharedImages.IMG_TOOL_COPY,
+ ISharedImages.IMG_TOOL_COPY_DISABLED,
+ WorkbenchMessages.Workbench_copy,
+ WorkbenchMessages.Workbench_copyToolTip, null);
+ }
+
+ private IContributionItem getPasteItem() {
+ return getItem(
+ ActionFactory.PASTE.getId(),
+ "org.eclipse.ui.edit.paste", ISharedImages.IMG_TOOL_PASTE, //$NON-NLS-1$
+ ISharedImages.IMG_TOOL_PASTE_DISABLED,
+ WorkbenchMessages.Workbench_paste,
+ WorkbenchMessages.Workbench_pasteToolTip, null);
+ }
+
+ private IContributionItem getPrintItem() {
+ return getItem(
+ ActionFactory.PRINT.getId(),
+ "org.eclipse.ui.file.print", ISharedImages.IMG_ETOOL_PRINT_EDIT, //$NON-NLS-1$
+ ISharedImages.IMG_ETOOL_PRINT_EDIT_DISABLED,
+ WorkbenchMessages.Workbench_print,
+ WorkbenchMessages.Workbench_printToolTip, null);
+ }
+
+ private IContributionItem getSelectAllItem() {
+ return getItem(
+ ActionFactory.SELECT_ALL.getId(),
+ "org.eclipse.ui.edit.selectAll", //$NON-NLS-1$
+ null, null, WorkbenchMessages.Workbench_selectAll,
+ WorkbenchMessages.Workbench_selectAllToolTip, null);
+ }
+
+ private IContributionItem getFindItem() {
+ return getItem(
+ ActionFactory.FIND.getId(),
+ "org.eclipse.ui.edit.findReplace", //$NON-NLS-1$
+ null, null, WorkbenchMessages.Workbench_findReplace,
+ WorkbenchMessages.Workbench_findReplaceToolTip, null);
+ }
+
+ private IContributionItem getBookmarkItem() {
+ return getItem(
+ IDEActionFactory.BOOKMARK.getId(),
+ "org.eclipse.ui.edit.addBookmark", //$NON-NLS-1$
+ null, null, IDEWorkbenchMessages.Workbench_addBookmark,
+ IDEWorkbenchMessages.Workbench_addBookmarkToolTip, null);
+ }
+
+ private IContributionItem getTaskItem() {
+ return getItem(
+ IDEActionFactory.ADD_TASK.getId(),
+ "org.eclipse.ui.edit.addTask", //$NON-NLS-1$
+ null, null, IDEWorkbenchMessages.Workbench_addTask,
+ IDEWorkbenchMessages.Workbench_addTaskToolTip, null);
+ }
+
+ private IContributionItem getDeleteItem() {
+ return getItem(ActionFactory.DELETE.getId(),
+ "org.eclipse.ui.edit.delete", //$NON-NLS-1$
+ ISharedImages.IMG_TOOL_DELETE,
+ ISharedImages.IMG_TOOL_DELETE_DISABLED,
+ WorkbenchMessages.Workbench_delete,
+ WorkbenchMessages.Workbench_deleteToolTip,
+ IWorkbenchHelpContextIds.DELETE_RETARGET_ACTION);
+ }
+
+ private IContributionItem getRevertItem() {
+ return getItem(
+ ActionFactory.REVERT.getId(),
+ "org.eclipse.ui.file.revert", //$NON-NLS-1$
+ null, null, WorkbenchMessages.Workbench_revert,
+ WorkbenchMessages.Workbench_revertToolTip, null);
+ }
+
+ private IContributionItem getRefreshItem() {
+ return getItem(ActionFactory.REFRESH.getId(),
+ "org.eclipse.ui.file.refresh", null, null, //$NON-NLS-1$
+ WorkbenchMessages.Workbench_refresh,
+ WorkbenchMessages.Workbench_refreshToolTip, null);
+ }
+
+ private IContributionItem getPropertiesItem() {
+ return getItem(ActionFactory.PROPERTIES.getId(),
+ "org.eclipse.ui.file.properties", null, null, //$NON-NLS-1$
+ WorkbenchMessages.Workbench_properties,
+ WorkbenchMessages.Workbench_propertiesToolTip, null);
+ }
+
+ private IContributionItem getMoveItem() {
+ return getItem(ActionFactory.MOVE.getId(), "org.eclipse.ui.edit.move", //$NON-NLS-1$
+ null, null, WorkbenchMessages.Workbench_move,
+ WorkbenchMessages.Workbench_moveToolTip, null);
+ }
+
+ private IContributionItem getRenameItem() {
+ return getItem(ActionFactory.RENAME.getId(),
+ "org.eclipse.ui.edit.rename", null, null, //$NON-NLS-1$
+ WorkbenchMessages.Workbench_rename,
+ WorkbenchMessages.Workbench_renameToolTip, null);
+ }
+
+ private IContributionItem getOpenProjectItem() {
+ return getItem(IDEActionFactory.OPEN_PROJECT.getId(),
+ "org.eclipse.ui.project.openProject", null, null, //$NON-NLS-1$
+ IDEWorkbenchMessages.OpenResourceAction_text,
+ IDEWorkbenchMessages.OpenResourceAction_toolTip, null);
+ }
+
+ private IContributionItem getCloseProjectItem() {
+ return getItem(
+ IDEActionFactory.CLOSE_PROJECT.getId(),
+ "org.eclipse.ui.project.closeProject", //$NON-NLS-1$
+ null, null, IDEWorkbenchMessages.CloseResourceAction_text,
+ IDEWorkbenchMessages.CloseResourceAction_text, null);
+ }
+
+ private IContributionItem getItem(String actionId, String commandId,
+ String image, String disabledImage, String label, String tooltip, String helpContextId) {
+ ISharedImages sharedImages = getWindow().getWorkbench()
+ .getSharedImages();
+
+ IActionCommandMappingService acms = (IActionCommandMappingService) getWindow()
+ .getService(IActionCommandMappingService.class);
+ acms.map(actionId, commandId);
+
+ CommandContributionItemParameter commandParm = new CommandContributionItemParameter(
+ getWindow(), actionId, commandId, null, sharedImages
+ .getImageDescriptor(image), sharedImages
+ .getImageDescriptor(disabledImage), null, label, null,
+ tooltip, CommandContributionItem.STYLE_PUSH, null, false);
+ return new CommandContributionItem(commandParm);
+ }
+
+}
diff --git a/examples/org.eclipse.datatools.enablement.rcp/src/org/eclipse/datatools/enablement/rcp/ApplicationWorkbenchAdvisor.java b/examples/org.eclipse.datatools.enablement.rcp/src/org/eclipse/datatools/enablement/rcp/ApplicationWorkbenchAdvisor.java
new file mode 100644
index 0000000..4b3eb34
--- /dev/null
+++ b/examples/org.eclipse.datatools.enablement.rcp/src/org/eclipse/datatools/enablement/rcp/ApplicationWorkbenchAdvisor.java
@@ -0,0 +1,83 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Sybase, Inc. and others
+ *
+ * All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License v1.0 which
+ * accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors: Ingres - initial API and implementation
+ * brianf - a few tweaks
+ ******************************************************************************/
+package org.eclipse.datatools.enablement.rcp;
+
+import java.net.URL;
+
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.ui.application.IWorkbenchConfigurer;
+import org.eclipse.ui.application.IWorkbenchWindowConfigurer;
+import org.eclipse.ui.application.WorkbenchAdvisor;
+import org.eclipse.ui.application.WorkbenchWindowAdvisor;
+import org.eclipse.ui.ide.IDE;
+import org.eclipse.ui.internal.ide.IDEWorkbenchPlugin;
+import org.eclipse.ui.internal.ide.model.WorkbenchAdapterBuilder;
+import org.eclipse.ui.internal.ide.undo.WorkspaceUndoMonitor;
+import org.osgi.framework.Bundle;
+
+public class ApplicationWorkbenchAdvisor extends WorkbenchAdvisor {
+
+ private static final String PERSPECTIVE_ID = "org.eclipse.datatools.enablement.rcp.perspective";
+
+ private transient WorkspaceUndoMonitor workspaceUndoMonitor;
+
+ public WorkbenchWindowAdvisor createWorkbenchWindowAdvisor(IWorkbenchWindowConfigurer configurer) {
+ return new ApplicationWorkbenchWindowAdvisor(configurer);
+ }
+
+ public String getInitialWindowPerspectiveId() {
+ return PERSPECTIVE_ID;
+ }
+
+ public void initialize(IWorkbenchConfigurer configurer) {
+ super.initialize(configurer);
+ // make sure we always save and restore workspace state
+ configurer.setSaveAndRestore(true);
+ WorkbenchAdapterBuilder.registerAdapters();
+
+ final String ICONS_PATH = "icons/full/";
+ final String PATH_OBJECT = ICONS_PATH + "obj16/";
+ Bundle ideBundle = Platform.getBundle(IDEWorkbenchPlugin.IDE_WORKBENCH);
+ declareWorkbenchImage(configurer, ideBundle,
+ IDE.SharedImages.IMG_OBJ_PROJECT, PATH_OBJECT + "prj_obj.gif",
+ true);
+ declareWorkbenchImage(configurer, ideBundle,
+ IDE.SharedImages.IMG_OBJ_PROJECT_CLOSED, PATH_OBJECT
+ + "cprj_obj.gif", true);
+
+ // initialize the workspace undo monitor
+ workspaceUndoMonitor = WorkspaceUndoMonitor.getInstance();
+ }
+
+ private void declareWorkbenchImage(IWorkbenchConfigurer configurer_p,
+ Bundle ideBundle, String symbolicName, String path, boolean shared) {
+ URL url = ideBundle.getEntry(path);
+ ImageDescriptor desc = ImageDescriptor.createFromURL(url);
+ configurer_p.declareImage(symbolicName, desc, shared);
+ }
+
+ @Override
+ public IAdaptable getDefaultPageInput() {
+ return ResourcesPlugin.getWorkspace().getRoot();
+ }
+
+ @Override
+ public void postShutdown() {
+ if (workspaceUndoMonitor != null) {
+ workspaceUndoMonitor.shutdown();
+ workspaceUndoMonitor = null;
+ }
+ }
+}
\ No newline at end of file
diff --git a/examples/org.eclipse.datatools.enablement.rcp/src/org/eclipse/datatools/enablement/rcp/ApplicationWorkbenchWindowAdvisor.java b/examples/org.eclipse.datatools.enablement.rcp/src/org/eclipse/datatools/enablement/rcp/ApplicationWorkbenchWindowAdvisor.java
new file mode 100644
index 0000000..e784035
--- /dev/null
+++ b/examples/org.eclipse.datatools.enablement.rcp/src/org/eclipse/datatools/enablement/rcp/ApplicationWorkbenchWindowAdvisor.java
@@ -0,0 +1,38 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Sybase, Inc. and others
+ *
+ * All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License v1.0 which
+ * accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors: Ingres - initial API and implementation
+ * brianf - a few tweaks
+ ******************************************************************************/
+package org.eclipse.datatools.enablement.rcp;
+
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.ui.application.ActionBarAdvisor;
+import org.eclipse.ui.application.IActionBarConfigurer;
+import org.eclipse.ui.application.IWorkbenchWindowConfigurer;
+import org.eclipse.ui.application.WorkbenchWindowAdvisor;
+
+public class ApplicationWorkbenchWindowAdvisor extends WorkbenchWindowAdvisor {
+
+ public ApplicationWorkbenchWindowAdvisor(IWorkbenchWindowConfigurer configurer) {
+ super(configurer);
+ }
+
+ public ActionBarAdvisor createActionBarAdvisor(IActionBarConfigurer configurer) {
+ return new ApplicationActionBarAdvisor(configurer);
+ }
+
+ public void preWindowOpen() {
+ IWorkbenchWindowConfigurer configurer = getWindowConfigurer();
+ configurer.setInitialSize(new Point(1000, 800));
+ configurer.setShowCoolBar(false);
+ configurer.setShowStatusLine(true);
+ configurer.setShowMenuBar(true);
+ configurer.setShowProgressIndicator(true);
+ }
+}
diff --git a/examples/org.eclipse.datatools.enablement.rcp/src/org/eclipse/datatools/enablement/rcp/Perspective.java b/examples/org.eclipse.datatools.enablement.rcp/src/org/eclipse/datatools/enablement/rcp/Perspective.java
new file mode 100644
index 0000000..22112fb
--- /dev/null
+++ b/examples/org.eclipse.datatools.enablement.rcp/src/org/eclipse/datatools/enablement/rcp/Perspective.java
@@ -0,0 +1,44 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Sybase, Inc. and others
+ *
+ * All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License v1.0 which
+ * accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors: Ingres - initial API and implementation
+ * brianf - a few tweaks
+ ******************************************************************************/
+package org.eclipse.datatools.enablement.rcp;
+
+import org.eclipse.ui.IFolderLayout;
+import org.eclipse.ui.IPageLayout;
+import org.eclipse.ui.IPerspectiveFactory;
+
+public class Perspective implements IPerspectiveFactory {
+
+ private static String DSE_VIEW_ID = "org.eclipse.datatools.connectivity.DataSourceExplorerNavigator"; //$NON-NLS-1$
+ private static String PROJECT_EXPLORER_VIEW_ID = "org.eclipse.ui.navigator.ProjectExplorer"; //$NON-NLS-1$
+ private static String RESULT_VIEW_ID = "org.eclipse.datatools.sqltools.result.resultView"; //$NON-NLS-1$
+ private static String PLAN_VIEW_ID = "org.eclipse.datatools.sqltools.plan.planView"; //$NON-NLS-1$
+
+ public void createInitialLayout(IPageLayout layout) {
+
+ // Get the editor area.
+ String editorArea = layout.getEditorArea();
+ layout.setEditorAreaVisible(true);
+
+ //Left
+ IFolderLayout left = layout.createFolder("topleft", IPageLayout.LEFT, 0.25f, editorArea); //$NON-NLS-1$
+ left.addView(DSE_VIEW_ID);
+
+ left = layout.createFolder("bottomleft", IPageLayout.BOTTOM, 0.5f, //$NON-NLS-1$
+ "topleft"); //$NON-NLS-1$
+ left.addView(PROJECT_EXPLORER_VIEW_ID);
+
+ // Bottom
+ IFolderLayout bottom = layout.createFolder("bottom", IPageLayout.BOTTOM, 0.75f, editorArea); //$NON-NLS-1$
+ bottom.addView(RESULT_VIEW_ID);
+ bottom.addView(PLAN_VIEW_ID);
+ }
+}
diff --git a/features/org.eclipse.birt.dtp.nl.feature/.project b/features/org.eclipse.birt.dtp.nl.feature/.project
new file mode 100644
index 0000000..62dc530
--- /dev/null
+++ b/features/org.eclipse.birt.dtp.nl.feature/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.birt.dtp.nl.feature</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <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.FeatureBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.pde.FeatureNature</nature>
+ </natures>
+</projectDescription>
diff --git a/features/org.eclipse.birt.dtp.nl.feature/build.properties b/features/org.eclipse.birt.dtp.nl.feature/build.properties
new file mode 100644
index 0000000..60e19e5
--- /dev/null
+++ b/features/org.eclipse.birt.dtp.nl.feature/build.properties
@@ -0,0 +1,5 @@
+bin.includes = eclipse_update_120.jpg,\
+ epl-v10.html,\
+ feature.properties,\
+ feature.xml,\
+ license.html
diff --git a/features/org.eclipse.birt.dtp.nl.feature/eclipse_update_120.jpg b/features/org.eclipse.birt.dtp.nl.feature/eclipse_update_120.jpg
new file mode 100644
index 0000000..bfdf708
--- /dev/null
+++ b/features/org.eclipse.birt.dtp.nl.feature/eclipse_update_120.jpg
Binary files differ
diff --git a/features/org.eclipse.birt.dtp.nl.feature/epl-v10.html b/features/org.eclipse.birt.dtp.nl.feature/epl-v10.html
new file mode 100644
index 0000000..ed4b196
--- /dev/null
+++ b/features/org.eclipse.birt.dtp.nl.feature/epl-v10.html
@@ -0,0 +1,328 @@
+<html xmlns:o="urn:schemas-microsoft-com:office:office"
+xmlns:w="urn:schemas-microsoft-com:office:word"
+xmlns="http://www.w3.org/TR/REC-html40">
+
+<head>
+<meta http-equiv=Content-Type content="text/html; charset=windows-1252">
+<meta name=ProgId content=Word.Document>
+<meta name=Generator content="Microsoft Word 9">
+<meta name=Originator content="Microsoft Word 9">
+<link rel=File-List
+href="./Eclipse%20EPL%202003_11_10%20Final_files/filelist.xml">
+<title>Eclipse Public License - Version 1.0</title>
+<!--[if gte mso 9]><xml>
+ <o:DocumentProperties>
+ <o:Revision>2</o:Revision>
+ <o:TotalTime>3</o:TotalTime>
+ <o:Created>2004-03-05T23:03:00Z</o:Created>
+ <o:LastSaved>2004-03-05T23:03:00Z</o:LastSaved>
+ <o:Pages>4</o:Pages>
+ <o:Words>1626</o:Words>
+ <o:Characters>9270</o:Characters>
+ <o:Lines>77</o:Lines>
+ <o:Paragraphs>18</o:Paragraphs>
+ <o:CharactersWithSpaces>11384</o:CharactersWithSpaces>
+ <o:Version>9.4402</o:Version>
+ </o:DocumentProperties>
+</xml><![endif]--><!--[if gte mso 9]><xml>
+ <w:WordDocument>
+ <w:TrackRevisions/>
+ </w:WordDocument>
+</xml><![endif]-->
+<style>
+<!--
+ /* Font Definitions */
+@font-face
+ {font-family:Tahoma;
+ panose-1:2 11 6 4 3 5 4 4 2 4;
+ mso-font-charset:0;
+ mso-generic-font-family:swiss;
+ mso-font-pitch:variable;
+ mso-font-signature:553679495 -2147483648 8 0 66047 0;}
+ /* Style Definitions */
+p.MsoNormal, li.MsoNormal, div.MsoNormal
+ {mso-style-parent:"";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ font-family:"Times New Roman";
+ mso-fareast-font-family:"Times New Roman";}
+p
+ {margin-right:0in;
+ mso-margin-top-alt:auto;
+ mso-margin-bottom-alt:auto;
+ margin-left:0in;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ font-family:"Times New Roman";
+ mso-fareast-font-family:"Times New Roman";}
+p.BalloonText, li.BalloonText, div.BalloonText
+ {mso-style-name:"Balloon Text";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:8.0pt;
+ font-family:Tahoma;
+ mso-fareast-font-family:"Times New Roman";}
+@page Section1
+ {size:8.5in 11.0in;
+ margin:1.0in 1.25in 1.0in 1.25in;
+ mso-header-margin:.5in;
+ mso-footer-margin:.5in;
+ mso-paper-source:0;}
+div.Section1
+ {page:Section1;}
+-->
+</style>
+</head>
+
+<body lang=EN-US style='tab-interval:.5in'>
+
+<div class=Section1>
+
+<p align=center style='text-align:center'><b>Eclipse Public License - v 1.0</b>
+</p>
+
+<p><span style='font-size:10.0pt'>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER
+THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE,
+REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE
+OF THIS AGREEMENT.</span> </p>
+
+<p><b><span style='font-size:10.0pt'>1. DEFINITIONS</span></b> </p>
+
+<p><span style='font-size:10.0pt'>"Contribution" means:</span> </p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
+in the case of the initial Contributor, the initial code and documentation
+distributed under this Agreement, and<br clear=left>
+b) in the case of each subsequent Contributor:</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
+changes to the Program, and</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
+additions to the Program;</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>where
+such changes and/or additions to the Program originate from and are distributed
+by that particular Contributor. A Contribution 'originates' from a Contributor
+if it was added to the Program by such Contributor itself or anyone acting on
+such Contributor's behalf. Contributions do not include additions to the
+Program which: (i) are separate modules of software distributed in conjunction
+with the Program under their own license agreement, and (ii) are not derivative
+works of the Program. </span></p>
+
+<p><span style='font-size:10.0pt'>"Contributor" means any person or
+entity that distributes the Program.</span> </p>
+
+<p><span style='font-size:10.0pt'>"Licensed Patents " mean patent
+claims licensable by a Contributor which are necessarily infringed by the use
+or sale of its Contribution alone or when combined with the Program. </span></p>
+
+<p><span style='font-size:10.0pt'>"Program" means the Contributions
+distributed in accordance with this Agreement.</span> </p>
+
+<p><span style='font-size:10.0pt'>"Recipient" means anyone who
+receives the Program under this Agreement, including all Contributors.</span> </p>
+
+<p><b><span style='font-size:10.0pt'>2. GRANT OF RIGHTS</span></b> </p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
+Subject to the terms of this Agreement, each Contributor hereby grants Recipient
+a non-exclusive, worldwide, royalty-free copyright license to<span
+style='color:red'> </span>reproduce, prepare derivative works of, publicly
+display, publicly perform, distribute and sublicense the Contribution of such
+Contributor, if any, and such derivative works, in source code and object code
+form.</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
+Subject to the terms of this Agreement, each Contributor hereby grants
+Recipient a non-exclusive, worldwide,<span style='color:green'> </span>royalty-free
+patent license under Licensed Patents to make, use, sell, offer to sell, import
+and otherwise transfer the Contribution of such Contributor, if any, in source
+code and object code form. This patent license shall apply to the combination
+of the Contribution and the Program if, at the time the Contribution is added
+by the Contributor, such addition of the Contribution causes such combination
+to be covered by the Licensed Patents. The patent license shall not apply to
+any other combinations which include the Contribution. No hardware per se is
+licensed hereunder. </span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>c)
+Recipient understands that although each Contributor grants the licenses to its
+Contributions set forth herein, no assurances are provided by any Contributor
+that the Program does not infringe the patent or other intellectual property
+rights of any other entity. Each Contributor disclaims any liability to Recipient
+for claims brought by any other entity based on infringement of intellectual
+property rights or otherwise. As a condition to exercising the rights and
+licenses granted hereunder, each Recipient hereby assumes sole responsibility
+to secure any other intellectual property rights needed, if any. For example,
+if a third party patent license is required to allow Recipient to distribute
+the Program, it is Recipient's responsibility to acquire that license before
+distributing the Program.</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>d)
+Each Contributor represents that to its knowledge it has sufficient copyright
+rights in its Contribution, if any, to grant the copyright license set forth in
+this Agreement. </span></p>
+
+<p><b><span style='font-size:10.0pt'>3. REQUIREMENTS</span></b> </p>
+
+<p><span style='font-size:10.0pt'>A Contributor may choose to distribute the
+Program in object code form under its own license agreement, provided that:</span>
+</p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
+it complies with the terms and conditions of this Agreement; and</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
+its license agreement:</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
+effectively disclaims on behalf of all Contributors all warranties and
+conditions, express and implied, including warranties or conditions of title
+and non-infringement, and implied warranties or conditions of merchantability
+and fitness for a particular purpose; </span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
+effectively excludes on behalf of all Contributors all liability for damages,
+including direct, indirect, special, incidental and consequential damages, such
+as lost profits; </span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iii)
+states that any provisions which differ from this Agreement are offered by that
+Contributor alone and not by any other party; and</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iv)
+states that source code for the Program is available from such Contributor, and
+informs licensees how to obtain it in a reasonable manner on or through a
+medium customarily used for software exchange.<span style='color:blue'> </span></span></p>
+
+<p><span style='font-size:10.0pt'>When the Program is made available in source
+code form:</span> </p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
+it must be made available under this Agreement; and </span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b) a
+copy of this Agreement must be included with each copy of the Program. </span></p>
+
+<p><span style='font-size:10.0pt'>Contributors may not remove or alter any
+copyright notices contained within the Program. </span></p>
+
+<p><span style='font-size:10.0pt'>Each Contributor must identify itself as the
+originator of its Contribution, if any, in a manner that reasonably allows
+subsequent Recipients to identify the originator of the Contribution. </span></p>
+
+<p><b><span style='font-size:10.0pt'>4. COMMERCIAL DISTRIBUTION</span></b> </p>
+
+<p><span style='font-size:10.0pt'>Commercial distributors of software may
+accept certain responsibilities with respect to end users, business partners
+and the like. While this license is intended to facilitate the commercial use
+of the Program, the Contributor who includes the Program in a commercial
+product offering should do so in a manner which does not create potential
+liability for other Contributors. Therefore, if a Contributor includes the
+Program in a commercial product offering, such Contributor ("Commercial
+Contributor") hereby agrees to defend and indemnify every other
+Contributor ("Indemnified Contributor") against any losses, damages and
+costs (collectively "Losses") arising from claims, lawsuits and other
+legal actions brought by a third party against the Indemnified Contributor to
+the extent caused by the acts or omissions of such Commercial Contributor in
+connection with its distribution of the Program in a commercial product
+offering. The obligations in this section do not apply to any claims or Losses
+relating to any actual or alleged intellectual property infringement. In order
+to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
+Contributor in writing of such claim, and b) allow the Commercial Contributor
+to control, and cooperate with the Commercial Contributor in, the defense and
+any related settlement negotiations. The Indemnified Contributor may participate
+in any such claim at its own expense.</span> </p>
+
+<p><span style='font-size:10.0pt'>For example, a Contributor might include the
+Program in a commercial product offering, Product X. That Contributor is then a
+Commercial Contributor. If that Commercial Contributor then makes performance
+claims, or offers warranties related to Product X, those performance claims and
+warranties are such Commercial Contributor's responsibility alone. Under this
+section, the Commercial Contributor would have to defend claims against the
+other Contributors related to those performance claims and warranties, and if a
+court requires any other Contributor to pay any damages as a result, the
+Commercial Contributor must pay those damages.</span> </p>
+
+<p><b><span style='font-size:10.0pt'>5. NO WARRANTY</span></b> </p>
+
+<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT
+WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING,
+WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
+MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
+responsible for determining the appropriateness of using and distributing the
+Program and assumes all risks associated with its exercise of rights under this
+Agreement , including but not limited to the risks and costs of program errors,
+compliance with applicable laws, damage to or loss of data, programs or
+equipment, and unavailability or interruption of operations. </span></p>
+
+<p><b><span style='font-size:10.0pt'>6. DISCLAIMER OF LIABILITY</span></b> </p>
+
+<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF
+THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF
+THE POSSIBILITY OF SUCH DAMAGES.</span> </p>
+
+<p><b><span style='font-size:10.0pt'>7. GENERAL</span></b> </p>
+
+<p><span style='font-size:10.0pt'>If any provision of this Agreement is invalid
+or unenforceable under applicable law, it shall not affect the validity or
+enforceability of the remainder of the terms of this Agreement, and without
+further action by the parties hereto, such provision shall be reformed to the
+minimum extent necessary to make such provision valid and enforceable.</span> </p>
+
+<p><span style='font-size:10.0pt'>If Recipient institutes patent litigation
+against any entity (including a cross-claim or counterclaim in a lawsuit)
+alleging that the Program itself (excluding combinations of the Program with
+other software or hardware) infringes such Recipient's patent(s), then such
+Recipient's rights granted under Section 2(b) shall terminate as of the date
+such litigation is filed. </span></p>
+
+<p><span style='font-size:10.0pt'>All Recipient's rights under this Agreement
+shall terminate if it fails to comply with any of the material terms or
+conditions of this Agreement and does not cure such failure in a reasonable
+period of time after becoming aware of such noncompliance. If all Recipient's
+rights under this Agreement terminate, Recipient agrees to cease use and
+distribution of the Program as soon as reasonably practicable. However,
+Recipient's obligations under this Agreement and any licenses granted by
+Recipient relating to the Program shall continue and survive. </span></p>
+
+<p><span style='font-size:10.0pt'>Everyone is permitted to copy and distribute
+copies of this Agreement, but in order to avoid inconsistency the Agreement is
+copyrighted and may only be modified in the following manner. The Agreement
+Steward reserves the right to publish new versions (including revisions) of
+this Agreement from time to time. No one other than the Agreement Steward has
+the right to modify this Agreement. The Eclipse Foundation is the initial
+Agreement Steward. The Eclipse Foundation may assign the responsibility to
+serve as the Agreement Steward to a suitable separate entity. Each new version
+of the Agreement will be given a distinguishing version number. The Program
+(including Contributions) may always be distributed subject to the version of
+the Agreement under which it was received. In addition, after a new version of
+the Agreement is published, Contributor may elect to distribute the Program
+(including its Contributions) under the new version. Except as expressly stated
+in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to
+the intellectual property of any Contributor under this Agreement, whether
+expressly, by implication, estoppel or otherwise. All rights in the Program not
+expressly granted under this Agreement are reserved.</span> </p>
+
+<p><span style='font-size:10.0pt'>This Agreement is governed by the laws of the
+State of New York and the intellectual property laws of the United States of
+America. No party to this Agreement will bring a legal action under this
+Agreement more than one year after the cause of action arose. Each party waives
+its rights to a jury trial in any resulting litigation.</span> </p>
+
+<p class=MsoNormal><![if !supportEmptyParas]> <![endif]><o:p></o:p></p>
+
+</div>
+
+</body>
+
+</html>
\ No newline at end of file
diff --git a/features/org.eclipse.birt.dtp.nl.feature/feature.properties b/features/org.eclipse.birt.dtp.nl.feature/feature.properties
new file mode 100644
index 0000000..953a84e
--- /dev/null
+++ b/features/org.eclipse.birt.dtp.nl.feature/feature.properties
@@ -0,0 +1,163 @@
+###############################################################################
+# Copyright (c) 2000, 2005 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:
+# Actuate Corporation - initial API and implementation
+###############################################################################
+# feature.properties
+# contains externalized strings for feature.xml
+# "%foo" in feature.xml corresponds to the key "foo" in this file
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# This file should be translated.
+
+# "featureName" property - name of the feature
+featureName=Datatools Language Pack Project
+
+# "providerName" property - name of the company that provides the feature
+providerName=Eclipse Data Tools Platform
+
+# "updateSiteName" property - label for the update site
+updateSiteName=Business Intellegence and Reporting Tool (BIRT) Updates
+
+# "description" property - description of the feature
+description=Eclipse Business Intelligence and Reporting Tools (BIRT) Report Designer Plug-ins, Runtime and user documentation.
+
+# "copyright" property
+copyrightURL=http://www.eclipse.org/birt
+copyright=(c) Copyright Eclipse Contributors and others 2004, 2007. All rights reserved.\n
+
+# "licenseURL" property - URL of the "Feature License"
+# do not translate value - just change to point to a locale-specific HTML page
+licenseURL=license.html
+
+# "license" property - text of the "Feature Update License"
+# should be plain text version of license agreement pointed to be "licenseURL"
+license=\
+Eclipse Foundation Software User Agreement\n\
+February 1, 2011\n\
+\n\
+Usage Of Content\n\
+\n\
+THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\
+OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
+USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
+AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
+NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
+AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
+AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
+OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
+TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
+OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
+BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
+\n\
+Applicable Licenses\n\
+\n\
+Unless otherwise indicated, all Content made available by the\n\
+Eclipse Foundation is provided to you under the terms and conditions of\n\
+the Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is\n\
+provided with this Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
+For purposes of the EPL, "Program" will mean the Content.\n\
+\n\
+Content includes, but is not limited to, source code, object code,\n\
+documentation and other files maintained in the Eclipse Foundation source code\n\
+repository ("Repository") in software modules ("Modules") and made available\n\
+as downloadable archives ("Downloads").\n\
+\n\
+ - Content may be structured and packaged into modules to facilitate delivering,\n\
+ extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
+ plug-in fragments ("Fragments"), and features ("Features").\n\
+ - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java(TM) ARchive)\n\
+ in a directory named "plugins".\n\
+ - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
+ Each Feature may be packaged as a sub-directory in a directory named "features".\n\
+ Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
+ numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
+ - Features may also include other Features ("Included Features"). Within a Feature, files\n\
+ named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
+\n\
+The terms and conditions governing Plug-ins and Fragments should be\n\
+contained in files named "about.html" ("Abouts"). The terms and\n\
+conditions governing Features and Included Features should be contained\n\
+in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
+Licenses may be located in any directory of a Download or Module\n\
+including, but not limited to the following locations:\n\
+\n\
+ - The top-level (root) directory\n\
+ - Plug-in and Fragment directories\n\
+ - Inside Plug-ins and Fragments packaged as JARs\n\
+ - Sub-directories of the directory named "src" of certain Plug-ins\n\
+ - Feature directories\n\
+\n\
+Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
+Provisioning Technology (as defined below), you must agree to a license ("Feature \n\
+Update License") during the installation process. If the Feature contains\n\
+Included Features, the Feature Update License should either provide you\n\
+with the terms and conditions governing the Included Features or inform\n\
+you where you can locate them. Feature Update Licenses may be found in\n\
+the "license" property of files named "feature.properties" found within a Feature.\n\
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the\n\
+terms and conditions (or references to such terms and conditions) that\n\
+govern your use of the associated Content in that directory.\n\
+\n\
+THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER\n\
+TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
+SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
+\n\
+ - Eclipse Distribution License Version 1.0 (available at http://www.eclipse.org/licenses/edl-v1.0.html)\n\
+ - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
+ - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
+ - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
+ - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
+ - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
+\n\
+IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
+TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License\n\
+is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
+govern that particular Content.\n\
+\n\
+\n\Use of Provisioning Technology\n\
+\n\
+The Eclipse Foundation makes available provisioning software, examples of which include,\n\
+but are not limited to, p2 and the Eclipse Update Manager ("Provisioning Technology") for\n\
+the purpose of allowing users to install software, documentation, information and/or\n\
+other materials (collectively "Installable Software"). This capability is provided with\n\
+the intent of allowing such users to install, extend and update Eclipse-based products.\n\
+Information about packaging Installable Software is available at\n\
+http://eclipse.org/equinox/p2/repository_packaging.html ("Specification").\n\
+\n\
+You may use Provisioning Technology to allow other parties to install Installable Software.\n\
+You shall be responsible for enabling the applicable license agreements relating to the\n\
+Installable Software to be presented to, and accepted by, the users of the Provisioning Technology\n\
+in accordance with the Specification. By using Provisioning Technology in such a manner and\n\
+making it available in accordance with the Specification, you further acknowledge your\n\
+agreement to, and the acquisition of all necessary rights to permit the following:\n\
+\n\
+ 1. A series of actions may occur ("Provisioning Process") in which a user may execute\n\
+ the Provisioning Technology on a machine ("Target Machine") with the intent of installing,\n\
+ extending or updating the functionality of an Eclipse-based product.\n\
+ 2. During the Provisioning Process, the Provisioning Technology may cause third party\n\
+ Installable Software or a portion thereof to be accessed and copied to the Target Machine.\n\
+ 3. Pursuant to the Specification, you will provide to the user the terms and conditions that\n\
+ govern the use of the Installable Software ("Installable Software Agreement") and such\n\
+ Installable Software Agreement shall be accessed from the Target Machine in accordance\n\
+ with the Specification. Such Installable Software Agreement must inform the user of the\n\
+ terms and conditions that govern the Installable Software and must solicit acceptance by\n\
+ the end user in the manner prescribed in such Installable Software Agreement. Upon such\n\
+ indication of agreement by the user, the provisioning Technology will complete installation\n\
+ of the Installable Software.\n\
+\n\
+Cryptography\n\
+\n\
+Content may contain encryption software. The country in which you are\n\
+currently may have restrictions on the import, possession, and use,\n\
+and/or re-export to another country, of encryption software. BEFORE\n\
+using any encryption software, please check the country's laws,\n\
+regulations and policies concerning the import, possession, or use, and\n\
+re-export of encryption software, to see if this is permitted.\n\
+\n\
+Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.\n
+########### end of license property ##########################################
diff --git a/features/org.eclipse.birt.dtp.nl.feature/feature.xml b/features/org.eclipse.birt.dtp.nl.feature/feature.xml
new file mode 100644
index 0000000..1d0f04f
--- /dev/null
+++ b/features/org.eclipse.birt.dtp.nl.feature/feature.xml
@@ -0,0 +1,666 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<feature
+ id="org.eclipse.birt.dtp.nl"
+ label="%featureName"
+ version="4.2.1.qualifier"
+ provider-name="%providerName"
+ image="eclipse_update_120.jpg">
+
+ <description url="http://www.eclipse.org/birt">
+ %description
+ </description>
+
+ <copyright url="%copyrightURL">
+ %copyright
+ </copyright>
+
+ <license url="%licenseURL">
+ %license
+ </license>
+
+ <url>
+ <update label="Business Intelligence and Reporting Tools (BIRT) Updates" url="http://download.eclipse.org/birt/update-site/2.5"/>
+ <discovery label="%updateSiteName" url="http://download.eclipse.org/birt/update-site/2.5"/>
+ </url>
+
+ <plugin
+ id="org.eclipse.datatools.connectivity.nl1"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ fragment="true"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.datatools.connectivity.oda.consumer.nl1"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ fragment="true"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.datatools.connectivity.oda.design.nl1"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ fragment="true"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.datatools.connectivity.oda.design.ui.nl1"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ fragment="true"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.datatools.connectivity.oda.flatfile.nl1"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ fragment="true"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.datatools.connectivity.oda.flatfile.ui.nl1"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ fragment="true"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.datatools.connectivity.oda.nl1"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ fragment="true"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.datatools.connectivity.oda.profile.nl1"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ fragment="true"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.datatools.connectivity.ui.dse.nl1"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ fragment="true"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.datatools.connectivity.ui.nl1"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ fragment="true"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.datatools.connectivity.oda.template.ui.nl1"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ fragment="true"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.datatools.enablement.oda.xml.nl1"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ fragment="true"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.datatools.enablement.oda.xml.ui.nl1"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ fragment="true"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.datatools.enablement.oda.ws.nl1"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ fragment="true"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.datatools.enablement.oda.ws.ui.nl1"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ fragment="true"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.datatools.connectivity.apache.derby.nl1"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ fragment="true"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.datatools.connectivity.apache.derby.dbdefinition.nl1"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ fragment="true"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.datatools.connectivity.apache.derby.ui.nl1"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ fragment="true"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.datatools.connectivity.db.generic.nl1"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ fragment="true"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.datatools.connectivity.db.generic.ui.nl1"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ fragment="true"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.datatools.connectivity.dbdefinition.genericJDBC.nl1"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ fragment="true"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.datatools.connectivity.sqm.core.nl1"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ fragment="true"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.datatools.connectivity.sqm.core.ui.nl1"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ fragment="true"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.datatools.connectivity.sqm.server.ui.nl1"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ fragment="true"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.datatools.connectivity.console.profile.nl1"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ fragment="true"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.datatools.sqltools.common.ui.nl1"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ fragment="true"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.datatools.sqltools.db.derby.nl1"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ fragment="true"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.datatools.sqltools.db.generic.nl1"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ fragment="true"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.datatools.sqltools.editor.core.nl1"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ fragment="true"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.datatools.sqltools.parsers.sql.nl1"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ fragment="true"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.datatools.sqltools.parsers.sql.query.nl1"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ fragment="true"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.datatools.sqltools.plan.nl1"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ fragment="true"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.datatools.sqltools.result.nl1"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ fragment="true"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.datatools.sqltools.sql.nl1"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ fragment="true"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.datatools.sqltools.sqlbuilder.nl1"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ fragment="true"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.datatools.sqltools.sqleditor.nl1"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ fragment="true"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.datatools.enablement.hsqldb.nl1"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ fragment="true"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.datatools.enablement.hsqldb.dbdefinition.nl1"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ fragment="true"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.datatools.enablement.hsqldb.ui.nl1"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ fragment="true"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.datatools.enablement.ibm.db2.iseries.nl1"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ fragment="true"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.datatools.enablement.ibm.db2.iseries.dbdefinition.nl1"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ fragment="true"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.datatools.enablement.ibm.db2.iseries.ui.nl1"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ fragment="true"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.datatools.enablement.ibm.db2.luw.nl1"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ fragment="true"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.datatools.enablement.ibm.db2.luw.dbdefinition.nl1"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ fragment="true"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.datatools.enablement.ibm.db2.luw.ui.nl1"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ fragment="true"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.datatools.enablement.ibm.db2.zseries.nl1"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ fragment="true"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.datatools.enablement.ibm.db2.zseries.dbdefinition.nl1"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ fragment="true"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.datatools.enablement.ibm.db2.zseries.ui.nl1"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ fragment="true"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.datatools.enablement.ibm.informix.nl1"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ fragment="true"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.datatools.enablement.ibm.informix.dbdefinition.nl1"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ fragment="true"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.datatools.enablement.ibm.informix.ui.nl1"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ fragment="true"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.datatools.enablement.ibm.ui.nl1"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ fragment="true"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.datatools.enablement.msft.sqlserver.nl1"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ fragment="true"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.datatools.enablement.msft.sqlserver.dbdefinition.nl1"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ fragment="true"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.datatools.enablement.msft.sqlserver.ui.nl1"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ fragment="true"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.datatools.enablement.mysql.nl1"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ fragment="true"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.datatools.enablement.mysql.dbdefinition.nl1"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ fragment="true"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.datatools.enablement.mysql.ui.nl1"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ fragment="true"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.datatools.enablement.oracle.nl1"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ fragment="true"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.datatools.enablement.oracle.dbdefinition.nl1"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ fragment="true"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.datatools.enablement.oracle.ui.nl1"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ fragment="true"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.datatools.enablement.postgresql.nl1"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ fragment="true"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.datatools.enablement.postgresql.ui.nl1"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ fragment="true"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.datatools.enablement.sap.maxdb.nl1"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ fragment="true"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.datatools.enablement.sap.maxdb.dbdefinition.nl1"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ fragment="true"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.datatools.enablement.sap.maxdb.ui.nl1"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ fragment="true"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.datatools.enablement.ingres.dbdefinition.nl1"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ fragment="true"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.datatools.enablement.ingres.nl1"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ fragment="true"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.datatools.enablement.ingres.ui.nl1"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ fragment="true"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.datatools.enablement.jdt.classpath.nl1"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ fragment="true"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.datatools.enablement.sqlite.dbdefinition.nl1"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ fragment="true"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.datatools.enablement.sqlite.nl1"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ fragment="true"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.datatools.enablement.sqlite.ui.nl1"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ fragment="true"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.datatools.modelbase.dbdefinition.nl1"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ fragment="true"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.datatools.modelbase.derby.nl1"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ fragment="true"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.datatools.modelbase.sql.edit.nl1"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ fragment="true"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.datatools.modelbase.sql.nl1"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ fragment="true"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.datatools.modelbase.sql.query.edit.nl1"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ fragment="true"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.datatools.modelbase.sql.query.nl1"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ fragment="true"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.datatools.modelbase.sql.xml.query.nl1"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ fragment="true"
+ unpack="false"/>
+
+</feature>
diff --git a/features/org.eclipse.birt.dtp.nl.feature/license.html b/features/org.eclipse.birt.dtp.nl.feature/license.html
new file mode 100644
index 0000000..f19c483
--- /dev/null
+++ b/features/org.eclipse.birt.dtp.nl.feature/license.html
@@ -0,0 +1,108 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!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>February 1, 2011</p>
+
+<h3>Usage Of Content</h3>
+
+<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
+ (COLLECTIVELY "CONTENT"). 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
+ ("EPL"). 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, "Program" 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 ("Repository") in software modules ("Modules") and made available as downloadable archives ("Downloads").</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 ("Plug-ins"), plug-in fragments ("Fragments"), and features ("Features").</li>
+ <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java™ ARchive) in a directory named "plugins".</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 "features". Within a Feature, files named "feature.xml" 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 ("Included Features"). Within a Feature, files named "feature.xml" 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 "about.html" ("Abouts"). The terms and conditions governing Features and
+Included Features should be contained in files named "license.html" ("Feature Licenses"). 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 "src" 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 ("Feature Update License") 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 "license" property of files named "feature.properties" 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>Eclipse Distribution License Version 1.0 (available at <a href="http://www.eclipse.org/licenses/edl-v10.html">http://www.eclipse.org/licenses/edl-v1.0.html</a>)</li>
+ <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 ("Provisioning Technology") for the purpose of allowing users to install software, documentation, information and/or
+ other materials (collectively "Installable Software"). 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>
+ ("Specification").</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 ("Provisioning Process") in which a user may execute the Provisioning Technology
+ on a machine ("Target Machine") 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 ("Installable Software Agreement") 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>
diff --git a/features/org.eclipse.birt.dtp.sybase.nl.feature/.project b/features/org.eclipse.birt.dtp.sybase.nl.feature/.project
new file mode 100644
index 0000000..d47d1e4
--- /dev/null
+++ b/features/org.eclipse.birt.dtp.sybase.nl.feature/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.birt.dtp.sybase.nl.feature</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <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.FeatureBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.pde.FeatureNature</nature>
+ </natures>
+</projectDescription>
diff --git a/features/org.eclipse.birt.dtp.sybase.nl.feature/build.properties b/features/org.eclipse.birt.dtp.sybase.nl.feature/build.properties
new file mode 100644
index 0000000..60e19e5
--- /dev/null
+++ b/features/org.eclipse.birt.dtp.sybase.nl.feature/build.properties
@@ -0,0 +1,5 @@
+bin.includes = eclipse_update_120.jpg,\
+ epl-v10.html,\
+ feature.properties,\
+ feature.xml,\
+ license.html
diff --git a/features/org.eclipse.birt.dtp.sybase.nl.feature/eclipse_update_120.jpg b/features/org.eclipse.birt.dtp.sybase.nl.feature/eclipse_update_120.jpg
new file mode 100644
index 0000000..bfdf708
--- /dev/null
+++ b/features/org.eclipse.birt.dtp.sybase.nl.feature/eclipse_update_120.jpg
Binary files differ
diff --git a/features/org.eclipse.birt.dtp.sybase.nl.feature/epl-v10.html b/features/org.eclipse.birt.dtp.sybase.nl.feature/epl-v10.html
new file mode 100644
index 0000000..ed4b196
--- /dev/null
+++ b/features/org.eclipse.birt.dtp.sybase.nl.feature/epl-v10.html
@@ -0,0 +1,328 @@
+<html xmlns:o="urn:schemas-microsoft-com:office:office"
+xmlns:w="urn:schemas-microsoft-com:office:word"
+xmlns="http://www.w3.org/TR/REC-html40">
+
+<head>
+<meta http-equiv=Content-Type content="text/html; charset=windows-1252">
+<meta name=ProgId content=Word.Document>
+<meta name=Generator content="Microsoft Word 9">
+<meta name=Originator content="Microsoft Word 9">
+<link rel=File-List
+href="./Eclipse%20EPL%202003_11_10%20Final_files/filelist.xml">
+<title>Eclipse Public License - Version 1.0</title>
+<!--[if gte mso 9]><xml>
+ <o:DocumentProperties>
+ <o:Revision>2</o:Revision>
+ <o:TotalTime>3</o:TotalTime>
+ <o:Created>2004-03-05T23:03:00Z</o:Created>
+ <o:LastSaved>2004-03-05T23:03:00Z</o:LastSaved>
+ <o:Pages>4</o:Pages>
+ <o:Words>1626</o:Words>
+ <o:Characters>9270</o:Characters>
+ <o:Lines>77</o:Lines>
+ <o:Paragraphs>18</o:Paragraphs>
+ <o:CharactersWithSpaces>11384</o:CharactersWithSpaces>
+ <o:Version>9.4402</o:Version>
+ </o:DocumentProperties>
+</xml><![endif]--><!--[if gte mso 9]><xml>
+ <w:WordDocument>
+ <w:TrackRevisions/>
+ </w:WordDocument>
+</xml><![endif]-->
+<style>
+<!--
+ /* Font Definitions */
+@font-face
+ {font-family:Tahoma;
+ panose-1:2 11 6 4 3 5 4 4 2 4;
+ mso-font-charset:0;
+ mso-generic-font-family:swiss;
+ mso-font-pitch:variable;
+ mso-font-signature:553679495 -2147483648 8 0 66047 0;}
+ /* Style Definitions */
+p.MsoNormal, li.MsoNormal, div.MsoNormal
+ {mso-style-parent:"";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ font-family:"Times New Roman";
+ mso-fareast-font-family:"Times New Roman";}
+p
+ {margin-right:0in;
+ mso-margin-top-alt:auto;
+ mso-margin-bottom-alt:auto;
+ margin-left:0in;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ font-family:"Times New Roman";
+ mso-fareast-font-family:"Times New Roman";}
+p.BalloonText, li.BalloonText, div.BalloonText
+ {mso-style-name:"Balloon Text";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:8.0pt;
+ font-family:Tahoma;
+ mso-fareast-font-family:"Times New Roman";}
+@page Section1
+ {size:8.5in 11.0in;
+ margin:1.0in 1.25in 1.0in 1.25in;
+ mso-header-margin:.5in;
+ mso-footer-margin:.5in;
+ mso-paper-source:0;}
+div.Section1
+ {page:Section1;}
+-->
+</style>
+</head>
+
+<body lang=EN-US style='tab-interval:.5in'>
+
+<div class=Section1>
+
+<p align=center style='text-align:center'><b>Eclipse Public License - v 1.0</b>
+</p>
+
+<p><span style='font-size:10.0pt'>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER
+THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE,
+REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE
+OF THIS AGREEMENT.</span> </p>
+
+<p><b><span style='font-size:10.0pt'>1. DEFINITIONS</span></b> </p>
+
+<p><span style='font-size:10.0pt'>"Contribution" means:</span> </p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
+in the case of the initial Contributor, the initial code and documentation
+distributed under this Agreement, and<br clear=left>
+b) in the case of each subsequent Contributor:</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
+changes to the Program, and</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
+additions to the Program;</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>where
+such changes and/or additions to the Program originate from and are distributed
+by that particular Contributor. A Contribution 'originates' from a Contributor
+if it was added to the Program by such Contributor itself or anyone acting on
+such Contributor's behalf. Contributions do not include additions to the
+Program which: (i) are separate modules of software distributed in conjunction
+with the Program under their own license agreement, and (ii) are not derivative
+works of the Program. </span></p>
+
+<p><span style='font-size:10.0pt'>"Contributor" means any person or
+entity that distributes the Program.</span> </p>
+
+<p><span style='font-size:10.0pt'>"Licensed Patents " mean patent
+claims licensable by a Contributor which are necessarily infringed by the use
+or sale of its Contribution alone or when combined with the Program. </span></p>
+
+<p><span style='font-size:10.0pt'>"Program" means the Contributions
+distributed in accordance with this Agreement.</span> </p>
+
+<p><span style='font-size:10.0pt'>"Recipient" means anyone who
+receives the Program under this Agreement, including all Contributors.</span> </p>
+
+<p><b><span style='font-size:10.0pt'>2. GRANT OF RIGHTS</span></b> </p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
+Subject to the terms of this Agreement, each Contributor hereby grants Recipient
+a non-exclusive, worldwide, royalty-free copyright license to<span
+style='color:red'> </span>reproduce, prepare derivative works of, publicly
+display, publicly perform, distribute and sublicense the Contribution of such
+Contributor, if any, and such derivative works, in source code and object code
+form.</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
+Subject to the terms of this Agreement, each Contributor hereby grants
+Recipient a non-exclusive, worldwide,<span style='color:green'> </span>royalty-free
+patent license under Licensed Patents to make, use, sell, offer to sell, import
+and otherwise transfer the Contribution of such Contributor, if any, in source
+code and object code form. This patent license shall apply to the combination
+of the Contribution and the Program if, at the time the Contribution is added
+by the Contributor, such addition of the Contribution causes such combination
+to be covered by the Licensed Patents. The patent license shall not apply to
+any other combinations which include the Contribution. No hardware per se is
+licensed hereunder. </span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>c)
+Recipient understands that although each Contributor grants the licenses to its
+Contributions set forth herein, no assurances are provided by any Contributor
+that the Program does not infringe the patent or other intellectual property
+rights of any other entity. Each Contributor disclaims any liability to Recipient
+for claims brought by any other entity based on infringement of intellectual
+property rights or otherwise. As a condition to exercising the rights and
+licenses granted hereunder, each Recipient hereby assumes sole responsibility
+to secure any other intellectual property rights needed, if any. For example,
+if a third party patent license is required to allow Recipient to distribute
+the Program, it is Recipient's responsibility to acquire that license before
+distributing the Program.</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>d)
+Each Contributor represents that to its knowledge it has sufficient copyright
+rights in its Contribution, if any, to grant the copyright license set forth in
+this Agreement. </span></p>
+
+<p><b><span style='font-size:10.0pt'>3. REQUIREMENTS</span></b> </p>
+
+<p><span style='font-size:10.0pt'>A Contributor may choose to distribute the
+Program in object code form under its own license agreement, provided that:</span>
+</p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
+it complies with the terms and conditions of this Agreement; and</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
+its license agreement:</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
+effectively disclaims on behalf of all Contributors all warranties and
+conditions, express and implied, including warranties or conditions of title
+and non-infringement, and implied warranties or conditions of merchantability
+and fitness for a particular purpose; </span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
+effectively excludes on behalf of all Contributors all liability for damages,
+including direct, indirect, special, incidental and consequential damages, such
+as lost profits; </span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iii)
+states that any provisions which differ from this Agreement are offered by that
+Contributor alone and not by any other party; and</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iv)
+states that source code for the Program is available from such Contributor, and
+informs licensees how to obtain it in a reasonable manner on or through a
+medium customarily used for software exchange.<span style='color:blue'> </span></span></p>
+
+<p><span style='font-size:10.0pt'>When the Program is made available in source
+code form:</span> </p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
+it must be made available under this Agreement; and </span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b) a
+copy of this Agreement must be included with each copy of the Program. </span></p>
+
+<p><span style='font-size:10.0pt'>Contributors may not remove or alter any
+copyright notices contained within the Program. </span></p>
+
+<p><span style='font-size:10.0pt'>Each Contributor must identify itself as the
+originator of its Contribution, if any, in a manner that reasonably allows
+subsequent Recipients to identify the originator of the Contribution. </span></p>
+
+<p><b><span style='font-size:10.0pt'>4. COMMERCIAL DISTRIBUTION</span></b> </p>
+
+<p><span style='font-size:10.0pt'>Commercial distributors of software may
+accept certain responsibilities with respect to end users, business partners
+and the like. While this license is intended to facilitate the commercial use
+of the Program, the Contributor who includes the Program in a commercial
+product offering should do so in a manner which does not create potential
+liability for other Contributors. Therefore, if a Contributor includes the
+Program in a commercial product offering, such Contributor ("Commercial
+Contributor") hereby agrees to defend and indemnify every other
+Contributor ("Indemnified Contributor") against any losses, damages and
+costs (collectively "Losses") arising from claims, lawsuits and other
+legal actions brought by a third party against the Indemnified Contributor to
+the extent caused by the acts or omissions of such Commercial Contributor in
+connection with its distribution of the Program in a commercial product
+offering. The obligations in this section do not apply to any claims or Losses
+relating to any actual or alleged intellectual property infringement. In order
+to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
+Contributor in writing of such claim, and b) allow the Commercial Contributor
+to control, and cooperate with the Commercial Contributor in, the defense and
+any related settlement negotiations. The Indemnified Contributor may participate
+in any such claim at its own expense.</span> </p>
+
+<p><span style='font-size:10.0pt'>For example, a Contributor might include the
+Program in a commercial product offering, Product X. That Contributor is then a
+Commercial Contributor. If that Commercial Contributor then makes performance
+claims, or offers warranties related to Product X, those performance claims and
+warranties are such Commercial Contributor's responsibility alone. Under this
+section, the Commercial Contributor would have to defend claims against the
+other Contributors related to those performance claims and warranties, and if a
+court requires any other Contributor to pay any damages as a result, the
+Commercial Contributor must pay those damages.</span> </p>
+
+<p><b><span style='font-size:10.0pt'>5. NO WARRANTY</span></b> </p>
+
+<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT
+WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING,
+WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
+MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
+responsible for determining the appropriateness of using and distributing the
+Program and assumes all risks associated with its exercise of rights under this
+Agreement , including but not limited to the risks and costs of program errors,
+compliance with applicable laws, damage to or loss of data, programs or
+equipment, and unavailability or interruption of operations. </span></p>
+
+<p><b><span style='font-size:10.0pt'>6. DISCLAIMER OF LIABILITY</span></b> </p>
+
+<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF
+THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF
+THE POSSIBILITY OF SUCH DAMAGES.</span> </p>
+
+<p><b><span style='font-size:10.0pt'>7. GENERAL</span></b> </p>
+
+<p><span style='font-size:10.0pt'>If any provision of this Agreement is invalid
+or unenforceable under applicable law, it shall not affect the validity or
+enforceability of the remainder of the terms of this Agreement, and without
+further action by the parties hereto, such provision shall be reformed to the
+minimum extent necessary to make such provision valid and enforceable.</span> </p>
+
+<p><span style='font-size:10.0pt'>If Recipient institutes patent litigation
+against any entity (including a cross-claim or counterclaim in a lawsuit)
+alleging that the Program itself (excluding combinations of the Program with
+other software or hardware) infringes such Recipient's patent(s), then such
+Recipient's rights granted under Section 2(b) shall terminate as of the date
+such litigation is filed. </span></p>
+
+<p><span style='font-size:10.0pt'>All Recipient's rights under this Agreement
+shall terminate if it fails to comply with any of the material terms or
+conditions of this Agreement and does not cure such failure in a reasonable
+period of time after becoming aware of such noncompliance. If all Recipient's
+rights under this Agreement terminate, Recipient agrees to cease use and
+distribution of the Program as soon as reasonably practicable. However,
+Recipient's obligations under this Agreement and any licenses granted by
+Recipient relating to the Program shall continue and survive. </span></p>
+
+<p><span style='font-size:10.0pt'>Everyone is permitted to copy and distribute
+copies of this Agreement, but in order to avoid inconsistency the Agreement is
+copyrighted and may only be modified in the following manner. The Agreement
+Steward reserves the right to publish new versions (including revisions) of
+this Agreement from time to time. No one other than the Agreement Steward has
+the right to modify this Agreement. The Eclipse Foundation is the initial
+Agreement Steward. The Eclipse Foundation may assign the responsibility to
+serve as the Agreement Steward to a suitable separate entity. Each new version
+of the Agreement will be given a distinguishing version number. The Program
+(including Contributions) may always be distributed subject to the version of
+the Agreement under which it was received. In addition, after a new version of
+the Agreement is published, Contributor may elect to distribute the Program
+(including its Contributions) under the new version. Except as expressly stated
+in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to
+the intellectual property of any Contributor under this Agreement, whether
+expressly, by implication, estoppel or otherwise. All rights in the Program not
+expressly granted under this Agreement are reserved.</span> </p>
+
+<p><span style='font-size:10.0pt'>This Agreement is governed by the laws of the
+State of New York and the intellectual property laws of the United States of
+America. No party to this Agreement will bring a legal action under this
+Agreement more than one year after the cause of action arose. Each party waives
+its rights to a jury trial in any resulting litigation.</span> </p>
+
+<p class=MsoNormal><![if !supportEmptyParas]> <![endif]><o:p></o:p></p>
+
+</div>
+
+</body>
+
+</html>
\ No newline at end of file
diff --git a/features/org.eclipse.birt.dtp.sybase.nl.feature/feature.properties b/features/org.eclipse.birt.dtp.sybase.nl.feature/feature.properties
new file mode 100644
index 0000000..953a84e
--- /dev/null
+++ b/features/org.eclipse.birt.dtp.sybase.nl.feature/feature.properties
@@ -0,0 +1,163 @@
+###############################################################################
+# Copyright (c) 2000, 2005 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:
+# Actuate Corporation - initial API and implementation
+###############################################################################
+# feature.properties
+# contains externalized strings for feature.xml
+# "%foo" in feature.xml corresponds to the key "foo" in this file
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# This file should be translated.
+
+# "featureName" property - name of the feature
+featureName=Datatools Language Pack Project
+
+# "providerName" property - name of the company that provides the feature
+providerName=Eclipse Data Tools Platform
+
+# "updateSiteName" property - label for the update site
+updateSiteName=Business Intellegence and Reporting Tool (BIRT) Updates
+
+# "description" property - description of the feature
+description=Eclipse Business Intelligence and Reporting Tools (BIRT) Report Designer Plug-ins, Runtime and user documentation.
+
+# "copyright" property
+copyrightURL=http://www.eclipse.org/birt
+copyright=(c) Copyright Eclipse Contributors and others 2004, 2007. All rights reserved.\n
+
+# "licenseURL" property - URL of the "Feature License"
+# do not translate value - just change to point to a locale-specific HTML page
+licenseURL=license.html
+
+# "license" property - text of the "Feature Update License"
+# should be plain text version of license agreement pointed to be "licenseURL"
+license=\
+Eclipse Foundation Software User Agreement\n\
+February 1, 2011\n\
+\n\
+Usage Of Content\n\
+\n\
+THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\
+OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
+USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
+AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
+NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
+AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
+AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
+OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
+TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
+OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
+BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
+\n\
+Applicable Licenses\n\
+\n\
+Unless otherwise indicated, all Content made available by the\n\
+Eclipse Foundation is provided to you under the terms and conditions of\n\
+the Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is\n\
+provided with this Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
+For purposes of the EPL, "Program" will mean the Content.\n\
+\n\
+Content includes, but is not limited to, source code, object code,\n\
+documentation and other files maintained in the Eclipse Foundation source code\n\
+repository ("Repository") in software modules ("Modules") and made available\n\
+as downloadable archives ("Downloads").\n\
+\n\
+ - Content may be structured and packaged into modules to facilitate delivering,\n\
+ extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
+ plug-in fragments ("Fragments"), and features ("Features").\n\
+ - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java(TM) ARchive)\n\
+ in a directory named "plugins".\n\
+ - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
+ Each Feature may be packaged as a sub-directory in a directory named "features".\n\
+ Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
+ numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
+ - Features may also include other Features ("Included Features"). Within a Feature, files\n\
+ named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
+\n\
+The terms and conditions governing Plug-ins and Fragments should be\n\
+contained in files named "about.html" ("Abouts"). The terms and\n\
+conditions governing Features and Included Features should be contained\n\
+in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
+Licenses may be located in any directory of a Download or Module\n\
+including, but not limited to the following locations:\n\
+\n\
+ - The top-level (root) directory\n\
+ - Plug-in and Fragment directories\n\
+ - Inside Plug-ins and Fragments packaged as JARs\n\
+ - Sub-directories of the directory named "src" of certain Plug-ins\n\
+ - Feature directories\n\
+\n\
+Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
+Provisioning Technology (as defined below), you must agree to a license ("Feature \n\
+Update License") during the installation process. If the Feature contains\n\
+Included Features, the Feature Update License should either provide you\n\
+with the terms and conditions governing the Included Features or inform\n\
+you where you can locate them. Feature Update Licenses may be found in\n\
+the "license" property of files named "feature.properties" found within a Feature.\n\
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the\n\
+terms and conditions (or references to such terms and conditions) that\n\
+govern your use of the associated Content in that directory.\n\
+\n\
+THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER\n\
+TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
+SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
+\n\
+ - Eclipse Distribution License Version 1.0 (available at http://www.eclipse.org/licenses/edl-v1.0.html)\n\
+ - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
+ - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
+ - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
+ - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
+ - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
+\n\
+IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
+TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License\n\
+is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
+govern that particular Content.\n\
+\n\
+\n\Use of Provisioning Technology\n\
+\n\
+The Eclipse Foundation makes available provisioning software, examples of which include,\n\
+but are not limited to, p2 and the Eclipse Update Manager ("Provisioning Technology") for\n\
+the purpose of allowing users to install software, documentation, information and/or\n\
+other materials (collectively "Installable Software"). This capability is provided with\n\
+the intent of allowing such users to install, extend and update Eclipse-based products.\n\
+Information about packaging Installable Software is available at\n\
+http://eclipse.org/equinox/p2/repository_packaging.html ("Specification").\n\
+\n\
+You may use Provisioning Technology to allow other parties to install Installable Software.\n\
+You shall be responsible for enabling the applicable license agreements relating to the\n\
+Installable Software to be presented to, and accepted by, the users of the Provisioning Technology\n\
+in accordance with the Specification. By using Provisioning Technology in such a manner and\n\
+making it available in accordance with the Specification, you further acknowledge your\n\
+agreement to, and the acquisition of all necessary rights to permit the following:\n\
+\n\
+ 1. A series of actions may occur ("Provisioning Process") in which a user may execute\n\
+ the Provisioning Technology on a machine ("Target Machine") with the intent of installing,\n\
+ extending or updating the functionality of an Eclipse-based product.\n\
+ 2. During the Provisioning Process, the Provisioning Technology may cause third party\n\
+ Installable Software or a portion thereof to be accessed and copied to the Target Machine.\n\
+ 3. Pursuant to the Specification, you will provide to the user the terms and conditions that\n\
+ govern the use of the Installable Software ("Installable Software Agreement") and such\n\
+ Installable Software Agreement shall be accessed from the Target Machine in accordance\n\
+ with the Specification. Such Installable Software Agreement must inform the user of the\n\
+ terms and conditions that govern the Installable Software and must solicit acceptance by\n\
+ the end user in the manner prescribed in such Installable Software Agreement. Upon such\n\
+ indication of agreement by the user, the provisioning Technology will complete installation\n\
+ of the Installable Software.\n\
+\n\
+Cryptography\n\
+\n\
+Content may contain encryption software. The country in which you are\n\
+currently may have restrictions on the import, possession, and use,\n\
+and/or re-export to another country, of encryption software. BEFORE\n\
+using any encryption software, please check the country's laws,\n\
+regulations and policies concerning the import, possession, or use, and\n\
+re-export of encryption software, to see if this is permitted.\n\
+\n\
+Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.\n
+########### end of license property ##########################################
diff --git a/features/org.eclipse.birt.dtp.sybase.nl.feature/feature.xml b/features/org.eclipse.birt.dtp.sybase.nl.feature/feature.xml
new file mode 100644
index 0000000..ba6f563
--- /dev/null
+++ b/features/org.eclipse.birt.dtp.sybase.nl.feature/feature.xml
@@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<feature
+ id="org.eclipse.birt.dtp.sybase.nl"
+ label="%featureName"
+ version="4.2.1.qualifier"
+ provider-name="%providerName"
+ image="eclipse_update_120.jpg">
+
+ <description url="http://www.eclipse.org/birt">
+ %description
+ </description>
+
+ <copyright url="%copyrightURL">
+ %copyright
+ </copyright>
+
+ <license url="%licenseURL">
+ %license
+ </license>
+
+ <url>
+ <update label="Business Intelligence and Reporting Tools (BIRT) Updates" url="http://download.eclipse.org/birt/update-site/2.5"/>
+ <discovery label="%updateSiteName" url="http://download.eclipse.org/birt/update-site/2.5"/>
+ </url>
+
+ <plugin
+ id="org.eclipse.datatools.enablement.sybase.nl1"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ fragment="true"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.datatools.enablement.sybase.ui.nl1"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ fragment="true"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.datatools.enablement.sybase.asa.nl1"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ fragment="true"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.datatools.enablement.sybase.asa.models.nl1"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ fragment="true"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.datatools.enablement.sybase.ase.dbdefinition.nl1"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ fragment="true"
+ unpack="false"/>
+
+</feature>
diff --git a/features/org.eclipse.birt.dtp.sybase.nl.feature/license.html b/features/org.eclipse.birt.dtp.sybase.nl.feature/license.html
new file mode 100644
index 0000000..f19c483
--- /dev/null
+++ b/features/org.eclipse.birt.dtp.sybase.nl.feature/license.html
@@ -0,0 +1,108 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!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>February 1, 2011</p>
+
+<h3>Usage Of Content</h3>
+
+<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
+ (COLLECTIVELY "CONTENT"). 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
+ ("EPL"). 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, "Program" 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 ("Repository") in software modules ("Modules") and made available as downloadable archives ("Downloads").</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 ("Plug-ins"), plug-in fragments ("Fragments"), and features ("Features").</li>
+ <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java™ ARchive) in a directory named "plugins".</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 "features". Within a Feature, files named "feature.xml" 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 ("Included Features"). Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of Included Features.</li>
+</ul>
+
+<p>The terms and cond