Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcvs2git2009-03-14 20:13:00 -0400
committercvs2git2009-03-14 20:13:00 -0400
commit601e026b8cd91cbfd2ee65c1d0acbe3dfad508b0 (patch)
treed0b45b3af7938784d19f45a368ecc8aeb3a28426
parent8355d3ee950b88ece7c7e8d39b4a58228452796f (diff)
downloadorg.eclipse.mylyn.tasks-601e026b8cd91cbfd2ee65c1d0acbe3dfad508b0.tar.gz
org.eclipse.mylyn.tasks-601e026b8cd91cbfd2ee65c1d0acbe3dfad508b0.tar.xz
org.eclipse.mylyn.tasks-601e026b8cd91cbfd2ee65c1d0acbe3dfad508b0.zip
This commit was manufactured by cvs2svn to create branch 'e_3_3_m_3_1_x'.R_3_1_0_e_3_3
Sprout from master 2009-03-15 00:12:58 UTC relves 'RESOLVED - bug 246387: restructure the User Guide and FAQ' Cherrypick from e_3_3_m_3_x 2009-01-13 07:15:58 UTC spingel 'NEW - bug 248778: [releng] backport changes to Eclipse 3.3': org.eclipse.mylyn-feature/.settings/org.eclipse.jdt.core.prefs org.eclipse.mylyn-feature/.settings/org.eclipse.jdt.ui.prefs org.eclipse.mylyn-feature/about.html org.eclipse.mylyn-feature/build.properties org.eclipse.mylyn-feature/feature.properties org.eclipse.mylyn-feature/feature.xml org.eclipse.mylyn.bugzilla-feature/.settings/org.eclipse.jdt.core.prefs org.eclipse.mylyn.bugzilla-feature/.settings/org.eclipse.jdt.ui.prefs org.eclipse.mylyn.bugzilla-feature/about.html org.eclipse.mylyn.bugzilla-feature/build.properties org.eclipse.mylyn.bugzilla-feature/feature.properties org.eclipse.mylyn.bugzilla-feature/feature.xml org.eclipse.mylyn.tasks.bugs/.classpath org.eclipse.mylyn.tasks.bugs/.settings/org.eclipse.jdt.core.prefs org.eclipse.mylyn.tasks.bugs/.settings/org.eclipse.jdt.ui.prefs org.eclipse.mylyn.tasks.bugs/META-INF/MANIFEST.MF org.eclipse.mylyn.tasks.bugs/about.html org.eclipse.mylyn.tasks.bugs/build.properties org.eclipse.mylyn.tasks.bugs/plugin.properties org.eclipse.mylyn.tasks.bugs/plugin.xml org.eclipse.mylyn.tasks.bugs/schema/pluginRepositoryMappings.exsd org.eclipse.mylyn.tasks.bugs/schema/taskContributors.exsd org.eclipse.mylyn.tasks.bugs/src/org/eclipse/mylyn/internal/provisional/tasks/bugs/AbstractTaskContributor.java org.eclipse.mylyn.tasks.bugs/src/org/eclipse/mylyn/internal/tasks/bugs/AttributeTaskMapper.java org.eclipse.mylyn.tasks.bugs/src/org/eclipse/mylyn/internal/tasks/bugs/DefaultTaskContributor.java org.eclipse.mylyn.tasks.bugs/src/org/eclipse/mylyn/internal/tasks/bugs/IRepositoryConstants.java org.eclipse.mylyn.tasks.bugs/src/org/eclipse/mylyn/internal/tasks/bugs/Messages.java org.eclipse.mylyn.tasks.bugs/src/org/eclipse/mylyn/internal/tasks/bugs/PluginRepositoryMapping.java org.eclipse.mylyn.tasks.bugs/src/org/eclipse/mylyn/internal/tasks/bugs/PluginRepositoryMappingManager.java org.eclipse.mylyn.tasks.bugs/src/org/eclipse/mylyn/internal/tasks/bugs/TaskContributorManager.java org.eclipse.mylyn.tasks.bugs/src/org/eclipse/mylyn/internal/tasks/bugs/TaskErrorReporter.java org.eclipse.mylyn.tasks.bugs/src/org/eclipse/mylyn/internal/tasks/bugs/TasksBugsPlugin.java org.eclipse.mylyn.tasks.bugs/src/org/eclipse/mylyn/internal/tasks/bugs/actions/Messages.java org.eclipse.mylyn.tasks.bugs/src/org/eclipse/mylyn/internal/tasks/bugs/actions/NewTaskFromErrorAction.java org.eclipse.mylyn.tasks.bugs/src/org/eclipse/mylyn/internal/tasks/bugs/actions/ReportBugAction.java org.eclipse.mylyn.tasks.bugs/src/org/eclipse/mylyn/internal/tasks/bugs/actions/messages.properties org.eclipse.mylyn.tasks.bugs/src/org/eclipse/mylyn/internal/tasks/bugs/messages.properties org.eclipse.mylyn.tasks.bugs/src/org/eclipse/mylyn/internal/tasks/bugs/wizards/BundleGroupContainer.java org.eclipse.mylyn.tasks.bugs/src/org/eclipse/mylyn/internal/tasks/bugs/wizards/ErrorLogStatus.java org.eclipse.mylyn.tasks.bugs/src/org/eclipse/mylyn/internal/tasks/bugs/wizards/FeatureGroup.java org.eclipse.mylyn.tasks.bugs/src/org/eclipse/mylyn/internal/tasks/bugs/wizards/FeatureStatus.java org.eclipse.mylyn.tasks.bugs/src/org/eclipse/mylyn/internal/tasks/bugs/wizards/Messages.java org.eclipse.mylyn.tasks.bugs/src/org/eclipse/mylyn/internal/tasks/bugs/wizards/ReportBugOrEnhancementWizard.java org.eclipse.mylyn.tasks.bugs/src/org/eclipse/mylyn/internal/tasks/bugs/wizards/ReportErrorPage.java org.eclipse.mylyn.tasks.bugs/src/org/eclipse/mylyn/internal/tasks/bugs/wizards/ReportErrorWizard.java org.eclipse.mylyn.tasks.bugs/src/org/eclipse/mylyn/internal/tasks/bugs/wizards/SelectFeaturePage.java org.eclipse.mylyn.tasks.bugs/src/org/eclipse/mylyn/internal/tasks/bugs/wizards/SelectProductPage.java org.eclipse.mylyn.tasks.bugs/src/org/eclipse/mylyn/internal/tasks/bugs/wizards/messages.properties Delete: org.eclipse.mylyn.tasks.bugs/icons/etool16/task-new.gif org.eclipse.mylyn.tasks.bugs/src/org/eclipse/mylyn/internal/tasks/bugs/actions/NewTaskFromMarkerHandler.java
-rw-r--r--org.eclipse.mylyn-feature/feature.xml24
-rw-r--r--org.eclipse.mylyn.bugzilla-feature/feature.xml9
-rw-r--r--org.eclipse.mylyn.tasks.bugs/.classpath2
-rw-r--r--org.eclipse.mylyn.tasks.bugs/META-INF/MANIFEST.MF4
-rw-r--r--org.eclipse.mylyn.tasks.bugs/icons/etool16/task-new.gifbin334 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.tasks.bugs/plugin.xml78
-rw-r--r--org.eclipse.mylyn.tasks.bugs/src/org/eclipse/mylyn/internal/tasks/bugs/actions/NewTaskFromErrorAction.java78
-rw-r--r--org.eclipse.mylyn.tasks.bugs/src/org/eclipse/mylyn/internal/tasks/bugs/actions/NewTaskFromMarkerHandler.java81
8 files changed, 64 insertions, 212 deletions
diff --git a/org.eclipse.mylyn-feature/feature.xml b/org.eclipse.mylyn-feature/feature.xml
index ee4053419..1922c7259 100644
--- a/org.eclipse.mylyn-feature/feature.xml
+++ b/org.eclipse.mylyn-feature/feature.xml
@@ -19,15 +19,20 @@
</license>
<url>
- <update label="%updateSiteName" url="http://download.eclipse.org/tools/mylyn/update/e3.4"/>
- <discovery label="%discovery_Mylyn_Extras" url="http://download.eclipse.org/tools/mylyn/update/extras"/>
- <discovery label="%discovery_Mylyn" url="http://download.eclipse.org/tools/mylyn/update/e3.4"/>
+ <update label="Mylyn for Eclipse 3.3" url="http://download.eclipse.org/tools/mylyn/update/e3.3"/>
+ <discovery label="Mylyn Extras" url="http://download.eclipse.org/tools/mylyn/update/extras"/>
+ <discovery label="Mylyn" url="http://download.eclipse.org/tools/mylyn/update/e3.3"/>
</url>
<requires>
<import plugin="org.eclipse.core.runtime"/>
- <import plugin="org.eclipse.ui" version="3.4.0.I20070918" match="greaterOrEqual"/>
+ <import plugin="org.eclipse.ui" version="3.3.0" match="equivalent"/>
<import plugin="org.eclipse.ui.forms"/>
+ <import plugin="org.eclipse.mylyn.tasks.core" version="3.0.0" match="compatible"/>
+ <import plugin="org.eclipse.mylyn.tasks.ui" version="3.0.0" match="compatible"/>
+ <import plugin="org.eclipse.mylyn.commons.ui" version="3.0.0" match="compatible"/>
+ <import plugin="org.eclipse.mylyn.commons.core" version="3.0.0" match="compatible"/>
+ <import plugin="org.eclipse.mylyn.monitor.core" version="3.0.0" match="compatible"/>
<import plugin="org.eclipse.compare"/>
<import plugin="org.eclipse.core.expressions"/>
<import plugin="org.eclipse.core.net"/>
@@ -39,19 +44,10 @@
<import plugin="org.eclipse.ui.ide"/>
<import plugin="org.eclipse.ui.views"/>
<import plugin="org.eclipse.ui.workbench.texteditor"/>
- <import plugin="org.apache.commons.codec" version="1.3.0" match="greaterOrEqual"/>
- <import plugin="org.apache.commons.httpclient" version="3.1.0" match="greaterOrEqual"/>
- <import plugin="org.apache.commons.lang" version="2.3.0" match="greaterOrEqual"/>
- <import plugin="org.apache.commons.logging" version="1.0.4" match="greaterOrEqual"/>
- <import plugin="org.eclipse.mylyn.tasks.core" version="3.0.0" match="compatible"/>
- <import plugin="org.eclipse.mylyn.tasks.ui" version="3.0.0" match="compatible"/>
- <import plugin="org.eclipse.mylyn.commons.ui" version="3.0.0" match="compatible"/>
- <import plugin="org.eclipse.mylyn.commons.core" version="3.0.0" match="compatible"/>
- <import plugin="org.eclipse.mylyn.monitor.core" version="3.0.0" match="compatible"/>
<import plugin="org.eclipse.mylyn.context.core" version="3.0.0" match="compatible"/>
<import plugin="org.eclipse.mylyn.monitor.ui" version="3.0.0" match="compatible"/>
<import plugin="org.eclipse.mylyn.commons.net" version="3.0.0" match="compatible"/>
- <import feature="org.eclipse.rcp" version="3.4.0" match="compatible"/>
+ <import feature="org.eclipse.rcp" version="3.3.0" match="equivalent"/>
</requires>
<plugin
diff --git a/org.eclipse.mylyn.bugzilla-feature/feature.xml b/org.eclipse.mylyn.bugzilla-feature/feature.xml
index bca1dacd6..830f77b36 100644
--- a/org.eclipse.mylyn.bugzilla-feature/feature.xml
+++ b/org.eclipse.mylyn.bugzilla-feature/feature.xml
@@ -19,12 +19,14 @@
</license>
<url>
- <update label="%updateSiteName" url="http://download.eclipse.org/tools/mylyn/update/e3.4"/>
+ <update label="Mylyn for Eclipse 3.3" url="http://download.eclipse.org/tools/mylyn/update/e3.3"/>
</url>
<requires>
<import plugin="org.eclipse.core.runtime"/>
<import plugin="org.eclipse.mylyn.tasks.core" version="3.0.0" match="compatible"/>
+ <import plugin="org.eclipse.mylyn.commons.net" version="3.0.0" match="compatible"/>
+ <import plugin="org.eclipse.mylyn.commons.core" version="3.0.0" match="compatible"/>
<import plugin="org.eclipse.core.net"/>
<import plugin="org.eclipse.ui"/>
<import plugin="org.eclipse.core.resources"/>
@@ -35,10 +37,9 @@
<import plugin="org.eclipse.ui.editors"/>
<import plugin="org.eclipse.ui.workbench.texteditor"/>
<import plugin="org.eclipse.mylyn.tasks.ui" version="3.0.0" match="compatible"/>
- <import feature="org.eclipse.mylyn_feature" version="3.1.0.qualifier" match="perfect"/>
- <import plugin="org.eclipse.mylyn.commons.net" version="3.0.0" match="compatible"/>
- <import plugin="org.eclipse.mylyn.commons.core" version="3.0.0" match="compatible"/>
<import plugin="org.eclipse.mylyn.commons.ui" version="3.0.0" match="compatible"/>
+ <import feature="org.eclipse.mylyn_feature" version="3.1.0.qualifier" match="perfect"/>
+ <import plugin="org.eclipse.mylyn.bugzilla.core" version="3.0.0" match="compatible"/>
</requires>
<plugin
diff --git a/org.eclipse.mylyn.tasks.bugs/.classpath b/org.eclipse.mylyn.tasks.bugs/.classpath
index 6a357762a..40856a70b 100644
--- a/org.eclipse.mylyn.tasks.bugs/.classpath
+++ b/org.eclipse.mylyn.tasks.bugs/.classpath
@@ -3,7 +3,7 @@
<classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins">
<accessrules>
- <accessrule kind="accessible" pattern="org/eclipse/ui/internal/views/log/*"/>
+ <accessrule kind="accessible" pattern="org/eclipse/pde/internal/runtime/logview/*"/>
<accessrule kind="accessible" pattern="org/eclipse/mylyn/internal/tasks/ui/**"/>
</accessrules>
</classpathentry>
diff --git a/org.eclipse.mylyn.tasks.bugs/META-INF/MANIFEST.MF b/org.eclipse.mylyn.tasks.bugs/META-INF/MANIFEST.MF
index c77e90fd4..4c549f12e 100644
--- a/org.eclipse.mylyn.tasks.bugs/META-INF/MANIFEST.MF
+++ b/org.eclipse.mylyn.tasks.bugs/META-INF/MANIFEST.MF
@@ -4,10 +4,8 @@ Bundle-Name: %Bundle-Name
Bundle-SymbolicName: org.eclipse.mylyn.tasks.bugs;singleton:=true
Bundle-Version: 3.1.0.qualifier
Require-Bundle: org.eclipse.core.runtime,
- org.eclipse.core.resources,
org.eclipse.ui,
- org.eclipse.ui.views.log;resolution:=optional,
- org.eclipse.ui.ide,
+ org.eclipse.pde.runtime;resolution:=optional,
org.eclipse.mylyn.commons.core;bundle-version="[3.0.0,4.0.0)",
org.eclipse.mylyn.tasks.core;bundle-version="[3.0.0,4.0.0)",
org.eclipse.mylyn.tasks.ui;bundle-version="[3.0.0,4.0.0)",
diff --git a/org.eclipse.mylyn.tasks.bugs/icons/etool16/task-new.gif b/org.eclipse.mylyn.tasks.bugs/icons/etool16/task-new.gif
deleted file mode 100644
index e2cde50c2..000000000
--- a/org.eclipse.mylyn.tasks.bugs/icons/etool16/task-new.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.tasks.bugs/plugin.xml b/org.eclipse.mylyn.tasks.bugs/plugin.xml
index 2ffd9b035..00129a81f 100644
--- a/org.eclipse.mylyn.tasks.bugs/plugin.xml
+++ b/org.eclipse.mylyn.tasks.bugs/plugin.xml
@@ -5,19 +5,16 @@
<extension-point id="taskContributors" name="Task Contributors" schema="schema/taskContributors.exsd"/>
<extension point="org.eclipse.ui.popupMenus">
- <objectContribution
- adaptable="false"
- id="org.eclipse.mylyn.internal.provisional.tasks.bugs.objectContribution"
- objectClass="org.eclipse.ui.internal.views.log.LogEntry">
- <action
- class="org.eclipse.mylyn.internal.tasks.bugs.actions.NewTaskFromErrorAction"
- enablesFor="1"
- icon="icons/etool16/task-repository-new.gif"
- menubarPath="org.eclipse.pde.runtime.LogView"
- id="org.eclipse.mylyn.tasklist.actions.newTaskFromErrorLog"
- label="%NewTaskFromErrorAction.label">
- </action>
- </objectContribution>
+ <viewerContribution
+ id="org.eclipse.mylyn.bugzilla.ide.log.contribution"
+ targetID="org.eclipse.pde.runtime.LogView">
+ <action
+ class="org.eclipse.mylyn.internal.tasks.bugs.actions.NewTaskFromErrorAction"
+ icon="icons/etool16/task-repository-new.gif"
+ menubarPath="org.eclipse.pde.runtime.LogView"
+ id="org.eclipse.mylyn.tasklist.actions.newTaskFromErrorLog"
+ label="%NewTaskFromErrorAction.label"/>
+ </viewerContribution>
</extension>
<extension point="org.eclipse.ui.actionSets">
@@ -37,61 +34,6 @@
</extension>
<extension
- point="org.eclipse.ui.handlers">
- <handler
- class="org.eclipse.mylyn.internal.tasks.bugs.actions.NewTaskFromMarkerHandler"
- commandId="org.eclipse.mylyn.tasks.bugs.commands.newTaskFromMarker">
- <activeWhen>
- <with variable="activePart">
- <test
- args="any"
- property="org.eclipse.ui.ide.contentGenerator">
- </test>
- </with>
- </activeWhen>
- <enabledWhen>
- <and>
- <count
- value="1">
- </count>
- <iterate
- ifEmpty="false"
- operator="and">
- <instanceof
- value="org.eclipse.ui.internal.views.markers.MarkerEntry">
- </instanceof>
- </iterate>
- </and>
- </enabledWhen>
- </handler>
- </extension>
-
- <extension
- point="org.eclipse.ui.commands">
- <command
- description="%commands.newTaskFromMarker.description"
- id="org.eclipse.mylyn.tasks.bugs.commands.newTaskFromMarker"
- name="%commands.newTaskFromMarker.name">
- </command>
- </extension>
-
- <extension
- point="org.eclipse.ui.menus">
- <menuContribution
- locationURI="popup:org.eclipse.ui.ide.MarkersView?after=org.eclipse.ui.ide.markCompleted">
- <command
- commandId="org.eclipse.mylyn.tasks.bugs.commands.newTaskFromMarker"
- icon="icons/etool16/task-new.gif"
- mnemonic="%commands.newTaskFromMarker.mnemonic"
- style="push">
- <visibleWhen
- checkEnabled="true">
- </visibleWhen>
- </command>
- </menuContribution>
- </extension>
-
- <extension
point="org.eclipse.mylyn.commons.core.errorReporters">
<errorReporter
class="org.eclipse.mylyn.internal.tasks.bugs.TasksBugsPlugin$BugReporter"
diff --git a/org.eclipse.mylyn.tasks.bugs/src/org/eclipse/mylyn/internal/tasks/bugs/actions/NewTaskFromErrorAction.java b/org.eclipse.mylyn.tasks.bugs/src/org/eclipse/mylyn/internal/tasks/bugs/actions/NewTaskFromErrorAction.java
index 5f0aafe7f..9d498634f 100644
--- a/org.eclipse.mylyn.tasks.bugs/src/org/eclipse/mylyn/internal/tasks/bugs/actions/NewTaskFromErrorAction.java
+++ b/org.eclipse.mylyn.tasks.bugs/src/org/eclipse/mylyn/internal/tasks/bugs/actions/NewTaskFromErrorAction.java
@@ -15,13 +15,17 @@ package org.eclipse.mylyn.internal.tasks.bugs.actions;
import org.eclipse.jface.action.IAction;
import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.ISelectionProvider;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.jface.viewers.TreeViewer;
import org.eclipse.mylyn.internal.commons.core.ErrorReporterManager;
import org.eclipse.mylyn.internal.tasks.bugs.wizards.ErrorLogStatus;
-import org.eclipse.ui.IObjectActionDelegate;
-import org.eclipse.ui.IWorkbenchPart;
-import org.eclipse.ui.internal.views.log.LogEntry;
-import org.eclipse.ui.internal.views.log.LogSession;
+import org.eclipse.pde.internal.runtime.logview.LogEntry;
+import org.eclipse.pde.internal.runtime.logview.LogSession;
+import org.eclipse.swt.widgets.TreeItem;
+import org.eclipse.ui.IViewActionDelegate;
+import org.eclipse.ui.IViewPart;
/**
* Creates a new task from the selected error log entry.
@@ -29,11 +33,11 @@ import org.eclipse.ui.internal.views.log.LogSession;
* @author Jeff Pound
* @author Steffen Pingel
*/
-public class NewTaskFromErrorAction implements IObjectActionDelegate {
+public class NewTaskFromErrorAction implements IViewActionDelegate, ISelectionChangedListener {
public static final String ID = "org.eclipse.mylyn.tasklist.ui.repositories.actions.create"; //$NON-NLS-1$
- private LogEntry entry;
+ private TreeViewer treeViewer;
/**
* Fills a {@link StringBuilder} with {@link LogEntry} information, optionally including subentries too
@@ -80,42 +84,29 @@ public class NewTaskFromErrorAction implements IObjectActionDelegate {
// includeChildren = true;
// }
// StringBuilder sb = new StringBuilder();
-// buildDescriptionFromLogEntry(entry, sb, true);
+// buildDescriptionFromLogEntry(entry, sb, includeChildren);
- ErrorLogStatus status = createStatus(entry);
-
- new ErrorReporterManager().fail(status);
- }
-
- private ErrorLogStatus createStatus(LogEntry entry) {
ErrorLogStatus status = new ErrorLogStatus(entry.getSeverity(), entry.getPluginId(), entry.getCode(),
entry.getMessage());
- try {
- status.setDate(entry.getDate());
- status.setStack(entry.getStack());
- LogSession session = entry.getSession();
- if (session != null) {
- status.setLogSessionData(session.getSessionData());
- }
-
- if (entry.hasChildren()) {
- Object[] children = entry.getChildren(entry);
- if (children != null) {
- for (Object child : children) {
- if (child instanceof LogEntry) {
- ErrorLogStatus childStatus = createStatus((LogEntry) child);
- status.add(childStatus);
- }
- }
- }
- }
- } catch (Exception e) {
- // ignore any errors for setting additional attributes
+ status.setDate(entry.getDate());
+ status.setStack(entry.getStack());
+ LogSession session = entry.getSession();
+ if (session != null) {
+ status.setLogSessionData(session.getSessionData());
}
- return status;
+ new ErrorReporterManager().fail(status);
}
public void run() {
+ TreeItem[] items = treeViewer.getTree().getSelection();
+ LogEntry entry = null;
+ if (items.length > 0) {
+ entry = (LogEntry) items[0].getData();
+ }
+ if (entry == null) {
+ return;
+ }
+
createTask(entry);
}
@@ -123,14 +114,19 @@ public class NewTaskFromErrorAction implements IObjectActionDelegate {
run();
}
+ public void init(IViewPart view) {
+ ISelectionProvider sp = view.getViewSite().getSelectionProvider();
+ sp.addSelectionChangedListener(this);
+ sp.setSelection(sp.getSelection());
+ }
+
public void selectionChanged(IAction action, ISelection selection) {
- Object object = ((IStructuredSelection) selection).getFirstElement();
- if (object instanceof LogEntry) {
- entry = (LogEntry) object;
- }
+ // this selection is always empty? explicitly register a listener in
+ // init() instead
}
- public void setActivePart(IAction action, IWorkbenchPart targetPart) {
+ public void selectionChanged(SelectionChangedEvent event) {
+ treeViewer = (TreeViewer) event.getSource();
}
}
diff --git a/org.eclipse.mylyn.tasks.bugs/src/org/eclipse/mylyn/internal/tasks/bugs/actions/NewTaskFromMarkerHandler.java b/org.eclipse.mylyn.tasks.bugs/src/org/eclipse/mylyn/internal/tasks/bugs/actions/NewTaskFromMarkerHandler.java
deleted file mode 100644
index 64fcb7f71..000000000
--- a/org.eclipse.mylyn.tasks.bugs/src/org/eclipse/mylyn/internal/tasks/bugs/actions/NewTaskFromMarkerHandler.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2008 Frank Becker 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:
- * Frank Becker - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.bugs.actions;
-
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.resources.IMarker;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.mylyn.tasks.core.TaskMapping;
-import org.eclipse.mylyn.tasks.ui.TasksUiUtil;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.views.markers.MarkerViewHandler;
-import org.eclipse.ui.views.markers.internal.MarkerType;
-import org.eclipse.ui.views.markers.internal.MarkerTypesModel;
-
-/**
- * Creates a new task from the selected marker entry.
- *
- * @author Frank Becker
- * @since 3.0
- */
-@SuppressWarnings("restriction")
-public class NewTaskFromMarkerHandler extends MarkerViewHandler {
-
- public Object execute(ExecutionEvent event) throws ExecutionException {
- IMarker[] markers = getSelectedMarkers(event);
- if (markers.length == 0 || markers[0] == null) {
- MessageDialog.openInformation(null, Messages.NewTaskFromMarkerHandler_New_Task_from_Marker,
- Messages.NewTaskFromMarkerHandler_No_marker_selected);
- return null;
- }
- final IMarker marker = markers[0];
- TaskMapping mapping = new TaskMapping() {
-
- @Override
- public String getSummary() {
- StringBuilder sb = new StringBuilder();
- try {
- MarkerType type = MarkerTypesModel.getInstance().getType(marker.getType());
- sb.append(type.getLabel() + ": "); //$NON-NLS-1$
- } catch (CoreException e) {
- // ignore
- }
-
- return sb.toString() + marker.getAttribute("message", ""); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- @Override
- public String getDescription() {
- return buildDescriptionFromMarkerItem(marker);
- }
-
- };
-
- TasksUiUtil.openNewTaskEditor(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), mapping, null);
- return null;
- }
-
- private String buildDescriptionFromMarkerItem(IMarker marker) {
- StringBuilder sb = new StringBuilder();
- sb.append(Messages.NewTaskFromMarkerHandler_Resource_
- + marker.getResource().getFullPath().removeLastSegments(1).toString().substring(1) + "/" //$NON-NLS-1$
- + marker.getResource().getName());
- int lineNumber = marker.getAttribute(IMarker.LINE_NUMBER, -1);
- if (lineNumber != -1) {
- sb.append(Messages.NewTaskFromMarkerHandler_LOCATION_LINE + lineNumber);
- }
- return sb.toString();
- }
-
-}

Back to the top