Visual Web Developer 2010 - no intellisense and compiler doesn't pick up syntax errors - visual-web-developer

I've just installed Visual Web Developer Express 2010, and I'm trying to write & compile some basic VB code (to do with Object Data Sources).
However, when I write my class (which is sitting in APP_Code folder), I find that :
1) I dont get any intellisense / code completion happening, and that
2) More of a problem, the compiler doesn't pick up coding syntax errors, and gives a successful build no matter what I write in the class file.
What am I missing here ?
Thanks,
Bazza

The "Build Action" in the properties of the file needs to be set to "Compile" - my guess is that it is something else now, causing the compiler to ignore the file.

Related

NetBeans - is there any way to disable the recurring error badges?

In NetBeans 8.0.1 error badges are recursive back to the project name from a file that has errors in it. This makes most of my projects look like they have errors that need to be fixed, even if the errors are being generated from code in, for example, WordPress. Not wanting to mess with WordPress core code I'm stuck with the error. Some working template files that contain code fragments also throw errors that I'm aware of and OK with.
It looks like this.
I've looked around the web and I can't find a way of removing these badges, just a load of related bug reports to NetBeans. Is there a way of removing these error badges? (I'm OK with them being on files with "errors", but I don't want them recursive back to the project name.)
I'm aware that I can set the mime type of php files to text/plain in Tools -> Options -> Misc -> Files, but that also disables syntax highlighting. That's not the answer for me.
I've come across posts on the web that mention the -J-Dnb.php.silent.error.badge=true option, but I've not been able to get this to work. Either it doesn't work, or I'm doing something wrong.
Can you help?

error raises when i placed the compile source code as "According to file Type"

I am integrating openCV in my project.
When i integrate in my sample application it works fine(In Targets Here i placed the compile source code as in "Objective c++")
But when i integrate the same application in to my "Main application"(In Targets Here i placed the compile source code as in "According to file type") it says error as "Lexical or preprocessor issue map file not found"
If i put the target settings in "Objective c++" then it raises an error in ASIAuthenticationDialog.m
I followed some answers posted here.
This answer worked for me in my sample app(here i did not have any parsing i placed the compile source code as 'objective c++') But in my Main Application where i do parsing it raises error(i placed the compile source code as 'According to file type')
Please Guide me.
Look at XCode's Log navigator : each build produce a log you can navigate into (showing only errors/warning), try and find exactly WHICH source file your compiler was trying to compile. (and also at which step it occurs : precompiled header / compiling / linking ?)
As you seem already aware, the problem might not be from OpenCV, but from your classes that depend on it - when the pre-compiler tries to solve import statements - I although thought that renaming your 'm' files in 'mm' solved this problem...
But if some library you're using need plain C (ASIAuthenticationDialog.m) - I guess that's the problem you're facing could rephrased : 'How do i mix C and C++ sources ?'
Maybe this SO post might help
Good luck !

Exclude ReSharper error for "Resource not found" inside Views

I have an MVC2 application and use ReSharper 6.1 - I've heavily customised the Code Inspection Severity and edited what it decides to show as errors, warnings, suggestions and hints, but I cannot seem to stop it from telling me that a specific resource is missing when utilising a HTMLHelper.
So, for instance:
<img src="<%:Url.Content("~/Resources/Image12345.jpg")%>" />
I get an error on every line similar to the above telling me that the path above does not exist - which at design time it does not, but during the build process all of these views are XCOPY'd to a location which contains all of the resources, such as the images, so at the point of running the application all of this path resolution is correct. Because of working in a team of people, some of which are new to ReSharper, I wanted to exclude this error from appearing as it may cause colleagues of mine to start fiddling with something that isn't broken.
ReSharper obviously doesn't know that this isn't an issue and it has no way of knowing which is why I want to turn off this specific bit of analysis. I've found on the whole that ReSharper is massively customizable and in version 6.1 under Inspection Severity there are some new MVC options, which have proved useful - but I can see no way of turning off the inspection for this.
Anybody have any ideas?
There are few options, press ALT+ENTER.
Suppress inspection "Path Error" with comment. You can suppress whole block of code, not only each of tag.
Suppress inspection "Path Error" at all at whole project.
There is new feature of 6.1 - path mapping, but it seems broken in conjunction with MVC.
Set to ignore that specific error by:
Open Soultion Errors Window by ReSharper->Windows->Soultion Errors Window.
Right-click annoying error and select Ignore Error.
See answer for another error for more explanation.
Well - It seems that this particular type of inspection is not currently catered for. I'll see if I can request it with JetBrains and hopefully more granular MVC inspection will be included in the future.
Cheers guys

Any way to disable syntax checking for a project?

I created a project "Sample Code"... here I just paste sample code... much of it is snippets that won't compile.
Is there some project-specific setting I can make so that Eclipse doesn't try to compile it?
I would prefer not to have the source code littered with red error markers.
Put your code in a non-java project, ie a general project.
Downside: you will have to create package directory structure (unless you can copy and paste from somewhere else).
Upside: it won't try to compile.
MY SOLUTION
ok, this is not an exact solution to my problem... but it is another way to do it and I kinda like it now...
I simply forget about using Eclipse to store the sample java files!
I found a good program CodeBox for Mac to store code snippets and I'm sure there exist such things for Windows, Linux too...
there interesting thing is that when I choose from this program to open the java snippet file (.java) in an external editor (Eclipse), it will open in Eclipse without any Syntax checking... wohoo! no squiggly lines
Because of this, it is not full blown code highlighting... classes and variables same color... but that's ok.. still quite readable. Much more than if it was in Eclipse with syntax highlighting running on it...
So basically, if you want to get rid of these red squiggles... one way to do it is don't keep sample .java (or other language) files in a project in Eclipse... simply keep them in the filesystem or code storage app and open them with Eclipse when you want to view them.
Depending on how you prefer to structure your project:
you could put your java files into a separate folder that is not configured as a source folder. There is an entry in the eclipse help on how to configure your build path.
or you can set exclusion-patterns in the build configuration, so that specific packages or files that follow a pattern you define don't get compiled.
Yet another way to handle your snippets could be to use a Scrapbook page.
Eclipse won't highlight anything in a scrapbook page but you can select code parts inside the page and execute them isolated. That's nice if you're experimenting and don't want to set up a whole class with imports and methods just to see if a specific snippet works as expected.

Setting breakpoint w/Eclipse PDT

I am SOOOOO discouraged. This seems so simple, but being a complete novice in Drupal and Eclipse PDT I have absolutely no idea where to look. My DAYS of searching seems to indicate that I am the only person on the planet with this problem.
Eclipse IDE for PHP Developers (1.2.1.20090918-0703)
WampServer Version 2.0
Apache 2.2.11
PHP 5.2.9-2
MySQL 5.1.33
Drupal 6.15
xDebug php_xdebug-2.0.5-5.2.dll
I setup my project in Eclipse to point to my Drupal directory (C:\wamp\www\drupal-6.15). I start the debugger (xdebug) and I stop at the first line of code. I can step through the code line by line -- so I think I am in the debugger, and when I terminate the app, I see the xdebug termination message in the tab heading.
But I cannot set a breakpoint in any of the PHP code files -- specifically a new .module file.
When I right click in the breakpoint column on the left in index.php (main) I see "toggle breakpoint" and the little blue circle next to the line of code...so I think I know how to set a breakpoint. But when I try to set a breakpoint in my .module, I see a menu that asks me to "add a bookmark" and no option to set a breakpoint.
Why can I not set a breakpoint in this file? Is my project path not set up correctly? Do I need to amend my include path? I can't get Eclipse to recognize even core modules not just site/all modules. I've seen posts about "importing" files into the project, and making sure the correct php.ini file is used for configuring xdebug. I'm lost.
There are so many posts about using Eclipst PDT and xDebug and they all end with "have fun debugging" or "just set some breakpoints and off you go" -- but what if you CAN'T set a breakpoint? Any ideas about where Eclipse is lost? Where in Eclipse can you get a list of files it has included in its build?
I think I just need to know understand why Eclipse cannot find these modules within the project (i.e. drupal application) path to allow me to set breakpoints. Then I think I can carry on. So discouraging...
Thanks to anyone listening.
Thanks for the tip. I think I had seen your similar response in another post somewhere.
Actually, the solution for me was to make sure to include all of the standard Drupal file extensions in the Eclipse file associations preferences: Preferences->General->Content Types->Text->PHP Content Type. The defaults are various *.php, *.phpX, *.phtml extensions, but not the extensions used in Drupal modules -- *.info, *.inc, *.module, *.install, etc.
Simple and obvious once you figure it out. I'm surprised with all the Eclipse-xDebug-Drupal setup instructions out there that this had not shown up. Lots of details about matching project paths with server paths, but nothing about this.
I hope my struggle helps someone. I did learn a lot about Eclipse PDT along the way :-). Good luck.
Breakpoints are tricky in PDT projects:
for php files, you need to be careful
One thing that gets me a lot is that there a lot of "invalid" places where you set breakpoints. You can put the dot there in the IDE, but the debugger won't stop at it:
blank/non-code lines
on switch statements
in some types of callbacks (for example, preg_replace)
But for breakpoints in .module files, this should be related to a setup issue.
I made the following changes to my setup:
Upgraded from php 5.2.1 to php 5.2.3
Installed the Zend debugger client in Eclipse/PDT (theoretically not necessary from what I understand, but I decided to give it a try)
Made sure that the Drupal files were fully imported into my project, not just referenced as include libraries.
I did that last step after I created a tiny test case and discovered that I could get the debugger to stop on a breakpoint in an externally included file only if that file was imported into the project, not if it was referenced as part of an include library directory.
To my mind this seems like a bug - the debugger could certainly see that the files in the include library directories were source files and it let me set breakpoints in them, so it seems that it should stop on them.
(For comparison from a separate (java) IDE, IntelliJ will let you define breakpoints in jar files as long as you tell it where the source is. Once you've defined it, it will stop on it.)
I think it was principally that last step that did the trick, so I'd suggest that anyone else with a similar problem make sure that isn't an issue in their setup first, and then try the other steps.
check whether you opened your java file in java editor mode.
ie ctrl+shift+R, in this popup check the button beside OPEN option and select java editor.
The problem of not being able to set a breakpoint can occur if you have recently created a file. You must close and re-open the file for it to be recognised as a source file that can be debugged, and to enable the code highlighting.