📄 pyrename.java
字号:
/*
* Created on Sep 15, 2004
*
* @author Fabio Zadrozny
*/
package org.python.pydev.editor.actions.refactoring;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.jface.action.IAction;
import org.python.pydev.editor.refactoring.IPyRefactoring;
/**
* @author Fabio Zadrozny
*/
public class PyRename extends PyRefactorAction {
/**
* we need:
*
* renameByCoordinates(filename, line, column, newname)
*/
protected String perform(IAction action, String name, IProgressMonitor monitor) throws Exception {
String res = "";
pyRefactoring = getPyRefactoring();
res = pyRefactoring.rename(getRefactoringRequest(name, monitor));
return res;
}
IPyRefactoring pyRefactoring;
/**
* @return
*/
protected IPyRefactoring getPyRefactoring() {
if(pyRefactoring == null){
pyRefactoring = getPyRefactoring("canRename");
}
return pyRefactoring;
}
protected String getInputMessage() {
return "New value?";
}
/**
* @return
*/
protected String getDefaultValue() {
return ps.getTextSelection().getText();
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -