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 27447 Details for
Bug 110438
[quick assist] surround with runnable: bug with control statement bodies
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Test
tests_110438.txt (text/plain), 2.27 KB, created by
Benno Baumgartner
on 2005-09-23 12:22:44 EDT
(
hide
)
Description:
Test
Filename:
MIME Type:
Creator:
Benno Baumgartner
Created:
2005-09-23 12:22:44 EDT
Size:
2.27 KB
patch
obsolete
>Index: ui/org/eclipse/jdt/ui/tests/quickfix/AssistQuickFixTest.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/quickfix/AssistQuickFixTest.java,v >retrieving revision 1.61 >diff -u -r1.61 AssistQuickFixTest.java >--- ui/org/eclipse/jdt/ui/tests/quickfix/AssistQuickFixTest.java 23 Sep 2005 13:43:34 -0000 1.61 >+++ ui/org/eclipse/jdt/ui/tests/quickfix/AssistQuickFixTest.java 23 Sep 2005 16:20:59 -0000 >@@ -4416,5 +4416,43 @@ > expected1.append("}\n"); > assertExpectedExistInProposals(proposals, new String[] {expected1.toString()}); > } >+ >+ public void testSurroundWithRunnable30() throws Exception { >+ >+ IPackageFragment pack1= fSourceFolder.createPackageFragment("test1", false, null); >+ StringBuffer buf= new StringBuffer(); >+ buf.append("package test;\n"); >+ buf.append("public class E {\n"); >+ buf.append(" public void foo() {\n"); >+ buf.append(" if (true) \n"); >+ buf.append(" System.out.println(1);\n"); >+ buf.append(" }\n"); >+ buf.append("}\n"); >+ ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null); >+ >+ StringBuffer selection= new StringBuffer(); >+ selection.append(" System.out.println(1);\n"); >+ >+ AssistContext context= getCorrectionContext(cu, buf.toString().indexOf(selection.toString()), selection.toString().length()); >+ List proposals= collectAssists(context, false); >+ >+ assertNumberOfProposals(proposals, 9); >+ assertCorrectLabels(proposals); >+ >+ StringBuffer expected1= new StringBuffer(); >+ expected1.append("package test;\n"); >+ expected1.append("public class E {\n"); >+ expected1.append(" public void foo() {\n"); >+ expected1.append(" if (true) {\n"); >+ expected1.append(" Runnable runnable = new Runnable() {\n"); >+ expected1.append(" public void run() {\n"); >+ expected1.append(" System.out.println(1);\n"); >+ expected1.append(" }\n"); >+ expected1.append(" };\n"); >+ expected1.append(" }\n"); >+ expected1.append(" }\n"); >+ expected1.append("}\n"); >+ assertExpectedExistInProposals(proposals, new String[] {expected1.toString()}); >+ } > > }
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 110438
:
27446
| 27447