-
Notifications
You must be signed in to change notification settings - Fork 263
ATF Code Editor Sample
CodeEditor is a code editor that uses the ActiproSoftare SyntaxEditor to provide an editing Control. It provides language syntax sensitive editing for plain text, C#, Lua, Squirrel, Python, XML, COLLADA and Cg files.
For a description of the sample's programming, see Code Editor Programming Discussion.
- Use of Managed Extensibility Framework (MEF) to put applications together.
- Use of the application shell framework, including CommandService, SettingsService, ControlHostService and WindowLayoutService.
- Use of FileDialogService, StandardFileCommands and StandardFileExitCommand to provide standard menus.
- Use of PerforceService, SourceControlCommands and SourceControlContext to provide source control.
- Use of a third party control (ActiproSoftare SyntaxEditor) that conforms to the ISyntaxEditorControl to provide most of the editor functions. See the files in the Atf.SyntaxEditorControl project for more details.
- Double-click the CodeEditor.exe in \bin\wws_atf\Release.
- A dialog appears with an empty text window.
- File:
- New: create a new file of various types using submenus for the language options.
- Open: open an existing file of various types using submenus for the language options.
- Save: save the active file.
- Save As ...: save the active file to a selected path.
- Save All: save all the open files.
- Close: close the active file.
- Source Control: select its various submenu items to perform standard source control operations, such as adding, checking in or out, refreshing files.
- Recent Files: open a recently opened file.
- Exit: exit CodeEditor.
- Edit:
- Undo and Redo: undo or redo the last editing operation.
- Cut, Copy, Paste and Delete: performs these editing operations.
- Find and Replace...: display a Find/Replace dialog with the usual options.
- Go to: display a dialog to enter a line number to go to.
- Keyboard Shortcuts: use the Customize Keyboard Shortcuts window to set up keyboard shortcuts.
- Load or Save Settings: use the Load and Save Settings window to save current CodeEditor application settings or load application settings from a file.
- Preferences: set application preferences, such as command icon size.
- Window:
- Tile Horizontal: tile window panes horizontally.
- Tile Vertical: tile window panes vertically.
- Tile Overlapping: overlap window panes horizontally.
- Layouts:
- Save Layout As...: associate the current layout with a name.
- Manage Layouts...: show a list of layouts and manage the list.
- Lock/Unlock UI Layout: lock or unlock the window layout.
- List of checked menu items; check to display the corresponding control.
- Help: its About menu item displays a dialog describing CodeEditor.
The toolbar contains buttons for most of the commands in the menus. For instance, all of the various Save commands are available, as well as the Edit commands.
Create a new file by clicking File > New > language. Or open an existing file by clicking File > Open > language. Enter text and perform the usual editing operations.
After creating content, you can save it with the various save options under the File menu or toolbar.
Modules perform these functions:
- Program.cs: Contains the Main program. It creates a TypeCatalog listing the ATF components used.
- Editors.cs: Sets up the ActiproSoftare SyntaxEditor control that does the editing. Sets up document clients for the different language types the editor supports.
- CodeDocument.cs: Defines the CodeDocument class, which implements the IDocument interface. Editors.cs creates a CodeDocument instance for every open document. CodeDocument performs the general document actions such as saving and reading text to and from files.
- SourceControlContext.cs: Defines the SourceControlContext class, which implements ISourceControlContext. The PerforceService, SourceControlCommands and SourceControlContext components actually do the source control management work.
- CircuitEditor: Editor for circuits, consisting of modules with input and output pins and connections between them.
- CodeEditor: Code editor that uses the ActiproSoftare SyntaxEditor to provide an editing Control.
- DiagramEditor: Combines the Circuit, Finite State Machine, and State Chart editors into a single application to show how multiple editors can share an application shell and editor components.
- DOMPropertyEditor: Demonstrates property editing, with a large variety of property editing controls and property descriptors.
- FileExplorer: Shows how to build a simple Windows® Explorer-like application to view the contents of a disk.
- FSMEditor: Finite state machine editor.
- ModelViewer: Shows how to use the ATF's ATGI and Collada file loaders and OpenGL® rendering.
- SimpleDOMEditor: Demonstrates the use of the DOM (Document Object Model) in WinForms, including defining a data model.
- SimpleDOMEditorWPF: Similar to ATF SimpleDOMEditor Sample, but implemented using ATF’s WPF framework.
- SimpleDOMNoXMLEditor: Very similar to the SimpleDOMEditor sample, but does not use XML.
- StateChartEditor: Editor for statecharts.
- TargetManager: Shows how to use the TargetEnumerationService to discover, add, configure and select targets, which are network endpoints, such as TCP/IP addresses, PS3™ DevKits or PlayStation®Vita DevKits.
- TimelineEditor: Relatively full-featured timeline editor whose components have been used in real production tools.
- TreeListControl: Demonstrates the usage of TreeListControl/TreeListItemRenderer classes to display and edit hierarchical data in a tree view with details in columns.
- TreeListEditor: Shows how to create and add entries to various kinds of Tree lists, including a hierarchical list to display selected folders' underlying folders and files.
- UsingDirect2D: Demonstrates how to use Direct2D and ATF classes that support Direct2D.
- UsingDom: Simple demo of basic DOM use.
- Home
- Getting Started
- Features & Benefits
- Requirements & Dependencies
- Gallery
- Technology & Samples
- Adoption
- News
- Release Notes
- ATF Community
- Searching Documentation
- Using Documentation
- Videos
- Tutorials
- How To
- Programmer's Guide
- Reference
- Code Samples
- Documentation Files
© 2014-2015, Sony Computer Entertainment America LLC