Lines 17-22
Link Here
|
17 |
import org.eclipse.core.resources.IProject; |
17 |
import org.eclipse.core.resources.IProject; |
18 |
import org.eclipse.core.resources.IProjectDescription; |
18 |
import org.eclipse.core.resources.IProjectDescription; |
19 |
import org.eclipse.core.resources.IResource; |
19 |
import org.eclipse.core.resources.IResource; |
|
|
20 |
import org.eclipse.core.resources.team.FileModificationValidationContext; |
21 |
import org.eclipse.core.resources.team.FileModificationValidator; |
20 |
import org.eclipse.core.resources.team.IMoveDeleteHook; |
22 |
import org.eclipse.core.resources.team.IMoveDeleteHook; |
21 |
import org.eclipse.core.resources.team.IResourceTree; |
23 |
import org.eclipse.core.resources.team.IResourceTree; |
22 |
import org.eclipse.core.runtime.CoreException; |
24 |
import org.eclipse.core.runtime.CoreException; |
Lines 27-33
Link Here
|
27 |
|
29 |
|
28 |
public class BinaryRepositoryProvider extends RepositoryProvider { |
30 |
public class BinaryRepositoryProvider extends RepositoryProvider { |
29 |
private IMoveDeleteHook moveDeleteHook; |
31 |
private IMoveDeleteHook moveDeleteHook; |
30 |
private IFileModificationValidator fileModificationValidator; |
32 |
private FileModificationValidator fileModificationValidator; |
31 |
|
33 |
|
32 |
public static final String EXTERNAL_PROJECT_VALUE = "external"; //$NON-NLS-1$ |
34 |
public static final String EXTERNAL_PROJECT_VALUE = "external"; //$NON-NLS-1$ |
33 |
|
35 |
|
Lines 119-129
Link Here
|
119 |
} |
121 |
} |
120 |
|
122 |
|
121 |
class BinaryFileModificationValidator |
123 |
class BinaryFileModificationValidator |
122 |
implements IFileModificationValidator { |
124 |
extends FileModificationValidator { |
123 |
/** |
125 |
/** |
124 |
* @see org.eclipse.core.resources.IFileModificationValidator#validateEdit(org.eclipse.core.resources.IFile, java.lang.Object) |
126 |
* @see org.eclipse.core.resources.IFileModificationValidator#validateEdit(org.eclipse.core.resources.IFile, java.lang.Object) |
125 |
*/ |
127 |
*/ |
126 |
public IStatus validateEdit(IFile[] files, Object context) { |
128 |
public IStatus validateEdit(IFile[] files, FileModificationValidationContext context) { |
127 |
for (int i = 0; i < files.length; i++) { |
129 |
for (int i = 0; i < files.length; i++) { |
128 |
if (isBinaryResource(files[i], false)) { |
130 |
if (isBinaryResource(files[i], false)) { |
129 |
return createProblemStatus(); |
131 |
return createProblemStatus(); |
Lines 170-175
Link Here
|
170 |
public IFileModificationValidator getFileModificationValidator() { |
172 |
public IFileModificationValidator getFileModificationValidator() { |
171 |
return fileModificationValidator; |
173 |
return fileModificationValidator; |
172 |
} |
174 |
} |
|
|
175 |
|
176 |
/** |
177 |
* @see org.eclipse.team.core.RepositoryProvider#getFileModificationValidator2() |
178 |
*/ |
179 |
public FileModificationValidator getFileModificationValidator2() { |
180 |
return fileModificationValidator; |
181 |
} |
173 |
|
182 |
|
174 |
/** |
183 |
/** |
175 |
* @see org.eclipse.team.core.RepositoryProvider#getID() |
184 |
* @see org.eclipse.team.core.RepositoryProvider#getID() |