blob: bd4f595f414456c80067d06393a379e4e8433ccb (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
|
/*******************************************************************************
* Copyright (c) 2004, 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
*******************************************************************************/
package org.eclipse.mylyn.internal.bugzilla.ui.editor;
import org.eclipse.mylyn.commons.ui.CommonImages;
import org.eclipse.mylyn.internal.bugzilla.core.BugzillaCorePlugin;
import org.eclipse.mylyn.tasks.ui.ITasksUiConstants;
import org.eclipse.mylyn.tasks.ui.TasksUiImages;
import org.eclipse.mylyn.tasks.ui.TasksUiUtil;
import org.eclipse.mylyn.tasks.ui.editors.AbstractTaskEditorPageFactory;
import org.eclipse.mylyn.tasks.ui.editors.TaskEditor;
import org.eclipse.mylyn.tasks.ui.editors.TaskEditorInput;
import org.eclipse.swt.graphics.Image;
import org.eclipse.ui.forms.editor.IFormPage;
/**
* @author Rob Elves
*/
public class BugzillaTaskEditorPageFactory extends AbstractTaskEditorPageFactory {
@Override
public boolean canCreatePageFor(TaskEditorInput input) {
if (input.getTask().getConnectorKind().equals(BugzillaCorePlugin.CONNECTOR_KIND)
|| TasksUiUtil.isOutgoingNewTask(input.getTask(), BugzillaCorePlugin.CONNECTOR_KIND)) {
return true;
}
return false;
}
@Override
public IFormPage createPage(TaskEditor parentEditor) {
return new BugzillaTaskEditorPage(parentEditor);
}
@Override
public String[] getConflictingIds(TaskEditorInput input) {
return new String[] { ITasksUiConstants.ID_PAGE_PLANNING };
}
@Override
public int getPriority() {
return PRIORITY_TASK;
}
@Override
public Image getPageImage() {
return CommonImages.getImage(TasksUiImages.REPOSITORY_SMALL);
}
@Override
public String getPageText() {
return "Bugzilla"; //$NON-NLS-1$
}
}
|