This seems like a stupid issue, but I can't seem to find an option to generate interface code with in the newest SharpDevelop build. When I search the site I get a lot of mentions of Alt+Ins and the Tools menu but those options do not appear to be available in the newest build. I can right click and extract interfaces but there doesn't seem to be any option to stub them in. What am I missing?
In SharpDevelop 4.1 put the mouse cursor on the class name or on the interface name. You will then see an icon appear on the left hand side of the text editor.
Then press Ctrl+T to display a pop-up menu.
This will give you a list of interfaces you can implement. Select the appropriate interface using the up and down arrows and press the Enter key. Then code will be generated for that interface.
Whenever you see this icon you can generate code. For more information on this feature take a look at the New productivity features blog post by Martin Konicek.
Related
I'm looking for a solution.
When I type some CSS inside VSC, the editor show me a list of possible choice. Then I select the desire one and the editor show me again a list of possible properties, but between all this properties their are some old one that are still use in web development if we want to make a website compatible with older browser.
I figure that some suggestion in VSC are display with strikethrought, so I'm looking to a solution to apply this to my personal snippets.
I am now working out a plugin which shows events information of static code analysis defect. My ideal user interface to present looks like "Find all reference", (please refer below picture). It supposed shows the list of event in right panel, and while click on one of event, it will move focus of source code panel on left.
click on "find all reference" in context menu will display like this.
But the problem now is that I can't find which existing vscode API I can use or find any useful information by google or from VSCode extension development document.
Could any one help?
The best place to learn about available APIs is the vscode namespace API page. There is a ReferenceProvider class which might be what you are looking for.
Recently I've been finding myself doing repetitive tasks. I would click button A, highlight text field A, type in some text, click an APPLY button, click on a drop-down box and select a specific option depending on the item I'm working with, select it and hit APPLY, then repeat this process only a couple hundred to thousand times.
So I thought maybe there's a way I could automate this? Macros then came to mind. However I've never wrote macros before so am not sure of several details such as
-what tools should I even work with?
-how do I determine which button to click?
-ideally, I would want to be able to read input from a text file to specify what should be typed in and which option should be selected from the dropdown list. Is this even possible? It seems like an operation that require some intelligence.
I am not picky on tools nor about cleanliness. I just want to be able to automate the process. It will be for personal use unless I find a convenient way such that others can use it as well.
Some details about the dropdown box: when the box is focused, I can hit the DOWN key to scroll from option to option. The items that I have to associate with these options are named exactly the same, so they appear in the same "index" order (meaning, the first item and first option appear at the top of the list, second item and second option appear after, thid item and third option...etc)
The placement of all of these fields can be fixed, so if I have to manually specify where on the screen I should be clicking, that is also a possibility.
Any idea where I should look?
If you're using Windows, AutoIt is a really nice tool.
It records actions (like a word/excel macro)
It offers a BASIC like language + API which is really easy to program (if you need to)
The API is pretty powerful
Check for Windows with a certain title
Automate klicks
...
You can "compile" your scripts into exe files so you can share your tools
It comes bundled with Scite (a nice text editor) + AutoIt syntax higlighting
But you can use any editor you want
It's well documented
It's Freeware
http://www.autoitscript.com/site/
On the Mac, there is Automator. Java has the Robot class in the basic library, to help with such automation. No doubt there are other similar tools.
This is my first attempt at an Eclipse plugin- the plugin architecture is vast and a little overwhelming, but I've found a number of tutorials and how-to's online which is helping, but trying to do the following is driving me nuts:
I want to add a submenu item that is available in the navigator context menu when you right click on an Eclipse project.
I can get a submenu to appear on a project file or folder, but absolutely no idea how to have it appear on a project.
Would someone be so kind as to provide me with step by step instructions, starting with creating a new plugin-project? This is probably a lot to ask, but I can't seem to find an online guide that has just the right amount of detail. I specifically want to use the plugin-project wizard rather than hand code a plugin.xml file as I am not very familiar with the Eclipse plugin architecture.
Ok- I got it- it was simple, but I got lost in the noise of the API-
Create a new Plug-in Project using the Plugin-Project Wizard and when the wizard has launched...
1.
On the Plug-in Project page, use anything as the project name and 3.5 as target platform eclipse version
2.
On the Content page, skip ahead and just press next
3.
On the Templates page, select "plug-in with a popup menu" and press next
4.
On the Sample Popup Menu page, you will see that eclipse has prefilled the field
"Target Object's Class" with a value of "org.eclipse.core.resources.IFile".
This means that when your popup menu will only appear when you right-click on a file in
a project. As we want the menu to appear when we right click on a Project when
we are using the Navigator view, simply use "org.eclipse.core.resources.IProject" instead
5.
Finish
You can validate that your pop-up will appear as expected by right-clicking the MF file
and "Run-as" > Eclipse Application
Now to refactor the resulting code to use menuContributions and commands rather than objectContributions and actions :)
I think you have a similar question (menu in the package explorer) here:
Renaming packages in Eclipse (thanks to Rich Seller)
This could be a good start, and is a complete plugin project.
You should look into the Eclipse Common Navigator Framework there are a few tutorials on this side that tell you what to do in detail The Project Explorer is an implementation of the CNF. You should also consider using the Platform Commands to add your commands (and popup menu item) to the popup menu associated with the project explorer. It's somewhat easier to use commands than actions. You should be able to do it with by adding a Command in your plugin extensions. Unfortunately off the top of my head I don't know the right incantation to have the command appear in the project explorer. But you will be able to find it in these resources.
I have been using Eclipse for a long time, the feature that is less known but very useful is the Scrapbook Page, that allows you to execute sections of the Java code without having them to be complete classes. For example, if I need to execute this simple for-loop I can do this by creating a scrap page (File->New->Other->Scrapbook Page) and then typing the following and they pressing the "Execute the Selected Text" or Ctrl-U will execute the code directly
for (int i=0; i < 10; ++i)
{
System.out.println("Here is the scrapbook page line: " + i);
}
Please post other less known but useful features that are available with eclipse. I know that there are entries in SO that mention the useful shortcuts available in eclipse, however this one is about forgotten or less known features
The plugin Spy (Alt+Shift+F1) is certainly one not very advertised.
Yet if you have any question about "how I develop a feature X looking like the one in eclipse", it can be very useful to quickly locate the right eclipse java source which does implement that feature!
(source: willianmitsuda.com)
See also this Guide to eclipse3.5:
The Plugin Spy gives you easily information about the running UI.
Press Alt+Shift+F1 to get information about the current running Eclipse plugin / data types / screen.
This way you can get immediately access to the plugin which is currently running.
(source: vogella.de)
Eclipse 3.5 introduced the possibility to check which plugin contributed a menu. Press "Alt+Shift+F2" and select a menu to see who is contributing this menu
(source: vogella.de)
I like the fact, that you don't necessarily need to create a new class by using New->Class, when having the class source somewhere in the clipboard. You can simply select the destination package and paste the clipboard content.