Are there Monodevelop add-ins that assist with refactoring? - add-in

What refactoring tools similar to Visual Studio / DevExpress / Resharper are available for the Linux environment? Specifically I'm interested in the global renaming and method generation.

MonoDevelop 2.2 supports several refactoring operations out of the box:
Rename Refactoring with Preview
Resolve Namespace
Extract Method Declare Local Variable
Integrate Temporary Variable
Introduce Constant Move Type to Own
File Remove Unused Usings Sort Usings
Create/Remove Backing Store Inline
Rename Generation of interface and virtual method overrides Generation
of constructors

It doesn't seem to be any, but you can quickly compose your own:
http://monodevelop.com/Developers/Articles/Refactoring

Related

Is there a way to view a list of all the classes / functions / globals I have defined in my current dart project when using VS Code?

Visual studio has the object browser where you can view the structure of a project, it lists the namespaces, classes, etc that are defined. Is there something like this in VS Code for Dart (dart-code)?
There's a command in VS Code called "Go to symbol in workspace" bound to Cmd+T (probably Ctrl+T for Win/Linux?) that should do what you want. It may include a little more than you want though (it includes referenced packages).

How to enable StackTrace in DUnitX ?

I have Delphi Seattle in place and I'm using DUnitX as my test framework.
I noticed that it may have support for stacktrace. But I found no example or documentation about it.
I found an inc file (DUnitX.Stacktrace.inc) where I can configure what I want to use as stacktrace provider. But, as I will not recompile it, because it comes along with Delphi.
How the best approach to enable it now ? When I have an error on tests setup etc. Will I get by default the stacktrace as well ?
Copy the inc file into project folder, apply your changes and include it explicitly:
{$I DUnitX.Stacktrace.inc}
Actually you don't have to reference it directly (Delphi will search in project folder first anyway). Look at DUnitXTest.dproj for example (comes with Delphi in DUnitX\Tests folder).
But i believe it is better to keep things obvious.

Can the Option Set file for Delphi 10 be set programmatically using the OTAPI?

Is it possible to automate setting the Option Set file reference programmatically when creating a new Delphi project using the IOTAProjectOptions respectively IOTAProjectOptionsConfigurations interface1?
Or can I do that using any of the other OTAPI IDE services2?
I'm currently using the RAD Studio Delphi 10 Seattle IDE. Though, if newer OTAPI versions would support that feature, I'd still like to know about that.
I couldn't find any appropriate property or function, that seems to do that action in my current ToolsAPI.pas.
I want to achieve the same as choosing Apply Option Set -> Reference at the root project configurations root node in the IDE's project manager view:
Hypothetically I'm looking for some functionality like
procedure IOTAProjectOptionsConfigurations.BaseConfiguration.ApplyOptionSetReference
(const optSetFilePath : string);
A bit more background:
I'm currently developing legacy project wizards for our company wide Delphi project settings. I already have a working IOTAProjectCreator implementation that also manipulates the .dproj MSBuild XML file after it was generated and saved by the IDE. I'm just adding some conditional Import elements there.
Now we also want to use a Options Set file that is stored at a central repository. I know and studied the differences done in the .dproj XML, after that action was applied using the GUI, but there's a non negligible amount of logic going on (regarding dependencies and such), and I'm refraining to (re-)implement that logic via plain XML file manipulations. Not to mention that the necessary logic is prone to be changed with future versions of the IDE.
1)I'm trying to use that in the context of a IOTAProjectCreator implementation, with the definition of the procedure SetInitialProjectOptions(NewProject : IOTAProject); function.
2)It's a shame that these features are documented so poorly.

F# IDE scripting support for accessing internal types in referenced assemblies

Usually for non-scripting C#/F# project, one can specify a InternalsVisibleTo attribute in the dependency assembly and be able to get intellisense for its internal types in the IDE. But in F# scripting, how would I configure the dependency assembly with respect to the IDE I'm using in order to get intellisense for internal types? Of course in order for the script to run by fsi I assume I'd need something like
[assembly:InternalsVisibleTo("fsi")]
But in order to get the IDE support should I also specify every known IDE in the dependency assembly? That doesn't seem to scale very well.
I did a code search and found this where fsc, fsi, compiler service assembly, and their strong name versions, etc. are all specified, seemingly to accommodate IDEs. This is exactly what concerns me and I don't want to litter my assemblies with these. Is there a better way?

Seq.generate_using is MIA

I'm trying to use the Seq.generate_using function but unfortunately, I don't seem to be able to find it. I thought it would be living here:
Microsoft.FSharp.Collections.Seq.generate_using
But it doesn't. I am getting the error listed below.
C:\Users\Owner\Documents\Visual Studio
2008\Projects\fsharp1\Program.fs(54,63):
error FS0039: The value, constructor,
namespace or type 'generate_using' is
not defined. A construct with this
name was found in
FSharp.PowerPack.dll, which contains
some modules and types that were
implicitly referenced in some previous
versions of F#. You may need to add an
explicit reference to this DLL in
order to compile this code.
According to the Sept 2008 CTP Release Notes:
The F# library is split into two
components. FSharp.Core.dll: Contains
the core F# libraries, which will be
stabilized and versioned infrequently.
FSharp.PowerPack.dll: Contains
additional useful F# libraries and
tools which will version more
frequently, and allow continued
innovation on top of the core F#
language and libraries.
Some methods in the Seq module were moved into the FSharp.PowerPack assembly, so you can only get those methods by doing the following:
If you're using Visual Studio, open your Solution Explorer, right-click on the project file, choose "Add Reference", and add "FSharp.PowerPack.dll".
If you're using a script file or fsi, then type #r "FSharp.PowerPack";; to load the assembly.
Now you should be able to call Seq.generate_using.
The #r "FSharp.PowerPack";; works for me but the addition of PowerPack to my solution does not. I am trying to use HashSet<>.

Resources