当前位置: 首页 > 工具软件 > AnyEdit Tools > 使用案例 >

AnyEdit tools plugin for Eclipse

潘慈
2023-12-01

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.

What can AnyEdit do for you?

   -> AnyEdit examples -> AnyEdit preferences -> AnyEdit in action

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 can 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 can 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 can 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 four new context menu actions to "Compare With " and "Replace With " menus in both editors and files.

What?Where?Details
Open File under CursorEditors, Console views, Bytecode Outline View Useful by many include's in jsp's, C/C++ files, file names in the console output etc. Can jump to the right line!
Works with run/debug and Ant console too, support "jump to line"!
Open Type under CursorEditors, Console views, Bytecode Outline View Useful for all xml's, tld's, jsp's etc files with referenced Java types.
Works with run/debug and Ant console too!
Save to file... Most of the Console views, Bytecode Outline View Allows to save the console/view content and quickly reopen it in an editor.
Works with most of the existing consoles!

Edit
    Show Witespace

"Edit" menu, main toolbarAllows to show tabs and spaces colored in the text editor. Has to be enabled once for the desired perspective via Window -> Customize Perspective -> Commands -> Whitespace
File Import / Export
    Working Sets
"File" menu Allows you to store working set definitions to the file and apply them to the another workspace by importing them.
File
    Convert Tabs <-> Spaces
"File" menu Enabled only if more then one file/folder is selected in Navigator or Project Explorer

Convert
    Tabs to Spaces
    Spaces to Tabs

EditorsTrailing whitespace will be removed automatically

Convert
    Chars to Html entities
    Html Entities to Chars

EditorsUseful if working in bilingual team to convert é's, ô's, ä's etc between html and other sources ;)
Convert
    Camel <-> Underscores
EditorsAuto-convert variable names from/to "camel" notation, like
thisIsMyFieldName <-> this_is_my_field_name
Convert
    Capitalize
EditorsOnly text selection in editor will be changed
Convert
    Invert Case
EditorsOnly text selection in editor will be changed
Convert
    To Upper Case
    To Lower Case
EditorsOnly text selection in editor will be changed
Convert
    To Unicode Notation
    From Unicode Notation
EditorsOnly text selection in editor will be changed
Convert
    To Base64
    From Base64
EditorsOnly text selection in editor will be changed
Compare / Replace with
    Clipboard
Editors, Navigator, Project Explorer If some text is selected in editor, then only this selection will be compared, otherwise entire editor
Compare / Replace with
    Workspace File...
Editors, Navigator, Project Explorer If some text is selected in editor, then only this selection will be compared, otherwise entire editor
Compare / Replace with
    External File...
Editors, Navigator, Project Explorer If some text is selected in editor, then only this selection will be compared, otherwise entire editor
Compare / Replace with
    Opened Editor...
Editors, Navigator, Project Explorer If some text is selected in editor, then only this selection will be compared, otherwise entire editor

This programm is free, see copyright

Installation

Please use Eclipse update manager to install this plugin.

Eclipse 3.3 - 3.4:

Go to "Help -> Software Updates -> Find and Install... -> Search for new features to install -> Next -> New Remote Site..."

Eclipse 3.5:

Go to "Help -> Install new Software... -> Work with:"

and use the http://andrei.gmxhome.de/eclipse/ as url.

Please also read the FAQ !

Manual download

Here

Browse source code

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.

And the rest is now just history :o)

This program is free, see copyright .

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 , Aptana Studio and I think with almost anyone text editor too.

Console integration for "Save to file:" Ant, Java run / debug / stack trace, External tools, CVS, CDT make etc.

Please do not hesitate to contact me if your editor/view/console is not supported.

Please also read the FAQ !

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.

Note: only working set descriptions would be imported/exported, and not the resources included in the working sets.

Please also read the FAQ , examples , preferences and AnyEdit in action !

 类似资料:

相关阅读

相关文章

相关问答