View | Details | Raw Unified | Return to bug 224959 | Differences between
and this patch

Collapse All | Expand All

(-)a/org.eclipse.ltk.core.refactoring.tests/src/org/eclipse/ltk/core/refactoring/tests/resource/ResourceRefactoringTests.java (-25 / +125 lines)
Lines 11-17 Link Here
11
 *******************************************************************************/
11
 *******************************************************************************/
12
package org.eclipse.ltk.core.refactoring.tests.resource;
12
package org.eclipse.ltk.core.refactoring.tests.resource;
13
13
14
import java.io.ByteArrayInputStream;
14
import java.io.IOException;
15
import java.io.IOException;
16
import java.io.InputStream;
15
17
16
import junit.framework.Test;
18
import junit.framework.Test;
17
import junit.framework.TestCase;
19
import junit.framework.TestCase;
Lines 41-46 Link Here
41
import org.eclipse.ltk.core.refactoring.RefactoringCore;
43
import org.eclipse.ltk.core.refactoring.RefactoringCore;
42
import org.eclipse.ltk.core.refactoring.RefactoringDescriptor;
44
import org.eclipse.ltk.core.refactoring.RefactoringDescriptor;
43
import org.eclipse.ltk.core.refactoring.RefactoringStatus;
45
import org.eclipse.ltk.core.refactoring.RefactoringStatus;
46
import org.eclipse.ltk.core.refactoring.resource.CreateFileChange;
44
import org.eclipse.ltk.core.refactoring.resource.DeleteResourcesDescriptor;
47
import org.eclipse.ltk.core.refactoring.resource.DeleteResourcesDescriptor;
45
import org.eclipse.ltk.core.refactoring.resource.MoveResourceChange;
48
import org.eclipse.ltk.core.refactoring.resource.MoveResourceChange;
46
import org.eclipse.ltk.core.refactoring.resource.MoveResourcesDescriptor;
49
import org.eclipse.ltk.core.refactoring.resource.MoveResourcesDescriptor;
Lines 95-101 Link Here
95
		Change undoChange= perform(new MoveResourceChange(testFolder, destination));
98
		Change undoChange= perform(new MoveResourceChange(testFolder, destination));
96
99
97
100
98
		IFolder movedResource= (IFolder) assertMove(testFolder, destination, null);
101
		IFolder movedResource= (IFolder)assertMove(testFolder, destination, null);
99
		assertTrue(movedResource.getFile("myFile.txt").exists());
102
		assertTrue(movedResource.getFile("myFile.txt").exists());
100
103
101
		perform(undoChange);
104
		perform(undoChange);
Lines 137-143 Link Here
137
		IFolder destination= fProject.createFolder("dest");
140
		IFolder destination= fProject.createFolder("dest");
138
141
139
		RefactoringContribution contribution= RefactoringCore.getRefactoringContribution(MoveResourcesDescriptor.ID);
142
		RefactoringContribution contribution= RefactoringCore.getRefactoringContribution(MoveResourcesDescriptor.ID);
140
		MoveResourcesDescriptor descriptor= (MoveResourcesDescriptor) contribution.createDescriptor();
143
		MoveResourcesDescriptor descriptor= (MoveResourcesDescriptor)contribution.createDescriptor();
141
144
142
		descriptor.setResourcesToMove(new IResource[] { file });
145
		descriptor.setResourcesToMove(new IResource[] { file });
143
		descriptor.setDestination(destination);
146
		descriptor.setDestination(destination);
Lines 161-174 Link Here
161
		IFolder destination= fProject.createFolder("dest");
164
		IFolder destination= fProject.createFolder("dest");
162
165
163
		RefactoringContribution contribution= RefactoringCore.getRefactoringContribution(MoveResourcesDescriptor.ID);
166
		RefactoringContribution contribution= RefactoringCore.getRefactoringContribution(MoveResourcesDescriptor.ID);
164
		MoveResourcesDescriptor descriptor= (MoveResourcesDescriptor) contribution.createDescriptor();
167
		MoveResourcesDescriptor descriptor= (MoveResourcesDescriptor)contribution.createDescriptor();
165
168
166
		descriptor.setResourcesToMove(new IResource[] { testFolder });
169
		descriptor.setResourcesToMove(new IResource[] { testFolder });
167
		descriptor.setDestination(destination);
170
		descriptor.setDestination(destination);
168
171
169
		Change undoChange= perform(descriptor);
172
		Change undoChange= perform(descriptor);
170
173
171
		IFolder movedResource= (IFolder) assertMove(testFolder, destination, null);
174
		IFolder movedResource= (IFolder)assertMove(testFolder, destination, null);
172
		assertTrue(movedResource.getFile("myFile.txt").exists());
175
		assertTrue(movedResource.getFile("myFile.txt").exists());
173
176
174
		perform(undoChange);
177
		perform(undoChange);
Lines 190-196 Link Here
190
		IFile file2= fProject.createFile(destination, "myFile.txt", content2);
193
		IFile file2= fProject.createFile(destination, "myFile.txt", content2);
191
194
192
		RefactoringContribution contribution= RefactoringCore.getRefactoringContribution(MoveResourcesDescriptor.ID);
195
		RefactoringContribution contribution= RefactoringCore.getRefactoringContribution(MoveResourcesDescriptor.ID);
193
		MoveResourcesDescriptor descriptor= (MoveResourcesDescriptor) contribution.createDescriptor();
196
		MoveResourcesDescriptor descriptor= (MoveResourcesDescriptor)contribution.createDescriptor();
194
197
195
		descriptor.setResourcesToMove(new IResource[] { file1 });
198
		descriptor.setResourcesToMove(new IResource[] { file1 });
196
		descriptor.setDestination(destination);
199
		descriptor.setDestination(destination);
Lines 208-214 Link Here
208
	public void testDeleteRefactoring1_bug343584() throws Exception {
211
	public void testDeleteRefactoring1_bug343584() throws Exception {
209
		IFolder testFolder= fProject.createFolder("test");
212
		IFolder testFolder= fProject.createFolder("test");
210
		fProject.createFile(testFolder, "myFile.txt", "hello");
213
		fProject.createFile(testFolder, "myFile.txt", "hello");
211
		
214
212
		IProject testProject2= ResourcesPlugin.getWorkspace().getRoot().getProject(SimpleTestProject.TEST_PROJECT_NAME + "2");
215
		IProject testProject2= ResourcesPlugin.getWorkspace().getRoot().getProject(SimpleTestProject.TEST_PROJECT_NAME + "2");
213
		try {
216
		try {
214
			testProject2.create(null);
217
			testProject2.create(null);
Lines 233-239 Link Here
233
		IPath location= fProject.getProject().getLocation();
236
		IPath location= fProject.getProject().getLocation();
234
		IFolder testFolder= fProject.createFolder("test");
237
		IFolder testFolder= fProject.createFolder("test");
235
		fProject.createFile(testFolder, "myFile.txt", "hello");
238
		fProject.createFile(testFolder, "myFile.txt", "hello");
236
		
239
237
		IWorkspace workspace= ResourcesPlugin.getWorkspace();
240
		IWorkspace workspace= ResourcesPlugin.getWorkspace();
238
		String p2Name= "p2";
241
		String p2Name= "p2";
239
		IProjectDescription p2Description= workspace.newProjectDescription(p2Name);
242
		IProjectDescription p2Description= workspace.newProjectDescription(p2Name);
Lines 242-269 Link Here
242
		p2.create(p2Description, null);
245
		p2.create(p2Description, null);
243
		p2.open(null);
246
		p2.open(null);
244
		IPath p2Location= p2.getLocation();
247
		IPath p2Location= p2.getLocation();
245
		
248
246
		RefactoringContribution contribution= RefactoringCore.getRefactoringContribution(DeleteResourcesDescriptor.ID);
249
		RefactoringContribution contribution= RefactoringCore.getRefactoringContribution(DeleteResourcesDescriptor.ID);
247
		DeleteResourcesDescriptor descriptor= (DeleteResourcesDescriptor) contribution.createDescriptor();
250
		DeleteResourcesDescriptor descriptor= (DeleteResourcesDescriptor)contribution.createDescriptor();
248
		
251
249
		descriptor.setDeleteContents(true);
252
		descriptor.setDeleteContents(true);
250
		descriptor.setResources(new IResource[] { fProject.getProject(), p2 });
253
		descriptor.setResources(new IResource[] { fProject.getProject(), p2 });
251
		
254
252
		perform(descriptor);
255
		perform(descriptor);
253
		
256
254
		assertFalse(fProject.getProject().exists());
257
		assertFalse(fProject.getProject().exists());
255
		assertFalse(p2.exists());
258
		assertFalse(p2.exists());
256
		
259
257
		assertFalse(location.toFile().exists());
260
		assertFalse(location.toFile().exists());
258
		assertFalse(p2Location.toFile().exists());
261
		assertFalse(p2Location.toFile().exists());
259
	}
262
	}
260
	
263
261
	public void testDeleteRefactoring3_bug343584() throws Exception {
264
	public void testDeleteRefactoring3_bug343584() throws Exception {
262
		IPath location= fProject.getProject().getLocation();
265
		IPath location= fProject.getProject().getLocation();
263
		IFolder testFolder= fProject.createFolder("test");
266
		IFolder testFolder= fProject.createFolder("test");
264
		IFile file= fProject.createFile(testFolder, "myFile.txt", "hello");
267
		IFile file= fProject.createFile(testFolder, "myFile.txt", "hello");
265
		IPath fileLocation= file.getLocation();
268
		IPath fileLocation= file.getLocation();
266
		
269
267
		IWorkspace workspace= ResourcesPlugin.getWorkspace();
270
		IWorkspace workspace= ResourcesPlugin.getWorkspace();
268
		String p2Name= "p2";
271
		String p2Name= "p2";
269
		IProjectDescription p2Description= workspace.newProjectDescription(p2Name);
272
		IProjectDescription p2Description= workspace.newProjectDescription(p2Name);
Lines 272-300 Link Here
272
		p2.create(p2Description, null);
275
		p2.create(p2Description, null);
273
		p2.open(null);
276
		p2.open(null);
274
		IPath p2Location= p2.getLocation();
277
		IPath p2Location= p2.getLocation();
275
		
278
276
		try {
279
		try {
277
			RefactoringContribution contribution= RefactoringCore.getRefactoringContribution(DeleteResourcesDescriptor.ID);
280
			RefactoringContribution contribution= RefactoringCore.getRefactoringContribution(DeleteResourcesDescriptor.ID);
278
			DeleteResourcesDescriptor descriptor= (DeleteResourcesDescriptor) contribution.createDescriptor();
281
			DeleteResourcesDescriptor descriptor= (DeleteResourcesDescriptor)contribution.createDescriptor();
279
			
282
280
			descriptor.setDeleteContents(false);
283
			descriptor.setDeleteContents(false);
281
			descriptor.setResources(new IResource[] { fProject.getProject(), p2 });
284
			descriptor.setResources(new IResource[] { fProject.getProject(), p2 });
282
			
285
283
			perform(descriptor);
286
			perform(descriptor);
284
			
287
285
			assertFalse(fProject.getProject().exists());
288
			assertFalse(fProject.getProject().exists());
286
			assertFalse(p2.exists());
289
			assertFalse(p2.exists());
287
			
290
288
			assertTrue(location.toFile().exists());
291
			assertTrue(location.toFile().exists());
289
			assertTrue(fileLocation.toFile().exists());
292
			assertTrue(fileLocation.toFile().exists());
290
			assertTrue(p2Location.toFile().exists());
293
			assertTrue(p2Location.toFile().exists());
291
			
294
292
		} finally {
295
		} finally {
293
			EFS.getLocalFileSystem().getStore(location).delete(EFS.NONE, null);
296
			EFS.getLocalFileSystem().getStore(location).delete(EFS.NONE, null);
294
			EFS.getLocalFileSystem().getStore(p2Location).delete(EFS.NONE, null);
297
			EFS.getLocalFileSystem().getStore(p2Location).delete(EFS.NONE, null);
295
		}
298
		}
296
	}
299
	}
297
	
300
301
	/*
302
	 * Creates a file in the project's root.
303
	 */
304
	public void testCreateFileChange1() throws Exception {
305
		String content= "hello";
306
307
		IFile file= fProject.getProject().getFile("myFile.txt");
308
		InputStream inputStream= new ByteArrayInputStream(content.getBytes());
309
310
		Change undoChange= perform(new CreateFileChange(file, inputStream));
311
312
		assertTrue(file.exists());
313
		assertEquals(content, fProject.getContent(file));
314
315
		perform(undoChange);
316
317
		assertFalse(file.exists());
318
	}
319
320
	/*
321
	 * Updates an existing file in the project's root.
322
	 */
323
	public void testCreateFileChange2() throws Exception {
324
		String oldContent= "hi";
325
		String newContent= "hello";
326
327
		IFile file= fProject.createFile(fProject.getProject(), "myFile.txt", oldContent);
328
		InputStream inputStream= new ByteArrayInputStream(newContent.getBytes());
329
330
		Change undoChange= perform(new CreateFileChange(file, inputStream));
331
332
		assertTrue(file.exists());
333
		assertEquals(newContent, fProject.getContent(file));
334
335
		perform(undoChange);
336
337
		assertTrue(file.exists());
338
		assertEquals(oldContent, fProject.getContent(file));
339
	}
340
341
	/*
342
	 * Updates an existing file in the project's root, but the overwrite flag
343
	 * is set to false.
344
	 */
345
	public void testCreateFileChange3() throws Exception {
346
		String oldContent= "hi";
347
		String newContent= "hello";
348
349
		IFile file= fProject.createFile(fProject.getProject(), "myFile.txt", oldContent);
350
		InputStream inputStream= new ByteArrayInputStream(newContent.getBytes());
351
352
		Change change= new CreateFileChange(file, inputStream, false);
353
		assertTrue(change.isValid(null).hasFatalError());
354
	}
355
356
	/*
357
	 * Creates a file in a deep folder structure where some folders do not
358
	 * exist yet.
359
	 */
360
	public void testCreateFileChange4() throws Exception {
361
		String content= "hello";
362
363
		IFolder existingFolder= fProject.createFolder("test");
364
		IFolder newFolder1= existingFolder.getFolder("foo");
365
		IFolder newFolder2= newFolder1.getFolder("bar");
366
		IFile file= newFolder2.getFile("myFile.txt");
367
		InputStream inputStream= new ByteArrayInputStream(content.getBytes());
368
369
		Change undoChange= perform(new CreateFileChange(file, inputStream));
370
371
		assertTrue(existingFolder.exists());
372
		assertTrue(newFolder1.exists());
373
		assertTrue(newFolder2.exists());
374
		assertTrue(file.exists());
375
		assertEquals(content, fProject.getContent(file));
376
377
		perform(undoChange);
378
379
		assertFalse(file.exists());
380
		assertFalse(newFolder2.exists());
381
		assertFalse(newFolder1.exists());
382
		assertTrue(existingFolder.exists());
383
	}
384
385
	/*
386
	 * Creates a file in a project that does not exist.
387
	 */
388
	public void testCreateFileChange5() throws Exception {
389
		String content= "hello";
390
391
		IProject project= ResourcesPlugin.getWorkspace().getRoot().getProject("foo");
392
		IFile file= project.getFile("myFile.txt");
393
		InputStream inputStream= new ByteArrayInputStream(content.getBytes());
394
395
		Change change= new CreateFileChange(file, inputStream, false);
396
		assertTrue(change.isValid(null).hasFatalError());
397
	}
398
298
	private Change perform(Change change) throws CoreException {
399
	private Change perform(Change change) throws CoreException {
299
		PerformChangeOperation op= new PerformChangeOperation(change);
400
		PerformChangeOperation op= new PerformChangeOperation(change);
300
		op.run(null);
401
		op.run(null);
Lines 327-336 Link Here
327
		assertTrue(res.getType() == source.getType());
428
		assertTrue(res.getType() == source.getType());
328
429
329
		if (res instanceof IFile) {
430
		if (res instanceof IFile) {
330
			assertTrue(content.equals(fProject.getContent((IFile) res)));
431
			assertTrue(content.equals(fProject.getContent((IFile)res)));
331
		}
432
		}
332
		return res;
433
		return res;
333
	}
434
	}
334
335
435
336
}
436
}
(-)a/org.eclipse.ltk.core.refactoring/src/org/eclipse/ltk/core/refactoring/resource/CreateFileChange.java (+207 lines)
Added Link Here
1
/*******************************************************************************
2
 * Copyright (c) 2013 Zend Technologies Ltd and others.
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
6
 * http://www.eclipse.org/legal/epl-v10.html
7
 *
8
 * Contributors:
9
 *     Zend Technologies Ltd - initial API and implementation
10
 *******************************************************************************/
11
package org.eclipse.ltk.core.refactoring.resource;
12
13
import java.io.IOException;
14
import java.io.InputStream;
15
import java.net.URI;
16
17
import org.eclipse.core.filesystem.EFS;
18
import org.eclipse.core.filesystem.IFileInfo;
19
20
import org.eclipse.core.runtime.Assert;
21
import org.eclipse.core.runtime.CoreException;
22
import org.eclipse.core.runtime.IProgressMonitor;
23
import org.eclipse.core.runtime.IStatus;
24
import org.eclipse.core.runtime.NullProgressMonitor;
25
import org.eclipse.core.runtime.Status;
26
import org.eclipse.core.runtime.SubProgressMonitor;
27
28
import org.eclipse.core.resources.IContainer;
29
import org.eclipse.core.resources.IFile;
30
import org.eclipse.core.resources.IFolder;
31
import org.eclipse.core.resources.IResource;
32
33
import org.eclipse.ltk.core.refactoring.Change;
34
import org.eclipse.ltk.core.refactoring.CompositeChange;
35
import org.eclipse.ltk.core.refactoring.RefactoringCore;
36
import org.eclipse.ltk.core.refactoring.RefactoringStatus;
37
import org.eclipse.ltk.internal.core.refactoring.BasicElementLabels;
38
import org.eclipse.ltk.internal.core.refactoring.Messages;
39
import org.eclipse.ltk.internal.core.refactoring.RefactoringCoreMessages;
40
41
/**
42
 * {@link Change} that creates a file.
43
 * 
44
 * @since 3.7
45
 */
46
public class CreateFileChange extends ResourceChange {
47
48
	private IFile fFile;
49
50
	private InputStream fInputStream;
51
52
	private boolean fOverwrite;
53
54
	/**
55
	 * Create new file.
56
	 * 
57
	 * <p>
58
	 * The file's project must exist in the workspace. Otherwise a fatal error will be returned by
59
	 * the {@link #isValid(IProgressMonitor)} method.
60
	 * </p>
61
	 * 
62
	 * <p>
63
	 * If there is an existing file on the specified path then it will be replaced with the new
64
	 * file. Calling this constructor is the same as calling
65
	 * <code>CreateFileChange(path, inputStream, true)</code>.
66
	 * </p>
67
	 * 
68
	 * @param file handle to for the new file
69
	 * @param inputStream content for the new file
70
	 */
71
	public CreateFileChange(IFile file, InputStream inputStream) {
72
		this(file, inputStream, true);
73
	}
74
75
	/**
76
	 * Create new file.
77
	 * 
78
	 * <p>
79
	 * The file's project must exist in the workspace. Otherwise a fatal error will be returned by
80
	 * the {@link #isValid(IProgressMonitor)} method.
81
	 * </p>
82
	 * 
83
	 * @param file handle to for the new file
84
	 * @param inputStream content for the new file
85
	 * @param overwrite whether an existing file on the specified path should be replaced, or the
86
	 *            change should fail
87
	 */
88
89
	public CreateFileChange(IFile file, InputStream inputStream, boolean overwrite) {
90
		Assert.isNotNull(file, "file"); //$NON-NLS-1$
91
		Assert.isNotNull(inputStream, "inputStream"); //$NON-NLS-1$
92
		fFile= file;
93
		fInputStream= inputStream;
94
		fOverwrite= overwrite;
95
	}
96
97
	/* (non-Javadoc)
98
	 * @see org.eclipse.ltk.core.refactoring.resource.ResourceChange#getModifiedResource()
99
	 */
100
	protected IResource getModifiedResource() {
101
		return fFile;
102
	}
103
104
	/* (non-Javadoc)
105
	 * @see org.eclipse.ltk.core.refactoring.Change#getName()
106
	 */
107
	public String getName() {
108
		String message= (fFile.exists()) ? RefactoringCoreMessages.CreateFileChange_update_file
109
				: RefactoringCoreMessages.CreateFileChange_create_file;
110
		return Messages.format(message, BasicElementLabels.getPathLabel(fFile.getFullPath(), false));
111
	}
112
113
	/*
114
	 * (non-Javadoc)
115
	 * @see org.eclipse.ltk.core.refactoring.resource.ResourceChange#isValid(org.eclipse.core.runtime.IProgressMonitor)
116
	 */
117
	public RefactoringStatus isValid(IProgressMonitor pm) throws CoreException {
118
		RefactoringStatus result= new RefactoringStatus();
119
120
		// among other things, checks that the file's project exists
121
		URI location= fFile.getLocationURI();
122
		if (location == null) {
123
			result.addFatalError(Messages.format(
124
					RefactoringCoreMessages.CreateFileChange_error_unknownLocation,
125
					BasicElementLabels.getPathLabel(fFile.getFullPath(), false)));
126
			return result;
127
		}
128
129
		// checks that if the file already exist then the fOverwrite flag is on too
130
		if (!fOverwrite) {
131
			IFileInfo jFile= EFS.getStore(location).fetchInfo();
132
			if (jFile.exists()) {
133
				result.addFatalError(Messages.format(
134
						RefactoringCoreMessages.CreateFileChange_error_exists,
135
						BasicElementLabels.getPathLabel(fFile.getFullPath(), false)));
136
				return result;
137
			}
138
		}
139
140
		return result;
141
	}
142
143
	/* (non-Javadoc)
144
	 * @see org.eclipse.ltk.core.refactoring.Change#perform(org.eclipse.core.runtime.IProgressMonitor)
145
	 */
146
	public Change perform(IProgressMonitor pm) throws CoreException {
147
		if (pm == null)
148
			pm= new NullProgressMonitor();
149
150
		try {
151
			pm.beginTask(RefactoringCoreMessages.CreateFileChange_creating_resource, 2);
152
153
			if (fFile.exists()) {
154
				// assuming fOverwrite is on, checked in isValid()
155
				CompositeChange composite= new CompositeChange(getName());
156
				composite.add(new DeleteResourceChange(fFile.getFullPath(), true));
157
				composite.add(new CreateFileChange(fFile, fInputStream));
158
				return composite.perform(new SubProgressMonitor(pm, 1));
159
			} else {
160
				// create the parent folder if does not exist yet
161
				Change undo= createParentFolderIfNeeded(fFile, pm);
162
163
				// create the file
164
				fFile.create(fInputStream, false, new SubProgressMonitor(pm, 1));
165
166
				// the undo change is the delete change for the parent folder if one is created
167
				// otherwise - it is the delete change for the created file
168
				return (undo != null) ? undo :
169
						new DeleteResourceChange(fFile.getFullPath(), false);
170
			}
171
		} finally {
172
			try {
173
				fInputStream.close();
174
			} catch (IOException e) {
175
				throw new CoreException(new Status(IStatus.ERROR,
176
						RefactoringCore.ID_PLUGIN, e.getMessage(), e));
177
			} finally {
178
				pm.done();
179
			}
180
		}
181
	}
182
183
	private Change createParentFolderIfNeeded(IResource resource, IProgressMonitor pm) throws CoreException {
184
		IContainer parent= resource.getParent();
185
		Assert.isNotNull(parent);
186
187
		if (parent.getType() == IResource.PROJECT)
188
			// the parent is a project - assuming it exists, checked in isValid()
189
			return null;
190
191
		IFolder folder= (IFolder)parent;
192
		if (folder.exists())
193
			// the parent folder exists - nothing to do
194
			return null;
195
196
		// check if the parent of the parent also needs to be created
197
		Change undo= createParentFolderIfNeeded(folder, pm);
198
199
		// create the parent folder
200
		folder.create(false, true, pm);
201
202
		// the undo change is the delete change for the top-most created folder
203
		return (undo != null) ? undo :
204
				new DeleteResourceChange(folder.getFullPath(), false);
205
	}
206
207
}
(-)a/org.eclipse.ltk.core.refactoring/src/org/eclipse/ltk/internal/core/refactoring/RefactoringCoreMessages.java (+10 lines)
Lines 266-271 Link Here
266
266
267
	public static String ValidateEditChecker_failed;
267
	public static String ValidateEditChecker_failed;
268
268
269
	public static String CreateFileChange_creating_resource;
270
271
	public static String CreateFileChange_create_file;
272
273
	public static String CreateFileChange_update_file;
274
275
	public static String CreateFileChange_error_exists;
276
277
	public static String CreateFileChange_error_unknownLocation;
278
269
	static {
279
	static {
270
		NLS.initializeMessages(BUNDLE_NAME, RefactoringCoreMessages.class);
280
		NLS.initializeMessages(BUNDLE_NAME, RefactoringCoreMessages.class);
271
	}
281
	}
(-)a/org.eclipse.ltk.core.refactoring/src/org/eclipse/ltk/internal/core/refactoring/RefactoringCoreMessages.properties (+6 lines)
Lines 156-158 Link Here
156
MoveResourceProcessor_error_destination_not_exists=Destination does not exist
156
MoveResourceProcessor_error_destination_not_exists=Destination does not exist
157
MoveResourceProcessor_error_invalid_destination=Invalid parent
157
MoveResourceProcessor_error_invalid_destination=Invalid parent
158
MoveResourceProcessor_processor_name=Move Resources
158
MoveResourceProcessor_processor_name=Move Resources
159
160
CreateFileChange_creating_resource=Creating file...
161
CreateFileChange_create_file=Create file ''{0}''
162
CreateFileChange_update_file=Update file ''{0}''
163
CreateFileChange_error_exists=File ''{0}'' already exists
164
CreateFileChange_error_unknownLocation=The location for file ''{0}'' is unknown

Return to bug 224959