Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorspingel2011-03-10 06:34:38 +0000
committerspingel2011-03-10 06:34:38 +0000
commitf60f55e5b22bee21572bdb4ba1c2289b8dfa65e3 (patch)
tree51948b746c6c6351747b201e655fe3b59d0b96f1
parenta8cf6870e0bb074b4ccb67f6150fd5add08591be (diff)
downloadorg.eclipse.mylyn.tasks-f60f55e5b22bee21572bdb4ba1c2289b8dfa65e3.tar.gz
org.eclipse.mylyn.tasks-f60f55e5b22bee21572bdb4ba1c2289b8dfa65e3.tar.xz
org.eclipse.mylyn.tasks-f60f55e5b22bee21572bdb4ba1c2289b8dfa65e3.zip
NEW - bug 336655: improve welcome screen for Mylyn 3.5
https://bugs.eclipse.org/bugs/show_bug.cgi?id=336655
-rw-r--r--org.eclipse.mylyn.help.ui/cheatsheets/Query.xml12
-rw-r--r--org.eclipse.mylyn.help.ui/cheatsheets/TaskFocus.xml24
-rw-r--r--org.eclipse.mylyn.help.ui/intro/overviewExtensionContent.xml82
-rw-r--r--org.eclipse.mylyn.help.ui/intro/tutorialsExtensionContent.xml64
-rw-r--r--org.eclipse.mylyn.help.ui/intro/whatsnewExtensionContent.xml37
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/WelcomeIntroAction.java25
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/commands/AddTaskRepositoryHandler.java26
7 files changed, 136 insertions, 134 deletions
diff --git a/org.eclipse.mylyn.help.ui/cheatsheets/Query.xml b/org.eclipse.mylyn.help.ui/cheatsheets/Query.xml
index ed6a81b2d..756379d71 100644
--- a/org.eclipse.mylyn.help.ui/cheatsheets/Query.xml
+++ b/org.eclipse.mylyn.help.ui/cheatsheets/Query.xml
@@ -1,4 +1,5 @@
-<?xml version="1.0" encoding="UTF-8"?><!--
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
Copyright (c) 2009 Tasktop Technologies and others.
All rights reserved. This program and the accompanying materials
are made available under the terms of the Eclipse Public License v1.0
@@ -8,7 +9,6 @@
Contributors:
Tasktop Technologies - initial API and implementation
-->
-
<cheatsheet title="Create a query from bugs.eclipse.org">
<intro>
<description>
@@ -26,7 +26,7 @@
<description>
In this step you can learn how to setup your Bugzilla account, but you can skip it.
<br/><br/>
-If the Task Repositories view isn&apos;t opened, select in the main menu <b>Window &gt; Show View &gt; Other... &gt; Tasks &gt; Task Repository</b>.
+If the Task Repositories view is not opened, select in the main menu <b>Window &gt; Show View &gt; Other... &gt; Tasks &gt; Task Repository</b>.
<br/><br/>
In the Task Repositories view you can see <b>Eclipse.org</b>. Right click on it and select <b>Properties</b>.<br/>
Check out the <b>Anonymous Access</b> checkbox.<br/>
@@ -38,7 +38,7 @@ Click on the <b>Finish</b> button to save the values and close the dialog.
</item>
<item title="Create a new Query" dialog="true" skip="false">
<description>
- In the Task List view, click on the right mouse button then select <b>New &gt; Query</b> or click on the &quot;Click to Perform&quot; link below.
+ In the Task List view, click the right mouse button then select <b>New &gt; Query</b> or click on the &quot;Click to Perform&quot; link below.
</description>
<command serialization="org.eclipse.ui.newWizard(newWizardId=org.eclipse.mylyn.tasks.ui.wizards.new.query)" confirm="true">
</command>
@@ -47,8 +47,8 @@ Click on the <b>Finish</b> button to save the values and close the dialog.
<description>
Select <b>Eclipse.org</b> then click on the <b>Next</b> button.<br/>
Select <b>Create a query using form</b> then click on the <b>Next</b> button.<br/>
- Enter <b>Mylyn bugs</b> for the query&apos;s title.
- Select <b>Mylyn</b> from the Product and <b>P1, P2</b> from the Priority then click on the <b>Finish</b> button.
+ Enter <b>Mylyn Bugs</b> for the query&apos;s title.
+ Select <b>Mylyn</b> from the Product and <b>P1, P2</b> from the Priority then click the <b>Finish</b> button.
</description>
</item>
</cheatsheet>
diff --git a/org.eclipse.mylyn.help.ui/cheatsheets/TaskFocus.xml b/org.eclipse.mylyn.help.ui/cheatsheets/TaskFocus.xml
index 80f439075..924bd12e0 100644
--- a/org.eclipse.mylyn.help.ui/cheatsheets/TaskFocus.xml
+++ b/org.eclipse.mylyn.help.ui/cheatsheets/TaskFocus.xml
@@ -9,12 +9,12 @@
Tasktop Technologies - initial API and implementation
-->
-<cheatsheet title="Use Task-Focused UI">
+<cheatsheet title="Use the Task-Focused UI">
<intro>
<description>
- This cheat sheet introduces the task lifecycle and shows how to use the task-focused user interface.
+ This cheat sheet introduces the task life-cycle and shows how to use the task-focused user interface.
<br/>
-You need an existing project for this sheet.
+You need an existing Java project for this sheet.eet.
</description>
</intro>
<item title="Open the Task List view" dialog="true" skip="false">
@@ -26,18 +26,18 @@ You need an existing project for this sheet.
</item>
<item title="Create and activate a task" dialog="true" skip="false">
<description>
- In the Task List view, click on the right mouse button, then select <b>New &gt; Category</b>. Enter <b>Tutorials</b> for the category&apos;s name.
+In the Task List view, click the right mouse button, then select <b>New &gt; Category</b>. Enter <b>Tutorials</b> for the category&apos;s name.
<br/><br/>
-Then right click on the <b>Tutorials</b> category and select <b>New &gt; Task</b>. In the <b>New Task</b> dialog select <b>Local</b> then click on the <b>Finish</b> button.
- Enter <b>Learn task-focus</b> for the task&apos;s title and change the priority to <b>High</b> using the drop down to the left of the summary. Feel free to add some notes as well.
+Then right click on the <b>Tutorials</b> category and select <b>New &gt; Task</b>. In the <b>New Task</b> dialog select <b>Local</b> then click the <b>Finish</b> button.
+ Enter <b>Explore Mylyn</b> for the task&apos;s title and change the priority to <b>High</b> using the drop down to the left of the summary. You can add some notes as well.
<br/><br/>
-Right click on the new task and select <b>Activate</b> to activate the task.
+Right click the new task and select <b>Activate</b> to start working on the task.
</description>
</item>
<item title="Focus on the task" dialog="true" skip="false">
<description>
- In the <b>Package Explorer</b> the task-focus turns on automatically if you activate a task.<br/>
-You can turn on or off this function if you click on the <b>Focus on Active Task</b> toogle button in the view&apos;s toolbar.<br/>
+ In the <b>Package Explorer</b> the task-In the <b>Package Explorer</b> the task-focus turns on automatically if you activate a task that has a context.<br/>
+You can turn on or off this function if you click on the <b>Focus on Active Task</b> toggle button in the view&apos;s toolbar.<br/>
You can use this function in the <b>Outline</b> view too. Turn it on in this view as well.
</description>
</item>
@@ -45,7 +45,7 @@ You can use this function in the <b>Outline</b> view too. Turn it on in this vie
<description>
Press down the <b>Alt</b> button and click on the <b>left</b> mouse button on the <b>Package Explorer</b> view. Now you can see all of your projects in the view.
<br/><br/>
-Next <b>Alt+click</b> on an arbitrary project and you can see the files wich are in the project.
+Next <b>Alt+click</b> on an arbitrary project and you can see the files which are in the project.
<br/><br/>
With this method, select a class from the project.<br/>
After the file is opened you can see the class both in the <b>Package Explorer</b> and in the <b>Outline</b> view.
@@ -56,7 +56,7 @@ After the file is opened you can see the class both in the <b>Package Explorer<
Select a method within the editor will result in this method appearing in other focused views including the <b>Outline</b> and <b>Package Explorer</b> views.
<br/><br/>
Next press the Alt button and click on the class in the <b>Outline</b> view.<br/>
-Now you can see all methods. Methods which aren&apos;t in the task context appear in <b>gray</b> color. Select another method from the list. After selecting, all methods that are not part of the the active task&apos;s context will no longer be revealed.
+Now you can see all methods. Methods which are not in the task context appear in <b>gray</b> color. Select another method from the list. After selecting, all methods that are not part of the the active task&apos;s context will no longer be revealed.
</description>
</item>
<item title="Landmark" dialog="true" skip="false">
@@ -73,7 +73,7 @@ You can manually promote an element to landmark status by right clicking on the
</item>
<item title="Open another file" dialog="true" skip="false">
<description>
- Press down the <b>Alt</b> button and <b>click</b> on the <b>project</b>. Select an arbitrary file from the list with <b>Alt+click</b>. After you open the new file you can see it in the focus and all files will disappear which aren&apos;t in the focus.
+ Press down the <b>Alt</b> button and <b>click</b> on the <b>project</b>. Select an arbitrary file from the list with <b>Alt+click</b>. After you open the new file you can see it in the focus and all files will disappear which are not in the focus.
<br/>
</description>
</item>
diff --git a/org.eclipse.mylyn.help.ui/intro/overviewExtensionContent.xml b/org.eclipse.mylyn.help.ui/intro/overviewExtensionContent.xml
index dec310fe6..5eecaf3fb 100644
--- a/org.eclipse.mylyn.help.ui/intro/overviewExtensionContent.xml
+++ b/org.eclipse.mylyn.help.ui/intro/overviewExtensionContent.xml
@@ -1,44 +1,44 @@
-<?xml version="1.0" encoding="utf-8" ?><!--
- Copyright (c) 2009 Tasktop Technologies and others.
- All rights reserved. This program and the accompanying materials
- are made available under the terms of the Eclipse Public License v1.0
- which accompanies this distribution, and is available at
- http://www.eclipse.org/legal/epl-v10.html
+<?xml version="1.0" encoding="utf-8" ?>
+<!--
+ Copyright (c) 2009 Tasktop Technologies and others.
+ All rights reserved. This program and the accompanying materials
+ are made available under the terms of the Eclipse Public License v1.0
+ which accompanies this distribution, and is available at
+ http://www.eclipse.org/legal/epl-v10.html
- Contributors:
- Tasktop Technologies - initial API and implementation
- -->
-
+ Contributors:
+ Tasktop Technologies - initial API and implementation
+ -->
<introContent>
- <extensionContent id="org.eclipse.mylyn" name="Mylyn"
- style="css/overview.css" alt-style="css/overview.properties" path="overview/@">
- <group id="content-group" style-id="content-group">
- <!--
- <link label="Mylyn"
- url="http://org.eclipse.ui.intro/showHelpTopic?id=/org.eclipse.mylyn.help.ui/doc/overview.html"
- id="mylyn-overview" style-id="content-link">
- <text>Learn more about how Mylyn will help you focus on tasks</text>
- </link>
- -->
- <link label="Mylyn Task Management"
- url="http://org.eclipse.ui.intro/runAction?pluginId=org.eclipse.mylyn.help.ui&amp;class=org.eclipse.mylyn.internal.tasks.ui.actions.WelcomeIntroAction&amp;id=org.eclipse.mylyn.doc.legend.show.action"
- id="mylyn-overview" style-id="content-link">
- <text>Open the Mylyn Task List and launch the New Task wizard</text>
- </link>
- <!-- <group id="links">
- <link
- label="Open Task List"
- url="http://org.eclipse.ui.intro/runAction?pluginId=org.eclipse.mylyn.help.ui&amp;class=org.eclipse.mylyn.internal.tasks.ui.actions.WelcomeIntroAction&amp;id=org.eclipse.mylyn.doc.legend.show.action"
- id="opentasklist"
- style-id="action-link"/>
- <link
- label="Connect to Task Repository"
- url="http://org.eclipse.ui.intro/runAction?pluginId=org.eclipse.mylyn.help.ui&amp;class=org.eclipse.mylyn.internal.tasks.ui.actions.ShowTasksUiLegendAction&amp;id=org.eclipse.mylyn.doc.legend.show.action"
- id="connectrepository"
- />
- </group>-->
- </group>
-
-
- </extensionContent>
+ <extensionContent id="org.eclipse.mylyn" name="Mylyn"
+ style="css/overview.css" alt-style="css/overview.properties" path="overview/@">
+ <group id="content-group" style-id="content-group">
+ <!--
+ <link label="Mylyn"
+ url="http://org.eclipse.ui.intro/showHelpTopic?id=/org.eclipse.mylyn.help.ui/doc/overview.html"
+ id="mylyn-overview" style-id="content-link">
+ <text>Learn more about how Mylyn will help you focus on tasks</text>
+ </link>
+ -->
+ <link label="Connect to Your Team Repository"
+ url="http://org.eclipse.ui.intro/runAction?pluginId=org.eclipse.mylyn.help.ui&amp;class=org.eclipse.mylyn.internal.tasks.ui.actions.WelcomeIntroAction&amp;id=org.eclipse.mylyn.doc.legend.show.action"
+ id="mylyn-overview" style-id="content-link">
+ <text>Open the Mylyn Task List and add a repository</text>
+ </link>
+ <!--
+ <group id="links">
+ <link
+ label="Open Task List"
+ url="http://org.eclipse.ui.intro/runAction?pluginId=org.eclipse.mylyn.help.ui&amp;class=org.eclipse.mylyn.internal.tasks.ui.actions.WelcomeIntroAction&amp;id=org.eclipse.mylyn.doc.legend.show.action"
+ id="opentasklist"
+ style-id="action-link"/>
+ <link
+ label="Connect to Task Repository"
+ url="http://org.eclipse.ui.intro/runAction?pluginId=org.eclipse.mylyn.help.ui&amp;class=org.eclipse.mylyn.internal.tasks.ui.actions.ShowTasksUiLegendAction&amp;id=org.eclipse.mylyn.doc.legend.show.action"
+ id="connectrepository"
+ />
+ </group>
+ -->
+ </group>
+ </extensionContent>
</introContent>
diff --git a/org.eclipse.mylyn.help.ui/intro/tutorialsExtensionContent.xml b/org.eclipse.mylyn.help.ui/intro/tutorialsExtensionContent.xml
index e2c982243..1b2db723c 100644
--- a/org.eclipse.mylyn.help.ui/intro/tutorialsExtensionContent.xml
+++ b/org.eclipse.mylyn.help.ui/intro/tutorialsExtensionContent.xml
@@ -1,36 +1,36 @@
-<?xml version="1.0" encoding="UTF-8" ?><!--
- Copyright (c) 2009 Tasktop Technologies and others.
- All rights reserved. This program and the accompanying materials
- are made available under the terms of the Eclipse Public License v1.0
- which accompanies this distribution, and is available at
- http://www.eclipse.org/legal/epl-v10.html
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+ Copyright (c) 2009 Tasktop Technologies and others.
+ All rights reserved. This program and the accompanying materials
+ are made available under the terms of the Eclipse Public License v1.0
+ which accompanies this distribution, and is available at
+ http://www.eclipse.org/legal/epl-v10.html
- Contributors:
- Tasktop Technologies - initial API and implementation
- -->
-
+ Contributors:
+ Tasktop Technologies - initial API and implementation
+ -->
<introContent>
- <extensionContent id="org.eclipse.mylyn" name="Mylyn"
- style="css/tutorials.css" alt-style="css/tutorials.properties" path="tutorials/@">
- <group label="Task-focused programming" id="mylyn" style-id="content-group">
- <link
- url="http://org.eclipse.ui.intro/showStandby?partId=org.eclipse.platform.cheatsheet&amp;input=org.eclipse.mylyn.cheatsheet.query"
- label="Use the Task List" id="mylyn-query" style-id="content-link">
- <text>Learn how to create tasks and task repository queries</text>
- </link>
- <link
- url="http://www.eclipse.org/mylyn/start/"
- label="Visit the Mylyn homepage" id="mylyn-task" style-id="content-link">
- <text>Learn about the benefits of task-focused programming with Mylyn</text>
- </link>
- </group>
- </extensionContent>
+ <extensionContent id="org.eclipse.mylyn" name="Mylyn"
+ style="css/tutorials.css" alt-style="css/tutorials.properties" path="tutorials/@">
+ <group label="Task-focused programming" id="mylyn" style-id="content-group">
+ <link
+ url="http://org.eclipse.ui.intro/showStandby?partId=org.eclipse.platform.cheatsheet&amp;input=org.eclipse.mylyn.cheatsheet.query"
+ label="Use the Task List" id="mylyn-query" style-id="content-link">
+ <text>Learn how to create tasks and queries</text>
+ </link>
+ <link
+ url="http://www.eclipse.org/mylyn/start/"
+ label="Visit the Mylyn homepage" id="mylyn-task" style-id="content-link">
+ <text>Learn about the benefits of task-focused programming with Mylyn</text>
+ </link>
+ <!--
+ <link
+ url="http://org.eclipse.ui.intro/showStandby?partId=org.eclipse.platform.cheatsheet&amp;input=org.eclipse.mylyn.cheatsheet.taskfocus"
+ label="Focus on Java" id="mylyn-task" style-id="content-link">
+ <text>Learn how to reduce information overload and multitask with ease.</text>
+ </link>
+ -->
+ </group>
+ </extensionContent>
</introContent>
-<!--
-<link
- url="http://org.eclipse.ui.intro/showStandby?partId=org.eclipse.platform.cheatsheet&amp;input=org.eclipse.mylyn.cheatsheet.taskfocus"
- label="Focus on Java" id="mylyn-task" style-id="content-link">
- <text>Learn how to reduce information overload and multitask with ease.</text>
-</link>
--->
diff --git a/org.eclipse.mylyn.help.ui/intro/whatsnewExtensionContent.xml b/org.eclipse.mylyn.help.ui/intro/whatsnewExtensionContent.xml
index 79d2852bc..e51958a01 100644
--- a/org.eclipse.mylyn.help.ui/intro/whatsnewExtensionContent.xml
+++ b/org.eclipse.mylyn.help.ui/intro/whatsnewExtensionContent.xml
@@ -1,4 +1,5 @@
-<?xml version="1.0" encoding="UTF-8" ?><!--
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
Copyright (c) 2009 Tasktop Technologies and others.
All rights reserved. This program and the accompanying materials
are made available under the terms of the Eclipse Public License v1.0
@@ -7,23 +8,21 @@
Contributors:
Tasktop Technologies - initial API and implementation
- -->
-
+ -->
<introContent>
- <extensionContent id="org.eclipse.mylyn" name="Mylyn"
- style="css/whatsnew.css" alt-style="css/whatsnew.properties" path="whatsnew/@">
- <group id="content-group" style-id="content-group">
- <link label="Mylyn"
- url="http://www.eclipse.org/mylyn/new/"
- id="mylyn-noteworthy" style-id="content-link">
- <text>
- Find out the significant changes made to Mylyn
- </text>
- </link>
- </group>
- </extensionContent>
+ <extensionContent id="org.eclipse.mylyn" name="Mylyn"
+ style="css/whatsnew.css" alt-style="css/whatsnew.properties" path="whatsnew/@">
+ <group id="content-group" style-id="content-group">
+ <link label="Mylyn Application Lifecycle Tools"
+ url="http://www.eclipse.org/mylyn/new/"
+ id="mylyn-noteworthy" style-id="content-link">
+ <!--
+ url="http://org.eclipse.ui.intro/showHelpTopic?id=/org.eclipse.mylyn.help.ui/doc/new.html"
+ -->
+ <text>
+ Visit the Mylyn New &amp;&amp; Noteworthy on Eclipse.org
+ </text>
+ </link>
+ </group>
+ </extensionContent>
</introContent>
-
-<!--
- url="http://org.eclipse.ui.intro/showHelpTopic?id=/org.eclipse.mylyn.help.ui/doc/new.html"
---> \ No newline at end of file
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/WelcomeIntroAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/WelcomeIntroAction.java
index d08696598..eee0b7739 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/WelcomeIntroAction.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/WelcomeIntroAction.java
@@ -13,17 +13,14 @@ package org.eclipse.mylyn.internal.tasks.ui.actions;
import org.eclipse.jface.action.IAction;
import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.mylyn.internal.tasks.ui.util.TasksUiInternal;
-import org.eclipse.mylyn.internal.tasks.ui.wizards.MultiRepositoryAwareWizard;
-import org.eclipse.mylyn.tasks.core.TaskMapping;
+import org.eclipse.mylyn.internal.provisional.commons.ui.WorkbenchUtil;
+import org.eclipse.mylyn.internal.tasks.ui.commands.AddTaskRepositoryHandler;
import org.eclipse.mylyn.tasks.ui.TasksUiUtil;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.IViewActionDelegate;
import org.eclipse.ui.IViewPart;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.IWorkbenchWindowActionDelegate;
-import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.intro.IIntroManager;
import org.eclipse.ui.intro.IIntroPart;
@@ -39,6 +36,10 @@ public class WelcomeIntroAction implements IWorkbenchWindowActionDelegate, IView
// ignore
}
+ public void init(IViewPart view) {
+ wbWindow = view.getViewSite().getWorkbenchWindow();
+ }
+
public void init(IWorkbenchWindow window) {
wbWindow = window;
}
@@ -56,19 +57,15 @@ public class WelcomeIntroAction implements IWorkbenchWindowActionDelegate, IView
TasksUiUtil.openTasksViewInActivePerspective();
- Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
- MultiRepositoryAwareWizard wizard = TasksUiInternal.createNewTaskWizard(new TaskMapping());
- WizardDialog dialog = null;
- dialog = new WizardDialog(shell, wizard);
- dialog.setBlockOnOpen(false);
- dialog.open();
+ AddTaskRepositoryHandler.showWizard(getShell(), null);
+ }
+
+ private Shell getShell() {
+ return (wbWindow != null) ? wbWindow.getShell() : WorkbenchUtil.getShell();
}
public void selectionChanged(IAction action, ISelection selection) {
// ignore
}
- public void init(IViewPart view) {
- wbWindow = view.getViewSite().getWorkbenchWindow();
- }
}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/commands/AddTaskRepositoryHandler.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/commands/AddTaskRepositoryHandler.java
index d95f96510..ec8bd5ce2 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/commands/AddTaskRepositoryHandler.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/commands/AddTaskRepositoryHandler.java
@@ -19,6 +19,7 @@ import org.eclipse.core.commands.ExecutionException;
import org.eclipse.jface.window.Window;
import org.eclipse.jface.wizard.WizardDialog;
import org.eclipse.mylyn.internal.tasks.ui.wizards.NewRepositoryWizard;
+import org.eclipse.mylyn.tasks.core.TaskRepository;
import org.eclipse.mylyn.tasks.ui.wizards.TaskRepositoryWizardDialog;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.handlers.HandlerUtil;
@@ -35,19 +36,24 @@ public class AddTaskRepositoryHandler extends AbstractHandler {
Shell shell = HandlerUtil.getActiveShell(event);
if (shell != null && !shell.isDisposed()) {
String connectorKind = event.getParameter("connectorKind"); //$NON-NLS-1$
- NewRepositoryWizard repositoryWizard = new NewRepositoryWizard(connectorKind);
-
- WizardDialog repositoryDialog = new TaskRepositoryWizardDialog(shell, repositoryWizard);
- repositoryDialog.create();
- repositoryDialog.getShell().setText(Messages.AddTaskRepositoryHandler_Add_Task_Repository);
- repositoryDialog.setBlockOnOpen(true);
- repositoryDialog.open();
- if (repositoryDialog.getReturnCode() == Window.OK) {
- return repositoryWizard.getTaskRepository();
- }
+ return showWizard(shell, connectorKind);
}
return null;
}
+ public static TaskRepository showWizard(Shell shell, String connectorKind) {
+ NewRepositoryWizard repositoryWizard = new NewRepositoryWizard(connectorKind);
+
+ WizardDialog repositoryDialog = new TaskRepositoryWizardDialog(shell, repositoryWizard);
+ repositoryDialog.create();
+ repositoryDialog.getShell().setText(Messages.AddTaskRepositoryHandler_Add_Task_Repository);
+ repositoryDialog.setBlockOnOpen(true);
+ repositoryDialog.open();
+ if (repositoryDialog.getReturnCode() == Window.OK) {
+ return repositoryWizard.getTaskRepository();
+ }
+ return null;
+ }
+
}

Back to the top