How to make Eclipse's content assist behavior similar to Visual Studio's IntelliSence - visual-studio

I'm a C# developer and recently started to use Eclipse IDE to write Android apps. The most noticeable change for me is that content assist doesn't popup automatically. Is there a way to do so? In VS it pops up almost always.
P.S. And a more general question: how to make eclipse to look more like VS?

Hey the best solution I've found, in terms of getting eclipse to pop up for everything I type, is going into windows > preferences > java > editor > content assist and adjusting the trigger characters. It's normally only set to ".". I changed mine to ".(abcdefgh..." etc. It's not quite as beautiful a solution as I'm sure you'd like, but it does an acceptable job making sure I don't have to remember what I've named things.

Go to Windows -> Preferences -> Java -> Editor -> Content Assist and check "Enable auto activation".
And what do you mean by "look like VS"? Fonts, colors, ...?

Related

Visual Studio Auto Tidy?

I have a question about how to enable automatic code tidying property in Visual Studio. I have no idea whether I have used the word correctly or not. What I'm doing is that I'm using Visual Studio in my personal laptop and also on a separate computer. In the laptop when I'm working on writing C++ code when I press "Enter" all the code automatically rearranges so that it looks more elegant and tidy. I did not enable it on purpose; I just like it and I would like to do the same thing on another computer as well. Is there anyone out there who knows how to do this stuff? Thanks.
I believe you're referring to "code formatting" support. Each language (C#, C++, VB, etc.) have their own implementation of this. To trigger it directly, you can find the command in the menus by going to Edit -> Advanced -> Format Document (or Format Selection). There are also keyboard shortcuts that do it, I use CTRL-E, D all the time, but that may be language specific so you should experiment some.
Hope that helps.
You can either Format Selection by using CTRL+K, CTRL+F and you can format the whole document by pressing CTRL+E, D.
You can also do this by going to Edit -> Advanced -> Format Document/Format Selection
For more options about formatting you can go to Tools -> Options -> Text Editor -> C++ -> Formatting

How to debug android UI styles

Please do you know about any tool which would allow me to debug Android UI in the way web debug tools work? I mean view which style is applied to each particular View, or also I would like to be able to see some inheritance tree etc..Do you guys know about something like that?
The only way I know of to look which style is applied is to look in xml. Simply search for Style and you'll be able to go through them one at a time, but something like web debug doesn't exist as far as I know.
Inheritance trees for styles are also not present and you'll have to go through them the hard way (writting on paper or something). In general android styles is a pain to learn but when you've learned to navigate it you'll be able to live with it :)
I haven't found a method to do so other than Warpzit's method. In Eclipse, there is a helpful tool to see your UI hierarchy though. When in debug mode, open the "Devices" window (if you can't find it: Alt+Shift+Q, Q). Then click the "Dump View Hierarchy for UI Automator".
You can see some view attributes there as well as the way it's build up.
There's also a hierarchy viewer in the SDK tools/ directory, but I haven't used it yet.
I know this is not the answer you're looking for, but this is what I do because I don't know of a better way.
On Eclipse, I start with the xml layout in question and I drill down by pressing the Ctrl key (or the Command key on a Mac) and clicking on the style in question (the style name becomes an hyperlink when that key is pressed down and I hover the mouse over it). Then, I use the yellow arrow keys on the Eclipse toolbar to come back through each pane of code once I need to go back to the root of where I started from.
On Android Studio Preview, which unfortunately I can't use at work because everyone uses Eclipse, the same shortcuts work as well, but unlike Eclipse, the navigation support and the refactoring support work much better, I'd recommend that you look at Android Studio if you're not satisfied with Eclipse's support (my only warning is that once you have a version of Android Studio that works for you, that you do not update it, because updates of Android Studio tend to break it frequently).
To find it, please go to Layout Inspector,
Tools --> Android --> Layout Inspector

enabling design view in VS 2010

Does anyone know where can I enable the bar that let me switch between different views (Design,split,..) in Visual Studio 2010 ? I can't find it and it is not enables by default
If you go into the Visual Studio Tools -> Options menu, under HTML Designer -> General there is a checkbox to enable or disable the HTML designer. Checking this and restarting VS will do the trick and show the Design/Split/Source options at the bottom again.
I really prefer the Code Optimized setup but do need on occasion to hit the design view, shame it does not seem easier to expose and, when exposed, takes up more UI than it really needs to.
Do you have the Design/source tabs down in the bottom left corner of the window? (just above where your debug & immediate windows appear from in the default view). If you do, look further to the right of them, there is a splitter bar you can drag up to produce the split mode.
It's a corrupt installation, try reintall the VS
I also cannot see the Design/Source tab split. I could have sworn it was in VS2010 RC. Did they take it out of retail?? (I'm working with an Activity xaml file)
go to Tool->Option->General->Enabe Html Designer

AutoClose parens, braces, etc in Eclipse and in Visual Studio

I want to know the name of the specific editing mode in which the editor automatically closes the paren after you write (, and then you can jump right after the ) when you press a tab. It does the same thing with ". How can one get this thing working in VisualStudio and in Eclipse?
Thanks.
upd: clarification of the title. The name of the feature is AutoClose
upd2: Visual Studio doesn't support this natively --> source
upd3: A similar question. Turns out ReSharper can do this for C# and VB, but still nothing for native C++.
I am going for the eclipse IDE (cause is the one that i know, but there are lots of VisualStudio gurus over here that probably will come with the other half).
In eclipse you are talking about the "Formatter" feature, that is located under the menu Window / Preferences, and then select in the right tab (Java / Code Style / Formatter ) and then you can edit the active profile (there is a section called "braces" that defines the behaviour that you are talking about).
To assign that behavior to another file type, you can choose open that file with the Java Editor, or assign that editor (Java Editor) by default to another extension (Under General / Editors / File Associations, also in the preferences dialog).
Hope this makes sense for you.
Intellisense? If I understand you correctly

What are your most-recommended Visual Studio preferences? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 1 year ago.
Improve this question
There are so many little options and settings within Microsoft Visual Studio. Which adjustments do you recommend to others?
Line Numbers
Tools > Options
Text Editor > All Languages > General
Display: Line Numbers
Environment->General->Animate environment tools => OFF.
Speeds UI responsiveness by 82%.
I've never found dynamic help to be either dynamic or helpful, and just tends to slow visual studio down, so using regedit:
registry key:
HKEY_CURRENT_USER\Software\Microsoft\Visual Studio\x.x\Dynamic Help
value:
Never Show DH on F1 = yes
I'm also keen on setting the following in Options->Projects and Solutions:
Show Output window when build starts - checked
(IMHO easiest way to spot build errors)
Track Active Item in Solution Explorer - unchecked
(stops every project ending up fully expanded in Solution Explorer)
Gotta have the tab indention set up right.
Also, Consolas & Color Themed - white backgrounds hurt my eyes
Option Strict On
Tools > Options
Projects and Solutions > VB Defaults
Default project settings: Option Strict: On
Tools -> Options -> Environment -> Keyboard
Setup a shortcut to close the active document. Ctrl+Alt+W in my case.
Personally i hate that VS defaults to "Tab to Spaces" when you are developing in C#. This is so awkward to work with and unnecessary.
Yes, i know there are issues with Tabs but honestly, did any of you ever encounter them coding in C# on Windows?
Several have mentioned custom keybindings. Here are handy default keybinding reference posters…
Microsoft Visual Basic Default Keybindings reference poster
A high quality, print-ready PDF
containing the useful keybindings for
developers that choose the Visual
Basic developer profile in Visual
Studio 2008 or use Visual Basic
Express.
Microsoft Visual C# Default Keybindings reference poster
Visual C# in Visual Studio 2008 and
Visual C# 2008 Express Edition Wall
chart showing useful keyboard
shortcuts for Visual C# programming
language.
I like Microsoft's instructions:
Download and extract PDF
Send to favorite full color printer/copier
Hang on wall
Code
Smile
Set the active document you're working on to display in the solution explorer. I've seen a lot of people hunting for their current doc if the project gets too big.
Tools -> Options.
Make sure show all settings is checked.
Click on Projects and Solutions.
Enable the Track Active Item in Explorer checkbox.
alt text http://img370.imageshack.us/img370/4821/trackactivedocumentqv2.gif
Environment => General => Recent files
24 items shown in Window menu
24 items shown in recently used lists
Environment => General
Show status bar ON
Animate environment tools OFF
Prevent Visual Studio from renaming pasted controls
How do I prevent Visual Studio from renaming my controls?
Window Layouts
This really isn't a setting but something I always do is back up my settings via Tools > Import and Export Settings.
I make sure to back up my window layouts for both single and multiple monitors. It saves frustration when moving from my multi-monitor setup to a single monitor for a presentation.
Not to mention, it makes it easy to get up and running on a new PC.
Visible white space. (Edit -> Advanced -> View White Space)
The default color is too strong. I immediately change it to silver. (Tools -> Options -> Fonts and Colors -> Visible White Space).
On some displays, even silver is too strong, and I create a "light silver".
I'm somewhat surprised to be the first person recommending Visual Studio Hacks for a lot of suggestions of this variety
Fixedsys Font
Tools > Options
Environment > Fonts and Colors
Font: Fixedsys
Always show solution
Tools > Options
Projects and Solutions
Always show solution
Check out this thread for the Color theme options for Visual Studio
https://stackoverflow.com/questions/141371/which-visual-studio-color-theme
And consolas is my favourite font
This applies to winform projects.
Instead of opening the form in design mode by default, you can configure VS to open the code editor instead. This is configured by right-clicking on a form in the solution explorer and choosing the "Open with" option. This gives you a dialog that allows you to specify the default option when double-clicking on a file.
In a control's properties, setting GenerateMembers to false for items you don't need (labels, etc). It's not a specifically Visual-Studio thing, more related to the platform, but mixed with the contextual list of objects and functions, it just clears up so much clutter.
When designing a form:
View > Tab Order
Allows you you specify and control your TabIndexes easily (much more so than setting them by hand!)
Source View
Tools > Options
HTML Designer > General
Start pages in: Source View
Its all about Resharper ;) Gives you tons of shortcuts which are so useful I can no longer work without them. I don't get on with the intellisense though, so I've turned that off.
This is incredibly useful, allows you to write underscores with the space bar when writing long test method names.
Un-Bold Brace Matching
Tools > Options
Environment > Fonts and Colors
Display items: Brace Matching (Hilight)
uncheck Bold
Find and Replace window’s "Search Hidden Text" checkbox.
It's not really a preference but it is indispensable. It sure is frustrating when you don’t notice that it "magically" unchecked itself.
Besides, Line Numbers, the first thing I always do in a newly-installed IDE is set the Edit.GoToDefinition keyboard shortcut.
Tools > Options > Keyboard

Resources