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 163430 Details for
Bug 306568
[ImportRewrite] Add Import does not work for nested type when package is on-demand imported
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Proposed fix
patch_306568.txt (text/plain), 1.97 KB, created by
Olivier Thomann
on 2010-03-30 13:35:01 EDT
(
hide
)
Description:
Proposed fix
Filename:
MIME Type:
Creator:
Olivier Thomann
Created:
2010-03-30 13:35:01 EDT
Size:
1.97 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.core >Index: dom/org/eclipse/jdt/internal/core/dom/rewrite/ImportRewriteAnalyzer.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/dom/org/eclipse/jdt/internal/core/dom/rewrite/ImportRewriteAnalyzer.java,v >retrieving revision 1.24 >diff -u -r1.24 ImportRewriteAnalyzer.java >--- dom/org/eclipse/jdt/internal/core/dom/rewrite/ImportRewriteAnalyzer.java 24 Feb 2010 19:52:59 -0000 1.24 >+++ dom/org/eclipse/jdt/internal/core/dom/rewrite/ImportRewriteAnalyzer.java 30 Mar 2010 17:33:55 -0000 >@@ -631,14 +631,20 @@ > if (!doStarImport || currDecl.isOnDemand() || (onDemandConflicts != null && onDemandConflicts.contains(currDecl.getSimpleName()))) { > String str= getNewImportString(currDecl.getElementName(), isStatic, lineDelim); > stringsToInsert.add(str); >+ } else if (doStarImport && !currDecl.isOnDemand()) { >+ String simpleName = currDecl.getTypeQualifiedName(); >+ if (simpleName.indexOf('.') != -1) { >+ String str= getNewImportString(currDecl.getElementName(), isStatic, lineDelim); >+ if (stringsToInsert.indexOf(str) == -1) { >+ stringsToInsert.add(str); >+ } >+ } > } >- } else { >- if (!doStarImport || currDecl.isOnDemand() || onDemandConflicts == null || onDemandConflicts.contains(currDecl.getSimpleName())) { >- int offset= region.getOffset(); >- removeAndInsertNew(buffer, currPos, offset, stringsToInsert, resEdit); >- stringsToInsert.clear(); >- currPos= offset + region.getLength(); >- } >+ } else if (!doStarImport || currDecl.isOnDemand() || onDemandConflicts == null || onDemandConflicts.contains(currDecl.getSimpleName())) { >+ int offset= region.getOffset(); >+ removeAndInsertNew(buffer, currPos, offset, stringsToInsert, resEdit); >+ stringsToInsert.clear(); >+ currPos= offset + region.getLength(); > } > } > }
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 306568
: 163430