View | Details | Raw Unified | Return to bug 252727
Collapse All | Expand All

(-)src/org/eclipse/mtj/core/internal/utils/Utils.java (-1 / +11 lines)
Lines 11-17 Link Here
11
 *     Diego Sandin (Motorola)  - Refactoring package name to follow eclipse 
11
 *     Diego Sandin (Motorola)  - Refactoring package name to follow eclipse 
12
 *                                standards and added serialVersionUID.
12
 *                                standards and added serialVersionUID.
13
 *     David Marques (Motorola)  - Adding getJavaProjectSourceDirectories method.
13
 *     David Marques (Motorola)  - Adding getJavaProjectSourceDirectories method.
14
 *     David Marques (Motorola)  - Adding project nature management methods     
14
 *     David Marques (Motorola)  - Adding project nature management methods
15
 *     David Marques (Motorola)  - Fixing clearContainer method to support removing
16
 *                                 read only files.     
15
 */
17
 */
16
package org.eclipse.mtj.core.internal.utils;
18
package org.eclipse.mtj.core.internal.utils;
17
19
Lines 41-46 Link Here
41
import org.eclipse.core.resources.IProjectDescription;
43
import org.eclipse.core.resources.IProjectDescription;
42
import org.eclipse.core.resources.IResource;
44
import org.eclipse.core.resources.IResource;
43
import org.eclipse.core.resources.IWorkspaceRoot;
45
import org.eclipse.core.resources.IWorkspaceRoot;
46
import org.eclipse.core.resources.ResourceAttributes;
44
import org.eclipse.core.runtime.CoreException;
47
import org.eclipse.core.runtime.CoreException;
45
import org.eclipse.core.runtime.IPath;
48
import org.eclipse.core.runtime.IPath;
46
import org.eclipse.core.runtime.IProgressMonitor;
49
import org.eclipse.core.runtime.IProgressMonitor;
Lines 158-163 Link Here
158
        if (container.exists()) {
161
        if (container.exists()) {
159
            IResource[] resources = container.members();
162
            IResource[] resources = container.members();
160
            for (IResource resource : resources) {
163
            for (IResource resource : resources) {
164
                /*Remove read only property in case it is set.*/
165
                ResourceAttributes attributes = resource.getResourceAttributes();
166
                if (attributes.isReadOnly()) {                    
167
                    attributes.setReadOnly(false);
168
                    resource.setResourceAttributes(attributes);
169
                }
170
                
161
                if (resource instanceof IContainer) {
171
                if (resource instanceof IContainer) {
162
                    clearContainer((IContainer) resource, monitor);
172
                    clearContainer((IContainer) resource, monitor);
163
                    resource.delete(true, monitor);
173
                    resource.delete(true, monitor);

Return to bug 252727