Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/wizard')
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/wizard/Messages.java40
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/wizard/NewBugzillaTaskWizard.java142
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/wizard/messages.properties12
3 files changed, 0 insertions, 194 deletions
diff --git a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/wizard/Messages.java b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/wizard/Messages.java
deleted file mode 100644
index 971007644..000000000
--- a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/wizard/Messages.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2008 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.bugzilla.ui.wizard;
-
-import org.eclipse.osgi.util.NLS;
-
-public class Messages extends NLS {
- private static final String BUNDLE_NAME = "org.eclipse.mylyn.internal.bugzilla.ui.wizard.messages"; //$NON-NLS-1$
-
- static {
- // load message values from bundle file
- reloadMessages();
- }
-
- public static void reloadMessages() {
- NLS.initializeMessages(BUNDLE_NAME, Messages.class);
- }
-
- public static String BugzillaProductPage_Bugzilla_Search_Page;
- public static String BugzillaProductPage_Error_reported;
- public static String BugzillaProductPage_Error_updating_product_list;
- public static String BugzillaProductPage_New_Bugzilla_Task_Error;
- public static String BugzillaProductPage_PAGE_1;
- public static String BugzillaProductPage_PICK_PRODUCT_TO_OPEN_NEW_BUG_EDITOR;
- public static String BugzillaProductPage_PRESS_UPDATE_BUTTON;
- public static String BugzillaProductPage_Unable_to_get_configuration;
- public static String BugzillaProductPage_Unable_to_get_products;
- public static String BugzillaProductPage_Update_Products_from_Repository;
- public static String BugzillaProductPage_Updating_repository_report_options_;
- public static String BugzillaProductPage_YOU_MUST_SELECT_PRODUCT;
-}
diff --git a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/wizard/NewBugzillaTaskWizard.java b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/wizard/NewBugzillaTaskWizard.java
deleted file mode 100644
index 1b8e28212..000000000
--- a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/wizard/NewBugzillaTaskWizard.java
+++ /dev/null
@@ -1,142 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2008 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.bugzilla.ui.wizard;
-
-import java.io.UnsupportedEncodingException;
-import java.net.URLDecoder;
-import java.util.ArrayList;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.mylyn.internal.bugzilla.core.BugzillaAttribute;
-import org.eclipse.mylyn.internal.bugzilla.core.BugzillaCorePlugin;
-import org.eclipse.mylyn.internal.bugzilla.core.IBugzillaConstants;
-import org.eclipse.mylyn.tasks.core.IRepositoryQuery;
-import org.eclipse.mylyn.tasks.core.ITask;
-import org.eclipse.mylyn.tasks.core.ITaskMapping;
-import org.eclipse.mylyn.tasks.core.TaskMapping;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.ui.wizards.NewTaskWizard;
-import org.eclipse.ui.INewWizard;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * @author Mik Kersten
- * @author Rob Elves
- */
-public class NewBugzillaTaskWizard extends NewTaskWizard implements INewWizard {
-
- private IStructuredSelection selection;
-
- public NewBugzillaTaskWizard(TaskRepository taskRepository, ITaskMapping taskSelection) {
- super(taskRepository, taskSelection);
- }
-
- @Override
- public void init(IWorkbench workbench, IStructuredSelection selection) {
- }
-
- /**
- * @since 3.0
- */
- @Override
- protected ITaskMapping getInitializationData() {
- if (getTaskSelection() != null) {
- return getTaskSelection();
- }
-
- IWorkbench workbench = PlatformUI.getWorkbench();
- if (workbench != null) {
- IWorkbenchWindow window = workbench.getActiveWorkbenchWindow();
- if (window != null) {
- ISelection sel = window.getSelectionService().getSelection();
- if (sel instanceof IStructuredSelection) {
- selection = (IStructuredSelection) sel;
- }
- }
- }
- if (selection == null || selection.isEmpty()) {
- final String lastSelection = getTaskRepository().getProperty(IBugzillaConstants.LAST_PRODUCT_SELECTION);
- return new TaskMapping() {
- @Override
- public String getProduct() {
- return lastSelection;
- }
- };
-
- }
-
- final ArrayList<String> products = new ArrayList<String>();
-
- Object element = (selection).getFirstElement();
- if (element instanceof ITask) {
- ITask bugzillaTask = (ITask) element;
- if (bugzillaTask.getAttribute(BugzillaAttribute.PRODUCT.getKey()) != null) {
- products.add(bugzillaTask.getAttribute(BugzillaAttribute.PRODUCT.getKey()));
- }
- } else {
- IRepositoryQuery query = null;
- if (element instanceof IRepositoryQuery) {
- query = (IRepositoryQuery) element;
- }
-
- if (query != null && query.getConnectorKind().equals(BugzillaCorePlugin.CONNECTOR_KIND)) {
- String queryUrl = query.getUrl();
- queryUrl = queryUrl.substring(queryUrl.indexOf("?") + 1); //$NON-NLS-1$
- String[] options = queryUrl.split("&"); //$NON-NLS-1$
-
- for (String option : options) {
- int index = option.indexOf("="); //$NON-NLS-1$
- if (index != -1) {
- String key = option.substring(0, index);
- if ("product".equals(key)) { //$NON-NLS-1$
- try {
- products.add(URLDecoder.decode(option.substring(index + 1),
- getTaskRepository().getCharacterEncoding()));
- // TODO: list box only accepts a single selection so
- // we break on first found
- break;
- } catch (UnsupportedEncodingException ex) {
- // ignore
- }
- }
- }
- }
- } else {
- if (element instanceof IAdaptable) {
- IAdaptable adaptable = (IAdaptable) element;
- ITask task = (ITask) adaptable.getAdapter(ITask.class);
- if (task != null) {
- ITask bugzillaTask = (ITask) element;
- if (bugzillaTask.getAttribute(BugzillaAttribute.PRODUCT.getKey()) != null) {
- products.add(bugzillaTask.getAttribute(BugzillaAttribute.PRODUCT.getKey()));
- }
- }
- }
- }
- }
-
- if (products.size() > 0) {
- return new TaskMapping() {
- @Override
- public String getProduct() {
- return products.get(0);
- }
- };
- }
- return null;
- }
-
-}
diff --git a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/wizard/messages.properties b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/wizard/messages.properties
deleted file mode 100644
index 078235251..000000000
--- a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/wizard/messages.properties
+++ /dev/null
@@ -1,12 +0,0 @@
-BugzillaProductPage_Bugzilla_Search_Page=Bugzilla Search Page
-BugzillaProductPage_Error_reported=Error reported:\n
-BugzillaProductPage_Error_updating_product_list=Error updating product list
-BugzillaProductPage_New_Bugzilla_Task_Error=New Bugzilla Task Error
-BugzillaProductPage_PAGE_1=Page1
-BugzillaProductPage_PICK_PRODUCT_TO_OPEN_NEW_BUG_EDITOR=Pick a product to open the new bug editor.\n
-BugzillaProductPage_PRESS_UPDATE_BUTTON=Press the Update button if the product is not in the list.
-BugzillaProductPage_Unable_to_get_configuration=Unable to get configuration. Ensure proper repository configuration in Task Repositories
-BugzillaProductPage_Unable_to_get_products=Unable to get products. Ensure proper repository configuration in task Repositories.
-BugzillaProductPage_Update_Products_from_Repository=Update Products from Repository
-BugzillaProductPage_Updating_repository_report_options_=Updating repository report options...
-BugzillaProductPage_YOU_MUST_SELECT_PRODUCT=You must select a product

Back to the top