Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrelves2006-12-12 19:14:22 -0500
committerrelves2006-12-12 19:14:22 -0500
commit1ba7761d3e39edb133d5fcc9c7074ae4e8111d19 (patch)
tree5277c6d9d938d334ad7f79e23b5006a098ea1a08
parent8b77ec186d49585f39ac07e59c416402080c8549 (diff)
downloadorg.eclipse.mylyn.tasks-1ba7761d3e39edb133d5fcc9c7074ae4e8111d19.tar.gz
org.eclipse.mylyn.tasks-1ba7761d3e39edb133d5fcc9c7074ae4e8111d19.tar.xz
org.eclipse.mylyn.tasks-1ba7761d3e39edb133d5fcc9c7074ae4e8111d19.zip
NEW - bug 166088: Cannot set focus to bug editor via keybinding
https://bugs.eclipse.org/bugs/show_bug.cgi?id=166088
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/AbstractRepositoryTaskEditor.java16
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/TaskEditor.java8
2 files changed, 15 insertions, 9 deletions
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/AbstractRepositoryTaskEditor.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/AbstractRepositoryTaskEditor.java
index 8355767b0..f3f81e77a 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/AbstractRepositoryTaskEditor.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/AbstractRepositoryTaskEditor.java
@@ -552,8 +552,7 @@ public abstract class AbstractRepositoryTaskEditor extends TaskFormPage {
editorComposite.setLayoutData(new GridData(GridData.FILL_BOTH));
if (getRepositoryTaskData() == null) {
- toolkit.createLabel(editorComposite,
- "Task data not available, please synchronize and reopen.");
+ toolkit.createLabel(editorComposite, "Task data not available, please synchronize and reopen.");
return;
}
@@ -855,7 +854,7 @@ public abstract class AbstractRepositoryTaskEditor extends TaskFormPage {
Font summaryFont = themeManager.getCurrentTheme().getFontRegistry()
.get(TaskListColorsAndFonts.TASK_EDITOR_FONT);
summaryText.setFont(summaryFont);
-
+
GridDataFactory.fillDefaults().grab(true, false).hint(DESCRIPTION_WIDTH, SWT.DEFAULT).applyTo(summaryText);
summaryText.addListener(SWT.KeyUp, new SummaryListener());
@@ -1850,7 +1849,11 @@ public abstract class AbstractRepositoryTaskEditor extends TaskFormPage {
@Override
public void setFocus() {
- form.setFocus();
+ if (summaryText != null && !summaryText.isDisposed()) {
+ summaryText.setFocus();
+ } else {
+ form.setFocus();
+ }
}
// /**
@@ -2586,7 +2589,6 @@ public abstract class AbstractRepositoryTaskEditor extends TaskFormPage {
return submitJobListener;
}
-
protected void attachContext(final AbstractRepositoryTask modifiedTask) {
IProgressService ps = PlatformUI.getWorkbench().getProgressService();
try {
@@ -2611,8 +2613,8 @@ public abstract class AbstractRepositoryTaskEditor extends TaskFormPage {
protected void handleSubmitError(final IJobChangeEvent event) {
if (event.getJob().getResult().getCode() == Status.INFO) {
- WebBrowserDialog.openAcceptAgreement(this.getSite().getShell(), "Failed to submit to repository", event.getJob().getResult()
- .getMessage(), event.getJob().getResult().getException().getMessage());
+ WebBrowserDialog.openAcceptAgreement(this.getSite().getShell(), "Failed to submit to repository", event
+ .getJob().getResult().getMessage(), event.getJob().getResult().getException().getMessage());
} else if (event.getJob().getResult().getCode() == Status.ERROR) {
MylarStatusHandler.fail(event.getJob().getResult().getException(), "Failed to submit to repository"
+ ": Changes may not have successfully committed.\n" + event.getJob().getResult().getMessage(),
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/TaskEditor.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/TaskEditor.java
index 53687c822..61d4318ad 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/TaskEditor.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/TaskEditor.java
@@ -288,8 +288,12 @@ public class TaskEditor extends FormEditor {
@Override
public void setFocus() {
- if (taskPlanningEditor != null)
- taskPlanningEditor.setFocus();
+ if (this.getActivePage() > -1) {
+ IFormPage page = this.getPages()[this.getActivePage()];
+ if (page != null) {
+ page.setFocus();
+ }
+ }
}
public Browser getWebBrowser() {

Back to the top