Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorspingel2008-06-04 22:06:32 -0400
committerspingel2008-06-04 22:06:32 -0400
commit3376d7a974962dea614f95b2b3cd69ca6e39e785 (patch)
treee35538475ddfb9115021d529fcdca2decb638e63
parent932d90733f83f08e466bab40f2ee64ecc368959d (diff)
downloadorg.eclipse.mylyn.tasks-3376d7a974962dea614f95b2b3cd69ca6e39e785.tar.gz
org.eclipse.mylyn.tasks-3376d7a974962dea614f95b2b3cd69ca6e39e785.tar.xz
org.eclipse.mylyn.tasks-3376d7a974962dea614f95b2b3cd69ca6e39e785.zip
NEW - bug 212209: provide a flexible bug reporting facility
https://bugs.eclipse.org/bugs/show_bug.cgi?id=212209
-rw-r--r--org.eclipse.mylyn.tasks.bugs/.classpath1
-rw-r--r--org.eclipse.mylyn.tasks.bugs/META-INF/MANIFEST.MF6
-rw-r--r--org.eclipse.mylyn.tasks.bugs/plugin.xml11
-rw-r--r--org.eclipse.mylyn.tasks.bugs/schema/pluginRepositoryMappings.exsd2
-rw-r--r--org.eclipse.mylyn.tasks.bugs/schema/taskContributors.exsd7
-rw-r--r--org.eclipse.mylyn.tasks.bugs/src/org/eclipse/mylyn/internal/provisional/tasks/bugs/AbstractTaskContributor.java (renamed from org.eclipse.mylyn.tasks.bugs/src/org/eclipse/mylyn/tasks/bugs/AbstractTaskContributor.java)2
-rw-r--r--org.eclipse.mylyn.tasks.bugs/src/org/eclipse/mylyn/internal/tasks/bugs/AttributeTaskMapper.java1
-rw-r--r--org.eclipse.mylyn.tasks.bugs/src/org/eclipse/mylyn/internal/tasks/bugs/DefaultTaskContributor.java2
-rw-r--r--org.eclipse.mylyn.tasks.bugs/src/org/eclipse/mylyn/internal/tasks/bugs/TaskContributorManager.java2
-rw-r--r--org.eclipse.mylyn.tasks.bugs/src/org/eclipse/mylyn/internal/tasks/bugs/TasksBugsPlugin.java42
-rw-r--r--org.eclipse.mylyn.tasks.bugs/src/org/eclipse/mylyn/internal/tasks/bugs/wizards/ReportErrorWizard.java1
-rw-r--r--org.eclipse.mylyn.tasks.ui/plugin.xml9
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/DialogErrorReporter.java52
13 files changed, 76 insertions, 62 deletions
diff --git a/org.eclipse.mylyn.tasks.bugs/.classpath b/org.eclipse.mylyn.tasks.bugs/.classpath
index b07f119d9..6a357762a 100644
--- a/org.eclipse.mylyn.tasks.bugs/.classpath
+++ b/org.eclipse.mylyn.tasks.bugs/.classpath
@@ -4,6 +4,7 @@
<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/mylyn/internal/tasks/ui/**"/>
</accessrules>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5">
diff --git a/org.eclipse.mylyn.tasks.bugs/META-INF/MANIFEST.MF b/org.eclipse.mylyn.tasks.bugs/META-INF/MANIFEST.MF
index 07eb73b06..8e7d8b36b 100644
--- a/org.eclipse.mylyn.tasks.bugs/META-INF/MANIFEST.MF
+++ b/org.eclipse.mylyn.tasks.bugs/META-INF/MANIFEST.MF
@@ -13,10 +13,10 @@ Require-Bundle: org.eclipse.core.runtime,
Bundle-Vendor: Eclipse.org
Bundle-ClassPath: .
Bundle-RequiredExecutionEnvironment: J2SE-1.5
-Export-Package: org.eclipse.mylyn.internal.tasks.bugs;x-internal:=true,
+Export-Package: org.eclipse.mylyn.internal.provisional.tasks.bugs,
+ org.eclipse.mylyn.internal.tasks.bugs;x-internal:=true,
org.eclipse.mylyn.internal.tasks.bugs.actions;x-internal:=true,
- org.eclipse.mylyn.internal.tasks.bugs.wizards;x-internal:=true,
- org.eclipse.mylyn.tasks.bugs
+ org.eclipse.mylyn.internal.tasks.bugs.wizards;x-internal:=true
Bundle-Localization: plugin
Bundle-ActivationPolicy: lazy
Bundle-Activator: org.eclipse.mylyn.internal.tasks.bugs.TasksBugsPlugin
diff --git a/org.eclipse.mylyn.tasks.bugs/plugin.xml b/org.eclipse.mylyn.tasks.bugs/plugin.xml
index 5e10bced8..2f6d39bd3 100644
--- a/org.eclipse.mylyn.tasks.bugs/plugin.xml
+++ b/org.eclipse.mylyn.tasks.bugs/plugin.xml
@@ -7,7 +7,7 @@
<extension point="org.eclipse.ui.popupMenus">
<objectContribution
adaptable="false"
- id="org.eclipse.mylyn.tasks.bugs.objectContribution"
+ 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"
@@ -19,15 +19,6 @@
</action>
</objectContribution>
</extension>
-
- <extension
- point="org.eclipse.mylyn.commons.core.errorReporters">
- <errorReporter
- class="org.eclipse.mylyn.internal.tasks.bugs.TasksBugsPlugin$DialogReporter"
- id="org.eclipse.mylyn.tasks.bugs.errorReporter"
- label="Report Error as Bug">
- </errorReporter>
- </extension>
<extension point="org.eclipse.ui.actionSets">
<actionSet
diff --git a/org.eclipse.mylyn.tasks.bugs/schema/pluginRepositoryMappings.exsd b/org.eclipse.mylyn.tasks.bugs/schema/pluginRepositoryMappings.exsd
index fccaf03d1..78ef7133e 100644
--- a/org.eclipse.mylyn.tasks.bugs/schema/pluginRepositoryMappings.exsd
+++ b/org.eclipse.mylyn.tasks.bugs/schema/pluginRepositoryMappings.exsd
@@ -13,7 +13,7 @@
<element name="extension">
<annotation>
<appinfo>
- <meta.element />
+ <meta.element internal="true" />
</appinfo>
</annotation>
<complexType>
diff --git a/org.eclipse.mylyn.tasks.bugs/schema/taskContributors.exsd b/org.eclipse.mylyn.tasks.bugs/schema/taskContributors.exsd
index 5e62e4848..48a1aa16d 100644
--- a/org.eclipse.mylyn.tasks.bugs/schema/taskContributors.exsd
+++ b/org.eclipse.mylyn.tasks.bugs/schema/taskContributors.exsd
@@ -11,6 +11,11 @@
</annotation>
<element name="extension">
+ <annotation>
+ <appinfo>
+ <meta.element internal="true" />
+ </appinfo>
+ </annotation>
<complexType>
<sequence minOccurs="1" maxOccurs="unbounded">
<element ref="contributor"/>
@@ -57,7 +62,7 @@
</documentation>
<appinfo>
- <meta.attribute kind="java"/>
+ <meta.attribute kind="java" basedOn="org.eclipse.mylyn.internal.provisional.tasks.bugs.AbstractTaskContributor:"/>
</appinfo>
</annotation>
</attribute>
diff --git a/org.eclipse.mylyn.tasks.bugs/src/org/eclipse/mylyn/tasks/bugs/AbstractTaskContributor.java b/org.eclipse.mylyn.tasks.bugs/src/org/eclipse/mylyn/internal/provisional/tasks/bugs/AbstractTaskContributor.java
index 3814166e2..d1c22246c 100644
--- a/org.eclipse.mylyn.tasks.bugs/src/org/eclipse/mylyn/tasks/bugs/AbstractTaskContributor.java
+++ b/org.eclipse.mylyn.tasks.bugs/src/org/eclipse/mylyn/internal/provisional/tasks/bugs/AbstractTaskContributor.java
@@ -6,7 +6,7 @@
* http://www.eclipse.org/legal/epl-v10.html
*******************************************************************************/
-package org.eclipse.mylyn.tasks.bugs;
+package org.eclipse.mylyn.internal.provisional.tasks.bugs;
import java.util.Map;
diff --git a/org.eclipse.mylyn.tasks.bugs/src/org/eclipse/mylyn/internal/tasks/bugs/AttributeTaskMapper.java b/org.eclipse.mylyn.tasks.bugs/src/org/eclipse/mylyn/internal/tasks/bugs/AttributeTaskMapper.java
index 5f40bd7fe..b3ee86b4b 100644
--- a/org.eclipse.mylyn.tasks.bugs/src/org/eclipse/mylyn/internal/tasks/bugs/AttributeTaskMapper.java
+++ b/org.eclipse.mylyn.tasks.bugs/src/org/eclipse/mylyn/internal/tasks/bugs/AttributeTaskMapper.java
@@ -51,7 +51,6 @@ public class AttributeTaskMapper {
return taskRepository;
}
- @SuppressWarnings("restriction")
public TaskData createTaskData(IProgressMonitor monitor) throws CoreException {
ITaskMapping taskMapping = getTaskMapping();
return TasksUiInternal.createTaskData(getTaskRepository(), taskMapping, taskMapping, monitor);
diff --git a/org.eclipse.mylyn.tasks.bugs/src/org/eclipse/mylyn/internal/tasks/bugs/DefaultTaskContributor.java b/org.eclipse.mylyn.tasks.bugs/src/org/eclipse/mylyn/internal/tasks/bugs/DefaultTaskContributor.java
index 33e07f61c..9322187aa 100644
--- a/org.eclipse.mylyn.tasks.bugs/src/org/eclipse/mylyn/internal/tasks/bugs/DefaultTaskContributor.java
+++ b/org.eclipse.mylyn.tasks.bugs/src/org/eclipse/mylyn/internal/tasks/bugs/DefaultTaskContributor.java
@@ -16,9 +16,9 @@ import java.util.Map;
import org.eclipse.core.runtime.IBundleGroup;
import org.eclipse.core.runtime.IStatus;
+import org.eclipse.mylyn.internal.provisional.tasks.bugs.AbstractTaskContributor;
import org.eclipse.mylyn.internal.tasks.bugs.wizards.ErrorLogStatus;
import org.eclipse.mylyn.internal.tasks.bugs.wizards.FeatureStatus;
-import org.eclipse.mylyn.tasks.bugs.AbstractTaskContributor;
import org.eclipse.mylyn.tasks.ui.editors.TaskEditor;
import org.osgi.framework.Bundle;
diff --git a/org.eclipse.mylyn.tasks.bugs/src/org/eclipse/mylyn/internal/tasks/bugs/TaskContributorManager.java b/org.eclipse.mylyn.tasks.bugs/src/org/eclipse/mylyn/internal/tasks/bugs/TaskContributorManager.java
index 2c12a1e6c..effea2fd9 100644
--- a/org.eclipse.mylyn.tasks.bugs/src/org/eclipse/mylyn/internal/tasks/bugs/TaskContributorManager.java
+++ b/org.eclipse.mylyn.tasks.bugs/src/org/eclipse/mylyn/internal/tasks/bugs/TaskContributorManager.java
@@ -23,7 +23,7 @@ import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.SafeRunner;
import org.eclipse.core.runtime.Status;
import org.eclipse.mylyn.commons.core.StatusHandler;
-import org.eclipse.mylyn.tasks.bugs.AbstractTaskContributor;
+import org.eclipse.mylyn.internal.provisional.tasks.bugs.AbstractTaskContributor;
import org.eclipse.mylyn.tasks.core.data.TaskData;
/**
diff --git a/org.eclipse.mylyn.tasks.bugs/src/org/eclipse/mylyn/internal/tasks/bugs/TasksBugsPlugin.java b/org.eclipse.mylyn.tasks.bugs/src/org/eclipse/mylyn/internal/tasks/bugs/TasksBugsPlugin.java
index 5afe0d594..ce179678e 100644
--- a/org.eclipse.mylyn.tasks.bugs/src/org/eclipse/mylyn/internal/tasks/bugs/TasksBugsPlugin.java
+++ b/org.eclipse.mylyn.tasks.bugs/src/org/eclipse/mylyn/internal/tasks/bugs/TasksBugsPlugin.java
@@ -9,11 +9,8 @@
package org.eclipse.mylyn.internal.tasks.bugs;
import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.jface.dialogs.ErrorDialog;
import org.eclipse.mylyn.commons.core.AbstractErrorReporter;
import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.plugin.AbstractUIPlugin;
@@ -47,45 +44,6 @@ public class TasksBugsPlugin extends AbstractUIPlugin {
}
}
- public static class DialogReporter extends AbstractErrorReporter {
-
- private static final String ERROR_MESSAGE = "Please report the following error at:\n"
- + "http://bugs.eclipse.org/bugs/enter_bug.cgi?product=Mylyn\n\n"
- + "Or via the popup menu in the Error Log view (see Window -> Show View)";
-
- private boolean errorDialogOpen;
-
- @Override
- public int getPriority(IStatus status) {
- return AbstractErrorReporter.PRIORITY_DEFAULT;
- }
-
- @Override
- public void handle(final IStatus status) {
- if (Platform.isRunning()) {
- final IWorkbench workbench = PlatformUI.getWorkbench();
- if (workbench != null) {
- Display display = workbench.getDisplay();
- if (display != null && !display.isDisposed()) {
- display.asyncExec(new Runnable() {
- public void run() {
- try {
- if (!errorDialogOpen) {
- errorDialogOpen = true;
- Shell shell = Display.getDefault().getActiveShell();
- ErrorDialog.openError(shell, "Mylyn Error", ERROR_MESSAGE, status);
- }
- } finally {
- errorDialogOpen = false;
- }
- }
- });
- }
- }
- }
- }
- }
-
public static final String ID_PLUGIN = "org.eclipse.mylyn.tasks.bugs";
private static TasksBugsPlugin INSTANCE;
diff --git a/org.eclipse.mylyn.tasks.bugs/src/org/eclipse/mylyn/internal/tasks/bugs/wizards/ReportErrorWizard.java b/org.eclipse.mylyn.tasks.bugs/src/org/eclipse/mylyn/internal/tasks/bugs/wizards/ReportErrorWizard.java
index 363af640d..57f9820d2 100644
--- a/org.eclipse.mylyn.tasks.bugs/src/org/eclipse/mylyn/internal/tasks/bugs/wizards/ReportErrorWizard.java
+++ b/org.eclipse.mylyn.tasks.bugs/src/org/eclipse/mylyn/internal/tasks/bugs/wizards/ReportErrorWizard.java
@@ -37,7 +37,6 @@ public class ReportErrorWizard extends Wizard {
setWindowTitle("Report as Bug");
}
- @SuppressWarnings("restriction")
@Override
public void addPages() {
reportErrorPage = new ReportErrorPage(mapper, status);
diff --git a/org.eclipse.mylyn.tasks.ui/plugin.xml b/org.eclipse.mylyn.tasks.ui/plugin.xml
index 311f49df6..8c4f00cfd 100644
--- a/org.eclipse.mylyn.tasks.ui/plugin.xml
+++ b/org.eclipse.mylyn.tasks.ui/plugin.xml
@@ -1634,5 +1634,14 @@
type="org.eclipse.mylyn.tasks.core.ITaskAttachment">
</propertyTester>
</extension>
+
+ <extension
+ point="org.eclipse.mylyn.commons.core.errorReporters">
+ <errorReporter
+ class="org.eclipse.mylyn.internal.tasks.ui.DialogErrorReporter"
+ id="org.eclipse.mylyn.tasks.bugs.errorReporter"
+ label="Report Error as Bug">
+ </errorReporter>
+ </extension>
</plugin>
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/DialogErrorReporter.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/DialogErrorReporter.java
new file mode 100644
index 000000000..c0301e2b6
--- /dev/null
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/DialogErrorReporter.java
@@ -0,0 +1,52 @@
+package org.eclipse.mylyn.internal.tasks.ui;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.jface.dialogs.ErrorDialog;
+import org.eclipse.mylyn.commons.core.AbstractErrorReporter;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.PlatformUI;
+
+/**
+ * @author Steffen Pingel
+ */
+public class DialogErrorReporter extends AbstractErrorReporter {
+
+ private static final String ERROR_MESSAGE = "Please report the following error at:\n"
+ + "http://bugs.eclipse.org/bugs/enter_bug.cgi?product=Mylyn\n\n"
+ + "Or via the popup menu in the Error Log view (see Window -> Show View)";
+
+ private boolean errorDialogOpen;
+
+ @Override
+ public int getPriority(IStatus status) {
+ return AbstractErrorReporter.PRIORITY_DEFAULT;
+ }
+
+ @Override
+ public void handle(final IStatus status) {
+ if (Platform.isRunning()) {
+ final IWorkbench workbench = PlatformUI.getWorkbench();
+ if (workbench != null) {
+ Display display = workbench.getDisplay();
+ if (display != null && !display.isDisposed()) {
+ display.asyncExec(new Runnable() {
+ public void run() {
+ try {
+ if (!errorDialogOpen) {
+ errorDialogOpen = true;
+ Shell shell = Display.getDefault().getActiveShell();
+ ErrorDialog.openError(shell, "Mylyn Error", ERROR_MESSAGE, status);
+ }
+ } finally {
+ errorDialogOpen = false;
+ }
+ }
+ });
+ }
+ }
+ }
+ }
+}

Back to the top