Refactoring
From Aptana
Aptana should provide common refactoring methods to make JavaScript, HTML and CSS development easier:
Contents |
Must Have
- Rename a selector (ID|class) across Javascript, CSS, and HTML files within the project. Preferably in comments too.
JavaScript
- Rename a variable
- Rename a function
- Extract local variable into global field
- Extract a block of code into a function
Nice to Have
JavaScript
- In situations where the editor can use ScriptDoc to resolve unknown types for objects, the editor should be able to notify users that the object's type is undefined, and provide "quick fixes" to let the user resolve the problem. Below, it would suggest adding a ScriptDoc section for paramteres a and b, and let the use choose the "type" for those parameters.
function foo(a,b)
{
return c;
}
- New operator on a type name that the editor cannot resolve.
- Extract current selected text into an external .js file
- Right-click on a script tag and extract inner contents into external .js file. Convert script tag to have source attribute.
- Surround with try/catch
HTML
- Refactor style tag into a CSS class


