Latest Tutorials| Questions and Answers|Ask Questions?|Site Map




Related Tutorials


 
 

Share on Google+Share on Google+

AnyEdit Tools

Advertisement
AnyEdit plugin adds several new tools to the context menu of text- based Eclipse editors, to output consoles, to Eclipse main menu and editor toolbar. AnyEdit contributes also Import/Export working sets wizards.

AnyEdit Tools

     

AnyEdit plugin adds several new tools to the context menu of text- based Eclipse editors, to output consoles, to Eclipse main menu and editor toolbar. AnyEdit contributes also Import/Export working sets wizards.

AnyEdit can show the withespace (tabs vs spaces) in editors and may use custom project settings for tab<->spaces auto-convert-on-save feature.
AnyEdit could perform tabs <-> spaces convert on multiple files or entire directories and supports also file exclusion filter for tabs <-> spaces action.
AnyEdit allows you automatically remove trailing whitespaces and/or perform tabs<->spaces conversion on a "save" action in all text- based Eclipse editors. It could automatically create a new line at the end of the file if the last line was not terminated by new line.
AnyEdit adds "Save All", "Open File" and "Show whitespace in editor" buttons to the global Eclipse toolbar and could remove "Print" button from it (because it is completely useless on Linux)
AnyEdit adds "Open File", "Open Type" and "Save to file..." actions to supported output consoles and "Save to file..." toolbar button to the Console view.

AnyEdit adds context menu actions to supported text editors:

  • "Open file under cursor"
    - useful by many include's in jsp's, file name/line in log messages etc.
    - Works with run/debug and Ant console too, support "jump to line"!

  • "Open type under cursor"
    - useful for all xml's, tld's, jsp's etc files with referenced Java types.
    - Works with run/debug and Ant console too!

  • "Convert -> Leading tabs to spaces"
    (trailing whitespace will be removed automatically)

  • "Convert -> Leading spaces to tabs"
    (trailing whitespace will be removed automatically)

  • "Convert ->Chars to Html entities"

  • "Convert -> Html entities to chars"
    - useful if working in bilingual team to convert 's, 's, 's etc between html and other sources ;)

  • "Convert -> Camel <-> Underscores"
    (auto-convert variable names from/to "camel" notation, like
    thisIsMyFieldName <-> this_is_my_field_name)

  • "Convert -> Capitalize"

  • "Convert -> Invert case"

  • "Convert -> To upper case"

  • "Convert -> To lower case

Why AnyEdit

"Open file" acton was inspired by refactoring of one big J2EE project that heavily used "included" JSP files. Some times it was necessary to traverse 5 nested includes to find a field declaration, thus 5 times open package explorer and search for the next file, brrr. With "Open file under cursor" this is a single click action. This works from Eclipse debug/Ant console too - moreover, if line information is included, then the right source line will be selected in editor!

"Open type" acton was inspired by working with web.xml/weblogic.xml/*.tld/*.jsp files. You can now simply change from XML to the Java editor if you want to see the declaring Java class, without typing the Java class name in the "Open type" dialog. This works from the Eclipse Ant/debug console too.

"Convert Spaces/Tabs" action set was inspired by Rahul Kuchhal's whitespace plugin and good old UltraEdit. The main difference is that my plugin doesn't change line ends while performing "spaces" operations. E.g. if you edit a Unix text file on Windows PC, Rahul's plugin automatically convert all line ends into DOS format (from "\n" to "\r\n") and vice versa. The same is for Mac/Unix, Mac/DOS text files too. This is angry for version control systems, diff tools etc. The trailing whitespace and/or tabs<->spaces conversion could be performed automatically on "save" action in nearly all text editors, even in editors which are not directly supported by AnyEdit context menu actions.

Editor / Console integration
For almost of Eclipse text editors this is done automatically. It works with default Eclipse Java and Text editors, with Web Tools from IBM, MyEclipse, SolarEclipse and Loboz JSP editors, JavaScript editor form Harish Kataria, EclipseColorer, ColorEditor, PHPEClipse, CFEclipse, CDT editors, EPIC (Perl), Zend PHP, PyDev (Python development environment), TRex TTCN3, Adobe Flex and I think with many other editors too. For any other editors it can be simply to add AnyEdit to context menu.

Console integration for "Save to file:" Ant, Java run / debug / stack trace, External tools, CVS, CDT make. Known limitation: SVN (Subclipse) Console is not supported by design restrictions.
 

Installation

All what you need to install AnyEdit plugin is to copy the downloaded jar file into you %Eclipse%/plugin directory and restart Eclipse. You don't need to do anymore to install AnyEdit. Do not unzip the downloaded jar file!

For Update Manager users: you can use special Eclipse update site for this plugin. Go to "Help -> Software Updates -> Find and Install... -> Search for new features to install -> Next -> New Remote Site..." and use the http://andrei.gmxhome.de/eclipse/ as url.

Usage

For "Convert tabs<->spaces" actions on a single file you can right-click anywhere in current editor and then select preferred action to run. Whole editor buffer will be changed, trailing whitespace will be removed automatically.

For "Convert tabs<->spaces" on a number of files, just select these files or directories in Navigator view and use "File->Convert tabs<->spaces" window menu. All selected text files and all text files in selected directory hierarchy would be checked out and "tabs<->spaces" would be executed on each file. This operation could not be undone without version control system, so be careful by using it. You may exclude files per project/global settings from this operation, using AnyEdit preferences.

For "Convert chars/html/case" actions you must select some text, then right-click on current selection and then select preferred action to run. Only the selected text will be changed.

For "Open" actions place cursor into file/java type string and select preferred action to run. You can also select a part of file/type and then click on "Open" action. In both cases AnyEdit will try to determine right file/type, and if it is found, will open file/type in associated Eclipse editor.

"Convert tabs<->spaces" actions uses tab width from AnyEdit Preference page to replace tabs with spaces/vice versa (except Java editor, which formatter preferences could be used instead).

Note: As default, trailing whitespace will be removed automatically on save and while "Convert spaces/tabs" actons, but you can turn this behavoir off in AnyEdit preferences.

"Open file" action uses special characters from AnyEdit Preference page to guess file name/path under cursor. It uses the simply string search for a continuous character sequence with allowed/required in path characters. Found character sequence can be the full file path or only one part of them, therefore plugin will search for this character sequence first relative to current document and if nothing found, in entire project/workspace and then on local file system.

Import/Export working sets wizards allows you to store working set definitions to the file and apply them to the another workspace by importing them. This is especially useful when working on big workspaces containing same set of projects (each workspace represents just different product version or branch). Please first import projects into the workspace, and then working sets, otherwise working sets would be imported but empty.

know click for more  information.

http://andrei.gmxhome.de/anyedit/index.html

Advertisement

If you enjoyed this post then why not add us on Google+? Add us to your Circles



Liked it!  Share this Tutorial


Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.

Posted on: February 28, 2008

Related Tutorials

Discuss: AnyEdit Tools  

Post your Comment


Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
 
 
Comments:0
DMCA.com