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 180739 Details for
Bug 293861
Problem with refactoring when existing jar with invalid package names
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
patch2
jbide5036-2.patch (text/plain), 2.71 KB, created by
Snjezana Peco
on 2010-10-13 04:31:19 EDT
(
hide
)
Description:
patch2
Filename:
MIME Type:
Creator:
Snjezana Peco
Created:
2010-10-13 04:31:19 EDT
Size:
2.71 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.ui >Index: core refactoring/org/eclipse/jdt/internal/corext/refactoring/rename/RippleMethodFinder2.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/rename/RippleMethodFinder2.java,v >retrieving revision 1.18 >diff -u -r1.18 RippleMethodFinder2.java >--- core refactoring/org/eclipse/jdt/internal/corext/refactoring/rename/RippleMethodFinder2.java 5 Nov 2008 18:44:38 -0000 1.18 >+++ core refactoring/org/eclipse/jdt/internal/corext/refactoring/rename/RippleMethodFinder2.java 12 Oct 2010 23:23:50 -0000 >@@ -26,6 +26,7 @@ > import org.eclipse.core.runtime.OperationCanceledException; > import org.eclipse.core.runtime.SubProgressMonitor; > >+import org.eclipse.jdt.core.IJavaProject; > import org.eclipse.jdt.core.IMember; > import org.eclipse.jdt.core.IMethod; > import org.eclipse.jdt.core.IRegion; >@@ -42,6 +43,8 @@ > import org.eclipse.jdt.core.search.SearchPattern; > import org.eclipse.jdt.core.search.SearchRequestor; > >+import org.eclipse.jdt.internal.core.PackageFragment; >+import org.eclipse.jdt.internal.core.util.Util; > import org.eclipse.jdt.internal.corext.refactoring.RefactoringScopeFactory; > import org.eclipse.jdt.internal.corext.refactoring.base.ReferencesInBinaryContext; > import org.eclipse.jdt.internal.corext.util.JavaModelUtil; >@@ -181,6 +184,22 @@ > return (IMethod[]) rippleMethodsList.toArray(new IMethod[rippleMethodsList.size()]); > } > >+ private boolean isValidPackageName(IMethod method) { >+ if (method == null) >+ return false; >+ IType type= method.getDeclaringType(); >+ PackageFragment packageFragment= (PackageFragment)type.getPackageFragment(); >+ IJavaProject javaProject= method.getJavaProject(); >+ String sourceLevel= javaProject.getOption(JavaCore.COMPILER_SOURCE, true); >+ String complianceLevel= javaProject.getOption(JavaCore.COMPILER_COMPLIANCE, true); >+ for (int i= 0, length= packageFragment.names.length; i < length; i++) { >+ if (!Util.isValidFolderNameForPackage(packageFragment.names[i], sourceLevel, complianceLevel)) >+ return false; >+ } >+ return true; >+ } >+ >+ > private IMethod[] findAllRippleMethods(IProgressMonitor pm, WorkingCopyOwner owner) throws CoreException { > pm.beginTask("", 4); //$NON-NLS-1$ > >@@ -237,6 +256,9 @@ > boolean hasAlienInterfaces= false; > for (Iterator iter= alienDeclarations.iterator(); iter.hasNext();) { > IMethod alienDeclaration= (IMethod) iter.next(); >+ if (!isValidPackageName(alienDeclaration)) { >+ continue; >+ } > IType alienType= alienDeclaration.getDeclaringType(); > alienTypes.add(alienType); > if (alienType.isInterface())
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 293861
:
151012
|
151013
|
151410
|
152146
|
153222
|
153223
|
154621
|
154622
|
154957
|
155298
|
155299
|
155300
|
158473
|
158478
|
159164
|
180736
|
180737
|
180738
| 180739