Adding button in toolbar for intellij plugin - intellij-plugin

I am writing a Plugin for intelliJ IDEA and I have been trying to add a button in the main toolbar, besides the run button:
I have been looking for guides to help me do it, but I haven't found any. It has to be possible, this is just my first plugin and I lack the necessary experience. Any help is greatly appreciated.

It's simple. You have to create an action (descendant of AnAction) and put it in Actions tag within your plugin.xml:
<actions>
<action id="your.action.id" class="your.Action"
text="Some label" description="Action description" icon="AllIcons.General.AddJdk">
<add-to-group group-id="ToolbarRunGroup" anchor="first" />
</action>
</actions>
The "add-to-group" tag will tell IDEA to put it together with other execution related buttons.

Related

How to use TableView in Xamarin.Forms?

I am relatively new to the world of Xamarin.Forms and have a question with regard to Xamarin TableView.
I want to create a layout similar to the one shown below.
Question is, can I use TableView for this or is there an another option for this? Can anyone show this with XAML code please?
Thanks in advance.
Edit: Tabs in the bottom are not required.
I don't mean to be rude, but this is very easy to retrieve from the documentation pages and a bit of trying yourself.
To get you started, try this:
<TableView Intent="Settings">
<TableView.Root>
<TableView.Section>
<ImageCell Text="Invoice Customization" Source="Invoice_image.png" />
<ImageCell Text="Invoice Defaults" Source="Invoice_image.png" />
</TableView.Section>
<TableView.Section Title="Security">
<SwitchCell Text="Use Touch ID" />
</TableView.Section>
... etc.
</TableView.Root>
</TableView>
The arrows at the end of the cells and the footer text underneath the Security section are not possible with Xamarin.Forms out of the box, this will probably require you to write a custom renderer.

grouping toolwindows in menu

I am creating several tool windows and i would like to group them all under the same designated menu or at least a submenu of view
I am able to make the tool windows using this sort of syntax in the plugin xml:
<extensions defaultExtensionNs="com.intellij">
<toolWindow id="My Sample Tool Window" secondary="true" icon="/myToolWindow/plus.png" anchor="right" factoryClass="myToolWindow.MyToolWindowFactory"/>
</extensions>
and I am able to make menus and menu items like this:
<actions>
<group id="SampleMenu" text="Sample Menu" description="Sample menu">
<action id="Textboxes" class="TextBoxes" text="Text _Boxes" description="A test menu item" />
<add-to-group group-id="MainMenu" relative-to-action="HelpMenu" anchor="before" />
</group>
</actions>
but I can't seem to figure out how to combine the two or find the relevant parts in the documentation
You can't control how toolwindows are presented under View | Tool Windows. You can define your own actions to show your toolwindows, and add those actions in any
other place of the menu, as a group or in any way that you prefer.
To activate a toolwindow programmatically, use:
ToolWindowManager.getInstance(project).getToolWindow(YOUR_ID).activate(null);

Right click doesn't work in plugin.xml

I am following this tutorial http://www.vogella.com/tutorials/EclipsePlugin/article.html#exercise-adding-e4view-based-parts-to-3-x-based-applications . When I'm trying to right click in extension tab to add a new e4View as shown in a tutorial, nothing happens, the popup menu doesn't appear. Is it possible to create this view in different way?
You can always edit the plugin.xml directly by clicking on the 'plugin.xml' tab.
A basic e4view would look something like:
<extension
point="org.eclipse.ui.views">
<e4view
class="testview.E4view1"
id="TestView.e4view1"
name="name"
restorable="true">
</e4view>
</extension>

How to create Eclipse like Welcome page

I want to create my own Welcome page like eclipse.I have search for but it shows for RCP Application but i want to create it inside Eclipse IDE So that when i click on menu, it should open Intro(help) page.
eclipse.ui.intro extension point
All you need to do is to extend org.eclipse.ui.intro.configExtension and provide your implementation.
<extension point="org.eclipse.ui.intro.configExtension">
<configExtension configId="org.eclipse.ui.intro.universalConfig"
content="intro/eclipse-tips.xml" />
</extension>
You have the whole tutorial here
http://eclipse.dzone.com/articles/short-tutorial-introwelcome

could anybody give me an example on how to insert hyperlink in a customized dialog

I tried the following code, but it is not work. could anybody give me some example? thanks.
<Control Id="URL2" Type="Hyperlink" X="20" Y="105" Width="320" Height="18">
<Text><![CDATA[Joy of Setup]]></Text>
</Control>
The Hyperlink control type was added in Windows Installer 5.0. Hence, for the previous versions it will fail. See this article for more details.
I don't think you can do this. But a possible workaround is to have a button in your custom dialog call a custom action that could launch the URL in a browser. You could set the text of the button as the URL and then pass that to the custom action as a parameter so the custom action would be reusable. It is not exactly what you are looking - it is more of a workaround.