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 92375 Details for
Bug 187127
support content assist to work after a comma in the cc list
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Patch
patch187127.txt (text/plain), 3.85 KB, created by
Frank Becker
on 2008-03-12 18:14:27 EDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Frank Becker
Created:
2008-03-12 18:14:27 EDT
Size:
3.85 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.mylyn.tasks.tests >Index: src/org/eclipse/mylyn/tasks/tests/PersonProposalProviderTest.java >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.mylyn/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/PersonProposalProviderTest.java,v >retrieving revision 1.2 >diff -u -r1.2 PersonProposalProviderTest.java >--- src/org/eclipse/mylyn/tasks/tests/PersonProposalProviderTest.java 1 Mar 2008 21:38:41 -0000 1.2 >+++ src/org/eclipse/mylyn/tasks/tests/PersonProposalProviderTest.java 12 Mar 2008 22:12:17 -0000 >@@ -49,6 +49,41 @@ > assertNotNull(result); > assertEquals(1, result.length); > assertEquals("foo", result[0].getContent()); >+ >+ // tests for add more the one Person >+ result = provider.getProposals("f", 1); >+ assertNotNull(result); >+ assertEquals(1, result.length); >+ assertEquals("foo", result[0].getContent()); >+ >+ result = provider.getProposals("f,xx", 1); >+ assertNotNull(result); >+ assertEquals(1, result.length); >+ assertEquals("foo", result[0].getContent()); >+ result = provider.getProposals("a,xx", 1); >+ assertNotNull(result); >+ assertEquals(0, result.length); >+ >+ result = provider.getProposals("xx,f", 4); >+ assertNotNull(result); >+ assertEquals(1, result.length); >+ assertEquals("foo", result[0].getContent()); >+ result = provider.getProposals("xx,a", 4); >+ assertNotNull(result); >+ assertEquals(0, result.length); >+ >+ result = provider.getProposals("xx,f,yy", 4); >+ assertNotNull(result); >+ assertEquals(1, result.length); >+ assertEquals("foo", result[0].getContent()); >+ result = provider.getProposals("xx,a,yy", 4); >+ assertNotNull(result); >+ assertEquals(0, result.length); >+ >+ result = provider.getProposals("xx,,yy", 3); >+ assertNotNull(result); >+ assertEquals(1, result.length); >+ assertEquals("foo", result[0].getContent()); > } > > } >#P org.eclipse.mylyn.tasks.ui >Index: src/org/eclipse/mylyn/internal/tasks/ui/PersonProposalProvider.java >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.mylyn/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/PersonProposalProvider.java,v >retrieving revision 1.18 >diff -u -r1.18 PersonProposalProvider.java >--- src/org/eclipse/mylyn/internal/tasks/ui/PersonProposalProvider.java 1 Mar 2008 21:38:50 -0000 1.18 >+++ src/org/eclipse/mylyn/internal/tasks/ui/PersonProposalProvider.java 12 Mar 2008 22:12:26 -0000 >@@ -51,12 +51,35 @@ > > SortedSet<String> addressSet = getAddressSet(); > if (position > 0) { >+ String searchElement = contents; >+ int pos_prev = contents.substring(0, position).lastIndexOf(','); >+ int pos_next = contents.substring(position).indexOf(','); >+ >+ int new_position; >+ >+ if (pos_prev != -1) { >+ new_position = position - pos_prev - 1; >+ if (pos_next != -1) { >+ searchElement = contents.substring(pos_prev + 1, position + pos_next); >+ } else { >+ searchElement = contents.substring(pos_prev + 1); >+ } >+ } else { >+ new_position = position; >+ if (pos_next != -1) { >+ searchElement = contents.substring(0, position + pos_next); >+ } else { >+ searchElement = contents; >+ } >+ } > // retrieve subset of the tree set using key range >- char[] chars = contents.toLowerCase().toCharArray(); >- String contents1 = new String(chars, 0, position); >- chars[position - 1]++; >- String contents2 = new String(chars, 0, position); >- addressSet = addressSet.subSet(contents1, contents2); >+ if (!searchElement.equals("")) { >+ char[] chars = searchElement.toLowerCase().toCharArray(); >+ String contents1 = new String(chars, 0, searchElement.length()); >+ chars[new_position - 1]++; >+ String contents2 = new String(chars, 0, searchElement.length()); >+ addressSet = addressSet.subSet(contents1, contents2); >+ } > } > > IContentProposal[] result = new IContentProposal[addressSet.size()];
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 187127
: 92375 |
92376
|
92521
|
92522
|
92524
|
93935
|
93936
|
94077
|
94078
|
94079
|
94124
|
94125
|
94126
|
94127