Having trouble porting PowerToys.FindText sample to R#9.0

having trouble installing the findText sample code in R#9. the version from github. https://github.com/JetBrains/ReSharperPowerToys

I fixed all the namespace issues and have is compiling with a few warnings. Mainly architecture mismatch, referenced component cant be found for cxLex etc. but it dosnt look like any of the warnings should affect the plugin.

I created a nupkg, and every time it changes I uninstall the old one, quit, install the new one, quit. then run it in the debugger. each time I run it with /rootSuffix Plugins /ReSharper.Internal

The extention manager sees it as being installed but I dont see the action in the ToolsMenu. I also dont see any references to FindText in the console. This makes me think that it might be an install problem.

*** is there anyway to get a log of the installed extensions or to see if there was a problem installing something?

Here is my Zone Marker.  for now just making it wide open to minimize errors.

namespace JetBrains.ReSharper.PowerToys.FindText

{

    //[ZoneDefinition]

    //public interface IZenSharpZoneDefinition : IZone

    //{

    //}


    [ZoneMarker]

    //public class ZoneMarker : IRequire<IZenSharpZoneDefinition>

    public class ZoneMarker

    {

    }

}

*** here is my action

namespace JetBrains.ReSharper.PowerToys.FindText

{

    [Action( "Find Text Special", Id = 66602)]

    public class FindTextAction : IExecutableAction, IInsertFirst<ToolsMenu>

    {

        public bool Update(IDataContext context, ActionPresentation presentation, DelegateUpdate nextUpdate)

        {

            // Check that we have a solution

            return context.CheckAllNotNull(ProjectModel.DataContext.DataConstants.SOLUTION);

        }


        public void Execute(IDataContext context, DelegateExecute nextExecute)

        {

            // Get solution from context in which action is executed

            ISolution solution = context.GetData(ProjectModel.DataContext.DataConstants.SOLUTION);

            if (solution == null)

                return;


            var documentManager = solution.GetComponent<DocumentManager>();

            var shellLocks = solution.GetComponent<IShellLocks>();

            var settingStore = solution.GetComponent<ISettingsStore>();

            var mainWindow = solution.GetComponent<IMainWindow>();

      

            // Ask user about search string

            FindTextSearchRequest searchRequest;

            using (var dialog = new EnterSearchStringDialog(settingStore.BindToContextTransient(ContextRange.Smart((lt, contexts) => context))))

            {

                if (dialog.ShowDialog(mainWindow) != DialogResult.OK)

                    return;


                // Create request, descriptor, perform search and show results

                searchRequest = new FindTextSearchRequest(solution, dialog.SearchString, dialog.CaseSensitive, dialog.SearchFlags);

            }


            using (shellLocks.UsingReadLock())

            {

                var descriptor = new FindTextDescriptor(searchRequest);

                descriptor.Search();

                FindResultsBrowser.ShowResults(descriptor);

            }

        }

    }

}

here is my nuspec

<?xml version="1.0"?>

<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">

  <metadata>

    <id>JetBrains.FindText</id>

    <title>FindText for ReSharper 9)</title>

    <version>1.2.0</version>

    <authors>JetBrains</authors>

    <owners>JetBrains</owners>

    <requireLicenseAcceptance>false</requireLicenseAcceptance>

    <projectUrl>https://github.com/JetBrains/resharper-angularjs</projectUrl>

    <licenseUrl>https://raw.github.com/JetBrains/resharper-angularjs/master/license.txt</licenseUrl>

    <iconUrl>https://raw.github.com/JetBrains/resharper-angularjs/master/icon.png</iconUrl>

    <description>Not sure what it does</description>

    <releaseNotes>&#8226; Support for ReSharper 9.0</releaseNotes>

    <dependencies>

      <dependency id="Wave" version="[1.0]" />

    </dependencies>

    <tags>resharper angular angularjs javascript js typescript</tags>

  </metadata>

  <files>

    <file src="bin\Debug\FindText.dll"

          target="dotFiles\" />

  </files>

</package>

Please sign in to leave a comment.