Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSergey Prigogin2011-10-27 21:40:40 -0400
committerSergey Prigogin2011-11-07 14:02:27 -0500
commitb1be2dbaac0d27e74355ce189166e357734a286e (patch)
treef1eda5fefff73113d37b7502e62d6624ee5e161b /core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/rewrite
parent168e1f446012ffb85c26de067475e52622f4e280 (diff)
downloadorg.eclipse.cdt-b1be2dbaac0d27e74355ce189166e357734a286e.tar.gz
org.eclipse.cdt-b1be2dbaac0d27e74355ce189166e357734a286e.tar.xz
org.eclipse.cdt-b1be2dbaac0d27e74355ce189166e357734a286e.zip
Method name adjustment.
Diffstat (limited to 'core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/rewrite')
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/rewrite/astwriter/StatementWriter.java2
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/rewrite/changegenerator/ChangeGenerator.java10
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/rewrite/util/FileHelper.java2
3 files changed, 7 insertions, 7 deletions
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/rewrite/astwriter/StatementWriter.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/rewrite/astwriter/StatementWriter.java
index 2e1e6dcafd..9bae7f9115 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/rewrite/astwriter/StatementWriter.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/rewrite/astwriter/StatementWriter.java
@@ -448,7 +448,7 @@ public class StatementWriter extends NodeWriter{
}
protected int writeMixedStatement(IASTStatement statement) {
- IFile file = FileHelper.getIFilefromIASTNode(statement);
+ IFile file = FileHelper.getFileFromNode(statement);
int offset = statement.getFileLocation().getNodeOffset();
int length = statement.getFileLocation().getNodeLength();
String code =FileContentHelper.getContent(file, offset, length);
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/rewrite/changegenerator/ChangeGenerator.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/rewrite/changegenerator/ChangeGenerator.java
index 2c0b275e8d..eda395e181 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/rewrite/changegenerator/ChangeGenerator.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/rewrite/changegenerator/ChangeGenerator.java
@@ -211,11 +211,11 @@ public class ChangeGenerator extends ASTVisitor {
if (modification.getTargetNode() instanceof IASTTranslationUnit &&
((IASTTranslationUnit)modification.getTargetNode()).getDeclarations().length > 0) {
IASTTranslationUnit tu = (IASTTranslationUnit)modification.getTargetNode();
- IASTDeclaration lastDecl = tu.getDeclarations()[tu.getDeclarations().length -1];
+ IASTDeclaration lastDecl = tu.getDeclarations()[tu.getDeclarations().length - 1];
targetLocation = lastDecl.getFileLocation();
}
String lineDelimiter = FileHelper.determineLineDelimiter(
- FileHelper.getIFilefromIASTNode(modification.getTargetNode()));
+ FileHelper.getFileFromNode(modification.getTargetNode()));
edit.addChild(new InsertEdit(targetLocation.getNodeOffset() + targetLocation.getNodeLength(),
lineDelimiter + lineDelimiter + newNodeCode));
break;
@@ -224,7 +224,7 @@ public class ChangeGenerator extends ASTVisitor {
}
private void createChange(IASTNode synthNode, String synthSource) {
- IFile relevantFile = FileHelper.getIFilefromIASTNode(synthNode);
+ IFile relevantFile = FileHelper.getFileFromNode(synthNode);
String originalCode = originalCodeOfNode(synthNode);
CodeComparer codeComparer = new CodeComparer(originalCode, synthSource);
@@ -242,7 +242,7 @@ public class ChangeGenerator extends ASTVisitor {
public String originalCodeOfNode(IASTNode node) {
if (node.getFileLocation() != null) {
- IFile sourceFile = FileHelper.getIFilefromIASTNode(node);
+ IFile sourceFile = FileHelper.getFileFromNode(node);
int nodeOffset = getOffsetIncludingComments(node);
int nodeLength = getNodeLengthIncludingComments(node);
@@ -294,7 +294,7 @@ public class ChangeGenerator extends ASTVisitor {
IASTFileLocation fileLocation = nextNode.getFileLocation();
int length = fileLocation.getNodeOffset() - getOffsetForNodeFile(nextNode);
- String originalSource = FileContentHelper.getContent(FileHelper.getIFilefromIASTNode(nextNode),
+ String originalSource = FileContentHelper.getContent(FileHelper.getFileFromNode(nextNode),
getOffsetForNodeFile(nextNode), length);
StringBuilder indent = new StringBuilder(originalSource);
indent.reverse();
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/rewrite/util/FileHelper.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/rewrite/util/FileHelper.java
index 6c7ad12c6b..fe37d7df6f 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/rewrite/util/FileHelper.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/rewrite/util/FileHelper.java
@@ -31,7 +31,7 @@ import org.eclipse.jface.text.TextUtilities;
public class FileHelper {
private static final String DEFAULT_LINE_DELIMITTER = "\n"; //$NON-NLS-1$
- public static IFile getIFilefromIASTNode(IASTNode node) {
+ public static IFile getFileFromNode(IASTNode node) {
IPath implPath = new Path(node.getContainingFilename());
return ResourceLookup.selectFileForLocation(implPath, null);
}

Back to the top