Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrelves2007-02-19 17:32:10 +0000
committerrelves2007-02-19 17:32:10 +0000
commit51748fd697959b303b96accfa3ec37217508f52a (patch)
tree8118ac593001e741b8d034126c6c9d9fc1208c93 /org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn
parent114bb9dece5c8632a2e2b4c7881afd301a9cb8b0 (diff)
downloadorg.eclipse.mylyn.tasks-51748fd697959b303b96accfa3ec37217508f52a.tar.gz
org.eclipse.mylyn.tasks-51748fd697959b303b96accfa3ec37217508f52a.tar.xz
org.eclipse.mylyn.tasks-51748fd697959b303b96accfa3ec37217508f52a.zip
NEW - bug 174657: new bug should not show bogus ID
https://bugs.eclipse.org/bugs/show_bug.cgi?id=174657
Diffstat (limited to 'org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn')
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/AbstractRepositoryTaskEditor.java19
1 files changed, 11 insertions, 8 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 170284576..46cd50e6b 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
@@ -697,13 +697,19 @@ public abstract class AbstractRepositoryTaskEditor extends TaskFormPage {
kindLabel = connectorUi.getTaskKindLabel(repositoryTask);
}
String idLabel = "";
+
if (repositoryTask != null) {
idLabel = repositoryTask.getIdentifyingLabel();
} else {
idLabel = taskData.getId();
}
- form.setText(kindLabel + " " + idLabel);
+ if (taskData.isNew()) {
+ form.setText("New "+kindLabel);
+ } else {
+ form.setText(kindLabel + " " + idLabel);
+ }
+
toolkit.decorateFormHeading(form.getForm());
editorComposite = form.getBody();
@@ -765,8 +771,6 @@ public abstract class AbstractRepositoryTaskEditor extends TaskFormPage {
headerLayout.horizontalSpacing = 6;
headerInfoComposite.setLayout(headerLayout);
-
-
RepositoryTaskAttribute statusAtribute = taskData.getAttribute(RepositoryTaskAttribute.STATUS);
addNameValue(headerInfoComposite, statusAtribute);
@@ -775,13 +779,12 @@ public abstract class AbstractRepositoryTaskEditor extends TaskFormPage {
String idLabel = (repositoryTask != null) ? repositoryTask.getIdentifyingLabel() : taskData.getId();
if (idLabel != null) {
-
+
Composite nameValue = toolkit.createComposite(headerInfoComposite);
nameValue.setLayout(new GridLayout(2, false));
toolkit.createLabel(nameValue, "ID:");// .setFont(TITLE_FONT);
toolkit.createText(nameValue, idLabel, SWT.FLAT | SWT.READ_ONLY);
}
-
String openedDateString = "";
String modifiedDateString = "";
@@ -805,11 +808,11 @@ public abstract class AbstractRepositoryTaskEditor extends TaskFormPage {
}
RepositoryTaskAttribute modifiedAttribute = taskData.getAttribute(RepositoryTaskAttribute.DATE_MODIFIED);
- if (modifiedAttribute != null) {
+ if (modifiedAttribute != null) {
Composite nameValue = toolkit.createComposite(headerInfoComposite);
nameValue.setLayout(new GridLayout(2, false));
createLabel(nameValue, modifiedAttribute);
- toolkit.createText(nameValue, modifiedDateString, SWT.FLAT | SWT.READ_ONLY);
+ toolkit.createText(nameValue, modifiedDateString, SWT.FLAT | SWT.READ_ONLY);
}
if (getActivityUrl() != null) {
@@ -828,7 +831,7 @@ public abstract class AbstractRepositoryTaskEditor extends TaskFormPage {
// SWT.DEFAULT).align(SWT.RIGHT, SWT.DEFAULT).applyTo(hyperlink);
}
}
-
+
private void addNameValue(Composite parent, RepositoryTaskAttribute attribute) {
Composite nameValue = toolkit.createComposite(parent);
nameValue.setLayout(new GridLayout(2, false));

Back to the top