When i'm in Netbeans 8.0, developing JavaScript and i'm on a line of code like this:
var sum = (example / anotherExample)
And i type a dot after that so it becomes this:
var sum = (example / anotherExample).
And press CTRL+Space i get a lists of some code hints with the description of:
JS Platform
Like this:
Whenever I press CTRL+Space for the second time while im on that interface, it gives me the list with all possible code hints for that line of code.
Why is this?
This CTRL+Space is a shortcut key to get hint about all the fields,methods,etc. defined for the attribute which you have used!
Taken from Netbeans Documentations,
When the user clicks Ctrl-Space, or an alternative key combination
defined by the user, our code completion entries should appear. This
is the COMPLETION_QUERY_TYPE. Alternative query types exist, such as
DOCUMENTATION_QUERY_TYPE and TOOLTIP_QUERY_TYPE.
It helps completion of your code in a quick way without needing you to put efforts by typing manually the complete statement!
So,it's a much needed feature in IDE's and is a boon for developers. Also,if you have the documentation installed in your NetBeans Path or embedded in your NetBeans IDE,it will show the complete description of those parameters(fields,methods,etc) in the space.That's an extra plus point.
Happy,CHEERS!
Related
I have a search result column where I'm using the record ID to pass parameters as a link to a non-netsuite external site I own that is designed for a specific non-NetSuite task.
The link is working great and the formula looks something like this:
'Use Tool'
However, I'd like to add some script to it by using onClick, and each time I've tried this either I get back invalid expression or the script seems to get stripped out of the link.
I've added what should just be a simple alert window with the record id as a test like this:
'Use Tool'
but using the dev tools to inspect this the search result shows up like this:
Use MT Tool With Tracking
I'd like to track something simple like which user clicked the link and what day it was, but I'm starting to think that this might not be possible.
Has anyone ever tried doing something like this before?
Is there a better way to do this?
Thanks in advance for any help.
It may be a rudimentary attempt on NetSuite's part to prevent XSS attempts, but if you don't need to support Internet Explorer you can get around it using the template literal syntax.
'Use Tool'
I still think the escaped double quote is a problem ☺, but I was able to duplicate your issue in preview mode (I think it's a result of NetSuite's whence parameter). Run or Save and Run does not encounter the issue. See screenshots of Search Formula Text fields below and corresponding elements when run.
Lazy Loader
Result
Element
I know you can press Ctrl + R to find the Defition/Declaration of the function but how do you go back. Say you have a function and you want to know where it was used.
You can do normal search like name( and then it shows up But.. if name is minified then searching A( is less helpful and sometimes there is space A ( wont be matched.
Also i could write regex every time but that's tedious and unproductive.
Just like there is a way to find where was the function defined there should be a way to highlight and go through each invocation of that function.. so basically search functionality in revers.
Simply use: CTRL + Shift + F
Also, third-party packages are available for Sublime. Try WhoCalled.
The answer is that Sublime Text cannot "go to usages". It is not an Intellisense-type IDE. It's not like working with NetBeans or Visual Studio, where it indexes all usages and function calls in the background and allows you to traverse them.
The best you can do is a simple text search (or regex), and limit the files searched by type or directory.
Or you can use a plugin from the Sublime Text community - though I've found such plugins to be non-functional or buggy, or not quite what you asked for.
The best option seems like what you've indicated you are already using - use a different IDE.
I'm using Visual Studio 2012 and building a JavaScript Windows Store App.
For the most part, intellisense works, but for some things it does not. I'm just wondering why. Here are a few examples:
var ctl=document.getElementById("txtName").winControl;
Although other items show up, the "winControl" item does not appear in intellisense, yet it still works. The same goes for "srcElement" in this line:
var nameInput = eventInfo.srcElement;
Is this to be expected or am I missing something?
As you go deeper into JavaScript, unlike strongly-typed languages, it becomes more difficult to figure out what these values are going to be, unless the JavaScript code is written inside of an HTML page, which the editor can run through in real-time.
var myFunc = function (evt) { console.log(evt); }
window.onclick = myFunc;
myFunc("Bob");
What is an IDE supposed to make of that, and what properties should evt have?
If JavaScript were strongly-typed, and that function could only accept Event objects, or ClickEvent objects, then the IDE could know exactly what properties to expect.
Just like .getElementById -- if one page has "myEl" as <a> and another page has the same ID as <canvas> then what should the properties be?
Norguard is right about the difficulties in providing suggestions for a dynamic language like JS. To help in situations like this, you can provide hints to the Visual Studio JavaScript editor using documentation comments. For example, I can use the following code:
/// <var type="WinJS.UI.ListView"/>
var listView = document.querySelector("#listView").winControl;
and the /// comment will associate the WinJS.UI.ListView type with my listView variable. Typing listView. will then show a completion list with suggestions for the ListView.
Jordan, Microsoft Visual Studio PM
I'm switching from eclipse with Aptana plugin to netbeans 7.1.
Is it possible to mark TODO in error line on the right with a blue dot as in eclipse?
In Netbean you can't do that anymore, the only way to retrieve your tasks is to use the Tasks Window. Maybe you can look for a plugin to add marks in left/right margins.
Let me know if you found one up to date, I've made some search but found nothing.
You can, but it differs a bit in implementation from Eclipse.
(tested in Netbeans 8) click Window > Action Items, a log console should appear, then go to Tools > Options > Teams > ToDo patterns, and add or change your TODO mark pattern.
once done, you can view TODO's (or any other thing you've marked) on the Action Items console.
I have two questions:
While editing a source file, it's very convenient to be able to label the current position of cursor and then jump to it later by somehow calling that label. I VIM, there is the marking notion, but I'm not aware of such possibility in Eclipse text editor.
Is there any way in Eclipse to add a portion of the code to the outline window, such that you can easily jump to that part when you click on it? I know that for java source-code, almost all variables and functions are shown there, but what if I have a html/javascript code, in which I'm using jquery functions, and the outline doesn't show these functions.
Any help is appreciated!
I dont have any direct answers for your question.
May be you are looking for the following eclipse features.
Eclipse supports bookmarks, you may use that feature. Also CTRL + Q will go back to the last edited location.
You may be able to get this using the Mylyn, which is packaged along with eclipse by default. Implements the notion of a Task focussed IDE ( RECOMMENDED)