Introduction to NetBeans Plug-in development

Source: Internet
Author: User
Tags netbeans

Want NetBeans to provide you with more functionality?

You want to dive into the development of NetBeans and hope it will inspire you to develop another application. You want to listen to music, browse the Web, view messages, store favorite URLs, and maintain daily tasks-all within NetBeans. So, let's take a look at how to add all these required features?

The NetBeans IDE is a plug-in based development environment. In other words, NetBeans has a modular architecture. To put it simply, we have a basic integrated development environment and then extend the IDE by writing Plug-ins to enrich its functionality. The NetBeans platform is the basic IDE. Most of the features you see in NetBeans are implemented by these plug-ins.

NetBeans plug-in module and related backend

As the name suggests, a plug-in module is a module that is inserted into the NetBeans IDE to provide specific functionality. Plug-ins can have a graphical user interface, or they may not have a graphical user interface. We've started to better put the concept of plug-ins into practice, and I'm sure you've installed more than one Mozilla Firefox plugin to make you enjoy a better browsing experience.

Basic terminology See http://platform.netbeans.org/tutorials/nbm-glossary.html.

NetBeans Platform: A skeleton application that provides all the content required by most applications, but not what most applications do not need. NetBeans Platform provides a common requirement for an application, such as menus, file management, and Settings-all on the fly. Building an application "on NetBeans" means not writing the application from scratch, but providing only the part of the application that NetBeans Platform does not yet have. At the end of the development cycle, you package your application with NetBeans Platform, saving a lot of time and effort and gaining robust and reliable applications.

System filesystem: The General registry that contains the NetBeans configuration information built from the Layer.xml configuration file of the registered module. NetBeans stores a variety of configuration information in System filesystem. For example, System filesystem contains a Menu folder that contains a subfolder with a name, such as File and Edit. These subfolders contain files that represent Java classes that perform actions that appear in the IDE's file and Edit menus.

Module: A set of Java classes that provide applications with specific functionality. The Java class uses the MANIFEST.MF file to declare modules and Layer.xml configuration files to register their functionality in System filesystem. In NetBeans terminology "plugin" is an adjective and "module" is a noun. There is no obvious semantic difference between the two.

NetBeans API: Common interfaces and classes that can be used by plug-in module writers. They are divided into specific application interfaces (APIs) based on the different types of functionality they provide. As specified in the API reference documentation, the contents and behavior of the Java source package and its child packages are APIs. To obtain a list of all NetBeans application interfaces (NetBeans API list), click here.

Module Suite: A set of modules that are deployed together in interdependent mode. The IDE helps you tag the suite-for example, you can add a splash screen, and you can also specify a portion of the NetBeans platform that you don't want the application to provide.

Write the first plug-in

You will now see how to write to the first plug-in. What will the plugin do? In addition to creating a "Start Page" tab in the editor, you can create another "tab."

No, it's not pretty enough, but it's enough to get the demo:-)

Create a new module project

Create a new module project and name it "Nbmodule-demo".

Select the Standalone Module option.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.