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 40921 Details for
Bug 140565
[clean up] 'change all acces through instances' + 'remove unused imports' leads to code with fatal errors
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
test case
test_140565.txt (text/plain), 2.77 KB, created by
Benno Baumgartner
on 2006-05-10 07:45:22 EDT
(
hide
)
Description:
test case
Filename:
MIME Type:
Creator:
Benno Baumgartner
Created:
2006-05-10 07:45:22 EDT
Size:
2.77 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.ui.tests >Index: ui/org/eclipse/jdt/ui/tests/quickfix/CleanUpTest.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/quickfix/CleanUpTest.java,v >retrieving revision 1.47 >diff -u -r1.47 CleanUpTest.java >--- ui/org/eclipse/jdt/ui/tests/quickfix/CleanUpTest.java 5 May 2006 10:14:47 -0000 1.47 >+++ ui/org/eclipse/jdt/ui/tests/quickfix/CleanUpTest.java 10 May 2006 11:44:53 -0000 >@@ -3917,6 +3917,58 @@ > assertRefactoringResultAsExpected(refactoring, new String[] {expected1}); > } > >+ public void testCombinationBug140565() throws Exception { >+ IPackageFragment pack1= fSourceFolder.createPackageFragment("test1", false, null); >+ StringBuffer buf= new StringBuffer(); >+ buf.append("package test1;\n"); >+ buf.append("import java.io.*;\n"); >+ buf.append("public class E1 {\n"); >+ buf.append(" static class ClassA {\n"); >+ buf.append(" static ClassB B;\n"); >+ buf.append(" }\n"); >+ buf.append(" static class ClassB {\n"); >+ buf.append(" static ClassC C;\n"); >+ buf.append(" }\n"); >+ buf.append(" static class ClassC {\n"); >+ buf.append(" static ClassD D;\n"); >+ buf.append(" }\n"); >+ buf.append(" static class ClassD {}\n"); >+ buf.append(" private void foo() {\n"); >+ buf.append(" ClassA.B.C.D.toString();\n"); >+ buf.append(" }\n"); >+ buf.append("}\n"); >+ ICompilationUnit cu1= pack1.createCompilationUnit("E1.java", buf.toString(), false, null); >+ >+ CleanUpRefactoring refactoring= new CleanUpRefactoring(); >+ refactoring.addCompilationUnit(cu1); >+ >+ ICleanUp cleanUp1= new CodeStyleCleanUp(CodeStyleCleanUp.CHANGE_NON_STATIC_ACCESS_TO_STATIC); >+ ICleanUp cleanUp2= new UnusedCodeCleanUp(UnusedCodeCleanUp.REMOVE_UNUSED_IMPORTS); >+ refactoring.addCleanUp(cleanUp1); >+ refactoring.addCleanUp(cleanUp2); >+ >+ buf= new StringBuffer(); >+ buf.append("package test1;\n"); >+ buf.append("public class E1 {\n"); >+ buf.append(" static class ClassA {\n"); >+ buf.append(" static ClassB B;\n"); >+ buf.append(" }\n"); >+ buf.append(" static class ClassB {\n"); >+ buf.append(" static ClassC C;\n"); >+ buf.append(" }\n"); >+ buf.append(" static class ClassC {\n"); >+ buf.append(" static ClassD D;\n"); >+ buf.append(" }\n"); >+ buf.append(" static class ClassD {}\n"); >+ buf.append(" private void foo() {\n"); >+ buf.append(" ClassB.C.D.toString();\n"); >+ buf.append(" }\n"); >+ buf.append("}\n"); >+ String expected1= buf.toString(); >+ >+ assertRefactoringResultAsExpected(refactoring, new String[] {expected1}); >+ } >+ > > public void testSerialVersion01() throws Exception { >
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 140565
:
40585
|
40921
|
40922
|
41297
|
45660
|
47834