/Community

A Support Community for SubMain Products
in Search
Welcome to SubMain Community Sign in | Join | Help

Extract method not working

Last post 06-22-2006, 2:00 AM by Serge B.. 4 replies.
Sort Posts: Previous Next
  •  06-20-2006, 6:13 AM 118

    Extract method not working

    The Extract Method option is dimmed on the context menu when trying to extract a method from the following code:

    Private Sub tbFuturesSeries_ButtonClick(ByVal sender As Object, ByVal e As System.Windows.Forms.ToolBarButtonClickEventArgs) Handles tbFuturesSeries.ButtonClick
    If e.Button Is tbbSaveChanges Then
    pSec.Focus() ' get focus off futures series datagrid so changes will be committed
    SaveFuturesSeries()
    ElseIf e.Button Is tbbDiscardChanges Then
    DiscardFuturesSeries()
    ElseIf e.Button Is tbbGenerateContracts Then
    ' START SELECTION HERE
    Dim cancelled As Boolean = PromptToSaveFuturesSeries()
    If Not cancelled Then
    Dim success As Boolean = PerformAction("aGenerateFuturesContracts")
    If success Then
    MsgBox("Contracts generated", MsgBoxStyle.Information, "Generate Futures Contracts")
    End If
    End If
    ' END SELECTION HERE
    End If
    End Sub

    Reproducing the problem:
    1. Select the indicated text
    2. Right-click
    3. 'Extract Method' option on CodeIt.Once menu is dimmed

    I am using VB.NET 2003. I'm using version 1.0.258 of CodeIt.Once.
  •  06-20-2006, 9:37 AM 119 in reply to 118

    Extract method not working

    Hi Phil,

    Thank you for reporting this. I passed this to the devs for troubleshooting.

    I will get back to you as soon as I hear from them.
    Thank you,
    Serge Baranovsky
    http://submain.com - .NET Developer Tools  |  Microsoft VB MVP  |  http://vbcity.com - VB Developer Community
    » » (Static Code Analysis + Automatic Refactoring) / Painless Coding Guidelines = CodeIt.Right - http://submain.com/codeit.right
    » » C#/VB .NET Coding Guidelines - FREE 100+ page ebook (PDF) http://submain.com/guidelines
  •  06-21-2006, 2:54 AM 120 in reply to 119

    Extract method not working

    Hi Phil,

    The feedback I got from the devs and that most likely you we trying Extract Method in a module that is not compilable - i.e. there is a syntactical error above the tbFuturesSeries_ButtonClick event procedure.

    Can you please right-click over the "Private Sub tbFuturesSeries_ButtonClick" declaration line and see if "Rename" is enabled in CodeIt.Once menu.
    Thank you,
    Serge Baranovsky
    http://submain.com - .NET Developer Tools  |  Microsoft VB MVP  |  http://vbcity.com - VB Developer Community
    » » (Static Code Analysis + Automatic Refactoring) / Painless Coding Guidelines = CodeIt.Right - http://submain.com/codeit.right
    » » C#/VB .NET Coding Guidelines - FREE 100+ page ebook (PDF) http://submain.com/guidelines
  •  06-21-2006, 11:04 AM 121 in reply to 120

    Extract method not working

    Hi Serge

    The code is compilable - I have just done a Rebuild All to confirm this.

    However when I right-click over the "Private Sub tbFuturesSeries_ButtonClick" declaration line, "Rename" is not enabled in the CodeIt.Once menu either.

    Phil
  •  06-22-2006, 2:00 AM 122 in reply to 121

    Extract method not working

    Hi Phil,

    I followed up from our bug tracking system. You will receive email "Re:(Case SM.5630) Extract method not working" - please send us the two log files to help us troubleshooting the issue.
    Thank you,
    Serge Baranovsky
    http://submain.com - .NET Developer Tools  |  Microsoft VB MVP  |  http://vbcity.com - VB Developer Community
    » » (Static Code Analysis + Automatic Refactoring) / Painless Coding Guidelines = CodeIt.Right - http://submain.com/codeit.right
    » » C#/VB .NET Coding Guidelines - FREE 100+ page ebook (PDF) http://submain.com/guidelines
View as RSS news feed in XML