Netbeans how many lines of code in project




















I haven't found a way to do that in netbeans on any OS but i guess you could get away with something like the following:. With some minor trickery I'm sure you can create a shortcut to it that you can put on the quick launch bar or use it in some other tooling. What I found as a working solution for me: phploc by Sebastian Bergmann.

Works like a charm. Stack Overflow for Teams — Collaborate and share knowledge with a private group. Create a free Team What is Teams? Collectives on Stack Overflow. Learn more. I was hoping for a cut-and-paste answer. So I wrote one. EDIT: Supports millions of lines of code. No external libraries required. Jonathan Jonathan 1 1 gold badge 11 11 silver badges 12 12 bronze badges.

Tried it but it never says anywhere hos many lines there are. Juste in case, here's exactly what I do and what I get while using this plugin.

For anyone looking at this post with Netbeans 7. Netbeans kept looking for older versions of jars and wouldn't except the newer versions. It killed my configuration and I had to manually remove plugin before I could get Netbeans to start again.

Show 1 more comment. To avoid this and make the program more reliable I would suggest to replace the Scanner by a BufferedReader like so: [ Sign up or log in Sign up using Google.

Sign up using Facebook. Sign up using Email and Password. Post as a guest Name. I know this is a very old question however there is a simpler way of finding the line count in a netbeans project that doesn't involve installing plugins: Right click on the folder or package you want to find the amount of lines in Note: Don't right click on the project itself as that will cause it to count the lines in all the generated files too.

Make sure the Match dropdown is set to Regular Expression. Press find and the amount of lines your project has will be displayed at the top of the Search Results tab. I was hoping for a cut-and-paste answer.

So I wrote one. EDIT: Supports millions of lines of code. No external libraries required. Add the following tags to the layer. Now we need to think about installation and distribution. Install and try out the code snippet, by following the steps below. In the Projects window, right-click the NewSnippets2 project and choose Run. When the HTML file opens, it displays the Component Palette Ctrl-Shift-8 with one additional code snippet, called "New Line", with a tooltip that displays the result of drag-and-dropping the item:.

Optionally, you can let a JPanel appear when the palette item is dropped. In the JPanel , you can let the user define values for attributes that relate to the snippet that is about to be created. However, note that adding such a customizer is optional. In the case of a line break, which is what we are creating in this tutorial, there are no attributes that relate to the BR tag.

For that reason, to illustrate the customizer functionality, we will add a comment before the BR tag, by means of a customizer. Name it BRCustomizer.

In your BRCustomizer class, add this method, so that, in the next steps, you can open the customizer from your ActiveEditorDrop implementation class:. Define the evaluateInput method, which is called in the showDialog method above, as follows:.

Hook your customizer into the ActiveEditorDrop implementation class as follows only the lines that are changed are highlighted below :. You should see your customizer.

Enter something, finish the dialog, and the BR tag is added, together with a comment, at the point where you dropped the item. For more information about creating and developing NetBeans modules, see the following resources:.

Apache NetBeans. Latest release. If you are using an earlier version of Apache NetBeans, see the previous version of this document. A Java class that defines the piece of code to be dragged into the Source Editor. A display name for the palette item.



0コメント

  • 1000 / 1000