NetBeans IDE - How do i make indent lines, where i have largest and longest if while for brakets, can not find start and end now - netbeans

I have my Java/C code running in NetBeans IDE. Where i have some mess algorithms which is like largest/longest something like following:
if () {
while() {
for() {
}
}
} elseif( ) {
for() {
while() {
for() {
}
}
}
} elseif( ) {
do {
for () {
if() {
} else {
}
}
} while() ;
} elseif( ) {
switch() {
if(a.starsWith()) {
for() {
do {
for() {
if() {
} elseif() {
} else {
switch() { }
}
}
} while();
}
}
}
} elseif( ) {
} elseif( ) {
} elseif( ) {
}
Therefore, to find out how do i get this following type of indent highlighted lines?

The vertical lines you see in Notepad++ are not available in NetBeans. But I didn't try the new NetBeans 7.2 beta yet...

From version of Netbeans 8.0 indent lines are available out of the box.

In netbeans 8.1 tools>options>Fonts&Colors>Category>Indent Guide Lines then change Forground to your likeing.

Not sure what your question is, and the image you attached is too small:-(
Anyways, you can specify the type of indent you want NetBeans to use for your code in Preferences -> Editor -> Formatting. You can choose the indents to be tabs, or (recommended) spaces. There is a box where you type in the number of spaces you want per tab.
Also, you can make NetBeans format the code automatically for you, under Source -> Format.
Hope this helps!

Are you looking to highlight lines or just indent your code correctly?
If it is the latter, select all your code, then from the menu bar select Source -> Format.
That should resolve the issue.

Related

Jodit -> Hide Toolbar after initialization

i use Jodit as wysiwyg editor and have a beginner question.
At initialization of the editor, i want to hide the toolbar.
This works perfect:
var editor = new Jodit('#freitext_oben', {
fullsize: false,
toolbar: false,
editorCssClass: 'editor_freitext'
});
Now i want a custom button which calls a function that toggles the toolbar but i don't know how to set this option.
i need something like
function toggle_toolbar() {
editor.toggleToolbar();
}
But i don't know the exact syntax...
Please help ;-(
So here's a way that I've found to do this:
public ToggleToolbarVisibility()
{
if(!editor.editor.toolbar.container.style.display != "none")
{
editor.toolbar.container.style.display = "none";
}
else
{
editor.toolbar.container.style.display = "";
}
}

How to listen event on specific file in Visual Studio Code?

I am new to visual studio code API.
I would like to listen some event like onSave , onClose etc...
I am currently using this API.But I think this is vary expensive like this. When you only need to listen event for only a specific file.
let { workspace } = require("vscode");
module.exports = {
activate(ctx) {
ctx.subscriptions.push(
workspace.onDidSaveTextDocument(({ fileName, version }) => {
})
)
},
deactivate() {}
};
Not a great solution .But worked for me.
Still Though is there any other way,The better way?...
My solution is...
let onSaveCleaner = workspace.onDidSaveTextDocument((e) => {
// watch for all file save event ... yuck!
});
let onCloseCleaner = workspace.onDidCloseTextDocument(({ fileName, languageId }) => {
// some condition like once `specific` file closed
if (languageId == "python" && fileName == "...") {
onSaveCleaner.dispose()
onCloseCleaner.dispose()
}
});
By doing that We only run expensive code when file is not closed!
Once the file closed...Destroy everything!

how to remove or hide tree node in dev express navbar control containing treelist, using code

how to remove or hide tree node in dev ex press navbar control
containing treelist, using codeemphasized text
foreach (ToolStripMenuItem mi in mastersToolStripMenuItem.DropDownItems)
{
if (mi.Text == "Batch")
{
mastersToolStripMenuItem.DropDownItems.Remove(mi);
}
}
and
foreach (ToolStripMenuItem mi in mastersToolStripMenuItem.DropDownItems)
{
if (mi.Text == "Batch")
{
mi.visible=fase;
}
}
both not working
some how got the answer
treeListMaster.Nodes[4].Nodes.RemoveAt(7);
treeListMaster.Refresh();

Advanced indent settings in Visual Studio

I'm using VS2013 and I'd like to change indentation. However, Visual's settings aren't enough for me. I'd like it to auto indent it like this:
int function()
{
int a=1;
while (a)
{
if(a>0)
{
a=0;
return;
}
}
}
Are there any plugins, or anything like this to help me with indentation?

How do I inspect and interact with trails in KRL?

I have a trail that I'm using to track app history in KRL. I'm looking for an easy way to debug the trail, including seeing what is currently on the trail and clearing it.
Is there an easy way to do that in KRL?
The easiest way, for me, to see what is on the trail is to output it's contents to the browser console.
rule inspect_data_on_trail {
select when pageview ".*"
pre {
visitedDomains = ent:visitedDomains;
}
{
emit <|
console.log(visitedDomains);
|>;
}
}
firebug output after running ruleset several times:
To clear entity variables including trails, I usually just write a rule that selects on a domain that isn't part of my app's experience and clear the varaibles when the app is run on that domain.
rule clear_everything {
select when pageview "yahoo\.com"
{
notify("Cleared",":)") with sticky = true;
}
fired {
clear ent:visitedDomains;
}
}
Full example app:
ruleset a60x458 {
meta {
name "trail-debugging"
description <<
trail-debugging
>>
author "Mike Grace"
logging on
}
rule put_data_onto_trail {
select when pageview ".*"
pre {
domain = page:url("domain");
}
{
notify("Thanks for visiting #{domain}","You visit has been recorded") with sticky = true;
}
fired {
mark ent:visitedDomains with domain;
}
}
rule inspect_data_on_trail {
select when pageview ".*"
pre {
visitedDomains = ent:visitedDomains;
}
{
emit <|
console.log(visitedDomains);
|>;
}
}
rule clear_everything {
select when pageview "yahoo\.com"
{
notify("Cleared",":)") with sticky = true;
}
fired {
clear ent:visitedDomains;
}
}
}