Extend the C + + editor in NetBeans IDE 6.0 to provide highlighting for markup instances

Source: Internet
Author: User
Tags extend netbeans java se

Tutorial Requirements

Make sure that you have reviewed the requirements for this section before continuing.

Prerequisite

This tutorial assumes that you have some basic knowledge of using the IDE and Java programming experience.

The software required for this tutorial

Before you begin, you will need to install NetBeans 6.0. You will also need both C + + and Java SE support, so the best option is to select the "Download all" option and exclude all modules from the Base IDE, Java SE, and C + + packages at installation time.

Prepare the Project

For this tutorial, we need two items. One is the NetBeans module that manages the source code of our plug-ins. The other is the C + + project that is used to test it.

Create NetBeans Plug-in Module

Select File > New project. In the New Project Wizard, under Categories, under NetBeans module and project, select Modules. Click "Next".

On the name and Location page, type markoccurrences in the Project Name field and set the project location to an appropriate folder on disk. Select Standalone module and set as main project, if not selected. Click "Next".

On the Basic Module Configuration page, type org.netbeans.modules.markoccurrences in the code name base field. Click Finish.

In this project, we need some dependencies. In the Projects window, right-click the Libraries node and select libraries in the Add Module Dependencies dialog box, and then add the individual libraries listed in the screenshot. The C + + module API is in development, so you will need to select Show non--API modules in the dialog box to see them in the module list.

Right-click each of the C + + modules, select Edit, and then select Implement version.

To create a test application

Select File > New project. Select the Args project under "Sample" > "C + +" > "C + +" categories. Click "Next".

On the project name and Location page, set the project location to an appropriate folder on disk. Click Finish.

The Args_1 project has now been created. Open the ARG.C source file in the editor. We will use this file to test our module.

Create a highlight infrastructure

Now we're going to use the NetBeans API to add a highlight to the C + + editor.

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.