Lines 141-146
Link Here
|
141 |
|
141 |
|
142 |
public IFolder createLinkFolder(IPath externalFolderPath, boolean refreshIfExistAlready, IProgressMonitor monitor) throws CoreException { |
142 |
public IFolder createLinkFolder(IPath externalFolderPath, boolean refreshIfExistAlready, IProgressMonitor monitor) throws CoreException { |
143 |
IProject externalFoldersProject = createExternalFoldersProject(monitor); // run outside synchronized as this can create a resource |
143 |
IProject externalFoldersProject = createExternalFoldersProject(monitor); // run outside synchronized as this can create a resource |
|
|
144 |
return createLinkFolder(externalFolderPath, refreshIfExistAlready, externalFoldersProject, monitor); |
145 |
} |
146 |
|
147 |
private IFolder createLinkFolder(IPath externalFolderPath, boolean refreshIfExistAlready, |
148 |
IProject externalFoldersProject, IProgressMonitor monitor) throws CoreException { |
149 |
|
144 |
IFolder result = addFolder(externalFolderPath, externalFoldersProject, false); |
150 |
IFolder result = addFolder(externalFolderPath, externalFoldersProject, false); |
145 |
if (!result.exists()) |
151 |
if (!result.exists()) |
146 |
result.createLink(externalFolderPath, IResource.ALLOW_MISSING_LOCAL, monitor); |
152 |
result.createLink(externalFolderPath, IResource.ALLOW_MISSING_LOCAL, monitor); |
Lines 150-163
Link Here
|
150 |
} |
156 |
} |
151 |
|
157 |
|
152 |
public void createPendingFolders(IProgressMonitor monitor) throws JavaModelException{ |
158 |
public void createPendingFolders(IProgressMonitor monitor) throws JavaModelException{ |
153 |
if (this.pendingFolders == null) return; |
159 |
if (this.pendingFolders == null || this.pendingFolders.isEmpty()) return; |
|
|
160 |
|
161 |
IProject externalFoldersProject = null; |
162 |
try { |
163 |
externalFoldersProject = createExternalFoldersProject(monitor); |
164 |
} |
165 |
catch(CoreException e) { |
166 |
throw new JavaModelException(e); |
167 |
} |
154 |
Iterator iterator = this.pendingFolders.iterator(); |
168 |
Iterator iterator = this.pendingFolders.iterator(); |
155 |
while (iterator.hasNext()) { |
169 |
while (iterator.hasNext()) { |
156 |
Object folderPath = iterator.next(); |
170 |
Object folderPath = iterator.next(); |
157 |
try { |
171 |
try { |
158 |
createLinkFolder((IPath) folderPath, false, monitor); |
172 |
createLinkFolder((IPath) folderPath, false, externalFoldersProject, monitor); |
159 |
} catch (CoreException e) { |
173 |
} catch (CoreException e) { |
160 |
throw new JavaModelException(e); |
174 |
Util.log(e, "Error while creating a link for external folder :" + folderPath); //$NON-NLS-1$ |
161 |
} |
175 |
} |
162 |
} |
176 |
} |
163 |
this.pendingFolders.clear(); |
177 |
this.pendingFolders.clear(); |