In eclipse the Add New Class wizard lets you specify all sorts of options, such as what modifiers the class has, what interfaces it implements, what its parent class(es) is, what package it resides in, etc.
Comparatively the default add new item wizard in visual studio while offering a large selection of templates does not offer such options.
Is there any way to get eclipse like functionality in Visual Studio through some setting or extension?
Visual Studio should have those capabilities right off the start, I would suggest going through the different menu such as Views, projects etc. take a look at this
http://msdn.microsoft.com/en-us/vstudio/cc136611.aspx if your new that is
Visual Studio has a different way of handling things. You add the class and then use the refactor menu to add any interfaces, etc. Right click on the class name -> refactor, or you can use the refactor menu.
Related
In tutorials and in the programming book I am following, it all shows something like this to be on the homepage of vscode:
I want this too, so I can press the "Create a new project" button. However, my homepage of vscode looks like this, also after re-installing:
How can I create a new project?
The tutorials you're following are for Visual Studio. You've installed Visual Studio Code. Despite the similar names, they are completely separate products with completely different UI's and implementations, but with a little overlap in functionality. If you want the full Visual Studio (the current version of which is 2022), you probably qualify for the free Community edition, which you can download here, though of course you should double check the license to be sure.
I'd like to add extra visual elements inside the Java text editor of Eclipse, more specifically on top of classes and methods declarations. Things like indicators and links.
The best example is what Microsoft has done in Visual Studio with what they call CodeLens:
The closest solution I can think of is using Annotations (displayed in the rulers) but it's far from the user experience I want to have.
Are there any Eclipse plugins that have done this before?
Any pointers to give me somewhere to start?
Annotations are typically shown in the vertical and overview rulers (left and right), but they're not limited to them. Take a closer look at the documentation you linked to, particularly the mentions of AnnotationPainter, and then how it uses drawing strategies. I expect you'd need a rather complicated one, and I haven't even thought through how you'd generate the information in the first place, never mind adding it directly to the Annotation Model if you're not just going to stash it in a Marker on disk.
Of course, some of this looks like information you can already find through Team->Show Annotations (although that does use the ruler to let you find them by line).
Disclaimer, I'm the author of CodeLens Eclipse.
Eclipse doesn't provide Codelens feature, but it exists CodeLens Eclipse.
This project provides a CodeLens extension point to implement your own CodeLens. Today TypeScript, Java JDT CodeLens and lsp4e CodeLens are available. Here a little demo with Java JDT Editor:
Will keep the question simple, but its implications are much broader.
Goal
Create a 'My C/C++' perspective plugin.
this plugin is just the standard C/C++ plugin from CDT
plus some view sizing, extra help menus, and (1) custom plug-in
Need
Essentially just a way to share a customized C/C++ perspective
that includes a handful of my own plugins
but still harnesses all the power of CDT (editors, builders, parsers, views, etc).
Notes
This is a very helpful perspective-plugin tutorial:
Eclipse Plug-in Development – Create a Perspective
There must be a simple 'man/example/etc' out there. I've browsed all over the CDT plug-in manual to no avail:
CDT Plug-in Developer Guide
Perhaps it has to do with the org.eclipse.ui.perspectiveExtensions, but it is not clear to me how that would work.
org.eclipse.ui.perspectiveExtensions on its own just lets you add new views, menu items, tool bar items and new wizard items to an existing perspective (such as the C/C++ perspective).
If you want to create a new perspective you will have to declare it with org.eclipse.ui.perspectives and then use the perspective factory class and org.eclipse.ui.perspectiveExtensions to declare all the views, menu items and so on that you want in the perspective. This will mean finding out the ids of the C/C++ items you want to include - which probably means looking at the CDT plugin.xml files and their perspective factory source.
Update:
The C/C++ Perspective will be declared in one the CDT plugin plugin.xml files using the org.eclipse.ui.perspectives extension point. That declaration will give the name of the existing perspective factory class used. You may be able to extend this class (but if it is in an internal package this is not officially supported).
I need to navigate through the whole android api objects inside the Android Studio to find out classes that extend an individual class and also list of class and interfaces that is extended by an individual class in a hierarchy form.
In a simple word I need something like visual studio's Object Browser inside the android studio.
any solution?
Navigate menu > Type Hierarchy.
This is what comes with the IDE: into Project Tab, select Project View, and browse the External Libraries.
Updating info since the question is from '13
Sadly I couldn't find anything after about an hour of digging beyond the 2 awkward and not comparable answers above.
My solution was to create a chrome window app of the page located at:
https://developer.android.com/reference/packages.html
It's only after you leave Visual Studio that you understand why people say VS users are spoiled. I guess Balmer really meant it when he said it - DEVELOPERS DEVELOPERS DEVELOPERS DEVELOPERS =)
What are the tradeoffs of the Eclipse Snippets View vs. editor templates? Why were Snippets introduced in the first place?
Snippets appear to be a custom version of templates, with a view in the perspective and GUI dialogs to prompt for variable values in the template.
The only "new" functionality they have is to offer up their functionality through toolbar items in the editors.
Snippets view is sort of an extension proposed by WTP (Web Tool Platform) for template, more oriented to (web) code formatting, whereas templates help the user enter reoccurring patterns into a text editor.
So at the beginning, Eclipse Templates was a standard eclipse feature which could only be applied for java and javadocs.
Snippets are basically the same, but for other kind of files and were introduced by WTP to fill the same need, but for their own type of files (xml, jps, html, ...)
(and this is, right there, "why snippets were introduced in the first place")
Template does not have their own view, but rather an obscure Preference page (Preferences -> Java -> Editor -> Templates)
You could at the time however write a small eclipse extension in order to make a Template View.
This has been resolved since eclipse3.4M6 (Templates have their own view)
You can also build some custom advanced snippets view
Additionally, the Snippets view was first conceived during the development time frame between Eclipse 1.0 and 2.0, before the content assist templates were anywhere close to being as capable as they now are. That's why it was created, and it simply came into WTP as part of IBM's initial contribution to the project.