X-Git-Url: http://secure.phpeclipse.com
diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/ltk/ui/actions/RenamePHPIdentifier.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/ltk/ui/actions/RenamePHPIdentifier.java
index c73d1f4..53d06a5 100644
--- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/ltk/ui/actions/RenamePHPIdentifier.java
+++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/ltk/ui/actions/RenamePHPIdentifier.java
@@ -6,8 +6,8 @@ package net.sourceforge.phpdt.ltk.ui.actions;
import net.sourceforge.phpdt.internal.ui.util.PHPFileUtil;
import net.sourceforge.phpdt.ltk.core.RenameIdentifierDelegate;
import net.sourceforge.phpdt.ltk.core.RenameIdentifierInfo;
-import net.sourceforge.phpdt.ltk.core.RenamePHPProcessor;
import net.sourceforge.phpdt.ltk.core.RenameIdentifierRefactoring;
+import net.sourceforge.phpdt.ltk.core.RenamePHPProcessor;
import net.sourceforge.phpdt.ltk.ui.UITexts;
import net.sourceforge.phpdt.ltk.ui.wizards.RenameIdentifierWizard;
import net.sourceforge.phpeclipse.phpeditor.PHPEditor;
@@ -39,11 +39,11 @@ import org.eclipse.ui.texteditor.ITextEditor;
*
* action that is triggered from the editor context menu.
*
- *
+ *
*
* This action is declared in the plugin.xml
.
*
- *
+ *
*/
public class RenamePHPIdentifier implements IEditorActionDelegate {
@@ -58,7 +58,8 @@ public class RenamePHPIdentifier implements IEditorActionDelegate {
// interface methods of IEditorActionDelegate
// ///////////////////////////////////////////
- public void setActiveEditor(final IAction action, final IEditorPart targetEditor) {
+ public void setActiveEditor(final IAction action,
+ final IEditorPart targetEditor) {
this.targetEditor = targetEditor;
onPHPFile = false;
IFile file = getFile();
@@ -78,8 +79,10 @@ public class RenamePHPIdentifier implements IEditorActionDelegate {
if (targetEditor != null && (targetEditor instanceof PHPEditor)) {
PHPEditor editor = (PHPEditor) targetEditor;
if (editor != null) {
- ITextSelection textSelection = (ITextSelection) editor.getSelectionProvider().getSelection();
- IDocument doc = editor.getDocumentProvider().getDocument(editor.getEditorInput());
+ ITextSelection textSelection = (ITextSelection) editor
+ .getSelectionProvider().getSelection();
+ IDocument doc = editor.getDocumentProvider()
+ .getDocument(editor.getEditorInput());
int pos = textSelection.getOffset();
point = PHPWordExtractor.findWord(doc, pos);
if (point != null) {
@@ -98,14 +101,16 @@ public class RenamePHPIdentifier implements IEditorActionDelegate {
}
}
- public void selectionChanged(final IAction action, final ISelection selection) {
+ public void selectionChanged(final IAction action,
+ final ISelection selection) {
this.selection = selection;
}
// helping methods
// ////////////////
- private void applySelection(final ITextSelection textSelection, String word, Point point) {
+ private void applySelection(final ITextSelection textSelection,
+ String word, Point point) {
if (word != null) {
info.setOldName(word);
info.setNewName(word);
@@ -130,11 +135,13 @@ public class RenamePHPIdentifier implements IEditorActionDelegate {
}
private void openWizard() {
- RenameIdentifierDelegate delegate = new RenameIdentifierDelegate( info );
+ RenameIdentifierDelegate delegate = new RenameIdentifierDelegate(info);
RefactoringProcessor processor = new RenamePHPProcessor(info, delegate);
- RenameIdentifierRefactoring ref = new RenameIdentifierRefactoring(processor);
+ RenameIdentifierRefactoring ref = new RenameIdentifierRefactoring(
+ processor);
RenameIdentifierWizard wizard = new RenameIdentifierWizard(ref, info);
- RefactoringWizardOpenOperation op = new RefactoringWizardOpenOperation(wizard);
+ RefactoringWizardOpenOperation op = new RefactoringWizardOpenOperation(
+ wizard);
try {
String titleForFailedChecks = ""; //$NON-NLS-1$
op.run(getShell(), titleForFailedChecks);
@@ -148,7 +155,8 @@ public class RenamePHPIdentifier implements IEditorActionDelegate {
if (targetEditor != null) {
result = targetEditor.getSite().getShell();
} else {
- result = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
+ result = PlatformUI.getWorkbench().getActiveWorkbenchWindow()
+ .getShell();
}
return result;
}