SlideShare a Scribd company logo
1 of 32
Download to read offline
Developing Plug-Ins
for NetBeans


Tim Boudreau
Staff Engineer
Sun Microsystems




                       TM                             SM
               NetBeansTM Software Day at 2005 JavaOneSM Conference
Agenda

●   NetBeans Overview
●   Plug-In Development Support
●   Architectural Background
●   Developing a Plug-In




                NetBeansTM Software Day at 2005 JavaOneSM Conference
Modular Design




          NetBeansTM Software Day at 2005 JavaOneSM Conference
Everything is a Plug-In




            NetBeansTM Software Day at 2005 JavaOneSM Conference
What is a plug-in (module)

●   A jar file with some special manifest entries

OpenIDE-Module: org.netbeans.modules.project.ant/1
OpenIDE-Module-IDE-Dependencies: IDE/1 > 4.48
OpenIDE-Module-Specification-Version: 1.6
OpenIDE-Module-Implementation-Version: 050219
OpenIDE-Module-Public-Packages: org.netbeans.api.project.ant.*, org.ne
tbeans.spi.project.ant.*
OpenIDE-Module-Module-Dependencies: org.netbeans.modules.projectapi/1,
    org.netbeans.modules.queries/1, org.openide.loaders
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/project/ant/Bun
dle.properties


                         NetBeansTM Software Day at 2005 JavaOneSM Conference
What is a plug-in (module)

●   Module code-name

OpenIDE-Module: org.netbeans.modules.project.ant/1
OpenIDE-Module-IDE-Dependencies: IDE/1 > 4.48
OpenIDE-Module-Specification-Version: 1.6
OpenIDE-Module-Implementation-Version: 050219
OpenIDE-Module-Public-Packages: org.netbeans.api.project.ant.*, org.ne
tbeans.spi.project.ant.*
OpenIDE-Module-Module-Dependencies: org.netbeans.modules.projectapi/1,
    org.netbeans.modules.queries/1, org.openide.loaders
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/project/ant/Bun
dle.properties


                         NetBeansTM Software Day at 2005 JavaOneSM Conference
What is a plug-in (module)

●   What version of the main APIs does it need

OpenIDE-Module: org.netbeans.modules.project.ant/1
OpenIDE-Module-IDE-Dependencies: IDE/1 > 4.48
OpenIDE-Module-Specification-Version: 1.6
OpenIDE-Module-Implementation-Version: 050219
OpenIDE-Module-Public-Packages: org.netbeans.api.project.ant.*, org.ne
tbeans.spi.project.ant.*
OpenIDE-Module-Module-Dependencies: org.netbeans.modules.projectapi/1,
    org.netbeans.modules.queries/1, org.openide.loaders
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/project/ant/Bun
dle.properties


                         NetBeansTM Software Day at 2005 JavaOneSM Conference
What is a plug-in (module)

●   Modules have version numbers

OpenIDE-Module: org.netbeans.modules.project.ant/1
OpenIDE-Module-IDE-Dependencies: IDE/1 > 4.48
OpenIDE-Module-Specification-Version: 1.6
OpenIDE-Module-Implementation-Version: 050219
OpenIDE-Module-Public-Packages: org.netbeans.api.project.ant.*, org.ne
tbeans.spi.project.ant.*
OpenIDE-Module-Module-Dependencies: org.netbeans.modules.projectapi/1,
    org.netbeans.modules.queries/1, org.openide.loaders
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/project/ant/Bun
dle.properties


                         NetBeansTM Software Day at 2005 JavaOneSM Conference
What is a plug-in (module)

●   Modules can expose APIs

OpenIDE-Module: org.netbeans.modules.project.ant/1
OpenIDE-Module-IDE-Dependencies: IDE/1 > 4.48
OpenIDE-Module-Specification-Version: 1.6
OpenIDE-Module-Implementation-Version: 050219
OpenIDE-Module-Public-Packages: org.netbeans.api.project.ant.*, org.ne
tbeans.spi.project.ant.*
OpenIDE-Module-Module-Dependencies: org.netbeans.modules.projectapi/1,
    org.netbeans.modules.queries/1, org.openide.loaders
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/project/ant/Bun
dle.properties


                         NetBeansTM Software Day at 2005 JavaOneSM Conference
What is a plug-in (module)

●   Modules can use APIs from other modules

OpenIDE-Module: org.netbeans.modules.project.ant/1
OpenIDE-Module-IDE-Dependencies: IDE/1 > 4.48
OpenIDE-Module-Specification-Version: 1.6
OpenIDE-Module-Implementation-Version: 050219
OpenIDE-Module-Public-Packages: org.netbeans.api.project.ant.*, org.ne
tbeans.spi.project.ant.*
OpenIDE-Module-Module-Dependencies: org.netbeans.modules.projectapi/1,
    org.netbeans.modules.queries/1, org.openide.loaders
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/project/ant/Bun
dle.properties


                         NetBeansTM Software Day at 2005 JavaOneSM Conference
What is a plug-in (module)

●   Everything is localized

OpenIDE-Module: org.netbeans.modules.project.ant/1
OpenIDE-Module-IDE-Dependencies: IDE/1 > 4.48
OpenIDE-Module-Specification-Version: 1.6
OpenIDE-Module-Implementation-Version: 050219
OpenIDE-Module-Public-Packages: org.netbeans.api.project.ant.*, org.ne
tbeans.spi.project.ant.*
OpenIDE-Module-Module-Dependencies: org.netbeans.modules.projectapi/1,
    org.netbeans.modules.queries/1, org.openide.loaders
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/project/ant/Bun
dle.properties


                         NetBeansTM Software Day at 2005 JavaOneSM Conference
Anatomy of a Module




           NetBeansTM Software Day at 2005 JavaOneSM Conference
Plugin Support in NetBeans 4.2
   ●   NetBeans Plugin Projects
   ●   New Plugin Template
   ●   API class templates
   ●   Build Plugins outside source tree
       –   Deploy to
            ●   Separate Binary
            ●   Platform-only Binary
            ●   Current IDE
   DEMO: Creating a Plugin

                      NetBeansTM Software Day at 2005 JavaOneSM Conference
How the Hello World module works

 ●   Installs a layer file which
     –   Is merged into the system (configuration) filesystem
     –   Defines a virtual filesystem fragment
     –   Installs an instance file
          ●   Points to a standard Swing Action




                       NetBeansTM Software Day at 2005 JavaOneSM Conference
Filesystems API

 ●   FileObjects: Abstraction over java.io.File
     –   “Files” may not be on disk
          ●   XML
          ●   Remote (FTP, NFS)
          ●   Database, etc.
     –   Support
          ●   Listening for changes
          ●   Ad-hoc “attributes” (key-value pairs)
          ●   Live in a FileSystem – a namespace
 ●   Used for both config data + user's files

                        NetBeansTM Software Day at 2005 JavaOneSM Conference
Filesystems – virtual files




              NetBeansTM Software Day at 2005 JavaOneSM Conference
XML Filesystems – very virtual files




             NetBeansTM Software Day at 2005 JavaOneSM Conference
Layered Filesystem




            NetBeansTM Software Day at 2005 JavaOneSM Conference
System (configuration) Filesystem




            NetBeansTM Software Day at 2005 JavaOneSM Conference
A Tour of the System Filesystem

 DEMO: Browsing the layer file and System FS




              NetBeansTM Software Day at 2005 JavaOneSM Conference
DataObjects wrap Files




            NetBeansTM Software Day at 2005 JavaOneSM Conference
DataSystems API

 ●   DataObjects – wrap 1 or more FileObjects
     –   “Typed” files – knows what the content is
          ●   Different DataObject types for different MIME types
     –   Programmatic access to file contents
          ●   Structural or parsed representation of contents
          ●   Support for editing, etc.
 ●   DataLoaders
     –   Factories for DataObject
     –   Recognize and claim FileObjects by extension or
         contents
                        NetBeansTM Software Day at 2005 JavaOneSM Conference
DataSystems




          NetBeansTM Software Day at 2005 JavaOneSM Conference
Nodes API

 ●   Presentation layer on top of DataObjects – add
     –   Icon, display name, menu actions, properties, child
         nodes
 ●   Generic hierarchy API
 ●   Displayed to user with the Explorer API
     –   Tree, List, Combo, Menu, TreeTable and other
         views
 ●   Don't have to represent files


                    NetBeansTM Software Day at 2005 JavaOneSM Conference
From Files to Nodes




            NetBeansTM Software Day at 2005 JavaOneSM Conference
Factory Relationships – Files to Nodes




            NetBeansTM Software Day at 2005 JavaOneSM Conference
Lookup Patterns

 ●   “Glue” between disparate APIs
 ●   Common pattern: To ask an object for an
     implementation of some interface
     –   SomeObject.getLookup().lookup (SomeIFace.class);
     –   SomeObject.getCookie (SomeIFace.class);




                   NetBeansTM Software Day at 2005 JavaOneSM Conference
Lookup API

 ●   A way to find objects (dependency injection)
 ●   Global singletons
     ●   Lookup.getDefault().lookup (SomeInterface.class)
 ●   Objects belonging to another object
     ●   node.getLookup().lookup (SomeInterface.class)
     ●   dataObject.getCookie (SomeInterface.class)

 ●   Why lookup?
 ●   Lazy instantiation – create on demand
 ●   Evolution
     ●   Its hard to add/remove methods
     ●   Its easy to change what lives in an object's Lookup
                        NetBeansTM Software Day at 2005 JavaOneSM Conference
Global Lookup Registration

 ●    Instance file in system filesystem:
 <folder name=”services”>
  <file name=”org-foo-mymodule-MyService.instance”/>
 </folder>

 ●    META-INF/services entry in jar:
  ●   A single file that names the interface implemented
      ●   META-INF/services/org.openide.ErrorManager
  ●   With a single line of text naming the implementation
      class
      ●   com.mycom.mymodule.MyErrorManagerImpl



                        NetBeansTM Software Day at 2005 JavaOneSM Conference
getLookup() vs. getCookie()

 ●   Newer idiom
      ●   someobject.getLookup().lookup (SomeClass.class)

 ●   Older idiom
      ●   someobject.getCookie (SomeClass.class)

 ●   Principle difference
      ●   Lookup is more generic
      ●   Objects in a Lookup don't have to implement the marker
          interface Node.Cookie




                       NetBeansTM Software Day at 2005 JavaOneSM Conference
Povray




         NetBeansTM Software Day at 2005 JavaOneSM Conference
Developing Plug-Ins
for NetBeans


Tim Boudreau
Staff Engineer
Sun Microsystems




               NetBeansTM Software Day at 2005 JavaOneSM Conference
               NetBeansTM Software Day at 2005 JavaOneSM Conference

More Related Content

What's hot

Getting Started with Java EE 7
Getting Started with Java EE 7Getting Started with Java EE 7
Getting Started with Java EE 7Arun Gupta
 
Connect2017 DEV-1550 Why Java 8? Or, What's a Lambda?
Connect2017 DEV-1550 Why Java 8? Or, What's a Lambda?Connect2017 DEV-1550 Why Java 8? Or, What's a Lambda?
Connect2017 DEV-1550 Why Java 8? Or, What's a Lambda?Julian Robichaux
 
Managed Beans: When, Why and How
Managed Beans: When, Why and HowManaged Beans: When, Why and How
Managed Beans: When, Why and HowRussell Maher
 
Web application development using Play Framework (with Java)
Web application development using Play Framework (with Java)Web application development using Play Framework (with Java)
Web application development using Play Framework (with Java)Saeed Zarinfam
 
GR8Conf 2011: Grails, how to plug in
GR8Conf 2011: Grails, how to plug inGR8Conf 2011: Grails, how to plug in
GR8Conf 2011: Grails, how to plug inGR8Conf
 
Developing modern java web applications with java ee 7 and angular js
Developing modern java web applications with java ee 7 and angular jsDeveloping modern java web applications with java ee 7 and angular js
Developing modern java web applications with java ee 7 and angular jsShekhar Gulati
 
Intelligent Projects with Maven - DevFest Istanbul
Intelligent Projects with Maven - DevFest IstanbulIntelligent Projects with Maven - DevFest Istanbul
Intelligent Projects with Maven - DevFest IstanbulMert Çalışkan
 
OpenNTF Domino API (ODA): Super-Charging Domino Development
OpenNTF Domino API (ODA): Super-Charging Domino DevelopmentOpenNTF Domino API (ODA): Super-Charging Domino Development
OpenNTF Domino API (ODA): Super-Charging Domino DevelopmentPaul Withers
 
Exploring Java Heap Dumps (Oracle Code One 2018)
Exploring Java Heap Dumps (Oracle Code One 2018)Exploring Java Heap Dumps (Oracle Code One 2018)
Exploring Java Heap Dumps (Oracle Code One 2018)Ryan Cuprak
 
Node JS Express: Steps to Create Restful Web App
Node JS Express: Steps to Create Restful Web AppNode JS Express: Steps to Create Restful Web App
Node JS Express: Steps to Create Restful Web AppEdureka!
 
Java SE 9 modules (JPMS) - an introduction
Java SE 9 modules (JPMS) - an introductionJava SE 9 modules (JPMS) - an introduction
Java SE 9 modules (JPMS) - an introductionStephen Colebourne
 
Play Framework: The Basics
Play Framework: The BasicsPlay Framework: The Basics
Play Framework: The BasicsPhilip Langer
 
What's New in NetBeans IDE 7.x
What's New in NetBeans IDE 7.xWhat's New in NetBeans IDE 7.x
What's New in NetBeans IDE 7.xGeertjan Wielenga
 

What's hot (20)

Apache DeltaSpike the CDI toolbox
Apache DeltaSpike the CDI toolboxApache DeltaSpike the CDI toolbox
Apache DeltaSpike the CDI toolbox
 
Getting Started with Java EE 7
Getting Started with Java EE 7Getting Started with Java EE 7
Getting Started with Java EE 7
 
Hibernate
HibernateHibernate
Hibernate
 
Connect2017 DEV-1550 Why Java 8? Or, What's a Lambda?
Connect2017 DEV-1550 Why Java 8? Or, What's a Lambda?Connect2017 DEV-1550 Why Java 8? Or, What's a Lambda?
Connect2017 DEV-1550 Why Java 8? Or, What's a Lambda?
 
Managed Beans: When, Why and How
Managed Beans: When, Why and HowManaged Beans: When, Why and How
Managed Beans: When, Why and How
 
Maven
MavenMaven
Maven
 
Web application development using Play Framework (with Java)
Web application development using Play Framework (with Java)Web application development using Play Framework (with Java)
Web application development using Play Framework (with Java)
 
From JavaEE to AngularJS
From JavaEE to AngularJSFrom JavaEE to AngularJS
From JavaEE to AngularJS
 
GR8Conf 2011: Grails, how to plug in
GR8Conf 2011: Grails, how to plug inGR8Conf 2011: Grails, how to plug in
GR8Conf 2011: Grails, how to plug in
 
Developing modern java web applications with java ee 7 and angular js
Developing modern java web applications with java ee 7 and angular jsDeveloping modern java web applications with java ee 7 and angular js
Developing modern java web applications with java ee 7 and angular js
 
Intelligent Projects with Maven - DevFest Istanbul
Intelligent Projects with Maven - DevFest IstanbulIntelligent Projects with Maven - DevFest Istanbul
Intelligent Projects with Maven - DevFest Istanbul
 
OpenNTF Domino API (ODA): Super-Charging Domino Development
OpenNTF Domino API (ODA): Super-Charging Domino DevelopmentOpenNTF Domino API (ODA): Super-Charging Domino Development
OpenNTF Domino API (ODA): Super-Charging Domino Development
 
Maven
MavenMaven
Maven
 
Exploring Java Heap Dumps (Oracle Code One 2018)
Exploring Java Heap Dumps (Oracle Code One 2018)Exploring Java Heap Dumps (Oracle Code One 2018)
Exploring Java Heap Dumps (Oracle Code One 2018)
 
Node JS Express: Steps to Create Restful Web App
Node JS Express: Steps to Create Restful Web AppNode JS Express: Steps to Create Restful Web App
Node JS Express: Steps to Create Restful Web App
 
Gradle como alternativa a maven
Gradle como alternativa a mavenGradle como alternativa a maven
Gradle como alternativa a maven
 
Java SE 9 modules (JPMS) - an introduction
Java SE 9 modules (JPMS) - an introductionJava SE 9 modules (JPMS) - an introduction
Java SE 9 modules (JPMS) - an introduction
 
Play Framework: The Basics
Play Framework: The BasicsPlay Framework: The Basics
Play Framework: The Basics
 
Reactjs
ReactjsReactjs
Reactjs
 
What's New in NetBeans IDE 7.x
What's New in NetBeans IDE 7.xWhat's New in NetBeans IDE 7.x
What's New in NetBeans IDE 7.x
 

Similar to Developing Plug-Ins for NetBeans

Net Beans61 Platform
Net Beans61 PlatformNet Beans61 Platform
Net Beans61 Platformsatyajit_t
 
blueMarine Or Why You Should Really Ship Swing Applications
blueMarine  Or Why You Should Really Ship Swing  Applications blueMarine  Or Why You Should Really Ship Swing  Applications
blueMarine Or Why You Should Really Ship Swing Applications Fabrizio Giudici
 
eXo Platform SEA - Play Framework Introduction
eXo Platform SEA - Play Framework IntroductioneXo Platform SEA - Play Framework Introduction
eXo Platform SEA - Play Framework Introductionvstorm83
 
Maven: Managing Software Projects for Repeatable Results
Maven: Managing Software Projects for Repeatable ResultsMaven: Managing Software Projects for Repeatable Results
Maven: Managing Software Projects for Repeatable ResultsSteve Keener
 
CollabSphere 2021 - DEV114 - The Nuts and Bolts of CI/CD With a Large XPages ...
CollabSphere 2021 - DEV114 - The Nuts and Bolts of CI/CD With a Large XPages ...CollabSphere 2021 - DEV114 - The Nuts and Bolts of CI/CD With a Large XPages ...
CollabSphere 2021 - DEV114 - The Nuts and Bolts of CI/CD With a Large XPages ...Jesse Gallagher
 
Introduction to Android Development and Security
Introduction to Android Development and SecurityIntroduction to Android Development and Security
Introduction to Android Development and SecurityKelwin Yang
 
Ordina Accelerator program 2019 - Maven
Ordina Accelerator program 2019 - MavenOrdina Accelerator program 2019 - Maven
Ordina Accelerator program 2019 - MavenBert Koorengevel
 
Mac Application Packaging
Mac Application PackagingMac Application Packaging
Mac Application PackagingDell World
 
UKLUG 2012 - XPages, Beyond the basics
UKLUG 2012 - XPages, Beyond the basicsUKLUG 2012 - XPages, Beyond the basics
UKLUG 2012 - XPages, Beyond the basicsUlrich Krause
 
Introduction to node js - From "hello world" to deploying on azure
Introduction to node js - From "hello world" to deploying on azureIntroduction to node js - From "hello world" to deploying on azure
Introduction to node js - From "hello world" to deploying on azureColin Mackay
 
Liferay Configuration and Customization
Liferay Configuration and CustomizationLiferay Configuration and Customization
Liferay Configuration and CustomizationThành Nguyễn
 
Frankenstein's IDE: NetBeans and OSGi
Frankenstein's IDE: NetBeans and OSGiFrankenstein's IDE: NetBeans and OSGi
Frankenstein's IDE: NetBeans and OSGiToni Epple
 
Extending Build to the Client: A Maven User's Guide to Grunt.js
Extending Build to the Client: A Maven User's Guide to Grunt.jsExtending Build to the Client: A Maven User's Guide to Grunt.js
Extending Build to the Client: A Maven User's Guide to Grunt.jsPetr Jiricka
 
Managing Your Runtime With P2
Managing Your Runtime With P2Managing Your Runtime With P2
Managing Your Runtime With P2Pascal Rapicault
 
[DanNotes] XPages - Beyound the Basics
[DanNotes] XPages - Beyound the Basics[DanNotes] XPages - Beyound the Basics
[DanNotes] XPages - Beyound the BasicsUlrich Krause
 
Writing Plugged-in Java EE Apps: Jason Lee
Writing Plugged-in Java EE Apps: Jason LeeWriting Plugged-in Java EE Apps: Jason Lee
Writing Plugged-in Java EE Apps: Jason Leejaxconf
 
MyFaces CODI and JBoss Seam3 become Apache DeltaSpike
MyFaces CODI and JBoss Seam3 become Apache DeltaSpikeMyFaces CODI and JBoss Seam3 become Apache DeltaSpike
MyFaces CODI and JBoss Seam3 become Apache DeltaSpikeos890
 
Reversing & malware analysis training part 2 introduction to windows internals
Reversing & malware analysis training part 2   introduction to windows internalsReversing & malware analysis training part 2   introduction to windows internals
Reversing & malware analysis training part 2 introduction to windows internalssecurityxploded
 

Similar to Developing Plug-Ins for NetBeans (20)

Net Beans61 Platform
Net Beans61 PlatformNet Beans61 Platform
Net Beans61 Platform
 
blueMarine Or Why You Should Really Ship Swing Applications
blueMarine  Or Why You Should Really Ship Swing  Applications blueMarine  Or Why You Should Really Ship Swing  Applications
blueMarine Or Why You Should Really Ship Swing Applications
 
eXo Platform SEA - Play Framework Introduction
eXo Platform SEA - Play Framework IntroductioneXo Platform SEA - Play Framework Introduction
eXo Platform SEA - Play Framework Introduction
 
Maven: Managing Software Projects for Repeatable Results
Maven: Managing Software Projects for Repeatable ResultsMaven: Managing Software Projects for Repeatable Results
Maven: Managing Software Projects for Repeatable Results
 
CollabSphere 2021 - DEV114 - The Nuts and Bolts of CI/CD With a Large XPages ...
CollabSphere 2021 - DEV114 - The Nuts and Bolts of CI/CD With a Large XPages ...CollabSphere 2021 - DEV114 - The Nuts and Bolts of CI/CD With a Large XPages ...
CollabSphere 2021 - DEV114 - The Nuts and Bolts of CI/CD With a Large XPages ...
 
Introduction to Android Development and Security
Introduction to Android Development and SecurityIntroduction to Android Development and Security
Introduction to Android Development and Security
 
Ordina Accelerator program 2019 - Maven
Ordina Accelerator program 2019 - MavenOrdina Accelerator program 2019 - Maven
Ordina Accelerator program 2019 - Maven
 
Mac Application Packaging
Mac Application PackagingMac Application Packaging
Mac Application Packaging
 
UKLUG 2012 - XPages, Beyond the basics
UKLUG 2012 - XPages, Beyond the basicsUKLUG 2012 - XPages, Beyond the basics
UKLUG 2012 - XPages, Beyond the basics
 
Presentation
PresentationPresentation
Presentation
 
Introduction to node js - From "hello world" to deploying on azure
Introduction to node js - From "hello world" to deploying on azureIntroduction to node js - From "hello world" to deploying on azure
Introduction to node js - From "hello world" to deploying on azure
 
Liferay Configuration and Customization
Liferay Configuration and CustomizationLiferay Configuration and Customization
Liferay Configuration and Customization
 
Frankenstein's IDE: NetBeans and OSGi
Frankenstein's IDE: NetBeans and OSGiFrankenstein's IDE: NetBeans and OSGi
Frankenstein's IDE: NetBeans and OSGi
 
Extending Build to the Client: A Maven User's Guide to Grunt.js
Extending Build to the Client: A Maven User's Guide to Grunt.jsExtending Build to the Client: A Maven User's Guide to Grunt.js
Extending Build to the Client: A Maven User's Guide to Grunt.js
 
01 spring-intro
01 spring-intro01 spring-intro
01 spring-intro
 
Managing Your Runtime With P2
Managing Your Runtime With P2Managing Your Runtime With P2
Managing Your Runtime With P2
 
[DanNotes] XPages - Beyound the Basics
[DanNotes] XPages - Beyound the Basics[DanNotes] XPages - Beyound the Basics
[DanNotes] XPages - Beyound the Basics
 
Writing Plugged-in Java EE Apps: Jason Lee
Writing Plugged-in Java EE Apps: Jason LeeWriting Plugged-in Java EE Apps: Jason Lee
Writing Plugged-in Java EE Apps: Jason Lee
 
MyFaces CODI and JBoss Seam3 become Apache DeltaSpike
MyFaces CODI and JBoss Seam3 become Apache DeltaSpikeMyFaces CODI and JBoss Seam3 become Apache DeltaSpike
MyFaces CODI and JBoss Seam3 become Apache DeltaSpike
 
Reversing & malware analysis training part 2 introduction to windows internals
Reversing & malware analysis training part 2   introduction to windows internalsReversing & malware analysis training part 2   introduction to windows internals
Reversing & malware analysis training part 2 introduction to windows internals
 

More from elliando dias

Clojurescript slides
Clojurescript slidesClojurescript slides
Clojurescript slideselliando dias
 
Why you should be excited about ClojureScript
Why you should be excited about ClojureScriptWhy you should be excited about ClojureScript
Why you should be excited about ClojureScriptelliando dias
 
Functional Programming with Immutable Data Structures
Functional Programming with Immutable Data StructuresFunctional Programming with Immutable Data Structures
Functional Programming with Immutable Data Structureselliando dias
 
Nomenclatura e peças de container
Nomenclatura  e peças de containerNomenclatura  e peças de container
Nomenclatura e peças de containerelliando dias
 
Polyglot and Poly-paradigm Programming for Better Agility
Polyglot and Poly-paradigm Programming for Better AgilityPolyglot and Poly-paradigm Programming for Better Agility
Polyglot and Poly-paradigm Programming for Better Agilityelliando dias
 
Javascript Libraries
Javascript LibrariesJavascript Libraries
Javascript Librarieselliando dias
 
How to Make an Eight Bit Computer and Save the World!
How to Make an Eight Bit Computer and Save the World!How to Make an Eight Bit Computer and Save the World!
How to Make an Eight Bit Computer and Save the World!elliando dias
 
A Practical Guide to Connecting Hardware to the Web
A Practical Guide to Connecting Hardware to the WebA Practical Guide to Connecting Hardware to the Web
A Practical Guide to Connecting Hardware to the Webelliando dias
 
Introdução ao Arduino
Introdução ao ArduinoIntrodução ao Arduino
Introdução ao Arduinoelliando dias
 
Incanter Data Sorcery
Incanter Data SorceryIncanter Data Sorcery
Incanter Data Sorceryelliando dias
 
Fab.in.a.box - Fab Academy: Machine Design
Fab.in.a.box - Fab Academy: Machine DesignFab.in.a.box - Fab Academy: Machine Design
Fab.in.a.box - Fab Academy: Machine Designelliando dias
 
The Digital Revolution: Machines that makes
The Digital Revolution: Machines that makesThe Digital Revolution: Machines that makes
The Digital Revolution: Machines that makeselliando dias
 
Hadoop - Simple. Scalable.
Hadoop - Simple. Scalable.Hadoop - Simple. Scalable.
Hadoop - Simple. Scalable.elliando dias
 
Hadoop and Hive Development at Facebook
Hadoop and Hive Development at FacebookHadoop and Hive Development at Facebook
Hadoop and Hive Development at Facebookelliando dias
 
Multi-core Parallelization in Clojure - a Case Study
Multi-core Parallelization in Clojure - a Case StudyMulti-core Parallelization in Clojure - a Case Study
Multi-core Parallelization in Clojure - a Case Studyelliando dias
 

More from elliando dias (20)

Clojurescript slides
Clojurescript slidesClojurescript slides
Clojurescript slides
 
Why you should be excited about ClojureScript
Why you should be excited about ClojureScriptWhy you should be excited about ClojureScript
Why you should be excited about ClojureScript
 
Functional Programming with Immutable Data Structures
Functional Programming with Immutable Data StructuresFunctional Programming with Immutable Data Structures
Functional Programming with Immutable Data Structures
 
Nomenclatura e peças de container
Nomenclatura  e peças de containerNomenclatura  e peças de container
Nomenclatura e peças de container
 
Geometria Projetiva
Geometria ProjetivaGeometria Projetiva
Geometria Projetiva
 
Polyglot and Poly-paradigm Programming for Better Agility
Polyglot and Poly-paradigm Programming for Better AgilityPolyglot and Poly-paradigm Programming for Better Agility
Polyglot and Poly-paradigm Programming for Better Agility
 
Javascript Libraries
Javascript LibrariesJavascript Libraries
Javascript Libraries
 
How to Make an Eight Bit Computer and Save the World!
How to Make an Eight Bit Computer and Save the World!How to Make an Eight Bit Computer and Save the World!
How to Make an Eight Bit Computer and Save the World!
 
Ragel talk
Ragel talkRagel talk
Ragel talk
 
A Practical Guide to Connecting Hardware to the Web
A Practical Guide to Connecting Hardware to the WebA Practical Guide to Connecting Hardware to the Web
A Practical Guide to Connecting Hardware to the Web
 
Introdução ao Arduino
Introdução ao ArduinoIntrodução ao Arduino
Introdução ao Arduino
 
Minicurso arduino
Minicurso arduinoMinicurso arduino
Minicurso arduino
 
Incanter Data Sorcery
Incanter Data SorceryIncanter Data Sorcery
Incanter Data Sorcery
 
Rango
RangoRango
Rango
 
Fab.in.a.box - Fab Academy: Machine Design
Fab.in.a.box - Fab Academy: Machine DesignFab.in.a.box - Fab Academy: Machine Design
Fab.in.a.box - Fab Academy: Machine Design
 
The Digital Revolution: Machines that makes
The Digital Revolution: Machines that makesThe Digital Revolution: Machines that makes
The Digital Revolution: Machines that makes
 
Hadoop + Clojure
Hadoop + ClojureHadoop + Clojure
Hadoop + Clojure
 
Hadoop - Simple. Scalable.
Hadoop - Simple. Scalable.Hadoop - Simple. Scalable.
Hadoop - Simple. Scalable.
 
Hadoop and Hive Development at Facebook
Hadoop and Hive Development at FacebookHadoop and Hive Development at Facebook
Hadoop and Hive Development at Facebook
 
Multi-core Parallelization in Clojure - a Case Study
Multi-core Parallelization in Clojure - a Case StudyMulti-core Parallelization in Clojure - a Case Study
Multi-core Parallelization in Clojure - a Case Study
 

Recently uploaded

Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilV3cube
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 

Recently uploaded (20)

Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 

Developing Plug-Ins for NetBeans

  • 1. Developing Plug-Ins for NetBeans Tim Boudreau Staff Engineer Sun Microsystems TM SM NetBeansTM Software Day at 2005 JavaOneSM Conference
  • 2. Agenda ● NetBeans Overview ● Plug-In Development Support ● Architectural Background ● Developing a Plug-In NetBeansTM Software Day at 2005 JavaOneSM Conference
  • 3. Modular Design NetBeansTM Software Day at 2005 JavaOneSM Conference
  • 4. Everything is a Plug-In NetBeansTM Software Day at 2005 JavaOneSM Conference
  • 5. What is a plug-in (module) ● A jar file with some special manifest entries OpenIDE-Module: org.netbeans.modules.project.ant/1 OpenIDE-Module-IDE-Dependencies: IDE/1 > 4.48 OpenIDE-Module-Specification-Version: 1.6 OpenIDE-Module-Implementation-Version: 050219 OpenIDE-Module-Public-Packages: org.netbeans.api.project.ant.*, org.ne tbeans.spi.project.ant.* OpenIDE-Module-Module-Dependencies: org.netbeans.modules.projectapi/1, org.netbeans.modules.queries/1, org.openide.loaders OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/project/ant/Bun dle.properties NetBeansTM Software Day at 2005 JavaOneSM Conference
  • 6. What is a plug-in (module) ● Module code-name OpenIDE-Module: org.netbeans.modules.project.ant/1 OpenIDE-Module-IDE-Dependencies: IDE/1 > 4.48 OpenIDE-Module-Specification-Version: 1.6 OpenIDE-Module-Implementation-Version: 050219 OpenIDE-Module-Public-Packages: org.netbeans.api.project.ant.*, org.ne tbeans.spi.project.ant.* OpenIDE-Module-Module-Dependencies: org.netbeans.modules.projectapi/1, org.netbeans.modules.queries/1, org.openide.loaders OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/project/ant/Bun dle.properties NetBeansTM Software Day at 2005 JavaOneSM Conference
  • 7. What is a plug-in (module) ● What version of the main APIs does it need OpenIDE-Module: org.netbeans.modules.project.ant/1 OpenIDE-Module-IDE-Dependencies: IDE/1 > 4.48 OpenIDE-Module-Specification-Version: 1.6 OpenIDE-Module-Implementation-Version: 050219 OpenIDE-Module-Public-Packages: org.netbeans.api.project.ant.*, org.ne tbeans.spi.project.ant.* OpenIDE-Module-Module-Dependencies: org.netbeans.modules.projectapi/1, org.netbeans.modules.queries/1, org.openide.loaders OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/project/ant/Bun dle.properties NetBeansTM Software Day at 2005 JavaOneSM Conference
  • 8. What is a plug-in (module) ● Modules have version numbers OpenIDE-Module: org.netbeans.modules.project.ant/1 OpenIDE-Module-IDE-Dependencies: IDE/1 > 4.48 OpenIDE-Module-Specification-Version: 1.6 OpenIDE-Module-Implementation-Version: 050219 OpenIDE-Module-Public-Packages: org.netbeans.api.project.ant.*, org.ne tbeans.spi.project.ant.* OpenIDE-Module-Module-Dependencies: org.netbeans.modules.projectapi/1, org.netbeans.modules.queries/1, org.openide.loaders OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/project/ant/Bun dle.properties NetBeansTM Software Day at 2005 JavaOneSM Conference
  • 9. What is a plug-in (module) ● Modules can expose APIs OpenIDE-Module: org.netbeans.modules.project.ant/1 OpenIDE-Module-IDE-Dependencies: IDE/1 > 4.48 OpenIDE-Module-Specification-Version: 1.6 OpenIDE-Module-Implementation-Version: 050219 OpenIDE-Module-Public-Packages: org.netbeans.api.project.ant.*, org.ne tbeans.spi.project.ant.* OpenIDE-Module-Module-Dependencies: org.netbeans.modules.projectapi/1, org.netbeans.modules.queries/1, org.openide.loaders OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/project/ant/Bun dle.properties NetBeansTM Software Day at 2005 JavaOneSM Conference
  • 10. What is a plug-in (module) ● Modules can use APIs from other modules OpenIDE-Module: org.netbeans.modules.project.ant/1 OpenIDE-Module-IDE-Dependencies: IDE/1 > 4.48 OpenIDE-Module-Specification-Version: 1.6 OpenIDE-Module-Implementation-Version: 050219 OpenIDE-Module-Public-Packages: org.netbeans.api.project.ant.*, org.ne tbeans.spi.project.ant.* OpenIDE-Module-Module-Dependencies: org.netbeans.modules.projectapi/1, org.netbeans.modules.queries/1, org.openide.loaders OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/project/ant/Bun dle.properties NetBeansTM Software Day at 2005 JavaOneSM Conference
  • 11. What is a plug-in (module) ● Everything is localized OpenIDE-Module: org.netbeans.modules.project.ant/1 OpenIDE-Module-IDE-Dependencies: IDE/1 > 4.48 OpenIDE-Module-Specification-Version: 1.6 OpenIDE-Module-Implementation-Version: 050219 OpenIDE-Module-Public-Packages: org.netbeans.api.project.ant.*, org.ne tbeans.spi.project.ant.* OpenIDE-Module-Module-Dependencies: org.netbeans.modules.projectapi/1, org.netbeans.modules.queries/1, org.openide.loaders OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/project/ant/Bun dle.properties NetBeansTM Software Day at 2005 JavaOneSM Conference
  • 12. Anatomy of a Module NetBeansTM Software Day at 2005 JavaOneSM Conference
  • 13. Plugin Support in NetBeans 4.2 ● NetBeans Plugin Projects ● New Plugin Template ● API class templates ● Build Plugins outside source tree – Deploy to ● Separate Binary ● Platform-only Binary ● Current IDE DEMO: Creating a Plugin NetBeansTM Software Day at 2005 JavaOneSM Conference
  • 14. How the Hello World module works ● Installs a layer file which – Is merged into the system (configuration) filesystem – Defines a virtual filesystem fragment – Installs an instance file ● Points to a standard Swing Action NetBeansTM Software Day at 2005 JavaOneSM Conference
  • 15. Filesystems API ● FileObjects: Abstraction over java.io.File – “Files” may not be on disk ● XML ● Remote (FTP, NFS) ● Database, etc. – Support ● Listening for changes ● Ad-hoc “attributes” (key-value pairs) ● Live in a FileSystem – a namespace ● Used for both config data + user's files NetBeansTM Software Day at 2005 JavaOneSM Conference
  • 16. Filesystems – virtual files NetBeansTM Software Day at 2005 JavaOneSM Conference
  • 17. XML Filesystems – very virtual files NetBeansTM Software Day at 2005 JavaOneSM Conference
  • 18. Layered Filesystem NetBeansTM Software Day at 2005 JavaOneSM Conference
  • 19. System (configuration) Filesystem NetBeansTM Software Day at 2005 JavaOneSM Conference
  • 20. A Tour of the System Filesystem DEMO: Browsing the layer file and System FS NetBeansTM Software Day at 2005 JavaOneSM Conference
  • 21. DataObjects wrap Files NetBeansTM Software Day at 2005 JavaOneSM Conference
  • 22. DataSystems API ● DataObjects – wrap 1 or more FileObjects – “Typed” files – knows what the content is ● Different DataObject types for different MIME types – Programmatic access to file contents ● Structural or parsed representation of contents ● Support for editing, etc. ● DataLoaders – Factories for DataObject – Recognize and claim FileObjects by extension or contents NetBeansTM Software Day at 2005 JavaOneSM Conference
  • 23. DataSystems NetBeansTM Software Day at 2005 JavaOneSM Conference
  • 24. Nodes API ● Presentation layer on top of DataObjects – add – Icon, display name, menu actions, properties, child nodes ● Generic hierarchy API ● Displayed to user with the Explorer API – Tree, List, Combo, Menu, TreeTable and other views ● Don't have to represent files NetBeansTM Software Day at 2005 JavaOneSM Conference
  • 25. From Files to Nodes NetBeansTM Software Day at 2005 JavaOneSM Conference
  • 26. Factory Relationships – Files to Nodes NetBeansTM Software Day at 2005 JavaOneSM Conference
  • 27. Lookup Patterns ● “Glue” between disparate APIs ● Common pattern: To ask an object for an implementation of some interface – SomeObject.getLookup().lookup (SomeIFace.class); – SomeObject.getCookie (SomeIFace.class); NetBeansTM Software Day at 2005 JavaOneSM Conference
  • 28. Lookup API ● A way to find objects (dependency injection) ● Global singletons ● Lookup.getDefault().lookup (SomeInterface.class) ● Objects belonging to another object ● node.getLookup().lookup (SomeInterface.class) ● dataObject.getCookie (SomeInterface.class) ● Why lookup? ● Lazy instantiation – create on demand ● Evolution ● Its hard to add/remove methods ● Its easy to change what lives in an object's Lookup NetBeansTM Software Day at 2005 JavaOneSM Conference
  • 29. Global Lookup Registration ● Instance file in system filesystem: <folder name=”services”> <file name=”org-foo-mymodule-MyService.instance”/> </folder> ● META-INF/services entry in jar: ● A single file that names the interface implemented ● META-INF/services/org.openide.ErrorManager ● With a single line of text naming the implementation class ● com.mycom.mymodule.MyErrorManagerImpl NetBeansTM Software Day at 2005 JavaOneSM Conference
  • 30. getLookup() vs. getCookie() ● Newer idiom ● someobject.getLookup().lookup (SomeClass.class) ● Older idiom ● someobject.getCookie (SomeClass.class) ● Principle difference ● Lookup is more generic ● Objects in a Lookup don't have to implement the marker interface Node.Cookie NetBeansTM Software Day at 2005 JavaOneSM Conference
  • 31. Povray NetBeansTM Software Day at 2005 JavaOneSM Conference
  • 32. Developing Plug-Ins for NetBeans Tim Boudreau Staff Engineer Sun Microsystems NetBeansTM Software Day at 2005 JavaOneSM Conference NetBeansTM Software Day at 2005 JavaOneSM Conference