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 193327 Details for
Bug 337415
External folders project is not created
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Updated patch
bug_337415.txt (text/plain), 4.51 KB, created by
Jay Arthanareeswaran
on 2011-04-15 03:42:50 EDT
(
hide
)
Description:
Updated patch
Filename:
MIME Type:
Creator:
Jay Arthanareeswaran
Created:
2011-04-15 03:42:50 EDT
Size:
4.51 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.core >Index: model/org/eclipse/jdt/core/JavaCore.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/model/org/eclipse/jdt/core/JavaCore.java,v >retrieving revision 1.659 >diff -u -r1.659 JavaCore.java >--- model/org/eclipse/jdt/core/JavaCore.java 16 Jan 2011 22:43:21 -0000 1.659 >+++ model/org/eclipse/jdt/core/JavaCore.java 15 Apr 2011 07:33:28 -0000 >@@ -3530,6 +3530,8 @@ > > // initialize all containers and variables > JavaModelManager manager = JavaModelManager.getJavaModelManager(); >+ ExternalFoldersManager externalFoldersManager = JavaModelManager.getExternalManager(); >+ externalFoldersManager.createExternalFoldersProject(monitor); > SubProgressMonitor subMonitor = null; > try { > if (monitor != null) { >@@ -3565,7 +3567,6 @@ > // and recreate links for external folders if needed > if (monitor != null) > monitor.subTask(Messages.javamodel_resetting_source_attachment_properties); >- ExternalFoldersManager externalFoldersManager = JavaModelManager.getExternalManager(); > final IJavaProject[] projects = manager.getJavaModel().getJavaProjects(); > HashSet visitedPaths = new HashSet(); > for (int i = 0, length = projects.length; i < length; i++) { >@@ -3581,22 +3582,32 @@ > boolean needExternalFolderCreation = false; > for (int j = 0, length2 = classpath.length; j < length2; j++) { > IClasspathEntry entry = classpath[j]; >- if (entry.getSourceAttachmentPath() != null) { >+ IPath sourceAttachmentPath = null; >+ if ( (sourceAttachmentPath = entry.getSourceAttachmentPath()) != null) { > IPath entryPath = entry.getPath(); > if (visitedPaths.add(entryPath)) { > Util.setSourceAttachmentProperty(entryPath, null); > } >+ if (ExternalFoldersManager.isExternalFolderPath(sourceAttachmentPath) >+ && (externalFoldersManager.isPendingFolder(sourceAttachmentPath) || >+ externalFoldersManager.getFolder(sourceAttachmentPath) == null)) { >+ needExternalFolderCreation = true; >+ } > } > // else source might have been attached by IPackageFragmentRoot#attachSource(...), we keep it > if (!needExternalFolderCreation && entry.getEntryKind() == IClasspathEntry.CPE_LIBRARY) { > IPath entryPath = entry.getPath(); >- if (ExternalFoldersManager.isExternalFolderPath(entryPath) && externalFoldersManager.getFolder(entryPath) == null) { >+ if (ExternalFoldersManager.isExternalFolderPath(entryPath) >+ && (externalFoldersManager.isPendingFolder(entryPath) || >+ externalFoldersManager.getFolder(entryPath) == null)) { > needExternalFolderCreation = true; > } > } > } >+ // https://bugs.eclipse.org/bugs/show_bug.cgi?id=337415 >+ // Request for creation of external folder's link instead of relying on delta processing. > if (needExternalFolderCreation) >- manager.deltaState.addExternalFolderChange(javaProject, null/*act as if all external folders were new*/); >+ new ExternalFolderChange(javaProject, classpath).updateExternalFoldersIfNecessary(false, monitor); > } > } > >Index: model/org/eclipse/jdt/internal/core/ExternalFoldersManager.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/ExternalFoldersManager.java,v >retrieving revision 1.21 >diff -u -r1.21 ExternalFoldersManager.java >--- model/org/eclipse/jdt/internal/core/ExternalFoldersManager.java 3 Sep 2010 05:13:44 -0000 1.21 >+++ model/org/eclipse/jdt/internal/core/ExternalFoldersManager.java 15 Apr 2011 07:33:28 -0000 >@@ -193,7 +193,7 @@ > public IProject getExternalFoldersProject() { > return ResourcesPlugin.getWorkspace().getRoot().getProject(EXTERNAL_PROJECT_NAME); > } >- private IProject createExternalFoldersProject(IProgressMonitor monitor) throws CoreException { >+ public IProject createExternalFoldersProject(IProgressMonitor monitor) throws CoreException { > IProject project = getExternalFoldersProject(); > if (!project.isAccessible()) { > if (!project.exists()) { >@@ -258,6 +258,9 @@ > project.create(desc, IResource.HIDDEN, monitor); > } > >+ public boolean isPendingFolder(IPath externalFolderPath) { >+ return this.pendingFolders != null && this.pendingFolders.contains(externalFolderPath); >+ } > public IFolder getFolder(IPath externalFolderPath) { > return (IFolder) getFolders().get(externalFolderPath); > }
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 337415
:
189164
|
193147
|
193327
|
193372
|
193380
|
193481
|
193554
|
193555