| Shopping Cart | My Cart Account | Log In | Walkthrough | IDE Integrations | Contact | Partner |
|
|
|
|
| Home | Features | Documentation | Buy Polystyle | Download |
|
Polystyle Users Manual 0.0 Table Of Contents (Important sections are in bold) 1.0 About Polystyle 2.0 Configuring Polystyle To Match Your Style 2.1 Using The Configuration Tool And Formatting Files 2.1.1.0 Step 1: Define Your Examples 2.1.1.1 Option 1: Edit Examples Directly 2.1.1.2 Option 2: Select A Predefined Example For All Languages 2.1.2.0 Step 2: Set Global Preferences 2.1.2.1 Indent Character 2.1.2.2 Tab Width 2.1.2.3 Make Backups 2.1.2.4 Newline Style 2.1.2.5 Page Width 2.1.3.0 Step 3: Run Polystyle 2.1.3.1 Option 1: Run From Windows Explorer 2.1.3.2 Option 2: Run From The Command Line 2.1.3.3 Option 3: Run From Your IDE 2.1.4.0 (Optional) Step 0: Use Style Suite 2.1.4.1 Edit Suites 2.1.5 Register Polystyle 2.1.6 About Polystyle Polystyle is a source code beautifier which learns your personal formatting style by examining examples of your code. First, use a text editor to format your examples and define your style. You may then format your files by invoking Polystyle through Windows Explorer or your IDE. Polystyle comes with several predefined styles as well as a GUI Configuration Tool to make Polystyle easy to set up. 1.1 What Polystyle Will And Will Not Do Polystyle works by making the whitespace in your source files look the same as the whitespace in your example files. This is the idea to keep in mind when formatting your examples, Polystyle learns how you place padding between tokens and how many newlines you use in various areas. It then applies these rules to your source. Since Polystyle only updates the whitespace in your source code, it will not alter the actual contents of your files such as adding {}'s in if statements or alphabetizing method declarations. At this time Polystyle will not alter comments although this may change with a future version. After formatting, Polystyle performs very strict tests on the to make sure the original meaning of your source is preserved and that only the styling has changed. Next important section: 2.1.2.0 Step 2: Set Global Preferences 2.0 Configuring Polystyle To Match Your Style Configuring Polystyle takes two steps: formatting your example files and setting preferences in the Configuation Tool. The example files are used to express the bulk of the information about your style. The Configuration Tool is used to set things that can't be easily expressed in an example file, such as whether to make backups or not. 2.1.0 Using The Configuration Tool And Formatting Files The Configuration Tool contains several tabs which walk you through step by step the process of configuring Polystyle and running Polystyle against source files. 2.1.1.0 Step 1: Define Your Examples You example files contain most of the styling information Polystyle needs, such as how to format braced blocks and how many spaces to put around equal signs. The Configuration Tool offers three ways to define your example files to set up this aspect of your style. 2.1.1.1 Option 1: Edit Examples Directly The first option allows you to edit each example file using Notepad. First select the language you want to restyle ion the dropdown, then click the push button. Notepad will pop up with the example file loaded. 2.1.1.2 Option 2: Select A Predefined Example For All Languages This option allows you to overwrite all your current example files with a set of predefined examples that come with Polystyle. Select your indent length and the overall style type, then click the push button. Polystyle will select the correct directory, such as 2.1.1.3 Option 3: Browse Your Examples Directory This option is similar to Option 1, but is designed to make it easier for you to edit your examples in your preferred text editor. Click the push button and an explorer window will pop up in your examples directory ( 2.1.2.0 Step 2: Set Global Preferences This tab allows you to define information that can't be easily expressed in an example file. Each option has a The indent character is used to indent text between the end of the last line and the first character on each line. Spaces are always used when spacing things out after the first token regardless of the Affects Polystyle's interpretation of a tab character in an example file. The default is one tab equals 4 spaces. When this is selected, Polystyle will make a backup of each file it formats named something like You may use this preference to force the formatted files into a certain newline format, or to detect and keep the original format. DOS newlines are Polystyle will attempt to fit the source into the given page width. Note that this is not always possible, for example comments may be larger than the page width. Polystyle can be run from within Windows Explorer, the command line, or from inside your IDE. 2.1.3.1 Option 1: Run From Windows Explorer After installing Polystyle using the setup program, when you right-click on files and directories in Windows Explorer a menu box will pop up. Select 2.1.3.2 Option 2: Run From The Command Line This option in the Configuration Tool gives you detailed instructions how to set your system up to run Polystyle from the command line. 2.1.3.3 Option 3: Run From Your IDE Clicking the push button will launch Windows Explorer to view the Integrations page which contains instructions for integrating Polystyle into a number of IDEs. 2.1.4.0 (Optional) Step 0: Use Style Suite Style suites allow you to easily maintain multiple sets of styling configurations. For example, you can have a suite for your personal style and a suite for your company's corporate style. A suite contains all the information the Configuration Tool lists in the 'Step 1: Define Your Examples' and 'Step 2: Set Global Preferences' tabs. "); You can easily select which suite Polystyle uses with the 'Use Style Suite' dropdown on the Configuation Tool. When you select a suite, the Configuation Tool will load that suite's data into the Configuation Tool's GUI. This will also cause Polystyle to use that suite whenever you format a file. This window allows you to add, rename, and delete style suites. 2.1.4.2 Associate Suites With Specific Languages Style suite associations allow you to cause Polystyle to use specific suites for certain languages regardless of the current selected suite. For example, you may want to have java code formatted differently when it is in a JSP than when it is in a standalone file. To do this, first define two suites. Edit the Java examples accordingly, then associate JSP with one suite and Java with the other suite. To purchase a registration key click here.
You will be emailed a key which you may copy and paste into the text box in the This window contains version and legal information regarding Polystyle. |
| Home | Features | Documentation | Buy Polystyle | Download |
|
Click Here To Download A Free Trial!
|
|
|