• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Extending NetBeans IDE
 

Extending NetBeans IDE

on

  • 4,091 views

Learn how to extend NetBeans IDE for fun and profit!

Learn how to extend NetBeans IDE for fun and profit!

Statistics

Views

Total Views
4,091
Views on SlideShare
912
Embed Views
3,179

Actions

Likes
0
Downloads
10
Comments
0

18 Embeds 3,179

https://blogs.oracle.com 3114
http://cloud.feedly.com 24
http://newsblur.com 6
http://www.linkedin.com 5
https://www.inoreader.com 5
https://translate.googleusercontent.com 4
http://digg.com 4
https://inoreader.com 3
http://blogs.oracle.com 2
http://feedly.com 2
https://cloud.feedly.com 2
https://www.newsblur.com 2
http://feed-watcher.hol.es 1
http://bloggers1033.rssing.com 1
https://digg.com 1
http://yoleoreader.com 1
http://www.newsblur.com 1
http://news.google.com 1
More...

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Extending NetBeans IDE Extending NetBeans IDE Presentation Transcript

    • 1
    • Getting Started Extending NetBeans IDE (Learn how to create NetBeans plugins for fun and profit!) 2
    • Me  Twitter: @geertjanw  Facebook: www.facebook.com/geertjanw  E-Mail: geertjan.wielenga@oracle.com 3
    • Free Tool Box  HTML  JavaScript  CSS  Java EE  NetBeans 4
    • What is NetBeans? Increase Developer Productivity  Ready to use out of the box  Support for latest Java specifications & standards  Support for HTML, JavaScript, and CSS  Intuitive workflow  Debugger, Profiler, Editing & Refactoring Tools  Binaries and ZIPs for Mac OS, Linux, and Windows Simply download and run on any operating system! 5
    • What is NetBeans? Increase Developer Productivity  Works out of the box  Freely available  Open source  Support for Java standards & other popular platforms, such as HTML5  Deeply integrated Maven support  Extensible Java desktop framework  Powerful, award winning GUI Builder  Profiling and debugging tools  Customizable and extensible 6
    • What is NetBeans? Increase Developer Productivity  Works out of the box  Freely available  Open source  Support for Java standards & other popular platforms, such as HTML5  Deeply integrated Maven support  Extensible Java desktop framework  Powerful, award winning GUI Builder  Profiling and debugging tools  Customizable and extensible  Task: What are your favorite two features in NetBeans IDE? 7
    • NetBeans IDE Menu Items Toolbar Buttons Keyboard Shortcuts 8
    • NetBeans IDE Menu Items Toolbar Buttons Windows Keyboard Shortcuts Positions Groups 9
    • NetBeans IDE Options Window Menu Items Primary Tabs Toolbar Buttons Secondary Tabs Windows Keyboard Shortcuts Positions Groups 10
    • Progress Bar Status Bar NetBeans IDE Output Options Window Menu Items Primary Tabs Toolbar Buttons Secondary Tabs Windows Keyboard Shortcuts Positions Groups 11
    • Files Editors Popup Menus Progress Bar Status Bar NetBeans IDE Output Options Window Menu Items Primary Tabs Toolbar Buttons Secondary Tabs Windows Keyboard Shortcuts Positions Groups 12
    • Files Projects External Tools Editors Popup Menus Progress Bar Status Bar NetBeans IDE Output Options Window Menu Items Primary Tabs Toolbar Buttons Secondary Tabs Windows Keyboard Shortcuts Positions Groups 13
    • Key Concepts  Module  Action  Filesystem  TopComponent  Options Window  Lookup 14
    • Module  Most features in NetBeans IDE are found within a single module.  If a feature is complex and consists of different parts, it consists of multiple modules.  A module is: – a JAR file – with special manifest entries – distributed as an NBM file 15
    • Module  Most features in NetBeans IDE are found within a single module.  If a feature is complex and consists of different parts, it consists of multiple modules.  A module is: – a JAR file – with special manifest entries – distributed as an NBM file  Task: Choose your favorite two modules in Tools | Plugins | Available Plugins. 16
    • Workshop  Let’s create a module! 17
    • Actions  Actions are invoked from menu items, toolbar buttons, and keyboard shortcuts.  Actions consist of – ActionListener – Display name – Icon  Some actions are always enabled and some actions are contextually enabled. 18
    • Actions  Actions are invoked from menu items, toolbar buttons, and keyboard shortcuts.  Actions consist of – ActionListener – Display name – Icon  Some actions are always enabled and some actions are contextually enabled.  Task: 19 Find two always enabled actions and two contextually enabled actions …and explain why!
    • Filesystem  Features in modules are registered in an XML file called “layer.xml” file.  Each module has at most one “layer.xml” file.  Entries in the “layer.xml” file: – Come from annotations in Java classes. – Come from manually typing in the file.  When NetBeans IDE starts, it merges all “layer.xml” files and creates the filesystem.  The filesystem has fixed folders, e.g., “Menu” and “Toolbars”. 20
    • Workshop  Let’s create an Action and register it in the Filesystem! 21
    • Workshop  Try to create an Action without using a wizard! 22
    • Workshop  Create a new Module that registers an Action in the Toolbar! 23
    • TopComponents  TopComponents are windows.  Windows are displayed in modes, i.e., positions or tabs.  Predefined modes include “editor”, “explorer”, “output”, and “properties”.  Annotations on the TopComponent define its default Mode. 24
    • TopComponents  TopComponents are windows.  Windows are displayed in modes, i.e., positions or tabs.  Predefined modes include “editor”, “explorer”, “output”, and “properties”.  Annotations on the TopComponent define its default Mode.  Task: 25 Identify three windows displayed by default in the “explorer”, “editor”, and “output” mode.
    • Workshop  Let’s create a TopComponent! 26
    • Workshop  Try to create a TopComponent without using a wizard! 27
    • Options Window  The Options window is a centralized dialog for all customizations in NetBeans IDE.  Each module can contribute new panels to the Options window.  There are primary panels and secondary panels.  Changes in the Options window can be persisted across restarts of NetBeans IDE. 28
    • Options Window  The Options window is a centralized dialog for all customizations in NetBeans IDE.  Each module can contribute new panels to the Options window.  There are primary panels and secondary panels.  Changes in the Options window can be persisted across restarts of NetBeans IDE.  Task: 29 Go to the Miscellaneous category in the Options window and make the tabs of NetBeans IDE appear along the bottom and then experiment with other settings you find there.
    • Workshop  Let’s create a new Options panel! 30
    • Lookup  Lookup provides context sensitivity to NetBeans IDE.  Task: 31 Make a change in an editor and look at what happens to the Save button. Click the Save button and notice what happens. Do you think the Save button is in the same module as the editor? Try to make some guesses about how it works.
    • Lookup  Lookup provides context sensitivity to NetBeans IDE.  Task: Make a change in an editor and look at what happens to the Save button. Click the Save button and notice what happens. Do you think the Save button is in the same module as the editor? Try to make some guesses about how it works.  Context sensitivity is provided by an event listening mechanism: – The Save action is listening to the global context for a typed object. – When a change is made in the editor, the typed object is published into the global context. – The Save action calls a method on the type. 32
    • Workshop  Let’s listen to the global context for Projects! 33
    • Workshop  Display information about all the selected projects in a window displayed in the Properties mode. 34
    • Summary 35
    • Key Concepts  Module  Action  Filesystem  TopComponent  Options Window  Lookup 36
    • Me  Twitter: @geertjanw  Facebook: www.facebook.com/geertjanw  E-Mail: geertjan.wielenga@oracle.com 37
    • 38