Dissecting a C# Application: Inside SharpDevelop - Table of Contents

Summary Of Contents

Introduction  1
Chapter 1: Features at a Glance   7
Chapter 2: Designing the Architecture   23
Chapter 3: Implementing the Core   51
Chapter 4: Building the Application with Add-ins   81
Chapter 5: Providing Functionality with Workspace Services   107
Chapter 6: The User Interface   135
Chapter 7: Internationalization   169
Chapter 8: Document Management   189
Chapter 9: Syntax Highlighting   219
Chapter 10: Search and Replace   235
Chapter 11: Writing the Editor Control   263
Chapter 12: Writing the Parser   291
Chapter 13: Code Completion and Method Insight   329
Chapter 14: Navigating Code with the Class Scout and the Assembly Scout   369
Chapter 15: The Designer Infrastructure   413
Chapter 16: Implementing a Windows Forms Designer   437
Chapter 17: Code Generation   465
Index   499

Table of Contents

Introduction  1
    The Code in This Book2
    Conventions2
    Customer Support3
        How to Download the Sample Code for the Book3
        Errata3
        E-Mail Support3
        p2p.wrox.com4
            Why This System Offers the Best Support4
Chapter 1: Features at a Glance  7
    The idea behind SharpDevelop8
    SharpDevelop Software Requirements8
    SharpDevelop's Panels and Views9
    Limitations12
    Customizing SharpDevelop12
        Internationalization12
        Defining the Appearance13
    Customizations for Coding14
        Getting Started with Templates14
        Changing Syntax Highlighting14
        Code Completion and Method Insight15
        Bookmarks16
        Search and Replace Functionality16
        Compiling the Code17
    Managing Projects17
        Combines and Projects - What's in a Name?17
        Navigating the Project17
            The Project and Class Views of the World18
    Creating Windows Forms18
        Adding Controls to Windows Forms19
        Properties and Formatting of Controls20
    Summary20
Chapter 2: Designing the Architecture  23
    History of Architectural Design Decisions23
        The Early Stages23
        Building SharpDevelop with SharpDevelop24
        Correcting Bad Design Decisions26
    The Design Decisions27
        Designing Component-Exchangeability29
    Best Practices30
        Design Patterns30
            Singleton31
            Factory31
            Decorator33
            Strategy35
            Memento36
            Proxy37
        Coding Style Guideline39
        Defect Tracking and Testing39
            Bug Tracker39
            Unit Tests40
        Refactor Frequently41
            Design and Refactoring42
    Summary48
Chapter 3: Implementing the Core  51
    The AddIn Tree52
        Advantages of Using the AddIn Tree53
        The AddIn Tree Superstructure56
        Add-in Definition57
        From Tree Node to Running Object60
        Codon Creation62
        Conditions64
    AddIn Management66
    Property Management in SharpDevelop70
        The Idea behind the IXmlConvertable Interface71
        Overview of the IProperties Interface71
        The Default Implementation72
        Properties at Work75
        Property Persistence76
    Summary79
Chapter 4: Building the Application with Add-ins  81
    Working with Codons82
        The ICommand Interface82
        Making Menus Work85
        Codon Overview93
    Wiring up Add-ins with Conditions96
        Condition Structure97
        Defining Conditions98
        Overview of Available Conditions100
    Summary104
Chapter 5: Providing Functionality with Workspace Services  107
    Implementation Considerations107
        Requirements for Services108
        The ServiceManager109
        Defining Services111
    Common Services at your Service112
        File Utility Service113
        Property Service119
        Resource Service119
        String Parser Service119
        Ambience Service121
        Class Browser Icons Service123
        File Service124
        Project Service126
        Parser Service131
        Other Services133
    Summary133
Chapter 6: The User Interface  135
    Display Management136
        The Workbench Window136
        Views137
        Pads139
        Views and Pads Applied - An Integrated HTML Help Viewer141
            The HTML View142
            Navigating the Help File148
        Layout Managers153
    The Current and Future Implementation166
    Summary167
Chapter 7: Internationalization  169
    Handling Internationalization in SharpDevelop171
        Redrawing with Events173
        Accessing Resources176
    Managing Translations180
        The Translation Web Application181
            Localization Implications182
        Compiling to Resource Files182
            Generating Resource Files from XML182
            Generating Resource Files from the Database184
    Summary186
Chapter 8: Document Management  189
    Text Representation190
        Basic Sequence Data Structures190
            Arrays190
            Linked Lists192
        The Gap Buffer Approach192
            Theory of the Gap Buffer193
            The Gap Buffer in Practice194
        The Future - The Piece Table197
            Composite Sequence Data Structures198
    Representing Lines199
    Caret and Selection Management206
    The Text Model210
    Putting It All Together212
    Summary216
Chapter 9: Syntax Highlighting  219
    Syntax Highlighting Definitions220
        Increasing Ease of Use with XML220
        Implementing Syntax Highlighting226
            Validation of the Syntax Highlighting Definition File226
            The Sequence of Events from the Opening of a File to the Highlighting of the Text Editor Window231
    Summary233
Chapter 10: Search and Replace  235
    The Search Strategy235
    Inside Search and Replace249
        Basic Find and Replace Implementation249
        Using Algorithms252
            The Brute Force Algorithm254
            The Knuth-Morris-Pratt (KMP) Algorithm256
        Wildcard Search Strategy257
    Summary260
Chapter 11: Writing the Editor Control  263
    Introduction to the Editor263
    The TextArea Control265
        Theory265
        Getting Started266
        Event Handling272
        Updating277
    The TextAreaPainter279
    Mouse Management285
    Folding286
    SharpPad287
    Summary289
Chapter 12: Writing the Parser  291
    Need for a Parser291
    Parser and Language Theory292
        Basic Definitions and Theory292
            Grammar292
            Parsing295
            Technical Requirements296
    The SharpDevelop Parser297
        Design Decisions297
        Implementation298
            The Big Picture298
            Reflection Parsing for Assemblies299
            Persistent Parsing for the Framework Class Library304
            The C# Parser for the Editor309
            The Abstract Parser316
            Putting It All Together in the Parser Service318
    Summary326
Chapter 13: Code Completion and Method Insight  329
    Resolving Matters329
    Code Completion340
    Method Insight357
    Summary366
Chapter 14: Navigating Code with the Class Scout and the Assembly Scout  369
    The Class Scout369
        Implementing the Class Scout370
    The Assembly Scout383
        Browsing References with an Assembly Scout383
        Writing the Assembly Scout385
    Summary411
Chapter 15: The Designer Infrastructure  413
    Forms Designer Overview413
        Implementation Considerations414
        Design Overview415
    The .NET Component Model416
        The Service Interfaces418
        .NET Designers419
        The Root Designer420
    Designer Host Implementation421
        Designer Host Services431
            The ComponentChangeService431
            The Name Creation Service432
        The Design Panel433
    Summary434
Chapter 16: Implementing a Windows Forms Designer  437
    Designer Services437
        Toolbox Service438
        Menu Command Service442
            Executing the Standard Commands446
            Implementing a Key Event Handler447
        Selection Service450
        Additional Important Services454
            Designer Option Service455
            Dictionary Service457
            UI Service457
            Type Descriptor Filter Service460
            Unimplemented Services462
    Summary462
Chapter 17: Code Generation  465
    Making Components Persistent465
        The XML Forms Persistence Format466
        Generating the XML467
        Loading the XML470
        The Designer Serialization Service474
    Generating C#/VB.NET Code475
    Round-tripping484
    Summary496
Index  499

 

Copyright ©2001-2012 IC#Code. All rights reserved. Want to sponsor a feature / the project? Get in touch!