SourceFormatX

製品概要

機能一覧

なぜ使用

使用例

IDE への統合

スクリーンショット

よくあるご質問

機能履歴

受賞賞一覧

ユーザーコメント

ライセンス

CodeToHtml

VB.NET言語のソースコード整形例



SourceFormatXソースコード整形ツールの重要な特徴

SourceFormatX は優れた構文解析エンジンを元に作られています。ですのであらゆるスタイルで書かれたソースコードを美しく整形することができます。以下の例のようなめちゃくちゃなコードでさえも、整形することが可能です。

C/C++ Java C# Delphi (Pascal)
PHP JSP ASP HTML Components
Visual Basic VB.NET VBScript JavaScript
80x86 ASM 8051 ASM CORBA IDL

これは極端な例ですが。SourceFormatXに搭載されている強力な VB.NET 言語 のパーサーエンジンの実力を感じて頂けるかと思います。

  '----- VB.NET言語のソースコード整形 -----

  Imports System.ComponentModel
  Imports System.Drawing
  Imports System.Windows.Forms
  Imports System.IO
  Public Class FCommand
  Inherits System.Windows.Forms.Form
  #Region "Encapsulation"
  Private m_Actions As NActions
  Private m_AcsRecent As NActions
  Private m_Status As StatusBar
  #End Region
  #Region "Events, Handlers and Overrides"
  ' Generics
  Private Function HandleAction(ByVal action As CAction) As Boolean
  'MsgBox(action.Caption)
  m_Status.Text = Nothing
  Return True
  End Function
  Private Sub HandleHint(ByVal action As CAction)
  m_Status.Text = action.Hint
  End Sub
  Protected Overrides Sub OnMenuComplete(ByVal e As System.EventArgs)
  m_Status.Text = Nothing
  End Sub
  ' Special
  Private Function HandleExit(ByVal action As CAction) As Boolean
  Application.Exit
  End Function
  Private Function HandleUndo(ByVal action As CAction) As Boolean
  With action
  .Hint = "Can't undo right now"
  .Enabled = False
  End With
  End Function
  Private Function HandleCutCopy(ByVal action As CAction) As Boolean
  With m_Actions("Paste")
  .Enabled = True
  End With
  End Function
  #End Region
  End Class
  

  '----- VB.NET言語のソースコード整形 -----

  Imports System.ComponentModel
  Imports System.Drawing
  Imports System.Windows.Forms
  Imports System.IO
  
  Public Class FCommand
      Inherits System.Windows.Forms.Form
  
      #Region "Encapsulation"
          Private m_Actions As NActions
          Private m_AcsRecent As NActions
          Private m_Status As StatusBar
      #End Region
  
      #Region "Events, Handlers and Overrides"
          ' Generics
  
          Private Function HandleAction(ByVal action As CAction) As Boolean
              'MsgBox(action.Caption)
              m_Status.Text = Nothing
              Return True
          End Function
  
          '--------------------------------------------------------------------------
  
          Private Sub HandleHint(ByVal action As CAction)
              m_Status.Text = action.Hint
          End Sub
  
          '--------------------------------------------------------------------------
  
          Protected Overrides Sub OnMenuComplete(ByVal e As System.EventArgs)
              m_Status.Text = Nothing
          End Sub
  
          ' Special
          Private Function HandleExit(ByVal action As CAction) As Boolean
              Application.Exit
          End Function
  
          '--------------------------------------------------------------------------
  
          Private Function HandleUndo(ByVal action As CAction) As Boolean
  
              With action
                  .Hint = "Can't undo right now"
                  .Enabled = False
              End With
  
          End Function
  
          '--------------------------------------------------------------------------
  
          Private Function HandleCutCopy(ByVal action As CAction) As Boolean
  
              With m_Actions("Paste")
                  .Enabled = True
              End With
  
          End Function
  
      #End Region
  
  End Class
  

  再び手動でVB.NET言語のソースコードを整形するために時を浪費しないで下さい! SourceFormatX体験版の無料ダウンロード!