Intellij idea Javascript formatting and highlighting - javascript

I am new to developing webapps in Intellij so this may be a simple question. How do I get it to properly display Javascript syntax when I am editing scripts within an HTML page. For example when I create an external file with a .js extension it properly formats the Javascript, but when I have in in-file Javascript function it fails to pick up on it and displays it as plain text. Is this a limitation of the community edition?

It is most likely a limitation of the comunity edition. If you go to the comparison page you will notice a few differences:

Related

Detect duplicate code within ASP.NET MVC project in Visual Studio

Is there any way at all to detect duplicate code within ASP.NET MVC project in Visual Studio 2013 Professional???
I want to detect duplicate JavaScript functions within the cshtml files in the Views.
I've been searching forever and can't find a viable solution.
Our JavaScript CloneDR code duplication detector should be able to do this. (This obviously isn't part of VS 2013.)
Its parser can read plain Javascript, and/or html-like pages that contain JavaScript chunks in Script tags, and/or HTML script attributes (e.g., OnXXX= ). You can hand it lots of files and it will find clones across the files.
You can see examples of what it detects at the link.

Which program to use when running javascript code made in notepad

Ok, recently I started doing some tutorials in javascript. Soon I had finished doing some coding on notepad, saved it as " .js" but when I tried to open it I could not find a suitable program, hopefully, soomeone can tell me a method of running the code.
The first thing I did was try and download java, but quit the installer after seeing the ad based installer including vosteran, a web browser hijacker which I have had some experience with. Finally, is it necessary to download notepad ++ for this?
Thanks
It seems that you don't have a clear understanding of JavaScript and how it interacts with HTML. Java and JavaScript are two complete differently languages.
.js files are usually linked within a .html file or some server side language file, i.e. .php, .aspx. And the HTML file is opened with your browser, for example, Internet Explorer, Google Chrome or Firefox.
You should include the .js file in your HTML file using:
<script src="yourscript.js"></script>
Within the HTML file you can then invoke the methods and use the variables declared in your custom .js file.
You run js files in a webbrowser. Include files between tags.
Example:
There are two main options of running Javascript
1 In the browser
2 Or as a process
Choosing which one depends on your code. Please post an example of a what you are working on.
If your code fits option 1, then you will just need a small HTML file that includes reference to your javascript file.
If your code is not meant for a browser, you will likely need to install Nodejs. This is a CommonJS implementation of server-side js.
A note on Java and Javascript. They are in no way related. Netscape licensed the name from makers of Java and renamed language to Javascript in hopes it would inherate some of Java's popularity.

Find and track javascript code that modified the DOM

There is a javascript event that is modifying a search box but since I was not the original developer, I have no clue where it was written. I know it's Javascript because when I disabled Javascript in the browser it stopped working. But this is the Drupal CMS with tonnes of .js files and this person followed none of the standard places for putting .js files. How do I track down where the snippet of code that is causing the trouble is located?
The Chrome Inspector tool can do that.
An answer you're going to want to read is here: https://stackoverflow.com/a/7054733 .

JavaScript code analysis in VS2010

It is possible to enable a code editor helpers for .js files in Visual Studio 2010.
I am tasked to alter the existing JavaSript files, and I am having a hard time to even getting around the written codes, since VS editor treats JS as text. I think Notepad++ would do a better job in this case.
Consider a simple example in the image below:
When an opening braces are selected, the closing ones should also be highlighted so see the boundaries of the function.
The question is: Is there an extension, or some other add-in to VS to enable comfort javascript editing?
JScript Editor Extensions looks good

Aptana and JavaScript/jQuery IDE

I'm using Aptana for JavaScript and jQuery.
My script files are not being outlined, but I understand that this is a known issue.
When editing JavaScript, is there a way to add simple editing short cuts like:
High light a block and comment /or uncomment block.
Getting intellisense to recognize Jquery-UI and other libraries?
And while I’m here and asking what about the outliner and created code?
a. What allows JQuery to be recognized and my scripts to not be recognized?
Answers to 2. and a.
Aptana cheats. It knows jQuery and uses some local heuristics to guess when something is a jQuery collection, but it does not do data-flow analysis on the javascript to determine the type. That's why jQuery shows up, but jQueryUI and your code don't.

Categories

Resources