Use Structure Designer for File Extensions other than CLW and INC

I work on code that uses .RDEF file Extension to hold Reports. I cannot find a way to use Structure Designer for that. Ctrl+D does not work, and the Edit menu does not have the Structure Designer choice.

Below you see a WINDOW in an .RDEF file and the Edit menu missing Designer. It’s the same for the REPORT.

If I paste that code into a file named Test.CLW then it works

The RDEF file extension is configured as a Clarion file for Editor Syntax Highlighting.

Any idea how to make Designer open on any File Extension?

Will likely rename the files as .RDef.Inc because the copy/paste into a temp file is risky.

Just a thought…

KSS found 52 entries for CLW under %cwroot%\bin

I wonder if it would help to hack the files to add your extension

Maybe start with this one —v

%cwroot%\BIN\ADDINS\BACKENDBINDINGS\CLARIONBINDING\CLARIONWIN\CLARIONBINDING.ADDIN

1 Like

Winner winner, chicken dinner

1 Like

Close… The LanguageBinding showed Designer on the Edit menu, but it did not open it up the Report.

Adding the extension to the obviously named ``id=“ClaWinStructureDesigner”``` made Designer actually open. Note the use of Regex for these.

As MG suggested searching that file turned up that and I noticed it specified templates TPL TPW so I tested those and they worked with Designer so seemed like the place. I probably do not need the first change for this since the TPL/TPW files are not there, but I want it handled like a CLW.

I also searched .CLW and added special extensions few other places.


I’ll past the XML incase it gets searched, and for copy/paste:

 <!-- Language description -->
 <Path name = "/SharpDevelop/Workbench/LanguageBindings">
   <LanguageBinding id                   = "Clarion"
                    guid                 = "{12B76EC0-1D7B-4FA7-A7D0-C524288B48A1}"
                    supportedextensions  = ".clw;.inc;.int;.trn;.equ;.rdef;.edef;.gdef;.qdef;.def"
                    projectfileextension = ".cwproj"
                    class                = "CWBinding.CWLanguageBinding" />
 <Path name = "/SharpDevelop/Workbench/DisplayBindings">
    <DisplayBinding id              = "ClaWinStructureDesigner"
                    type            = "Secondary"
                    fileNamePattern = "\.clw$|\.inc$|\.int$|\.trn$|\.equ$|\.tpl$|\.tpw$|\.rdef$|\.edef$|\.gdef$|\.qdef$|\.def$"
                    class           = "CWBinding.Designer.WinStructureDesignerDisplayBinding" />
 </Path>
2 Likes