How to set the default run configuration for a project in Rider - rider

I have a C# solution, with multiple projects, being managed in Rider.
For one project ("Proj1") I have multiple run configurations ("Proj1 A", and "Proj1 B").
By default the project explorer UI offers one of the configurations preferentially:
"Build Selected Projects"
"Run 'Proj1 A'"
"Debug 'Proj1 A'"
but I want to run 'Proj1 B' more often that 'Proj1 A'.
How can I can set which one is offered by default?
(It doesn't seem to be done alphabetically, it mostly seems to be "order of creation"!?

Find \.idea\**\workspace.xml.
In that XML file find elements: <project> -> <component name="RunManager"> -> <list>.
Inside the <list> element, find <item> elements looking like this:
<item itemvalue=".NET Project.Proj1 A" />
<item itemvalue=".NET Project.Proj1 B" />
Reverse them - Rider appears to use whichever one is listed first as the default run config to offer.

Related

JSF2 custom component, parameter autocompletion with a local file path

My First Question, after years, thank you all and stackoverflow ;-)
I code a new Component for JSF2 and use it to include other templates.
It works perfectly for me.
<cc:interface>
<cc:attribute name="src" type="java.lang.String" required="true"/>
<cc:attribute name="addOption" type="java.util.List"/>
</cc:interface>
<cc:implementation>
<cc:insertChildren />
<ui:include src="#{BeanAnything.convert(cc.attrs.src, cc.attrs.addOption)}" />
</cc:implementation>
But i cant complete the Parameter src via auto completion in intellij or netbeans with "strg + space" or whatever other will use.
It should be used like the ui:include on src parameter.
Any Ideas ?
That's what I want to achieve only with my own componente gg:include
See Example

Cannot create work item control of type "MultiValueControl"

I have tried to install the latest version of the MultiValueContol for TFS 2015 update 3. I have it working when you are in Visual Studio. You can see the checkbox and it works. If I define the type as MultiValueControl (see test1 below) it works in VS but in the web I get an error message: Cannot create work item control of type "MultiValueControl"
I found an article that said define it as type=FieldControl and PreferedType=MultiValueControl.. (see test2 below) This works on VS ok, but on web access it shows me the 2 entries I selected when I created the WIT in VS, but when you select it acts as a fieldcontrol and only allows me to choose one item in the list. Based on the earlier warning in the Web access page, the browser page can't load that control.?
I have tried the following xml configs.
Test1:
<FIELD name="Technology Domain" refname="WPS.TechnologyDomain" type="String" reportable="dimension">
<SUGGESTEDVALUES expanditems="true">
<LISTITEM value="[Item 1]" />
<LISTITEM value="[item 2]" />
</SUGGESTEDVALUES>
</FIELD>
and
Test2:
<FIELD name="Technology Domain" refname="WPS.TechnologyDomain" type="String" reportable="dimension">
<SUGGESTEDVALUES expanditems="true">
<LISTITEM value="[Item 1]" />
<LISTITEM value="[item 2]" />
</SUGGESTEDVALUES>
</FIELD>
I'm not sure what to check next.
Seems you are using the extension Custom Controls for TFS Work Item Tracking. According to the responses from author :
#PatDelaney, The latest version of the control refactored to support
the new TFS "15". For TFS 2015 you should use the older version
http://witcustomcontrols.codeplex.com/releases/view/620316. Let us
know if this helps
Reply by kabalas (Coordinator) at 5:11 AM
Please have a try with the old version as suggested.

how to add working sets to eclipse common navigator?

I would love to add support for Working Sets for my Eclipse plugin that used the Common Navigator framework.
In Eclipse bugzilla there is mention that this is supported
None of the online manuals for the Common Navigator explain how to do it
I do not know where to start even since there is no extension point for it, and the Working Set implementation classes are all "internal". I have a very basic navigator setup showing default project resources and some additional IFileSystem stuff implementing ITreeContentProvider.
You can get the working set manager using:
IWorkingSetManager manager = PlatformUI.getWorkbench().getWorkingSetManager();
and from that get the visible working sets with:
IWorkingSet [] workingSets = manager.getWorkingSets();
the members of a working set can be accessed with:
IAdaptable [] elements = workingSet.getElements();
so you could use the working sets list as the input for the tree viewer and adjust your tree content provider to deal with this.
In retrospect the following is a better solution. Instead of implementing ITreeContentProvider and traversing the working sets ourselves, we can reuse existing standard providers for the same content, which might work better.
You can use them like so:
<extension
point="org.eclipse.ui.navigator.viewer">
<viewerContentBinding
viewerId="rascal.navigator">
<includes>
<contentExtension pattern="org.eclipse.ui.navigator.resourceContent" />
<contentExtension pattern="org.eclipse.ui.navigator.resources.filters.*"/>
<contentExtension pattern="org.eclipse.ui.navigator.resources.linkHelper"/>
<contentExtension pattern="org.eclipse.ui.navigator.resources.workingSets"/>
</includes>
</viewerContentBinding>
In particular the org.eclipse.ui.navigator.resources.workingSets is what adds working sets capabilities to your navigator.
Adding your own content then becomes an issue of adding another content provider which ignores workingsets and projects and other kinds of resources which are already taken care of, e.g. like so:
<extension
point="org.eclipse.ui.navigator.navigatorContent">
<navigatorContent
activeByDefault="true"
contentProvider="org.rascalmpl.eclipse.navigator.NavigatorContentProvider"
id="org.rascalmpl.navigator.searchPathContent"
labelProvider="org.rascalmpl.eclipse.navigator.NavigatorContentLabelProvider"
name="Rascal search path"
priority="normal">
<triggerPoints>
<or>
<instanceof value="org.eclipse.core.resources.IResource"/>
</or>
</triggerPoints>
<possibleChildren>
<or>
<instanceof value="java.lang.Object"/>
</or>
</possibleChildren>
<actionProvider
class="org.rascalmpl.eclipse.navigator.NavigatorActionProvider"
id="org.rascalmpl.navigator.actions">
</actionProvider>
<commonSorter
class="org.rascalmpl.eclipse.navigator.Sorter">
</commonSorter>
</navigatorContent>
<commonWizard
type="new"
wizardId="rascal_eclipse.wizards.NewRascalFile">
<enablement></enablement>
</commonWizard>
<commonWizard
type="new"
wizardId="rascal_eclipse.projectwizard">
<enablement></enablement>
</commonWizard>
</extension>
and in the NavigatorContentProvider class we implement getElements and getChildren but only for our own additional content.

Get the key value for a given attribute in MSBuild using XmlRead

I have a file containing (among other stuff) an xml structure like this:
<exchanges>
<name deliverycode="11">BIT</name>
<name deliverycode="92">BOTC</name>
<name deliverycode="24">BTEC</name>
<name deliverycode="24">BTEX</name>
<name deliverycode="60">NPCH</name>
<name deliverycode="00">TSE</name>
<name deliverycode="00">TSP</name>
<name deliverycode="91">UCA</name>
</exchanges>
For a given acronym I want the deliverycode number, e.g. "BIT" should return "11", "BOTC" -> "92" etc. I use MSBuild v4.0 and have without success tried the XmlRead task to accomplish this.
You can use one of the online XPath generators and XPath evaluators to quickly get the right XPath.
I used this one to test the following XPath:
string(/exchanges//name[text()="BOTC"]/#deliverycode)
it produces correct output of 92
Than you can use XMLRead tasks from MSBuild Community Tasks project to retrieve the value (it looks like you refer to it in your post, so I mention it for the sake of ensuring we are on the same page here).
Note: I don't have a set-up to test the XPath in msbuild environment right now (I tested only with web evaluator I referred to), so minor tweaks may be needed to get it producing the value in msbuild env.

CruiseControl.net dynamicValue for sourcecontrol branch

maybe i'm just not seeing it, but i'd like a way to "inject" the value for branch (externally somehow) for a set of predefined build projects.
we have builds configured for Project1, Project2 and Project3. But at any time, the projects may take from a different branch, based on merge schedules. i'd like to store the Project=>branch mapping in either an external file or database, then dynamically inject it into the config file when we do a ForceBuild.
The following block is used in all 3 project config files, which are referenced at the bottom (end) of the cnet.config file.
<cb:define name="cvs-block">
<sourcecontrol type="cvs">
<cvsroot>:sspi;username=johnDoe;password=passTheSalt;hostname=127.0.0.1;port=1776:/$(repository)</cvsroot>
<module>"$(module)"</module>
<executable>c:\Program Files (x86)\cvsnt\cvs.exe</executable>
<workingDirectory>D:\CruiseBuild\$(workingDir)</workingDirectory>
<branch>[SOME EXTERNALLY DYNAMIC VALUE]</branch>
<autoGetSource>true</autoGetSource>
<timeout units="minutes">20</timeout>
</sourcecontrol>
</cb:define>
<cb:include href="D:\CruiseBuild\ACME-project1.xml" xmlns:cb="urn:ccnet.config.builder" />
<cb:include href="D:\CruiseBuild\ACME-project2.xml" xmlns:cb="urn:ccnet.config.builder" />
<cb:include href="D:\CruiseBuild\ACME-project3.xml" xmlns:cb="urn:ccnet.config.builder" />
Just generate a file (injectpath.config) with a defined value:
<cb:define branchpath="yourpath"/>
...and then include it into your config file shown above at the top.
Change your [SOME DYNAMIC VALUE] to $(branchpath).