blob: cbdb3be4bb0eb3c4f87bad52475ac858487a476c [file] [log] [blame]
//
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.
//
= NetBeans Platform Tutorial for Integrated Development Environments
:jbake-type: platform_tutorial
:jbake-tags: tutorials
:jbake-status: published
:syntax: true
:source-highlighter: pygments
:toc: left
:toc-title:
:icons: font
:experimental:
:description: NetBeans Platform Tutorial for Integrated Development Environments - Apache NetBeans
:keywords: Apache NetBeans Platform, Platform Tutorials, NetBeans Platform Tutorial for Integrated Development Environments
The NetBeans Platform is a solid infrastructure for creating your own software development tools. However, beyond individual software development tools, an integrated development environment (IDE) assembles multiple disparate tools into a single coherent system. NetBeans IDE is itself an example of such a coherent system, though there are many others using the NetBeans Platform as their basis.
In this quick start, you are shown how to set up an integrated development environment on top of the NetBeans Platform.
NOTE: This document uses NetBeans IDE 8.0 and NetBeans Platform 8.0. If you are using an earlier version, see link:74/nbm-ide.html[the previous version of this document].
* Part 1: <<part1,Creating a Generic Application Basis>>
* Part 2: <<part2,Including Predefined IDE Features>>
* Part 3: <<part3,Coding Custom IDE Features>>
For troubleshooting purposes, you are welcome to download the link:http://web.archive.org/web/20170409072842/http://java.net/projects/nb-api-samples/show/versions/8.0/tutorials/MyIDE[completed tutorial source code].
NOTE: If you are new to the NetBeans Platform, do some background reading before diving into this tutorial. In particular, read the link:http://bits.netbeans.org/dev/javadoc/org-openide-modules/org/openide/modules/doc-files/api.html[Modules API Reference] document, which explains what modules are and provides some context for this tutorial, while noting that there is an extensive Reference Material section on the link:https://netbeans.apache.org/kb/docs/platform.html[NetBeans Platform Learning Trail].
== Creating a Generic Application Basis
We start by creating a new NetBeans Platform application as a starting point for our geospatial system.
[start=1]
1. Choose File | New Project and then choose NetBeans Modules. Select "NetBeans Platform Application":
image::images/ide_72_new-project-1.png[]
Click Next.
[start=2]
1. Name your new application "MyIDE" and specify a folder on disk for storing it:
image::images/ide_72_new-project-2.png[]
Click Finish. The new project appears as follows in the Projects window:
image::images/ide_72_new-project-3.png[]
[start=3]
1. Right-click the application and choose Run. The application deploys and you should see this:
image::images/ide_72_new-project-4.png[]
[start=4]
1. Explore the menus and toolbars in the application and notice that you have the structure for a generic desktop application:
image::images/ide_72_new-project-5.png[]
== Including Predefined IDE Features
In this section, we include many additional modules, used in NetBeans IDE, which are useful in any other IDE too.
[start=1]
1. Right-click the MyIDE project node and choose Properties. In the Libraries panel of the Project Properties dialog, expand the "platform" folder and deselect "JavaFX wrapper", since you will not need it in this scenario.
[start=2]
1. Next, click the "ide" checkbox, as shown below:
image::images/ide_72_new-ide-1.png[]
Click the red Resolve button to include modules that the modules you included depend on. Click Finish.
[start=3]
1. Right-click the application and choose "Clean", to remove the user cache from the previous run and set the application back to its defaults. Then right-click the application and choose Run. The new project appears as follows in the Projects window. Notice that you now have many additional features, all typical to any IDE, which we will explore in more detail in the next section.
image::images/ide_72_new-ide-3.png[]
== Coding Custom IDE Features
Depending on your needs, you can create custom features in your application that integrate with the predefined features you included in the previous section. The custom features are described via tutorials on the link:https://netbeans.org/features/platform/all-docs.html[NetBeans Platform Learning Trail].
Congratulations. You have learned how to create the starting point for your own IDE.
link:http://netbeans.apache.org/community/mailing-lists.html[Send Us Your Feedback]