Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 196931 Details for
Bug 237546
expand new comment when submitting changes to the repository
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
fix
clipboard.txt (text/plain), 5.44 KB, created by
Steffen Pingel
on 2011-05-30 17:58:42 EDT
(
hide
)
Description:
fix
Filename:
MIME Type:
Creator:
Steffen Pingel
Created:
2011-05-30 17:58:42 EDT
Size:
5.44 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.mylyn.tasks.ui >Index: src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorCommentPart.java >=================================================================== >RCS file: /cvsroot/mylyn/org.eclipse.mylyn.tasks/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorCommentPart.java,v >retrieving revision 1.72 >diff -u -r1.72 TaskEditorCommentPart.java >--- src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorCommentPart.java 30 May 2011 21:56:48 -0000 1.72 >+++ src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorCommentPart.java 30 May 2011 21:58:14 -0000 >@@ -312,7 +312,7 @@ > getTaskData().getAttributeMapper().updateTaskComment(taskComment, commentAttribute); > int style = ExpandableComposite.TREE_NODE | ExpandableComposite.LEFT_TEXT_CLIENT_ALIGNMENT > | ExpandableComposite.COMPACT; >- if (hasIncomingChanges || expandAllInProgress) { >+ if (hasIncomingChanges || (expandAllInProgress && !suppressExpandViewers)) { > style |= ExpandableComposite.EXPANDED; > } > commentComposite = toolkit.createExpandableComposite(composite, style); >@@ -571,6 +571,8 @@ > > private Font privateFont; > >+ private boolean suppressExpandViewers; >+ > public TaskEditorCommentPart() { > this.commentGroupStrategy = new CommentGroupStrategy() { > @Override >@@ -698,9 +700,10 @@ > } > } > >- private void expandAllComments() { >+ private void expandAllComments(boolean expandViewers) { > try { > expandAllInProgress = true; >+ suppressExpandViewers = !expandViewers; > getTaskEditorPage().setReflow(false); > > if (section != null) { >@@ -710,19 +713,18 @@ > > CommonFormUtil.setExpanded(section, true); > >- //if (expandGroups) { >- List<CommentGroupViewer> viewers = getCommentGroupViewers(); >- for (int i = viewers.size() - 1; i >= 0; i--) { >- if (!viewers.get(i).isFullyExpanded()) { >- viewers.get(i).setExpanded(true); >- // bug 280152: expand all groups >- //break; >+ if (expandViewers) { >+ List<CommentGroupViewer> viewers = getCommentGroupViewers(); >+ for (int i = viewers.size() - 1; i >= 0; i--) { >+ if (!viewers.get(i).isFullyExpanded()) { >+ viewers.get(i).setExpanded(true); >+ } > } > } >- //} > } > } finally { > expandAllInProgress = false; >+ suppressExpandViewers = false; > getTaskEditorPage().setReflow(true); > } > getTaskEditorPage().reflow(); >@@ -760,7 +762,7 @@ > Action expandAllAction = new Action("") { //$NON-NLS-1$ > @Override > public void run() { >- expandAllComments(); >+ expandAllComments(true); > } > }; > expandAllAction.setImageDescriptor(CommonImages.EXPAND_ALL_SMALL); >@@ -838,7 +840,7 @@ > if (commentAttribute == null) { > return null; > } >- expandAllComments(); >+ expandAllComments(false); > List<CommentGroupViewer> groupViewers = getCommentGroupViewers(); > for (CommentGroupViewer groupViewer : groupViewers) { > for (CommentViewer viewer : groupViewer.getCommentViewers()) { >Index: src/org/eclipse/mylyn/tasks/ui/editors/AbstractTaskEditorPage.java >=================================================================== >RCS file: /cvsroot/mylyn/org.eclipse.mylyn.tasks/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/AbstractTaskEditorPage.java,v >retrieving revision 1.173 >diff -u -r1.173 AbstractTaskEditorPage.java >--- src/org/eclipse/mylyn/tasks/ui/editors/AbstractTaskEditorPage.java 8 May 2011 12:39:37 -0000 1.173 >+++ src/org/eclipse/mylyn/tasks/ui/editors/AbstractTaskEditorPage.java 30 May 2011 21:58:15 -0000 >@@ -188,8 +188,11 @@ > > private final boolean attachContext; > >- public SubmitTaskJobListener(boolean attachContext) { >+ private final boolean expandLastComment; >+ >+ public SubmitTaskJobListener(boolean attachContext, boolean expandLastComment) { > this.attachContext = attachContext; >+ this.expandLastComment = expandLastComment; > } > > @Override >@@ -224,6 +227,9 @@ > newTask, taskData)); > migrator.execute(newTask); > } >+ if (expandLastComment) { >+ expandLastComment(); >+ } > } > handleTaskSubmitted(new SubmitJobEvent(job)); > } finally { >@@ -979,10 +985,16 @@ > > doSave(new NullProgressMonitor()); > >+ TaskAttribute newCommentAttribute = getModel().getTaskData() >+ .getRoot() >+ .getMappedAttribute(TaskAttribute.COMMENT_NEW); >+ boolean expandLastComment = newCommentAttribute != null >+ && getModel().getChangedAttributes().contains(newCommentAttribute); >+ > SubmitJob submitJob = TasksUiInternal.getJobFactory().createSubmitTaskJob(connector, > getModel().getTaskRepository(), task, getModel().getTaskData(), > getModel().getChangedOldAttributes()); >- submitJob.addSubmitJobListener(new SubmitTaskJobListener(getAttachContext())); >+ submitJob.addSubmitJobListener(new SubmitTaskJobListener(getAttachContext(), expandLastComment)); > submitJob.schedule(); > } catch (RuntimeException e) { > showEditorBusy(false); >@@ -1770,4 +1782,21 @@ > return super.selectReveal(object); > } > >+ void expandLastComment() { >+ if (getManagedForm() == null || getManagedForm().getForm().isDisposed()) { >+ // editor possibly closed or page has not been initialized >+ return; >+ } >+ >+ if (taskData == null) { >+ return; >+ } >+ >+ List<TaskAttribute> commentAttributes = taskData.getAttributeMapper().getAttributesByType(taskData, >+ TaskAttribute.TYPE_COMMENT); >+ if (commentAttributes.size() > 0) { >+ selectReveal(commentAttributes.get(commentAttributes.size() - 1).getId()); >+ } >+ } >+ > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 237546
: 196931 |
196932