1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

Cosmetics.

This commit is contained in:
Sergey Prigogin 2014-05-28 20:50:43 -07:00
parent 580b3a892a
commit 48b9c2e5ad
3 changed files with 6 additions and 7 deletions

View file

@ -7,7 +7,7 @@
* http://www.eclipse.org/legal/epl-v10.html * http://www.eclipse.org/legal/epl-v10.html
* *
* Contributors: * Contributors:
* Institute for Software (IFS)- initial API and implementation * Institute for Software (IFS)- initial API and implementation
******************************************************************************/ ******************************************************************************/
package org.eclipse.cdt.internal.ui.refactoring.rename; package org.eclipse.cdt.internal.ui.refactoring.rename;
@ -94,14 +94,14 @@ public class RenameCSourceFolderChange extends Change {
} }
private ICSourceEntry[] renameEntry(ICSourceEntry[] entries){ private ICSourceEntry[] renameEntry(ICSourceEntry[] entries){
Set<ICSourceEntry> set = new HashSet<ICSourceEntry>(); Set<ICSourceEntry> set = new HashSet<>();
for (ICSourceEntry se : entries){ for (ICSourceEntry se : entries){
String seLocation = se.getName(); String seLocation = se.getName();
if(seLocation.equals(oldName.toPortableString())) { if (seLocation.equals(oldName.toPortableString())) {
ICSourceEntry newSE = new CSourceEntry(newName, se.getExclusionPatterns(), se.getFlags()); ICSourceEntry newSE = new CSourceEntry(newName, se.getExclusionPatterns(), se.getFlags());
set.add(newSE); set.add(newSE);
} else { } else {
Set<IPath> exPatters = new HashSet<IPath>(); Set<IPath> exPatters = new HashSet<>();
for (IPath filter : se.getExclusionPatterns()) { for (IPath filter : se.getExclusionPatterns()) {
IPath oldSegments = oldName.removeFirstSegments(oldName.segmentCount() -1); IPath oldSegments = oldName.removeFirstSegments(oldName.segmentCount() -1);
if (filter.equals(oldSegments)) { if (filter.equals(oldSegments)) {

View file

@ -514,7 +514,7 @@ public class RenameLinkedMode {
} }
private AbstractCLikeLanguage getLanguage() { private AbstractCLikeLanguage getLanguage() {
ITranslationUnit tu = (ITranslationUnit) fEditor.getInputCElement(); ITranslationUnit tu = fEditor.getInputCElement();
ILanguage language = null; ILanguage language = null;
try { try {
language = tu.getLanguage(); language = tu.getLanguage();

View file

@ -7,7 +7,7 @@
* http://www.eclipse.org/legal/epl-v10.html * http://www.eclipse.org/legal/epl-v10.html
* *
* Contributors: * Contributors:
* Institute for Software (IFS)- initial API and implementation * Institute for Software (IFS)- initial API and implementation
******************************************************************************/ ******************************************************************************/
package org.eclipse.cdt.internal.ui.refactoring.rename; package org.eclipse.cdt.internal.ui.refactoring.rename;
@ -27,7 +27,6 @@ import org.eclipse.ltk.core.refactoring.participants.RenameParticipant;
* @author Emanuel Graf IFS * @author Emanuel Graf IFS
*/ */
public class RenameSourceFolder extends RenameParticipant { public class RenameSourceFolder extends RenameParticipant {
private IFolder oldFolder; private IFolder oldFolder;
private String newName; private String newName;