|
Lines 33-38
Link Here
|
| 33 |
import org.eclipse.mylyn.internal.tasks.ui.actions.AttachAction; |
33 |
import org.eclipse.mylyn.internal.tasks.ui.actions.AttachAction; |
| 34 |
import org.eclipse.mylyn.internal.tasks.ui.actions.AttachScreenshotAction; |
34 |
import org.eclipse.mylyn.internal.tasks.ui.actions.AttachScreenshotAction; |
| 35 |
import org.eclipse.mylyn.internal.tasks.ui.actions.CopyTaskDetailsAction; |
35 |
import org.eclipse.mylyn.internal.tasks.ui.actions.CopyTaskDetailsAction; |
|
|
36 |
import org.eclipse.mylyn.internal.tasks.ui.actions.NewBugFromCommentAction; |
| 36 |
import org.eclipse.mylyn.internal.tasks.ui.actions.OpenWithBrowserAction; |
37 |
import org.eclipse.mylyn.internal.tasks.ui.actions.OpenWithBrowserAction; |
| 37 |
import org.eclipse.mylyn.internal.tasks.ui.actions.ShowInTaskListAction; |
38 |
import org.eclipse.mylyn.internal.tasks.ui.actions.ShowInTaskListAction; |
| 38 |
import org.eclipse.mylyn.internal.tasks.ui.actions.SynchronizeEditorAction; |
39 |
import org.eclipse.mylyn.internal.tasks.ui.actions.SynchronizeEditorAction; |
|
Lines 42-47
Link Here
|
| 42 |
import org.eclipse.mylyn.tasks.core.AbstractTask; |
43 |
import org.eclipse.mylyn.tasks.core.AbstractTask; |
| 43 |
import org.eclipse.mylyn.tasks.core.AbstractTaskCategory; |
44 |
import org.eclipse.mylyn.tasks.core.AbstractTaskCategory; |
| 44 |
import org.eclipse.mylyn.tasks.core.AbstractTaskContainer; |
45 |
import org.eclipse.mylyn.tasks.core.AbstractTaskContainer; |
|
|
46 |
import org.eclipse.mylyn.tasks.core.TaskComment; |
| 45 |
import org.eclipse.mylyn.tasks.ui.TasksUiPlugin; |
47 |
import org.eclipse.mylyn.tasks.ui.TasksUiPlugin; |
| 46 |
import org.eclipse.mylyn.tasks.ui.editors.AbstractRepositoryTaskEditor; |
48 |
import org.eclipse.mylyn.tasks.ui.editors.AbstractRepositoryTaskEditor; |
| 47 |
import org.eclipse.mylyn.tasks.ui.editors.NewTaskEditorInput; |
49 |
import org.eclipse.mylyn.tasks.ui.editors.NewTaskEditorInput; |
|
Lines 86-91
Link Here
|
| 86 |
private SynchronizeEditorAction synchronizeEditorAction = new SynchronizeEditorAction(); |
88 |
private SynchronizeEditorAction synchronizeEditorAction = new SynchronizeEditorAction(); |
| 87 |
|
89 |
|
| 88 |
private ShowInTaskListAction showInTaskListAction = new ShowInTaskListAction(); |
90 |
private ShowInTaskListAction showInTaskListAction = new ShowInTaskListAction(); |
|
|
91 |
|
| 92 |
private NewBugFromCommentAction newBugFromCommentAction = new NewBugFromCommentAction(); |
| 89 |
|
93 |
|
| 90 |
private GlobalAction cutAction; |
94 |
private GlobalAction cutAction; |
| 91 |
|
95 |
|
|
Lines 220-225
Link Here
|
| 220 |
manager.add(synchronizeEditorAction); |
224 |
manager.add(synchronizeEditorAction); |
| 221 |
manager.add(openWithBrowserAction); |
225 |
manager.add(openWithBrowserAction); |
| 222 |
|
226 |
|
|
|
227 |
if (this.getEditor().getActivePageInstance() instanceof AbstractRepositoryTaskEditor) { |
| 228 |
if (this.getEditor().getSelection() instanceof RepositoryTaskSelection) { |
| 229 |
RepositoryTaskSelection repositoryTaskSelection = (RepositoryTaskSelection) this.getEditor() |
| 230 |
.getSelection(); |
| 231 |
TaskComment comment = repositoryTaskSelection.getComment(); |
| 232 |
|
| 233 |
if (comment != null) { |
| 234 |
newBugFromCommentAction.setTaskComment(comment); |
| 235 |
AbstractRepositoryTaskEditor editor = (AbstractRepositoryTaskEditor) this.getEditor() |
| 236 |
.getActivePageInstance(); |
| 237 |
if (getEditor().getActivePageInstance() instanceof TaskFormPage) { |
| 238 |
TaskFormPage editor1 = (TaskFormPage) getEditor().getActivePageInstance(); |
| 239 |
String selText = editor1.getSeletedTextFromActualEdit(); |
| 240 |
newBugFromCommentAction.setSelectedCommentText(selText); |
| 241 |
} |
| 242 |
IEditorInput input = editor.getEditorInput(); |
| 243 |
if (input instanceof RepositoryTaskEditorInput) { |
| 244 |
RepositoryTaskEditorInput repositoryInput = (RepositoryTaskEditorInput) input; |
| 245 |
newBugFromCommentAction.setTaskData(repositoryInput.getTaskData()); |
| 246 |
} |
| 247 |
manager.add(newBugFromCommentAction); |
| 248 |
} |
| 249 |
} |
| 250 |
} |
| 223 |
|
251 |
|
| 224 |
if (task.isActive()) { |
252 |
if (task.isActive()) { |
| 225 |
manager.add(new TaskDeactivateAction() { |
253 |
manager.add(new TaskDeactivateAction() { |