Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Valenta2006-06-22 20:11:50 +0000
committerMichael Valenta2006-06-22 20:11:50 +0000
commitd93266d3f446281a2014eaf94937eb7274cd97dd (patch)
tree21d14a4a412ba2e5a5abc1a446c76ba2d2cc6c17
parent7fe8c9d3336caad111d5934ed1540655ca6ed333 (diff)
downloadeclipse.platform.team-d93266d3f446281a2014eaf94937eb7274cd97dd.tar.gz
eclipse.platform.team-d93266d3f446281a2014eaf94937eb7274cd97dd.tar.xz
eclipse.platform.team-d93266d3f446281a2014eaf94937eb7274cd97dd.zip
Bug 97473 [Activities] Use of deprecated allowUseOf
-rw-r--r--bundles/org.eclipse.team.ui/plugin.xml10
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/TeamUIPlugin.java2
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ConfigureProjectWizardMainPage.java18
3 files changed, 26 insertions, 4 deletions
diff --git a/bundles/org.eclipse.team.ui/plugin.xml b/bundles/org.eclipse.team.ui/plugin.xml
index 041776648..31a1c1930 100644
--- a/bundles/org.eclipse.team.ui/plugin.xml
+++ b/bundles/org.eclipse.team.ui/plugin.xml
@@ -445,4 +445,14 @@
storageMergerId="org.eclipse.team.ui.textStorageMerger"/>
</extension>
+ <!-- *************** Activity Support **************** -->
+ <extension
+ point="org.eclipse.ui.activitySupport">
+ <triggerPoint id="org.eclipse.team.ui.activityTriggerPoint">
+ <hint
+ id="interactive"
+ value="true"/>
+ </triggerPoint>
+ </extension>
+
</plugin>
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/TeamUIPlugin.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/TeamUIPlugin.java
index a38b8c537..8207c8162 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/TeamUIPlugin.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/TeamUIPlugin.java
@@ -58,6 +58,8 @@ public class TeamUIPlugin extends AbstractUIPlugin {
// plugin id
public static final String PLUGIN_ID = "org.eclipse.team.ui"; //$NON-NLS-1$
+ public static final String TRIGGER_POINT_ID = "org.eclipse.team.ui.activityTriggerPoint"; //$NON-NLS-1$
+
private static List propertyChangeListeners = new ArrayList(5);
private Hashtable imageDescriptors = new Hashtable(20);
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ConfigureProjectWizardMainPage.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ConfigureProjectWizardMainPage.java
index 30d205a4b..e5fd44e0d 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ConfigureProjectWizardMainPage.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ConfigureProjectWizardMainPage.java
@@ -11,7 +11,8 @@
package org.eclipse.team.internal.ui.wizards;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.Arrays;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.CoreException;
@@ -26,11 +27,11 @@ import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.*;
-import org.eclipse.team.internal.ui.IHelpContextIds;
-import org.eclipse.team.internal.ui.TeamUIMessages;
+import org.eclipse.team.internal.ui.*;
import org.eclipse.team.ui.IConfigurationWizard;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.activities.ITriggerPoint;
import org.eclipse.ui.activities.WorkbenchActivityHelper;
import org.eclipse.ui.model.*;
@@ -59,6 +60,7 @@ public class ConfigureProjectWizardMainPage extends WizardPage {
* @param title the title of the page
* @param titleImage the image for the page title
* @param wizards the wizards to populate the table with
+ * @param disabledWizards the list of wizards that are disabled via capabilities
*/
public ConfigureProjectWizardMainPage(String pageName, String title, ImageDescriptor titleImage, AdaptableList wizards, AdaptableList disabledWizards) {
this(pageName,title,titleImage,wizards,disabledWizards, TeamUIMessages.ConfigureProjectWizardMainPage_selectRepository);
@@ -71,6 +73,7 @@ public class ConfigureProjectWizardMainPage extends WizardPage {
* @param title the title of the page
* @param titleImage the image for the page title
* @param wizards the wizards to populate the table with
+ * @param disabledWizards the list of wizards that are disabled via capabilities
* @param description The string to use as a description label
*/
public ConfigureProjectWizardMainPage(String pageName, String title, ImageDescriptor titleImage, AdaptableList wizards, AdaptableList disabledWizards, String description) {
@@ -192,9 +195,16 @@ public class ConfigureProjectWizardMainPage extends WizardPage {
*/
public IWizardPage getNextPage() {
if (selectedWizard == null) return null;
- if(! WorkbenchActivityHelper.allowUseOf(((IStructuredSelection)viewer.getSelection()).getFirstElement())) return null;
+ if(! WorkbenchActivityHelper.allowUseOf(getTriggerPoint(), ((IStructuredSelection)viewer.getSelection()).getFirstElement())) return null;
return selectedWizard.getStartingPage();
}
+
+ private ITriggerPoint getTriggerPoint() {
+ return PlatformUI.getWorkbench()
+ .getActivitySupport().getTriggerPointManager()
+ .getTriggerPoint(TeamUIPlugin.TRIGGER_POINT_ID);
+ }
+
/**
* Set the workbench to the argument
*

Back to the top