[BZ189240] Updates for context sensitive help
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
index 2854056..0b729f2 100644
--- a/examples/org.eclipse.datatools.connectivity.repository.file/META-INF/MANIFEST.MF
+++ b/examples/org.eclipse.datatools.connectivity.repository.file/META-INF/MANIFEST.MF
@@ -2,12 +2,14 @@
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.200703301
+Bundle-Version: 1.0.0.200705251
Bundle-Activator: org.eclipse.datatools.connectivity.repository.file.FileRepositoryPlugin
Bundle-Vendor: Eclipse.org
Bundle-Localization: plugin
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
org.eclipse.datatools.connectivity,
- org.eclipse.datatools.connectivity.ui
+ org.eclipse.datatools.connectivity.ui,
+ org.eclipse.datatools.help,
+ org.eclipse.help.base
Eclipse-LazyStart: true
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
index c5ae03f..23882e1 100644
--- 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
@@ -11,6 +11,9 @@
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;
@@ -134,4 +137,24 @@
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/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..773ff00
--- /dev/null
+++ b/examples/org.eclipse.datatools.connectivity.repository.file/src/org/eclipse/datatools/connectivity/repository/file/IHelpContextsRepositoryFile.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: brianf - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.datatools.connectivity.repository.file;
+
+public interface IHelpContextsRepositoryFile {
+
+ /*
+ * 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
index a4c8316..93430a5 100644
--- 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
@@ -13,7 +13,11 @@
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 {
@@ -42,4 +46,25 @@
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/plugins/org.eclipse.datatools.connectivity.db.generic.ui/META-INF/MANIFEST.MF b/plugins/org.eclipse.datatools.connectivity.db.generic.ui/META-INF/MANIFEST.MF
index 1a91dba..84b1815 100644
--- a/plugins/org.eclipse.datatools.connectivity.db.generic.ui/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.datatools.connectivity.db.generic.ui/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
Bundle-ManifestVersion: 2
Bundle-Name: %Bundle-Name
Bundle-SymbolicName: org.eclipse.datatools.connectivity.db.generic.ui; singleton:=true
-Bundle-Version: 1.0.0.200702121
+Bundle-Version: 1.0.0.200705251
Bundle-Activator: org.eclipse.datatools.connectivity.db.generic.ui.GenericDBUIPlugin
Bundle-Vendor: %Bundle-Vendor
Bundle-Localization: plugin
@@ -10,7 +10,9 @@
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.connectivity.db.generic;bundle-version="[0.9.1,1.5.0)"
+ org.eclipse.datatools.connectivity.db.generic;bundle-version="[0.9.1,1.5.0)",
+ org.eclipse.datatools.help,
+ org.eclipse.help.base
Eclipse-AutoStart: true
Export-Package: org.eclipse.datatools.connectivity.db.generic.ui
Bundle-RequiredExecutionEnvironment: J2SE-1.4
diff --git a/plugins/org.eclipse.datatools.connectivity.db.generic.ui/build.properties b/plugins/org.eclipse.datatools.connectivity.db.generic.ui/build.properties
index caa235b..0c24664 100644
--- a/plugins/org.eclipse.datatools.connectivity.db.generic.ui/build.properties
+++ b/plugins/org.eclipse.datatools.connectivity.db.generic.ui/build.properties
@@ -9,7 +9,7 @@
output.. = bin/
src.dir = src/
jars.extra.classpath =
-plugin.version = 1.0.0.200702121
+plugin.version = 1.0.0.200705251
javadoc.dir = doc/api/
download.dir = ./download/
javac.source = 1.4
diff --git a/plugins/org.eclipse.datatools.connectivity.db.generic.ui/plugin.xml b/plugins/org.eclipse.datatools.connectivity.db.generic.ui/plugin.xml
index 4ee39c7..1e9f0da 100644
--- a/plugins/org.eclipse.datatools.connectivity.db.generic.ui/plugin.xml
+++ b/plugins/org.eclipse.datatools.connectivity.db.generic.ui/plugin.xml
@@ -15,11 +15,15 @@
<page
class="org.eclipse.datatools.connectivity.db.generic.ui.GenericDBProfilePropertyPage"
id="org.eclipse.datatools.connectivity.db.generic.profileProperties"
- name="%page.name.jdbcConnectionProperties"
- objectClass="org.eclipse.datatools.connectivity.IConnectionProfile">
+ name="%page.name.jdbcConnectionProperties">
<filter
name="org.eclipse.datatools.profile.property.id"
value="org.eclipse.datatools.connectivity.db.generic.connectionProfile"/>
+ <enabledWhen>
+ <instanceof
+ value="org.eclipse.datatools.connectivity.IConnectionProfile">
+ </instanceof>
+ </enabledWhen>
</page>
</extension>
diff --git a/plugins/org.eclipse.datatools.connectivity.db.generic.ui/src/org/eclipse/datatools/connectivity/db/generic/ui/GenericDBProfileDetailsWizardPage.java b/plugins/org.eclipse.datatools.connectivity.db.generic.ui/src/org/eclipse/datatools/connectivity/db/generic/ui/GenericDBProfileDetailsWizardPage.java
index a9efa14..0531c14 100644
--- a/plugins/org.eclipse.datatools.connectivity.db.generic.ui/src/org/eclipse/datatools/connectivity/db/generic/ui/GenericDBProfileDetailsWizardPage.java
+++ b/plugins/org.eclipse.datatools.connectivity.db.generic.ui/src/org/eclipse/datatools/connectivity/db/generic/ui/GenericDBProfileDetailsWizardPage.java
@@ -22,6 +22,10 @@
import org.eclipse.datatools.connectivity.internal.ui.DelimitedStringList;
import org.eclipse.datatools.connectivity.internal.ui.DriverListCombo;
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.help.IContextProvider;
import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
@@ -36,7 +40,9 @@
*
* @author brianf
*/
-public class GenericDBProfileDetailsWizardPage extends ConnectionProfileDetailsPage {
+public class GenericDBProfileDetailsWizardPage
+ extends ConnectionProfileDetailsPage
+ implements IContextProvider {
// ui pieces
private Text mDatabaseNameText;
@@ -445,4 +451,24 @@
}
}
+ private ContextProviderDelegate contextProviderDelegate =
+ new ContextProviderDelegate(GenericDBUIPlugin.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(IHelpContextsGenericDBProfile.GENERIC_DB_PROFILE_WIZARD_PAGE, GenericDBUIPlugin.getDefault().getBundle().getSymbolicName()));
+ }
}
diff --git a/plugins/org.eclipse.datatools.connectivity.db.generic.ui/src/org/eclipse/datatools/connectivity/db/generic/ui/GenericDBProfilePropertyPage.java b/plugins/org.eclipse.datatools.connectivity.db.generic.ui/src/org/eclipse/datatools/connectivity/db/generic/ui/GenericDBProfilePropertyPage.java
index fc846e3..5a1deb6 100644
--- a/plugins/org.eclipse.datatools.connectivity.db.generic.ui/src/org/eclipse/datatools/connectivity/db/generic/ui/GenericDBProfilePropertyPage.java
+++ b/plugins/org.eclipse.datatools.connectivity.db.generic.ui/src/org/eclipse/datatools/connectivity/db/generic/ui/GenericDBProfilePropertyPage.java
@@ -24,6 +24,10 @@
import org.eclipse.datatools.connectivity.internal.ui.DelimitedStringList;
import org.eclipse.datatools.connectivity.internal.ui.DriverListCombo;
import org.eclipse.datatools.connectivity.ui.wizards.ProfileDetailsPropertyPage;
+import org.eclipse.datatools.help.ContextProviderDelegate;
+import org.eclipse.datatools.help.HelpUtil;
+import org.eclipse.help.IContext;
+import org.eclipse.help.IContextProvider;
import org.eclipse.jface.preference.PreferencePage;
import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.GridData;
@@ -40,7 +44,9 @@
*
* @author ledunnel
*/
-public class GenericDBProfilePropertyPage extends ProfileDetailsPropertyPage {
+public class GenericDBProfilePropertyPage
+ extends ProfileDetailsPropertyPage
+ implements IContextProvider {
private static final String EMPTY_STRING = new String();
@@ -344,5 +350,26 @@
}
}
+ private ContextProviderDelegate contextProviderDelegate =
+ new ContextProviderDelegate(GenericDBUIPlugin.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);
+ }
+
+ protected Control createContents(Composite parent) {
+ Control contents = super.createContents(parent);
+ getShell().setData( HelpUtil.CONTEXT_PROVIDER_KEY, this);
+ HelpUtil.setHelp( getControl(), HelpUtil.getContextId(IHelpContextsGenericDBProfile.GENERIC_DB_PROFILE_WIZARD_PAGE, GenericDBUIPlugin.getDefault().getBundle().getSymbolicName()));
+ return contents;
+ }
}
diff --git a/plugins/org.eclipse.datatools.connectivity.db.generic.ui/src/org/eclipse/datatools/connectivity/db/generic/ui/IHelpContextsGenericDBProfile.java b/plugins/org.eclipse.datatools.connectivity.db.generic.ui/src/org/eclipse/datatools/connectivity/db/generic/ui/IHelpContextsGenericDBProfile.java
new file mode 100644
index 0000000..828051f
--- /dev/null
+++ b/plugins/org.eclipse.datatools.connectivity.db.generic.ui/src/org/eclipse/datatools/connectivity/db/generic/ui/IHelpContextsGenericDBProfile.java
@@ -0,0 +1,31 @@
+/*******************************************************************************
+ * 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.db.generic.ui;
+
+public interface IHelpContextsGenericDBProfile {
+
+ /*
+ * GENERIC_DB_PROFILE_WIZARD_PAGE = the wizard page that collects SQL Model - JDBC Connection profile
+ * details such as the JDBC url, user id, password, etc.
+ */
+ public static final String GENERIC_DB_PROFILE_WIZARD_PAGE = "GENERIC_DB_PROFILE_WIZARD_PAGE";
+
+ /*
+ * GENERIC_DB_PROFILE_PROPERTY_PAGE = the property page that collects SQL Model - JDBC Connection profile
+ * details such as the JDBC url, user id, password, etc.
+ */
+ public static final String GENERIC_DB_PROFILE_PROPERTY_PAGE = "GENERIC_DB_PROFILE_PROPERTY_PAGE";
+
+ /*
+ * GENERIC_DB_PROFILE_WIZARD = the actual New SQL Model - JDBC Connection Profile wizard
+ */
+ public static final String GENERIC_DB_PROFILE_WIZARD = "GENERIC_DB_PROFILE_WIZARD";
+}
diff --git a/plugins/org.eclipse.datatools.connectivity.db.generic.ui/src/org/eclipse/datatools/connectivity/db/generic/ui/NewConnectionProfileWizard.java b/plugins/org.eclipse.datatools.connectivity.db.generic.ui/src/org/eclipse/datatools/connectivity/db/generic/ui/NewConnectionProfileWizard.java
index 62f40de..faca4d4 100644
--- a/plugins/org.eclipse.datatools.connectivity.db.generic.ui/src/org/eclipse/datatools/connectivity/db/generic/ui/NewConnectionProfileWizard.java
+++ b/plugins/org.eclipse.datatools.connectivity.db.generic.ui/src/org/eclipse/datatools/connectivity/db/generic/ui/NewConnectionProfileWizard.java
@@ -10,15 +10,17 @@
******************************************************************************/
package org.eclipse.datatools.connectivity.db.generic.ui;
-
-
import java.util.Properties;
import org.eclipse.datatools.connectivity.ConnectionProfileConstants;
import org.eclipse.datatools.connectivity.db.generic.GenericDBPlugin;
import org.eclipse.datatools.connectivity.db.generic.IDBConnectionProfileConstants;
import org.eclipse.datatools.connectivity.db.generic.IDBDriverDefinitionConstants;
+import org.eclipse.datatools.help.ContextProviderDelegate;
+import org.eclipse.datatools.help.HelpUtil;
+import org.eclipse.help.IContext;
import org.eclipse.jface.wizard.Wizard;
+import org.eclipse.swt.widgets.Composite;
/**
* @see Wizard
@@ -71,4 +73,26 @@
this.mPropPage.getURL());
return props;
}
+
+ private ContextProviderDelegate contextProviderDelegate =
+ new ContextProviderDelegate(GenericDBUIPlugin.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(
+ IHelpContextsGenericDBProfile.GENERIC_DB_PROFILE_WIZARD,
+ GenericDBUIPlugin.getDefault().getBundle().getSymbolicName()));
+ }
}
\ No newline at end of file
diff --git a/plugins/org.eclipse.datatools.connectivity.sqm.core.ui/META-INF/MANIFEST.MF b/plugins/org.eclipse.datatools.connectivity.sqm.core.ui/META-INF/MANIFEST.MF
index d7cfb0c..d472845 100644
--- a/plugins/org.eclipse.datatools.connectivity.sqm.core.ui/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.datatools.connectivity.sqm.core.ui/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.datatools.connectivity.sqm.core.ui; singleton:=true
-Bundle-Version: 1.0.0.200705161
+Bundle-Version: 1.0.0.200705251
Bundle-Activator: org.eclipse.datatools.connectivity.sqm.core.internal.ui.RDBCoreUIPlugin
Bundle-Vendor: %providerName
Bundle-Localization: plugin
@@ -39,7 +39,9 @@
org.eclipse.datatools.modelbase.dbdefinition;bundle-version="[0.9.0,1.5.0)",
org.eclipse.datatools.connectivity.sqm.core;bundle-version="[0.9.1,1.5.0)",
org.eclipse.datatools.connectivity.ui;bundle-version="[0.9.1,1.5.0)",
- org.eclipse.datatools.connectivity;bundle-version="[0.9.1,1.5.0)"
+ org.eclipse.datatools.connectivity;bundle-version="[0.9.1,1.5.0)",
+ org.eclipse.datatools.help,
+ org.eclipse.help.base
Eclipse-AutoStart: true
Bundle-RequiredExecutionEnvironment: J2SE-1.4
diff --git a/plugins/org.eclipse.datatools.connectivity.sqm.core.ui/build.properties b/plugins/org.eclipse.datatools.connectivity.sqm.core.ui/build.properties
index be18a4d..809164b 100644
--- a/plugins/org.eclipse.datatools.connectivity.sqm.core.ui/build.properties
+++ b/plugins/org.eclipse.datatools.connectivity.sqm.core.ui/build.properties
@@ -20,7 +20,7 @@
output.. = bin/
jars.extra.classpath =
src.dir = src/
-plugin.version = 1.0.0.200705161
+plugin.version = 1.0.0.200705251
javadoc.dir = doc/api/
download.dir = ./download/
javac.source = 1.4
diff --git a/plugins/org.eclipse.datatools.connectivity.sqm.core.ui/plugin.xml b/plugins/org.eclipse.datatools.connectivity.sqm.core.ui/plugin.xml
index bae39fa..a2cac7e 100644
--- a/plugins/org.eclipse.datatools.connectivity.sqm.core.ui/plugin.xml
+++ b/plugins/org.eclipse.datatools.connectivity.sqm.core.ui/plugin.xml
@@ -289,34 +289,51 @@
<page
class="org.eclipse.datatools.connectivity.sqm.core.internal.ui.explorer.filter.SchemaFilterPropertyPage"
id="org.eclipse.datatools.connectivity.sqm.core.internal.ui.explorer.filter.SchemaFilterPropertyPage"
- name="%DEFAULT_SCHEMA_FILTER_PROPERTY_PAGE_NAME"
- objectClass="org.eclipse.datatools.connectivity.IConnectionProfile">
+ name="%DEFAULT_SCHEMA_FILTER_PROPERTY_PAGE_NAME">
<filter
name="org.eclipse.datatools.connectivity.profile.property.factoryID"
value="org.eclipse.datatools.connectivity.sqm.core.connection.ConnectionInfo"/>
+ <enabledWhen>
+ <instanceof
+ value="org.eclipse.datatools.connectivity.IConnectionProfile">
+ </instanceof>
+ </enabledWhen>
</page>
<page
class="org.eclipse.datatools.connectivity.sqm.core.internal.ui.explorer.filter.DefaultTableFilterPropertyPage"
id="org.eclipse.datatools.connectivity.sqm.core.internal.ui.explorer.filter.DefaultTableFilterPropertyPage"
- name="%DEFAULT_TABLE_FILTER_PROPERTY_PAGE_NAME"
- objectClass="org.eclipse.datatools.connectivity.IConnectionProfile">
+ name="%DEFAULT_TABLE_FILTER_PROPERTY_PAGE_NAME">
<filter
name="org.eclipse.datatools.connectivity.profile.property.factoryID"
value="org.eclipse.datatools.connectivity.sqm.core.connection.ConnectionInfo"/>
+ <enabledWhen>
+ <instanceof
+ value="org.eclipse.datatools.connectivity.IConnectionProfile">
+ </instanceof>
+ </enabledWhen>
</page>
<page
class="org.eclipse.datatools.connectivity.sqm.core.internal.ui.explorer.filter.DefaultSPFilterPropertyPage"
id="org.eclipse.datatools.connectivity.sqm.core.internal.ui.explorer.filter.DefaultSPFilterPropertyPage"
- name="%DEFAULT_STORED_PROCEDURE_FILTER_PROPERTY_PAGE_NAME"
- objectClass="org.eclipse.datatools.connectivity.IConnectionProfile">
+ name="%DEFAULT_STORED_PROCEDURE_FILTER_PROPERTY_PAGE_NAME">
<filter
name="org.eclipse.datatools.connectivity.profile.property.factoryID"
value="org.eclipse.datatools.connectivity.sqm.core.connection.ConnectionInfo"/>
+ <enabledWhen>
+ <instanceof
+ value="org.eclipse.datatools.connectivity.IConnectionProfile">
+ </instanceof>
+ </enabledWhen>
</page>
<page
class="org.eclipse.datatools.connectivity.sqm.core.internal.ui.explorer.filter.FilterNodeFilterPropertyPage"
id="org.eclipse.datatools.connectivity.sqm.core.internal.ui.explorer.filter.FilterNodeFilterPropertyPage"
- name="%FILTER_SETTINGS_PROPERTY_PAGE_NAME"
- objectClass="org.eclipse.datatools.connectivity.sqm.core.internal.ui.explorer.filter.IFilterNode"/>
+ name="%FILTER_SETTINGS_PROPERTY_PAGE_NAME">
+ <enabledWhen>
+ <instanceof
+ value="org.eclipse.datatools.connectivity.sqm.core.internal.ui.explorer.filter.IFilterNode">
+ </instanceof>
+ </enabledWhen>
+ </page>
</extension>
</plugin>
diff --git a/plugins/org.eclipse.datatools.connectivity.sqm.core.ui/src/org/eclipse/datatools/connectivity/sqm/core/internal/ui/IHelpContextsSQMCoreUI.java b/plugins/org.eclipse.datatools.connectivity.sqm.core.ui/src/org/eclipse/datatools/connectivity/sqm/core/internal/ui/IHelpContextsSQMCoreUI.java
new file mode 100644
index 0000000..e049bd5
--- /dev/null
+++ b/plugins/org.eclipse.datatools.connectivity.sqm.core.ui/src/org/eclipse/datatools/connectivity/sqm/core/internal/ui/IHelpContextsSQMCoreUI.java
@@ -0,0 +1,38 @@
+/*******************************************************************************
+ * 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.sqm.core.internal.ui;
+
+public interface IHelpContextsSQMCoreUI {
+
+ /*
+ * DEFAULT_STORED_PROCEDURE_FILTER_PROPERTY_PAGE -
+ * SP filter page for connection profile properties
+ */
+ public static final String DEFAULT_STORED_PROCEDURE_FILTER_PROPERTY_PAGE = "DEFAULT_STORED_PROCEDURE_FILTER_PROPERTY_PAGE";
+
+ /*
+ * DEFAULT_TABLE_FILTER_PROPERTY_PAGE -
+ * table filter page for connection profile properties
+ */
+ public static final String DEFAULT_TABLE_FILTER_PROPERTY_PAGE = "DEFAULT_TABLE_FILTER_PROPERTY_PAGE";
+
+ /*
+ * DEFAULT_SCHEMA_FILTER_PROPERTY_PAGE -
+ * schema filter page for connection profile properties
+ */
+ public static final String DEFAULT_SCHEMA_FILTER_PROPERTY_PAGE = "DEFAULT_SCHEMA_FILTER_PROPERTY_PAGE";
+
+ /*
+ * LABEL_DECORATOR_PREFERENCE_PAGE -
+ * SQL Development->Label Decorator preference page
+ */
+ public static final String LABEL_DECORATOR_PREFERENCE_PAGE = "LABEL_DECORATOR_PREFERENCE_PAGE";
+}
diff --git a/plugins/org.eclipse.datatools.connectivity.sqm.core.ui/src/org/eclipse/datatools/connectivity/sqm/core/internal/ui/explorer/filter/DefaultSPFilterPropertyPage.java b/plugins/org.eclipse.datatools.connectivity.sqm.core.ui/src/org/eclipse/datatools/connectivity/sqm/core/internal/ui/explorer/filter/DefaultSPFilterPropertyPage.java
index 5ac81ec..b489f0a 100644
--- a/plugins/org.eclipse.datatools.connectivity.sqm.core.ui/src/org/eclipse/datatools/connectivity/sqm/core/internal/ui/explorer/filter/DefaultSPFilterPropertyPage.java
+++ b/plugins/org.eclipse.datatools.connectivity.sqm.core.ui/src/org/eclipse/datatools/connectivity/sqm/core/internal/ui/explorer/filter/DefaultSPFilterPropertyPage.java
@@ -10,10 +10,20 @@
******************************************************************************/
package org.eclipse.datatools.connectivity.sqm.core.internal.ui.explorer.filter;
+import org.eclipse.datatools.connectivity.sqm.core.internal.ui.IHelpContextsSQMCoreUI;
+import org.eclipse.datatools.connectivity.sqm.core.internal.ui.RDBCoreUIPlugin;
import org.eclipse.datatools.connectivity.sqm.core.internal.ui.util.resources.ResourceLoader;
import org.eclipse.datatools.connectivity.sqm.internal.core.connection.ConnectionFilter;
+import org.eclipse.datatools.help.ContextProviderDelegate;
+import org.eclipse.datatools.help.HelpUtil;
+import org.eclipse.help.IContext;
+import org.eclipse.help.IContextProvider;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
-public class DefaultSPFilterPropertyPage extends DefaultFilterPropertyPage {
+public class DefaultSPFilterPropertyPage
+ extends DefaultFilterPropertyPage
+ implements IContextProvider {
public DefaultSPFilterPropertyPage() {
super();
@@ -25,4 +35,27 @@
return ConnectionFilter.STORED_PROCEDURE_FILTER;
}
+ private ContextProviderDelegate contextProviderDelegate =
+ new ContextProviderDelegate(RDBCoreUIPlugin.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);
+ }
+
+ protected Control createContents(Composite parent) {
+ Control contents = super.createContents(parent);
+ getShell().setData( HelpUtil.CONTEXT_PROVIDER_KEY, this);
+ HelpUtil.setHelp( getControl(),
+ HelpUtil.getContextId(IHelpContextsSQMCoreUI.DEFAULT_STORED_PROCEDURE_FILTER_PROPERTY_PAGE,
+ RDBCoreUIPlugin.getDefault().getBundle().getSymbolicName()));
+ return contents;
+ }
}
diff --git a/plugins/org.eclipse.datatools.connectivity.sqm.core.ui/src/org/eclipse/datatools/connectivity/sqm/core/internal/ui/explorer/filter/DefaultTableFilterPropertyPage.java b/plugins/org.eclipse.datatools.connectivity.sqm.core.ui/src/org/eclipse/datatools/connectivity/sqm/core/internal/ui/explorer/filter/DefaultTableFilterPropertyPage.java
index b9f502e..195b148 100644
--- a/plugins/org.eclipse.datatools.connectivity.sqm.core.ui/src/org/eclipse/datatools/connectivity/sqm/core/internal/ui/explorer/filter/DefaultTableFilterPropertyPage.java
+++ b/plugins/org.eclipse.datatools.connectivity.sqm.core.ui/src/org/eclipse/datatools/connectivity/sqm/core/internal/ui/explorer/filter/DefaultTableFilterPropertyPage.java
@@ -10,10 +10,20 @@
******************************************************************************/
package org.eclipse.datatools.connectivity.sqm.core.internal.ui.explorer.filter;
+import org.eclipse.datatools.connectivity.sqm.core.internal.ui.IHelpContextsSQMCoreUI;
+import org.eclipse.datatools.connectivity.sqm.core.internal.ui.RDBCoreUIPlugin;
import org.eclipse.datatools.connectivity.sqm.core.internal.ui.util.resources.ResourceLoader;
import org.eclipse.datatools.connectivity.sqm.internal.core.connection.ConnectionFilter;
+import org.eclipse.datatools.help.ContextProviderDelegate;
+import org.eclipse.datatools.help.HelpUtil;
+import org.eclipse.help.IContext;
+import org.eclipse.help.IContextProvider;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
-public class DefaultTableFilterPropertyPage extends DefaultFilterPropertyPage {
+public class DefaultTableFilterPropertyPage
+ extends DefaultFilterPropertyPage
+ implements IContextProvider {
public DefaultTableFilterPropertyPage() {
super();
@@ -25,4 +35,27 @@
return ConnectionFilter.TABLE_FILTER;
}
+ private ContextProviderDelegate contextProviderDelegate =
+ new ContextProviderDelegate(RDBCoreUIPlugin.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);
+ }
+
+ protected Control createContents(Composite parent) {
+ Control contents = super.createContents(parent);
+ getShell().setData( HelpUtil.CONTEXT_PROVIDER_KEY, this);
+ HelpUtil.setHelp( getControl(),
+ HelpUtil.getContextId(IHelpContextsSQMCoreUI.DEFAULT_TABLE_FILTER_PROPERTY_PAGE,
+ RDBCoreUIPlugin.getDefault().getBundle().getSymbolicName()));
+ return contents;
+ }
}
diff --git a/plugins/org.eclipse.datatools.connectivity.sqm.core.ui/src/org/eclipse/datatools/connectivity/sqm/core/internal/ui/explorer/filter/SchemaFilterPropertyPage.java b/plugins/org.eclipse.datatools.connectivity.sqm.core.ui/src/org/eclipse/datatools/connectivity/sqm/core/internal/ui/explorer/filter/SchemaFilterPropertyPage.java
index f555c12..a94da89 100644
--- a/plugins/org.eclipse.datatools.connectivity.sqm.core.ui/src/org/eclipse/datatools/connectivity/sqm/core/internal/ui/explorer/filter/SchemaFilterPropertyPage.java
+++ b/plugins/org.eclipse.datatools.connectivity.sqm.core.ui/src/org/eclipse/datatools/connectivity/sqm/core/internal/ui/explorer/filter/SchemaFilterPropertyPage.java
@@ -10,10 +10,20 @@
******************************************************************************/
package org.eclipse.datatools.connectivity.sqm.core.internal.ui.explorer.filter;
+import org.eclipse.datatools.connectivity.sqm.core.internal.ui.IHelpContextsSQMCoreUI;
+import org.eclipse.datatools.connectivity.sqm.core.internal.ui.RDBCoreUIPlugin;
import org.eclipse.datatools.connectivity.sqm.core.internal.ui.util.resources.ResourceLoader;
import org.eclipse.datatools.connectivity.sqm.internal.core.connection.ConnectionFilter;
+import org.eclipse.datatools.help.ContextProviderDelegate;
+import org.eclipse.datatools.help.HelpUtil;
+import org.eclipse.help.IContext;
+import org.eclipse.help.IContextProvider;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
-public class SchemaFilterPropertyPage extends DefaultFilterPropertyPage {
+public class SchemaFilterPropertyPage
+ extends DefaultFilterPropertyPage
+ implements IContextProvider {
public SchemaFilterPropertyPage() {
super();
@@ -25,4 +35,27 @@
return ConnectionFilter.SCHEMA_FILTER;
}
+ private ContextProviderDelegate contextProviderDelegate =
+ new ContextProviderDelegate(RDBCoreUIPlugin.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);
+ }
+
+ protected Control createContents(Composite parent) {
+ Control contents = super.createContents(parent);
+ getShell().setData( HelpUtil.CONTEXT_PROVIDER_KEY, this);
+ HelpUtil.setHelp( getControl(),
+ HelpUtil.getContextId(IHelpContextsSQMCoreUI.DEFAULT_SCHEMA_FILTER_PROPERTY_PAGE,
+ RDBCoreUIPlugin.getDefault().getBundle().getSymbolicName()));
+ return contents;
+ }
}
diff --git a/plugins/org.eclipse.datatools.connectivity.sqm.core.ui/src/org/eclipse/datatools/connectivity/sqm/core/internal/ui/preferences/LabelDecoratorPreference.java b/plugins/org.eclipse.datatools.connectivity.sqm.core.ui/src/org/eclipse/datatools/connectivity/sqm/core/internal/ui/preferences/LabelDecoratorPreference.java
index 3579201..68d6990 100644
--- a/plugins/org.eclipse.datatools.connectivity.sqm.core.ui/src/org/eclipse/datatools/connectivity/sqm/core/internal/ui/preferences/LabelDecoratorPreference.java
+++ b/plugins/org.eclipse.datatools.connectivity.sqm.core.ui/src/org/eclipse/datatools/connectivity/sqm/core/internal/ui/preferences/LabelDecoratorPreference.java
@@ -15,8 +15,14 @@
import java.util.regex.PatternSyntaxException;
import org.eclipse.core.runtime.preferences.InstanceScope;
+import org.eclipse.datatools.connectivity.sqm.core.internal.ui.IHelpContextsSQMCoreUI;
+import org.eclipse.datatools.connectivity.sqm.core.internal.ui.RDBCoreUIPlugin;
import org.eclipse.datatools.connectivity.sqm.core.internal.ui.util.resources.ResourceLoader;
import org.eclipse.datatools.connectivity.sqm.core.ui.services.IDataToolsUIServiceManager;
+import org.eclipse.datatools.help.ContextProviderDelegate;
+import org.eclipse.datatools.help.HelpUtil;
+import org.eclipse.help.IContext;
+import org.eclipse.help.IContextProvider;
import org.eclipse.jface.preference.PreferencePage;
import org.eclipse.jface.viewers.ITreeContentProvider;
import org.eclipse.jface.viewers.LabelProvider;
@@ -44,7 +50,9 @@
/**
* @author ljulien
*/
-public class LabelDecoratorPreference extends PreferencePage implements IWorkbenchPreferencePage
+public class LabelDecoratorPreference
+ extends PreferencePage
+ implements IWorkbenchPreferencePage, IContextProvider
{
private static final String DECORATION_KEY = "org.eclipse.datatools.connectivity.sqm.core.ui.column.decoration"; //$NON-NLS-1$
@@ -397,4 +405,28 @@
{
return getColumnString(preferences.get(DECORATION_KEY, getColumnTextDefault()), dataType, isNullable, isPK, isFK);
}
+
+
+ private ContextProviderDelegate contextProviderDelegate =
+ new ContextProviderDelegate(RDBCoreUIPlugin.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(IHelpContextsSQMCoreUI.LABEL_DECORATOR_PREFERENCE_PAGE,
+ RDBCoreUIPlugin.getDefault().getBundle().getSymbolicName()));
+ }
}
\ No newline at end of file
diff --git a/plugins/org.eclipse.datatools.connectivity.ui/META-INF/MANIFEST.MF b/plugins/org.eclipse.datatools.connectivity.ui/META-INF/MANIFEST.MF
index 1f2a19c..dfab5b0 100644
--- a/plugins/org.eclipse.datatools.connectivity.ui/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.datatools.connectivity.ui/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
Bundle-ManifestVersion: 2
Bundle-Name: %Plugin.Name
Bundle-SymbolicName: org.eclipse.datatools.connectivity.ui; singleton:=true
-Bundle-Version: 1.0.0.200705181
+Bundle-Version: 1.0.0.200705251
Bundle-Activator: org.eclipse.datatools.connectivity.internal.ui.ConnectivityUIPlugin
Bundle-Vendor: %Plugin.ProviderName
Bundle-Localization: plugin
@@ -15,7 +15,11 @@
org.eclipse.ui.navigator;bundle-version="[3.2.0,4.0.0)",
org.eclipse.core.expressions;bundle-version="[3.2.0,4.0.0)",
com.ibm.icu;bundle-version="[3.4.0,4.0.0)",
- org.eclipse.ltk.core.refactoring;bundle-version="[3.2.0,4.0.0)"
+ org.eclipse.ltk.core.refactoring;bundle-version="[3.2.0,4.0.0)",
+ org.eclipse.datatools.help,
+ org.eclipse.help;visibility:=reexport,
+ org.eclipse.help.base,
+ org.eclipse.ui.workbench.texteditor
Eclipse-LazyStart: true
Export-Package: org.eclipse.datatools.connectivity.internal.ui,
org.eclipse.datatools.connectivity.internal.ui.dialogs,
diff --git a/plugins/org.eclipse.datatools.connectivity.ui/build.properties b/plugins/org.eclipse.datatools.connectivity.ui/build.properties
index 45e44a8..009d120 100644
--- a/plugins/org.eclipse.datatools.connectivity.ui/build.properties
+++ b/plugins/org.eclipse.datatools.connectivity.ui/build.properties
@@ -9,7 +9,7 @@
output.. = bin/
src.dir = src/
-plugin.version = 1.0.0.200705181
+plugin.version = 1.0.0.200705251
javadoc.dir = doc/api/
download.dir = ./download/
javac.source = 1.4
diff --git a/plugins/org.eclipse.datatools.connectivity.ui/plugin.xml b/plugins/org.eclipse.datatools.connectivity.ui/plugin.xml
index 55db7f2..058a7d4 100644
--- a/plugins/org.eclipse.datatools.connectivity.ui/plugin.xml
+++ b/plugins/org.eclipse.datatools.connectivity.ui/plugin.xml
@@ -17,16 +17,24 @@
<extension
point="org.eclipse.ui.propertyPages">
<page
- objectClass="org.eclipse.datatools.connectivity.IConnectionProfile"
name="%Extension.PropertyPage.General.Name"
class="org.eclipse.datatools.connectivity.internal.ui.wizards.CPPropetyPage"
id="org.eclipse.datatools.connectivity.internal.ui.properties.ProfileGeneralPropertyPage">
+ <enabledWhen>
+ <instanceof
+ value="org.eclipse.datatools.connectivity.IConnectionProfile">
+ </instanceof>
+ </enabledWhen>
</page>
<page
- objectClass="org.eclipse.datatools.connectivity.IConnectionProfile"
class="org.eclipse.datatools.connectivity.internal.ui.wizards.CPVersionPropertyPage"
name="%Extension.PropertyPage.Version.Name"
id="org.eclipse.datatools.connectivity.internal.ui.properties.ProfileVersionPropertyPage">
+ <enabledWhen>
+ <instanceof
+ value="org.eclipse.datatools.connectivity.IConnectionProfile">
+ </instanceof>
+ </enabledWhen>
</page>
</extension>
<extension
diff --git a/plugins/org.eclipse.datatools.connectivity.ui/src/org/eclipse/datatools/connectivity/internal/ui/IHelpConstants.java b/plugins/org.eclipse.datatools.connectivity.ui/src/org/eclipse/datatools/connectivity/internal/ui/IHelpConstants.java
index abb77f2..9fcdb89 100644
--- a/plugins/org.eclipse.datatools.connectivity.ui/src/org/eclipse/datatools/connectivity/internal/ui/IHelpConstants.java
+++ b/plugins/org.eclipse.datatools.connectivity.ui/src/org/eclipse/datatools/connectivity/internal/ui/IHelpConstants.java
@@ -16,32 +16,122 @@
*/
public interface IHelpConstants {
- public static final String CONTEXT_ID_CONNECTIVITY = ConnectivityUIPlugin
- .getDefault().getBundle().getSymbolicName()
- + ".connectivity"; //$NON-NLS-1$
+ /*
+ * CONTEXT_ID_CP_PROPERTY_PAGE =
+ * Basic profile name/description/auto-connect property page
+ */
+ public static final String CONTEXT_ID_CP_PROPERTY_PAGE =
+ "CONTEXT_ID_CP_PROPERTY_PAGE"; //$NON-NLS-1$
- public static final String CONTEXT_ID_CONNECTIVITY_DSE_VIEW = CONTEXT_ID_CONNECTIVITY
- + "_dse_view"; //$NON-NLS-1$
+ /*
+ * CONTEXT_ID_CP_WIZARD_PAGE =
+ * wizard selection page in New Connection Profile wizard
+ */
+ public static final String CONTEXT_ID_CP_WIZARD_PAGE =
+ "CONTEXT_ID_CP_PROPERTY_PAGE"; //$NON-NLS-1$
- public static final String CONTEXT_ID_CP_PROPERTY_PAGE = CONTEXT_ID_CONNECTIVITY
- + "_cp_property_page"; //$NON-NLS-1$
+ /*
+ * CONTEXT_ID_INTRO_WIZARD_PAGE =
+ * Basic intro page for new connection profile wizard
+ */
+ public static final String CONTEXT_ID_INTRO_WIZARD_PAGE =
+ "CONTEXT_ID_INTRO_WIZARD_PAGE"; //$NON-NLS-1$
- public static final String CONTEXT_ID_CP_WIZARD_PAGE = CONTEXT_ID_CONNECTIVITY
- + "_cp_wizard_page"; //$NON-NLS-1$
+ /*
+ * CONTEXT_ID_CONNECTION_PROFILE_SUMMARY_PAGE =
+ * Basic summary page for new connection profile wizard
+ */
+ public static final String CONTEXT_ID_CONNECTION_PROFILE_SUMMARY_PAGE =
+ "CONTEXT_ID_CONNECTION_PROFILE_SUMMARY_PAGE"; //$NON-NLS-1$
- public static final String CONTEXT_ID_INTRO_WIZARD_PAGE = CONTEXT_ID_CONNECTIVITY
- + "_intro_wizard_page"; //$NON-NLS-1$
+ /*
+ * CONTEXT_ID_NEW_CONNECTION_PROFILE_PAGE =
+ * Basic profile name/description/auto-connect wizard page
+ */
+ public static final String CONTEXT_ID_NEW_CONNECTION_PROFILE_PAGE =
+ "CONTEXT_ID_NEW_CONNECTION_PROFILE_PAGE"; //$NON-NLS-1$
- public static final String CONTEXT_ID_CONNECTION_PROFILE_DETAILS_PAGE = CONTEXT_ID_CONNECTIVITY
- + "_connection_profile_details_page"; //$NON-NLS-1$
+ /*
+ * CONTEXT_ID_PROFILE_DETAILS_PROPERTY_PAGE =
+ * Basic profile name/description/auto-connect property page
+ */
+ public static final String CONTEXT_ID_PROFILE_DETAILS_PROPERTY_PAGE =
+ "CONTEXT_ID_PROFILE_DETAILS_PROPERTY_PAGE"; //$NON-NLS-1$
- public static final String CONTEXT_ID_CONNECTION_PROFILE_SUMMARY_PAGE = CONTEXT_ID_CONNECTIVITY
- + "_connection_profile_summary_page"; //$NON-NLS-1$
+ /*
+ * CONTEXT_ID_DRIVER_DEFINITION_DIALOG =
+ * Driver Definition Dialog, which is the dialog equivalent to the
+ * functionality on the Driver Preferences page. This dialog is
+ * available from the driver drop-down on most profile wizard/property
+ * pages.
+ */
+ public static final String CONTEXT_ID_DRIVER_DEFINITION_DIALOG =
+ "CONTEXT_ID_DRIVER_DEFINITION_DIALOG"; //$NON-NLS-1$
- public static final String CONTEXT_ID_NEW_CONNECTION_PROFILE_PAGE = CONTEXT_ID_CONNECTIVITY
- + "_new_connection_profile_page"; //$NON-NLS-1$
+ /*
+ * CONTEXT_ID_EDIT_DRIVER_DIALOG =
+ * Edit Driver Dialog, allows users to edit a driver definition's name,
+ * description, and properties
+ */
+ public static final String CONTEXT_ID_EDIT_DRIVER_DIALOG =
+ "CONTEXT_ID_EDIT_DRIVER_DIALOG"; //$NON-NLS-1$
- public static final String CONTEXT_ID_PROFILE_DETAILS_PROPERTY_PAGE = CONTEXT_ID_CONNECTIVITY
- + "_profile_details_property_page"; //$NON-NLS-1$
+ /*
+ * CONTEXT_ID_NEW_DRIVER_DIALOG =
+ * New Driver Dialog, allows users to select a driver category and create
+ * a new driver (Edit Driver Dialog typically follows it once a category
+ * is selected)
+ */
+ public static final String CONTEXT_ID_NEW_DRIVER_DIALOG =
+ "CONTEXT_ID_NEW_DRIVER_DIALOG"; //$NON-NLS-1$
+ /*
+ * CONTEXT_ID_EXPORT_PROFILES_DIALOG =
+ * Export Profiles Dialog
+ */
+ public static final String CONTEXT_ID_EXPORT_PROFILES_DIALOG =
+ "CONTEXT_ID_EXPORT_PROFILES_DIALOG"; //$NON-NLS-1$
+
+ /*
+ * CONTEXT_ID_IMPORT_PROFILES_DIALOG =
+ * Import Profiles Dialog
+ */
+ public static final String CONTEXT_ID_IMPORT_PROFILES_DIALOG =
+ "CONTEXT_ID_IMPORT_PROFILES_DIALOG"; //$NON-NLS-1$
+
+ /*
+ * CONTEXT_ID_DRIVER_PREFERENCES =
+ * Driver Preferences page (see New Driver Dialog)
+ */
+ public static final String CONTEXT_ID_DRIVER_PREFERENCES =
+ "CONTEXT_ID_DRIVER_PREFERENCES"; //$NON-NLS-1$
+
+ /*
+ * CONTEXT_ID_PROFILE_VERSION_PROPERTIES =
+ * Version Property Page for connection profiles, shows the version info
+ * that comes back from the connection
+ */
+ public static final String CONTEXT_ID_PROFILE_VERSION_PROPERTIES =
+ "CONTEXT_ID_PROFILE_VERSION_PROPERTIES"; //$NON-NLS-1$
+
+ /*
+ * CONTEXT_ID_NEW_CP_WIZARD =
+ * New Connection Profile Wizard
+ */
+ public static final String CONTEXT_ID_NEW_CP_WIZARD =
+ "CONTEXT_ID_NEW_CP_WIZARD"; //$NON-NLS-1$
+
+ /*
+ * CONTEXT_ID_NEW_REPOSITORY_WIZARD =
+ * New Repository Wizard
+ */
+ public static final String CONTEXT_ID_NEW_REPOSITORY_WIZARD =
+ "CONTEXT_ID_NEW_REPOSITORY_WIZARD"; //$NON-NLS-1$
+
+ /*
+ * CONTEXT_ID_NEW_CONNECTION_PROFILE_WIZARD =
+ * New Connection Profile Wizard (overridden by each individual type of profile)
+ */
+ public static final String CONTEXT_ID_NEW_CONNECTION_PROFILE_WIZARD =
+ "CONTEXT_ID_NEW_CONNECTION_PROFILE_WIZARD"; //$NON-NLS-1$
}
diff --git a/plugins/org.eclipse.datatools.connectivity.ui/src/org/eclipse/datatools/connectivity/internal/ui/dialogs/DriverDefinitionsDialog.java b/plugins/org.eclipse.datatools.connectivity.ui/src/org/eclipse/datatools/connectivity/internal/ui/dialogs/DriverDefinitionsDialog.java
index 1b9bd3b..0a20875 100644
--- a/plugins/org.eclipse.datatools.connectivity.ui/src/org/eclipse/datatools/connectivity/internal/ui/dialogs/DriverDefinitionsDialog.java
+++ b/plugins/org.eclipse.datatools.connectivity.ui/src/org/eclipse/datatools/connectivity/internal/ui/dialogs/DriverDefinitionsDialog.java
@@ -27,6 +27,11 @@
import org.eclipse.datatools.connectivity.internal.ui.DriverTreeFilter;
import org.eclipse.datatools.connectivity.internal.ui.DriverTreeLabelProvider;
import org.eclipse.datatools.connectivity.internal.ui.DriverTreeSorter;
+import org.eclipse.datatools.connectivity.internal.ui.IHelpConstants;
+import org.eclipse.datatools.help.ContextProviderDelegate;
+import org.eclipse.datatools.help.HelpUtil;
+import org.eclipse.help.IContext;
+import org.eclipse.help.IContextProvider;
import org.eclipse.jface.dialogs.IDialogConstants;
import org.eclipse.jface.dialogs.IDialogSettings;
import org.eclipse.jface.dialogs.MessageDialog;
@@ -58,7 +63,8 @@
*
* @author brianf
*/
-public class DriverDefinitionsDialog extends TitleAreaDialog {
+public class DriverDefinitionsDialog extends TitleAreaDialog
+ implements IContextProvider {
// memento keys
public final static String MEMENTO_ROOT = "Drivers Definitions Driver_Dialog_Root";//$NON-NLS-1$
@@ -88,6 +94,9 @@
// stashed selected propertyset
private IPropertySet selectedPS = null;
+ private ContextProviderDelegate contextProviderDelegate =
+ new ContextProviderDelegate(ConnectivityUIPlugin.getDefault().getBundle().getSymbolicName());
+
/**
* Constructor
*
@@ -119,6 +128,8 @@
* @see org.eclipse.jface.dialogs.Dialog#createDialogArea(org.eclipse.swt.widgets.Composite)
*/
protected Control createDialogArea(Composite parent) {
+ getShell().setData( HelpUtil.CONTEXT_PROVIDER_KEY, this);
+ HelpUtil.setHelp( getShell(), IHelpConstants.CONTEXT_ID_DRIVER_DEFINITION_DIALOG);
Composite area = (Composite) super.createDialogArea(parent);
Font font = parent.getFont();
@@ -618,4 +629,16 @@
}
}
}
+
+ public IContext getContext(Object target) {
+ return contextProviderDelegate.getContext(target);
+ }
+
+ public int getContextChangeMask() {
+ return contextProviderDelegate.getContextChangeMask();
+ }
+
+ public String getSearchExpression(Object target) {
+ return contextProviderDelegate.getSearchExpression(target);
+ }
}
diff --git a/plugins/org.eclipse.datatools.connectivity.ui/src/org/eclipse/datatools/connectivity/internal/ui/dialogs/EditDriverDialog.java b/plugins/org.eclipse.datatools.connectivity.ui/src/org/eclipse/datatools/connectivity/internal/ui/dialogs/EditDriverDialog.java
index c4fa046..68b43e3 100644
--- a/plugins/org.eclipse.datatools.connectivity.ui/src/org/eclipse/datatools/connectivity/internal/ui/dialogs/EditDriverDialog.java
+++ b/plugins/org.eclipse.datatools.connectivity.ui/src/org/eclipse/datatools/connectivity/internal/ui/dialogs/EditDriverDialog.java
@@ -27,6 +27,11 @@
import org.eclipse.datatools.connectivity.drivers.models.TemplateDescriptor;
import org.eclipse.datatools.connectivity.internal.ui.ConnectivityUIPlugin;
import org.eclipse.datatools.connectivity.internal.ui.DriverPropertySourceProvider;
+import org.eclipse.datatools.connectivity.internal.ui.IHelpConstants;
+import org.eclipse.datatools.help.ContextProviderDelegate;
+import org.eclipse.datatools.help.HelpUtil;
+import org.eclipse.help.IContext;
+import org.eclipse.help.IContextProvider;
import org.eclipse.jface.dialogs.IDialogConstants;
import org.eclipse.jface.dialogs.IDialogSettings;
import org.eclipse.jface.dialogs.MessageDialog;
@@ -60,7 +65,8 @@
*
* @author brianf
*/
-public class EditDriverDialog extends TitleAreaDialog {
+public class EditDriverDialog extends TitleAreaDialog
+ implements IContextProvider {
// memento keys
public final static String MEMENTO_ROOT = "Drivers Edit Driver_Dialog_Root";//$NON-NLS-1$
@@ -89,6 +95,9 @@
private String mJarList;
private String mDriverTypeID;
+ private ContextProviderDelegate contextProviderDelegate =
+ new ContextProviderDelegate(ConnectivityUIPlugin.getDefault().getBundle().getSymbolicName());
+
/**
* Constructor
*
@@ -131,6 +140,8 @@
* @see org.eclipse.jface.dialogs.Dialog#createDialogArea(org.eclipse.swt.widgets.Composite)
*/
protected Control createDialogArea(Composite parent) {
+ getShell().setData( HelpUtil.CONTEXT_PROVIDER_KEY, this);
+ HelpUtil.setHelp( getShell(), IHelpConstants.CONTEXT_ID_EDIT_DRIVER_DIALOG);
Composite area = (Composite) super.createDialogArea(parent);
area.setLayout(new GridLayout());
@@ -793,4 +804,15 @@
return newPset;
}
+ public IContext getContext(Object target) {
+ return contextProviderDelegate.getContext(target);
+ }
+
+ public int getContextChangeMask() {
+ return contextProviderDelegate.getContextChangeMask();
+ }
+
+ public String getSearchExpression(Object target) {
+ return contextProviderDelegate.getSearchExpression(target);
+ }
}
diff --git a/plugins/org.eclipse.datatools.connectivity.ui/src/org/eclipse/datatools/connectivity/internal/ui/dialogs/NewDriverDialog.java b/plugins/org.eclipse.datatools.connectivity.ui/src/org/eclipse/datatools/connectivity/internal/ui/dialogs/NewDriverDialog.java
index c3bb9d4..3f303d0 100644
--- a/plugins/org.eclipse.datatools.connectivity.ui/src/org/eclipse/datatools/connectivity/internal/ui/dialogs/NewDriverDialog.java
+++ b/plugins/org.eclipse.datatools.connectivity.ui/src/org/eclipse/datatools/connectivity/internal/ui/dialogs/NewDriverDialog.java
@@ -26,6 +26,10 @@
import org.eclipse.datatools.connectivity.internal.ui.DriverTreeContentProvider;
import org.eclipse.datatools.connectivity.internal.ui.DriverTreeFilter;
import org.eclipse.datatools.connectivity.internal.ui.DriverTreeLabelProvider;
+import org.eclipse.datatools.connectivity.internal.ui.IHelpConstants;
+import org.eclipse.datatools.help.ContextProviderDelegate;
+import org.eclipse.datatools.help.HelpUtil;
+import org.eclipse.help.IContext;
import org.eclipse.jface.dialogs.IDialogConstants;
import org.eclipse.jface.dialogs.IDialogSettings;
import org.eclipse.jface.dialogs.TitleAreaDialog;
@@ -93,6 +97,9 @@
private String mErrorMessage = null;
+ private ContextProviderDelegate contextProviderDelegate =
+ new ContextProviderDelegate(ConnectivityUIPlugin.getDefault().getBundle().getSymbolicName());
+
/**
* Constructor
*
@@ -124,7 +131,10 @@
* @see org.eclipse.jface.dialogs.Dialog#createDialogArea(org.eclipse.swt.widgets.Composite)
*/
protected Control createDialogArea(Composite parent) {
- Font font = parent.getFont();
+ getShell().setData( HelpUtil.CONTEXT_PROVIDER_KEY, this);
+ HelpUtil.setHelp( getShell(), IHelpConstants.CONTEXT_ID_NEW_DRIVER_DIALOG);
+
+ Font font = parent.getFont();
Composite area = (Composite) super.createDialogArea(parent);
area.setLayout(new GridLayout());
@@ -464,4 +474,16 @@
protected boolean needEditImmediately(TemplateDescriptor descriptor) {
return !descriptor.getEmptyJarListIsOKFlag() || descriptor.hasVisibleProperties();
}
+
+ public IContext getContext(Object target) {
+ return contextProviderDelegate.getContext(target);
+ }
+
+ public int getContextChangeMask() {
+ return contextProviderDelegate.getContextChangeMask();
+ }
+
+ public String getSearchExpression(Object target) {
+ return contextProviderDelegate.getSearchExpression(target);
+ }
}
diff --git a/plugins/org.eclipse.datatools.connectivity.ui/src/org/eclipse/datatools/connectivity/internal/ui/preferences/DriverPreferences.java b/plugins/org.eclipse.datatools.connectivity.ui/src/org/eclipse/datatools/connectivity/internal/ui/preferences/DriverPreferences.java
index 9c806b2..ecf33e8 100644
--- a/plugins/org.eclipse.datatools.connectivity.ui/src/org/eclipse/datatools/connectivity/internal/ui/preferences/DriverPreferences.java
+++ b/plugins/org.eclipse.datatools.connectivity.ui/src/org/eclipse/datatools/connectivity/internal/ui/preferences/DriverPreferences.java
@@ -28,8 +28,13 @@
import org.eclipse.datatools.connectivity.internal.ui.DriverTreeContentProvider;
import org.eclipse.datatools.connectivity.internal.ui.DriverTreeLabelProvider;
import org.eclipse.datatools.connectivity.internal.ui.DriverTreeSorter;
+import org.eclipse.datatools.connectivity.internal.ui.IHelpConstants;
import org.eclipse.datatools.connectivity.internal.ui.dialogs.EditDriverDialog;
import org.eclipse.datatools.connectivity.internal.ui.dialogs.NewDriverDialog;
+import org.eclipse.datatools.help.ContextProviderDelegate;
+import org.eclipse.datatools.help.HelpUtil;
+import org.eclipse.help.IContext;
+import org.eclipse.help.IContextProvider;
import org.eclipse.jface.action.Action;
import org.eclipse.jface.action.IMenuListener;
import org.eclipse.jface.action.IMenuManager;
@@ -67,7 +72,7 @@
* @author brianf
*/
public class DriverPreferences extends PreferencePage implements
- IWorkbenchPreferencePage {
+ IWorkbenchPreferencePage, IContextProvider {
// ui elements
private Button mAddButton;
@@ -85,6 +90,9 @@
// dirty flag for save/no save
private boolean mDirty = false;
+ private ContextProviderDelegate contextProviderDelegate =
+ new ContextProviderDelegate(ConnectivityUIPlugin.getDefault().getBundle().getSymbolicName());
+
/**
* Default Constructor
*/
@@ -117,7 +125,7 @@
* @see org.eclipse.jface.preference.PreferencePage#createContents(org.eclipse.swt.widgets.Composite)
*/
protected Control createContents(Composite parent) {
- Font font = parent.getFont();
+ Font font = parent.getFont();
Composite content = new Composite(parent, SWT.NONE);
GridLayout layout = new GridLayout();
@@ -628,4 +636,23 @@
topset.getBaseProperties().putAll(fromPset.getBaseProperties());
}
}
+
+ 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(IHelpConstants.CONTEXT_ID_DRIVER_PREFERENCES, ConnectivityUIPlugin.getDefault().getBundle().getSymbolicName()));
+
+ }
}
diff --git a/plugins/org.eclipse.datatools.connectivity.ui/src/org/eclipse/datatools/connectivity/internal/ui/wizards/CPPropetyPage.java b/plugins/org.eclipse.datatools.connectivity.ui/src/org/eclipse/datatools/connectivity/internal/ui/wizards/CPPropetyPage.java
index aa63a64..2c7a7c9 100644
--- a/plugins/org.eclipse.datatools.connectivity.ui/src/org/eclipse/datatools/connectivity/internal/ui/wizards/CPPropetyPage.java
+++ b/plugins/org.eclipse.datatools.connectivity.ui/src/org/eclipse/datatools/connectivity/internal/ui/wizards/CPPropetyPage.java
@@ -17,6 +17,10 @@
import org.eclipse.datatools.connectivity.internal.ui.ConnectivityUIPlugin;
import org.eclipse.datatools.connectivity.internal.ui.IHelpConstants;
import org.eclipse.datatools.connectivity.internal.ui.dialogs.ExceptionHandler;
+import org.eclipse.datatools.help.ContextProviderDelegate;
+import org.eclipse.datatools.help.HelpUtil;
+import org.eclipse.help.IContext;
+import org.eclipse.help.IContextProvider;
import org.eclipse.jface.preference.PreferencePage;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.ModifyEvent;
@@ -28,10 +32,10 @@
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.dialogs.PropertyPage;
-public class CPPropetyPage extends PropertyPage {
+public class CPPropetyPage extends PropertyPage
+ implements IContextProvider {
private Text txtProfileName;
@@ -39,6 +43,9 @@
private Button btnAutoConnect;
+ private ContextProviderDelegate contextProviderDelegate =
+ new ContextProviderDelegate(ConnectivityUIPlugin.getDefault().getBundle().getSymbolicName());
+
/**
* Constructor for FileProfilePropetyPage.
*/
@@ -90,8 +97,10 @@
btnAutoConnect.setLayoutData(gd);
initControls();
- PlatformUI.getWorkbench().getHelpSystem().setHelp(parent,
- IHelpConstants.CONTEXT_ID_CP_PROPERTY_PAGE);
+// PlatformUI.getWorkbench().getHelpSystem().setHelp(parent,
+// IHelpConstants.CONTEXT_ID_CP_PROPERTY_PAGE);
+ getShell().setData( HelpUtil.CONTEXT_PROVIDER_KEY, this);
+ HelpUtil.setHelp( getControl(), HelpUtil.getContextId(IHelpConstants.CONTEXT_ID_CP_PROPERTY_PAGE, ConnectivityUIPlugin.getDefault().getBundle().getSymbolicName()));
return content;
}
@@ -163,4 +172,16 @@
setErrorMessage(errorMessage);
setValid(errorMessage == null);
}
+
+ public IContext getContext(Object target) {
+ return contextProviderDelegate.getContext(target);
+ }
+
+ public int getContextChangeMask() {
+ return contextProviderDelegate.getContextChangeMask();
+ }
+
+ public String getSearchExpression(Object target) {
+ return contextProviderDelegate.getSearchExpression(target);
+ }
}
diff --git a/plugins/org.eclipse.datatools.connectivity.ui/src/org/eclipse/datatools/connectivity/internal/ui/wizards/CPVersionPropertyPage.java b/plugins/org.eclipse.datatools.connectivity.ui/src/org/eclipse/datatools/connectivity/internal/ui/wizards/CPVersionPropertyPage.java
index c59d621..f6029a0 100644
--- a/plugins/org.eclipse.datatools.connectivity.ui/src/org/eclipse/datatools/connectivity/internal/ui/wizards/CPVersionPropertyPage.java
+++ b/plugins/org.eclipse.datatools.connectivity.ui/src/org/eclipse/datatools/connectivity/internal/ui/wizards/CPVersionPropertyPage.java
@@ -24,6 +24,11 @@
import org.eclipse.datatools.connectivity.IPropertySetListener;
import org.eclipse.datatools.connectivity.IPropertySetChangeEvent.IChangedProperty;
import org.eclipse.datatools.connectivity.internal.ui.ConnectivityUIPlugin;
+import org.eclipse.datatools.connectivity.internal.ui.IHelpConstants;
+import org.eclipse.datatools.help.ContextProviderDelegate;
+import org.eclipse.datatools.help.HelpUtil;
+import org.eclipse.help.IContext;
+import org.eclipse.help.IContextProvider;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
@@ -42,12 +47,15 @@
* Created on Jun 3, 2005
*/
public class CPVersionPropertyPage extends PropertyPage implements
- IWorkbenchPropertyPage {
+ IWorkbenchPropertyPage, IContextProvider {
private static final int INDENT_TECH_VERSION = 20;
private Button mUpdateVersionInfoButton;
+ private ContextProviderDelegate contextProviderDelegate =
+ new ContextProviderDelegate(ConnectivityUIPlugin.getDefault().getBundle().getSymbolicName());
+
private IPropertySetListener mPropertySetListener = new IPropertySetListener() {
public void propertySetChanged(IPropertySetChangeEvent event) {
@@ -97,7 +105,7 @@
* @see org.eclipse.jface.preference.PreferencePage#createContents(org.eclipse.swt.widgets.Composite)
*/
protected Control createContents(Composite parent) {
- Composite content = new Composite(parent, SWT.NULL);
+ Composite content = new Composite(parent, SWT.NULL);
GridLayout layout = new GridLayout();
content.setLayout(layout);
@@ -105,6 +113,8 @@
getConnectionProfile().addPropertySetListener(mPropertySetListener);
+ getShell().setData( HelpUtil.CONTEXT_PROVIDER_KEY, this);
+ HelpUtil.setHelp( getControl(), HelpUtil.getContextId(IHelpConstants.CONTEXT_ID_PROFILE_VERSION_PROPERTIES, ConnectivityUIPlugin.getDefault().getBundle().getSymbolicName()));
return content;
}
@@ -243,4 +253,15 @@
return profile;
}
+ public IContext getContext(Object target) {
+ return contextProviderDelegate.getContext(target);
+ }
+
+ public int getContextChangeMask() {
+ return contextProviderDelegate.getContextChangeMask();
+ }
+
+ public String getSearchExpression(Object target) {
+ return contextProviderDelegate.getSearchExpression(target);
+ }
}
\ No newline at end of file
diff --git a/plugins/org.eclipse.datatools.connectivity.ui/src/org/eclipse/datatools/connectivity/internal/ui/wizards/CPWizardSelectionPage.java b/plugins/org.eclipse.datatools.connectivity.ui/src/org/eclipse/datatools/connectivity/internal/ui/wizards/CPWizardSelectionPage.java
index 570b15e..2643534 100644
--- a/plugins/org.eclipse.datatools.connectivity.ui/src/org/eclipse/datatools/connectivity/internal/ui/wizards/CPWizardSelectionPage.java
+++ b/plugins/org.eclipse.datatools.connectivity.ui/src/org/eclipse/datatools/connectivity/internal/ui/wizards/CPWizardSelectionPage.java
@@ -21,6 +21,10 @@
import org.eclipse.datatools.connectivity.ui.wizards.ICPWizard;
import org.eclipse.datatools.connectivity.ui.wizards.IProfileWizardProvider;
import org.eclipse.datatools.connectivity.ui.wizards.IWizardCategoryProvider;
+import org.eclipse.datatools.help.ContextProviderDelegate;
+import org.eclipse.datatools.help.HelpUtil;
+import org.eclipse.help.IContext;
+import org.eclipse.help.IContextProvider;
import org.eclipse.jface.viewers.ColumnWeightData;
import org.eclipse.jface.viewers.DoubleClickEvent;
import org.eclipse.jface.viewers.IDoubleClickListener;
@@ -47,17 +51,21 @@
import org.eclipse.swt.widgets.Group;
import org.eclipse.swt.widgets.Table;
import org.eclipse.swt.widgets.TableColumn;
-import org.eclipse.ui.PlatformUI;
/**
* @author shongxum
*
*/
-public class CPWizardSelectionPage extends WizardSelectionPage {
+public class CPWizardSelectionPage
+ extends WizardSelectionPage
+ implements IContextProvider {
private String category = ""; //$NON-NLS-1$
private TableViewer tableViewer;
+ private ContextProviderDelegate contextProviderDelegate =
+ new ContextProviderDelegate(ConnectivityUIPlugin.getDefault().getBundle().getSymbolicName());
+
private ViewerFilter viewerFilter = new ViewerFilter() {
public boolean select(Viewer viewer, Object parentElement,
@@ -164,7 +172,7 @@
* @see org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets.Composite)
*/
public void createControl(Composite parent) {
- // <!-- Created by SWT-Designer
+ // <!-- Created by SWT-Designer
Composite container = new Composite(parent, SWT.NULL);
container.setLayout(new GridLayout());
setControl(container);
@@ -230,8 +238,11 @@
});
setPageComplete(false);
- PlatformUI.getWorkbench().getHelpSystem().setHelp(parent,
- IHelpConstants.CONTEXT_ID_CP_WIZARD_PAGE);
+// PlatformUI.getWorkbench().getHelpSystem().setHelp(parent,
+// IHelpConstants.CONTEXT_ID_CP_WIZARD_PAGE);
+
+ getShell().setData( HelpUtil.CONTEXT_PROVIDER_KEY, this);
+ HelpUtil.setHelp( tableViewer.getTable(), HelpUtil.getContextId(IHelpConstants.CONTEXT_ID_CP_WIZARD_PAGE, ConnectivityUIPlugin.getDefault().getBundle().getSymbolicName()));
}
@@ -301,4 +312,17 @@
return wizard.getStartingPage();
}
+
+ public IContext getContext(Object target) {
+ return contextProviderDelegate.getContext(target);
+ }
+
+ public int getContextChangeMask() {
+ return contextProviderDelegate.getContextChangeMask();
+ }
+
+ public String getSearchExpression(Object target) {
+ return contextProviderDelegate.getSearchExpression(target);
+ }
+
}
\ No newline at end of file
diff --git a/plugins/org.eclipse.datatools.connectivity.ui/src/org/eclipse/datatools/connectivity/internal/ui/wizards/ExportProfilesDialog.java b/plugins/org.eclipse.datatools.connectivity.ui/src/org/eclipse/datatools/connectivity/internal/ui/wizards/ExportProfilesDialog.java
index 3f4d63d..6f43c1e 100644
--- a/plugins/org.eclipse.datatools.connectivity.ui/src/org/eclipse/datatools/connectivity/internal/ui/wizards/ExportProfilesDialog.java
+++ b/plugins/org.eclipse.datatools.connectivity.ui/src/org/eclipse/datatools/connectivity/internal/ui/wizards/ExportProfilesDialog.java
@@ -16,10 +16,15 @@
import org.eclipse.datatools.connectivity.IConnectionProfile;
import org.eclipse.datatools.connectivity.ProfileManager;
import org.eclipse.datatools.connectivity.internal.ui.ConnectivityUIPlugin;
+import org.eclipse.datatools.connectivity.internal.ui.IHelpConstants;
import org.eclipse.datatools.connectivity.ui.ProfileImageRegistry;
-import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.datatools.help.ContextProviderDelegate;
+import org.eclipse.datatools.help.HelpUtil;
+import org.eclipse.help.IContext;
+import org.eclipse.help.IContextProvider;
import org.eclipse.jface.dialogs.IDialogConstants;
import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.dialogs.TrayDialog;
import org.eclipse.jface.viewers.CheckboxTableViewer;
import org.eclipse.jface.viewers.IStructuredContentProvider;
import org.eclipse.jface.viewers.ITableLabelProvider;
@@ -45,7 +50,7 @@
/**
* @author shongxum
*/
-public class ExportProfilesDialog extends Dialog {
+public class ExportProfilesDialog extends TrayDialog implements IContextProvider{
private CheckboxTableViewer tvViewer;
@@ -59,6 +64,9 @@
private boolean mNeedEncryption;
+ private ContextProviderDelegate contextProviderDelegate =
+ new ContextProviderDelegate(ConnectivityUIPlugin.getDefault().getBundle().getSymbolicName());
+
class TableLabelProvider extends LabelProvider implements
ITableLabelProvider {
@@ -93,7 +101,10 @@
}
protected Control createDialogArea(Composite parent) {
- Composite container = (Composite) super.createDialogArea(parent);
+ getShell().setData( HelpUtil.CONTEXT_PROVIDER_KEY, this);
+ HelpUtil.setHelp( getShell(), IHelpConstants.CONTEXT_ID_EXPORT_PROFILES_DIALOG);
+
+ Composite container = (Composite) super.createDialogArea(parent);
final GridLayout gridLayout = new GridLayout();
gridLayout.marginHeight = 20;
gridLayout.numColumns = 3;
@@ -285,4 +296,16 @@
mNeedEncryption = btnEncryption.getSelection();
super.okPressed();
}
+
+ public IContext getContext(Object target) {
+ return contextProviderDelegate.getContext(target);
+ }
+
+ public int getContextChangeMask() {
+ return contextProviderDelegate.getContextChangeMask();
+ }
+
+ public String getSearchExpression(Object target) {
+ return contextProviderDelegate.getSearchExpression(target);
+ }
}
\ No newline at end of file
diff --git a/plugins/org.eclipse.datatools.connectivity.ui/src/org/eclipse/datatools/connectivity/internal/ui/wizards/ImportProfilesDialog.java b/plugins/org.eclipse.datatools.connectivity.ui/src/org/eclipse/datatools/connectivity/internal/ui/wizards/ImportProfilesDialog.java
index d5fd5ea..68cd469 100644
--- a/plugins/org.eclipse.datatools.connectivity.ui/src/org/eclipse/datatools/connectivity/internal/ui/wizards/ImportProfilesDialog.java
+++ b/plugins/org.eclipse.datatools.connectivity.ui/src/org/eclipse/datatools/connectivity/internal/ui/wizards/ImportProfilesDialog.java
@@ -19,10 +19,15 @@
import org.eclipse.datatools.connectivity.internal.repository.IConnectionProfileRepositoryConstants;
import org.eclipse.datatools.connectivity.internal.security.SecurityManager;
import org.eclipse.datatools.connectivity.internal.ui.ConnectivityUIPlugin;
+import org.eclipse.datatools.connectivity.internal.ui.IHelpConstants;
import org.eclipse.datatools.connectivity.internal.ui.RepositoriesDropList;
-import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.datatools.help.ContextProviderDelegate;
+import org.eclipse.datatools.help.HelpUtil;
+import org.eclipse.help.IContext;
+import org.eclipse.help.IContextProvider;
import org.eclipse.jface.dialogs.IDialogConstants;
import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.dialogs.TrayDialog;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.ISelectionChangedListener;
import org.eclipse.jface.viewers.IStructuredSelection;
@@ -43,7 +48,7 @@
/**
* @author shongxum
*/
-public class ImportProfilesDialog extends Dialog {
+public class ImportProfilesDialog extends TrayDialog implements IContextProvider {
private Text txtFile;
@@ -63,12 +68,18 @@
private IConnectionProfile mRepository;
+ private ContextProviderDelegate contextProviderDelegate =
+ new ContextProviderDelegate(ConnectivityUIPlugin.getDefault().getBundle().getSymbolicName());
+
public ImportProfilesDialog(Shell parentShell) {
super(parentShell);
}
protected Control createDialogArea(Composite parent) {
- Composite container = (Composite) super.createDialogArea(parent);
+ getShell().setData( HelpUtil.CONTEXT_PROVIDER_KEY, this);
+ HelpUtil.setHelp( getShell(), IHelpConstants.CONTEXT_ID_IMPORT_PROFILES_DIALOG);
+
+ Composite container = (Composite) super.createDialogArea(parent);
final GridLayout gridLayout = new GridLayout();
gridLayout.marginHeight = 20;
gridLayout.numColumns = 3;
@@ -282,4 +293,16 @@
mOverwrite = btnOverwrite.getSelection();
super.okPressed();
}
+
+ public IContext getContext(Object target) {
+ return contextProviderDelegate.getContext(target);
+ }
+
+ public int getContextChangeMask() {
+ return contextProviderDelegate.getContextChangeMask();
+ }
+
+ public String getSearchExpression(Object target) {
+ return contextProviderDelegate.getSearchExpression(target);
+ }
}
\ No newline at end of file
diff --git a/plugins/org.eclipse.datatools.connectivity.ui/src/org/eclipse/datatools/connectivity/internal/ui/wizards/IntroWizardPage.java b/plugins/org.eclipse.datatools.connectivity.ui/src/org/eclipse/datatools/connectivity/internal/ui/wizards/IntroWizardPage.java
index 5422fe6..d10d8f7 100644
--- a/plugins/org.eclipse.datatools.connectivity.ui/src/org/eclipse/datatools/connectivity/internal/ui/wizards/IntroWizardPage.java
+++ b/plugins/org.eclipse.datatools.connectivity.ui/src/org/eclipse/datatools/connectivity/internal/ui/wizards/IntroWizardPage.java
@@ -12,12 +12,15 @@
import org.eclipse.datatools.connectivity.internal.ui.ConnectivityUIPlugin;
import org.eclipse.datatools.connectivity.internal.ui.IHelpConstants;
+import org.eclipse.datatools.help.ContextProviderDelegate;
+import org.eclipse.datatools.help.HelpUtil;
+import org.eclipse.help.IContext;
+import org.eclipse.help.IContextProvider;
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.Text;
-import org.eclipse.ui.PlatformUI;
/**
* @author danielva
@@ -25,11 +28,14 @@
* Introduction Wizard Page
*/
-public class IntroWizardPage extends BaseWizardPage {
+public class IntroWizardPage extends BaseWizardPage implements IContextProvider {
private Text _txtIntroduction;
private static final String PAGE_NAME = "IntroductionWizardPage"; //$NON-NLS-1$
+ private ContextProviderDelegate contextProviderDelegate =
+ new ContextProviderDelegate(ConnectivityUIPlugin.getDefault().getBundle().getSymbolicName());
+
/**
* Constructor
*/
@@ -47,7 +53,7 @@
* @see org.eclipse.jface.dialogs.DialogPage#createControl(org.eclipse.swt.widgets.Composite)
*/
public void createControl(Composite parent) {
- GridData gd;
+ GridData gd;
Composite composite = new Composite(parent, SWT.NONE);
GridLayout gl = new GridLayout();
@@ -65,8 +71,23 @@
setControl(composite);
setPageComplete(true);
- PlatformUI.getWorkbench().getHelpSystem().setHelp(parent,
- IHelpConstants.CONTEXT_ID_INTRO_WIZARD_PAGE);
+// PlatformUI.getWorkbench().getHelpSystem().setHelp(parent,
+// IHelpConstants.CONTEXT_ID_INTRO_WIZARD_PAGE);
+ getShell().setData( HelpUtil.CONTEXT_PROVIDER_KEY, this);
+ HelpUtil.setHelp( getControl(), HelpUtil.getContextId(IHelpConstants.CONTEXT_ID_INTRO_WIZARD_PAGE, ConnectivityUIPlugin.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);
}
}
diff --git a/plugins/org.eclipse.datatools.connectivity.ui/src/org/eclipse/datatools/connectivity/internal/ui/wizards/NewCPWizard.java b/plugins/org.eclipse.datatools.connectivity.ui/src/org/eclipse/datatools/connectivity/internal/ui/wizards/NewCPWizard.java
index d06b291..730409a 100644
--- a/plugins/org.eclipse.datatools.connectivity.ui/src/org/eclipse/datatools/connectivity/internal/ui/wizards/NewCPWizard.java
+++ b/plugins/org.eclipse.datatools.connectivity.ui/src/org/eclipse/datatools/connectivity/internal/ui/wizards/NewCPWizard.java
@@ -12,17 +12,23 @@
import org.eclipse.datatools.connectivity.IConnectionProfile;
import org.eclipse.datatools.connectivity.internal.ui.ConnectivityUIPlugin;
+import org.eclipse.datatools.connectivity.internal.ui.IHelpConstants;
import org.eclipse.datatools.connectivity.internal.ui.SharedImages;
+import org.eclipse.datatools.help.ContextProviderDelegate;
+import org.eclipse.datatools.help.HelpUtil;
+import org.eclipse.help.IContext;
+import org.eclipse.help.IContextProvider;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.viewers.ViewerFilter;
import org.eclipse.jface.wizard.Wizard;
+import org.eclipse.swt.widgets.Composite;
import org.eclipse.ui.INewWizard;
import org.eclipse.ui.IWorkbench;
/**
* @see Wizard
*/
-public class NewCPWizard extends BaseWizard implements INewWizard {
+public class NewCPWizard extends BaseWizard implements INewWizard, IContextProvider {
private CPWizardSelectionPage mProfilePage;
@@ -87,4 +93,28 @@
public IConnectionProfile getParentProfile() {
return mParentProfile;
}
+
+ public void createPageControls(Composite pageContainer) {
+ super.createPageControls(pageContainer);
+ getShell().setData(HelpUtil.CONTEXT_PROVIDER_KEY, this);
+// HelpUtil.setHelp(getShell(), IHelpConstants.CONTEXT_ID_NEW_CP_WIZARD);
+ HelpUtil.setHelp(getShell(), HelpUtil.getContextId(
+ IHelpConstants.CONTEXT_ID_NEW_CP_WIZARD,
+ ConnectivityUIPlugin.getDefault().getBundle().getSymbolicName()));
+ }
+
+ private ContextProviderDelegate contextProviderDelegate = new ContextProviderDelegate(
+ ConnectivityUIPlugin.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);
+ }
}
\ No newline at end of file
diff --git a/plugins/org.eclipse.datatools.connectivity.ui/src/org/eclipse/datatools/connectivity/internal/ui/wizards/NewRepositoryWizard.java b/plugins/org.eclipse.datatools.connectivity.ui/src/org/eclipse/datatools/connectivity/internal/ui/wizards/NewRepositoryWizard.java
index c636fe9..3de50ab 100644
--- a/plugins/org.eclipse.datatools.connectivity.ui/src/org/eclipse/datatools/connectivity/internal/ui/wizards/NewRepositoryWizard.java
+++ b/plugins/org.eclipse.datatools.connectivity.ui/src/org/eclipse/datatools/connectivity/internal/ui/wizards/NewRepositoryWizard.java
@@ -11,7 +11,11 @@
package org.eclipse.datatools.connectivity.internal.ui.wizards;
import org.eclipse.datatools.connectivity.internal.repository.IConnectionProfileRepositoryConstants;
+import org.eclipse.datatools.connectivity.internal.ui.ConnectivityUIPlugin;
+import org.eclipse.datatools.connectivity.internal.ui.IHelpConstants;
import org.eclipse.datatools.connectivity.internal.ui.SharedImages;
+import org.eclipse.datatools.help.HelpUtil;
+import org.eclipse.swt.widgets.Composite;
public class NewRepositoryWizard extends NewCPWizard {
@@ -23,4 +27,12 @@
setWindowTitle("New Repository Wizard Window"); //$NON-NLS-1$
}
+ public void createPageControls(Composite pageContainer) {
+ super.createPageControls(pageContainer);
+ getShell().setData(HelpUtil.CONTEXT_PROVIDER_KEY, this);
+ HelpUtil.setHelp(getShell(), HelpUtil.getContextId(
+ IHelpConstants.CONTEXT_ID_NEW_REPOSITORY_WIZARD,
+ ConnectivityUIPlugin.getDefault().getBundle().getSymbolicName()));
+ }
+
}
diff --git a/plugins/org.eclipse.datatools.connectivity.ui/src/org/eclipse/datatools/connectivity/ui/wizards/ConnectionProfileDetailsPage.java b/plugins/org.eclipse.datatools.connectivity.ui/src/org/eclipse/datatools/connectivity/ui/wizards/ConnectionProfileDetailsPage.java
index 3e9aa84..1a2c184 100644
--- a/plugins/org.eclipse.datatools.connectivity.ui/src/org/eclipse/datatools/connectivity/ui/wizards/ConnectionProfileDetailsPage.java
+++ b/plugins/org.eclipse.datatools.connectivity.ui/src/org/eclipse/datatools/connectivity/ui/wizards/ConnectionProfileDetailsPage.java
@@ -16,6 +16,10 @@
import org.eclipse.datatools.connectivity.internal.ui.IHelpConstants;
import org.eclipse.datatools.connectivity.internal.ui.wizards.BaseWizardPage;
import org.eclipse.datatools.connectivity.ui.PingJob;
+import org.eclipse.datatools.help.ContextProviderDelegate;
+import org.eclipse.datatools.help.HelpUtil;
+import org.eclipse.help.IContext;
+import org.eclipse.help.IContextProvider;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.wizard.IWizard;
@@ -28,15 +32,19 @@
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
-import org.eclipse.ui.PlatformUI;
/**
* @author shongxum
*/
-public abstract class ConnectionProfileDetailsPage extends BaseWizardPage {
+public abstract class ConnectionProfileDetailsPage
+ extends BaseWizardPage
+ implements IContextProvider {
protected Button btnPing;
+ private ContextProviderDelegate contextProviderDelegate =
+ new ContextProviderDelegate(ConnectivityUIPlugin.getDefault().getBundle().getSymbolicName());
+
/**
* @param name
*/
@@ -80,8 +88,11 @@
btnPing.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END));
btnPing.setText(ConnectivityUIPlugin.getDefault().getResourceString(
"ConnectionProfileDetailsPage.Button.TestConnection")); //$NON-NLS-1$
- PlatformUI.getWorkbench().getHelpSystem().setHelp(parent,
- IHelpConstants.CONTEXT_ID_CONNECTION_PROFILE_DETAILS_PAGE);
+
+// PlatformUI.getWorkbench().getHelpSystem().setHelp(parent,
+// IHelpConstants.CONTEXT_ID_CONNECTION_PROFILE_DETAILS_PAGE);
+ getShell().setData( HelpUtil.CONTEXT_PROVIDER_KEY, this);
+ HelpUtil.setHelp( getControl(), HelpUtil.getContextId(IHelpConstants.CONTEXT_ID_PROFILE_DETAILS_PROPERTY_PAGE, ConnectivityUIPlugin.getDefault().getBundle().getSymbolicName()));
}
public abstract void createCustomControl(Composite parent);
@@ -121,4 +132,16 @@
});
}
}
+
+ public IContext getContext(Object target) {
+ return contextProviderDelegate.getContext(target);
+ }
+
+ public int getContextChangeMask() {
+ return contextProviderDelegate.getContextChangeMask();
+ }
+
+ public String getSearchExpression(Object target) {
+ return contextProviderDelegate.getSearchExpression(target);
+ }
}
diff --git a/plugins/org.eclipse.datatools.connectivity.ui/src/org/eclipse/datatools/connectivity/ui/wizards/ConnectionProfileSummaryPage.java b/plugins/org.eclipse.datatools.connectivity.ui/src/org/eclipse/datatools/connectivity/ui/wizards/ConnectionProfileSummaryPage.java
index 94a9a7b..1f55f3b 100644
--- a/plugins/org.eclipse.datatools.connectivity.ui/src/org/eclipse/datatools/connectivity/ui/wizards/ConnectionProfileSummaryPage.java
+++ b/plugins/org.eclipse.datatools.connectivity.ui/src/org/eclipse/datatools/connectivity/ui/wizards/ConnectionProfileSummaryPage.java
@@ -17,6 +17,10 @@
import org.eclipse.datatools.connectivity.internal.ui.wizards.ISummaryDataSource;
import org.eclipse.datatools.connectivity.internal.ui.wizards.SummaryWizardPage;
import org.eclipse.datatools.connectivity.ui.PingJob;
+import org.eclipse.datatools.help.ContextProviderDelegate;
+import org.eclipse.datatools.help.HelpUtil;
+import org.eclipse.help.IContext;
+import org.eclipse.help.IContextProvider;
import org.eclipse.swt.SWT;
import org.eclipse.swt.custom.BusyIndicator;
import org.eclipse.swt.events.SelectionAdapter;
@@ -24,17 +28,21 @@
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
-import org.eclipse.ui.PlatformUI;
/**
* Summary Page + Test Connection
*
* @author shongxum
*/
-public class ConnectionProfileSummaryPage extends SummaryWizardPage {
+public class ConnectionProfileSummaryPage
+ extends SummaryWizardPage
+ implements IContextProvider {
private ISummaryDataSource dataSource;
+ private ContextProviderDelegate contextProviderDelegate =
+ new ContextProviderDelegate(ConnectivityUIPlugin.getDefault().getBundle().getSymbolicName());
+
/**
* @param source
*/
@@ -60,8 +68,10 @@
});
button.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END));
button.setText(ConnectivityUIPlugin.getDefault().getResourceString("ConnectionProfileSummaryPage.button.testConnection")); //$NON-NLS-1$
- PlatformUI.getWorkbench().getHelpSystem().setHelp(parent,
- IHelpConstants.CONTEXT_ID_CONNECTION_PROFILE_SUMMARY_PAGE);
+// PlatformUI.getWorkbench().getHelpSystem().setHelp(parent,
+// IHelpConstants.CONTEXT_ID_CONNECTION_PROFILE_SUMMARY_PAGE);
+ getShell().setData( HelpUtil.CONTEXT_PROVIDER_KEY, this);
+ HelpUtil.setHelp( getControl(), HelpUtil.getContextId(IHelpConstants.CONTEXT_ID_CONNECTION_PROFILE_SUMMARY_PAGE, ConnectivityUIPlugin.getDefault().getBundle().getSymbolicName()));
}
@@ -88,4 +98,16 @@
});
}
}
+
+ public IContext getContext(Object target) {
+ return contextProviderDelegate.getContext(target);
+ }
+
+ public int getContextChangeMask() {
+ return contextProviderDelegate.getContextChangeMask();
+ }
+
+ public String getSearchExpression(Object target) {
+ return contextProviderDelegate.getSearchExpression(target);
+ }
}
\ No newline at end of file
diff --git a/plugins/org.eclipse.datatools.connectivity.ui/src/org/eclipse/datatools/connectivity/ui/wizards/NewConnectionProfileWizard.java b/plugins/org.eclipse.datatools.connectivity.ui/src/org/eclipse/datatools/connectivity/ui/wizards/NewConnectionProfileWizard.java
index 96c6f55..5c498eb 100644
--- a/plugins/org.eclipse.datatools.connectivity.ui/src/org/eclipse/datatools/connectivity/ui/wizards/NewConnectionProfileWizard.java
+++ b/plugins/org.eclipse.datatools.connectivity.ui/src/org/eclipse/datatools/connectivity/ui/wizards/NewConnectionProfileWizard.java
@@ -18,16 +18,22 @@
import org.eclipse.datatools.connectivity.IConnectionProfile;
import org.eclipse.datatools.connectivity.ProfileManager;
import org.eclipse.datatools.connectivity.internal.ui.ConnectivityUIPlugin;
+import org.eclipse.datatools.connectivity.internal.ui.IHelpConstants;
import org.eclipse.datatools.connectivity.internal.ui.SharedImages;
import org.eclipse.datatools.connectivity.internal.ui.dialogs.ExceptionHandler;
import org.eclipse.datatools.connectivity.internal.ui.refactoring.ConnectionProfileCreateChange;
import org.eclipse.datatools.connectivity.internal.ui.wizards.BaseWizard;
import org.eclipse.datatools.connectivity.internal.ui.wizards.SummaryWizardPage;
+import org.eclipse.datatools.help.ContextProviderDelegate;
+import org.eclipse.datatools.help.HelpUtil;
+import org.eclipse.help.IContext;
+import org.eclipse.help.IContextProvider;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.jface.wizard.Wizard;
import org.eclipse.ltk.core.refactoring.PerformChangeOperation;
+import org.eclipse.swt.widgets.Composite;
import org.eclipse.ui.INewWizard;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPart;
@@ -40,7 +46,7 @@
* @author shongxum
*/
public abstract class NewConnectionProfileWizard extends BaseWizard implements
- INewWizard, ICPWizard {
+ INewWizard, ICPWizard, IContextProvider {
protected NewConnectionProfileWizardPage mProfilePage;
protected SummaryWizardPage mSummaryPage;
@@ -210,4 +216,26 @@
addPage(mSummaryPage);
}
+ public void createPageControls(Composite pageContainer) {
+ super.createPageControls(pageContainer);
+ getShell().setData(HelpUtil.CONTEXT_PROVIDER_KEY, this);
+ HelpUtil.setHelp(getShell(), HelpUtil.getContextId(
+ IHelpConstants.CONTEXT_ID_NEW_CONNECTION_PROFILE_WIZARD,
+ ConnectivityUIPlugin.getDefault().getBundle().getSymbolicName()));
+ }
+
+ private ContextProviderDelegate contextProviderDelegate = new ContextProviderDelegate(
+ ConnectivityUIPlugin.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);
+ }
}
\ No newline at end of file
diff --git a/plugins/org.eclipse.datatools.connectivity.ui/src/org/eclipse/datatools/connectivity/ui/wizards/NewConnectionProfileWizardPage.java b/plugins/org.eclipse.datatools.connectivity.ui/src/org/eclipse/datatools/connectivity/ui/wizards/NewConnectionProfileWizardPage.java
index b1cb1de..044ac62 100644
--- a/plugins/org.eclipse.datatools.connectivity.ui/src/org/eclipse/datatools/connectivity/ui/wizards/NewConnectionProfileWizardPage.java
+++ b/plugins/org.eclipse.datatools.connectivity.ui/src/org/eclipse/datatools/connectivity/ui/wizards/NewConnectionProfileWizardPage.java
@@ -24,6 +24,10 @@
import org.eclipse.datatools.connectivity.internal.ui.IHelpConstants;
import org.eclipse.datatools.connectivity.internal.ui.RepositoriesDropList;
import org.eclipse.datatools.connectivity.internal.ui.wizards.BaseWizardPage;
+import org.eclipse.datatools.help.ContextProviderDelegate;
+import org.eclipse.datatools.help.HelpUtil;
+import org.eclipse.help.IContext;
+import org.eclipse.help.IContextProvider;
import org.eclipse.jface.viewers.ISelectionChangedListener;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.viewers.SelectionChangedEvent;
@@ -39,12 +43,13 @@
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.PlatformUI;
/**
* @author shongxum
*/
-public class NewConnectionProfileWizardPage extends BaseWizardPage {
+public class NewConnectionProfileWizardPage
+ extends BaseWizardPage
+ implements IContextProvider {
private Text mCPName;
private Text mCPDesc;
@@ -59,6 +64,9 @@
private static final String EMPTY_STRING = ""; //$NON-NLS-1$
+ private ContextProviderDelegate contextProviderDelegate =
+ new ContextProviderDelegate(ConnectivityUIPlugin.getDefault().getBundle().getSymbolicName());
+
/**
* Constructor
*/
@@ -235,8 +243,10 @@
validate();
setErrorMessage(null);
- PlatformUI.getWorkbench().getHelpSystem().setHelp(parent,
- IHelpConstants.CONTEXT_ID_NEW_CONNECTION_PROFILE_PAGE);
+ getShell().setData( HelpUtil.CONTEXT_PROVIDER_KEY, this);
+ HelpUtil.setHelp( getControl(), HelpUtil.getContextId(IHelpConstants.CONTEXT_ID_NEW_CONNECTION_PROFILE_PAGE, ConnectivityUIPlugin.getDefault().getBundle().getSymbolicName()));
+// PlatformUI.getWorkbench().getHelpSystem().setHelp(parent,
+// IHelpConstants.CONTEXT_ID_NEW_CONNECTION_PROFILE_PAGE);
}
private void handleModify() {
@@ -358,4 +368,15 @@
.getSelection()).getFirstElement();
}
+ public IContext getContext(Object target) {
+ return contextProviderDelegate.getContext(target);
+ }
+
+ public int getContextChangeMask() {
+ return contextProviderDelegate.getContextChangeMask();
+ }
+
+ public String getSearchExpression(Object target) {
+ return contextProviderDelegate.getSearchExpression(target);
+ }
}
diff --git a/plugins/org.eclipse.datatools.connectivity.ui/src/org/eclipse/datatools/connectivity/ui/wizards/ProfileDetailsPropertyPage.java b/plugins/org.eclipse.datatools.connectivity.ui/src/org/eclipse/datatools/connectivity/ui/wizards/ProfileDetailsPropertyPage.java
index d5e4b38..8fab1bd 100644
--- a/plugins/org.eclipse.datatools.connectivity.ui/src/org/eclipse/datatools/connectivity/ui/wizards/ProfileDetailsPropertyPage.java
+++ b/plugins/org.eclipse.datatools.connectivity.ui/src/org/eclipse/datatools/connectivity/ui/wizards/ProfileDetailsPropertyPage.java
@@ -16,6 +16,7 @@
import org.eclipse.datatools.connectivity.internal.ui.ConnectivityUIPlugin;
import org.eclipse.datatools.connectivity.internal.ui.IHelpConstants;
import org.eclipse.datatools.connectivity.ui.PingJob;
+import org.eclipse.datatools.help.HelpUtil;
import org.eclipse.swt.SWT;
import org.eclipse.swt.custom.BusyIndicator;
import org.eclipse.swt.events.SelectionAdapter;
@@ -60,8 +61,10 @@
btnPing.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END));
btnPing.setText(ConnectivityUIPlugin.getDefault().getResourceString(
"ConnectionProfileDetailsPage.Button.TestConnection")); //$NON-NLS-1$
- PlatformUI.getWorkbench().getHelpSystem().setHelp(parent,
- IHelpConstants.CONTEXT_ID_PROFILE_DETAILS_PROPERTY_PAGE);
+// PlatformUI.getWorkbench().getHelpSystem().setHelp(parent,
+// IHelpConstants.CONTEXT_ID_PROFILE_DETAILS_PROPERTY_PAGE);
+ getShell().setData( HelpUtil.CONTEXT_PROVIDER_KEY, this);
+ HelpUtil.setHelp( getControl(), HelpUtil.getContextId(IHelpConstants.CONTEXT_ID_PROFILE_DETAILS_PROPERTY_PAGE, ConnectivityUIPlugin.getDefault().getBundle().getSymbolicName()));
return container;
}