Introduction to the NetBeans Platform



Similar documents
NetBeans IDE Field Guide

Glassfish, JAVA EE, Servlets, JSP, EJB

Visualization of Program Dependence Graphs

NetBeans: Universal Tool for Java Development and More. Roman Štrobl Technology Evangelist

Implementation of ULC Visual Editor for Eclipse

Ruby on Rails in GlassFish Sun Microsystems

Tutorial 5: Developing Java applications

PHP vs. Java. In this paper, I am not discussing following two issues since each is currently hotly debated in various communities:

Using NetBeans IDE for Desktop Development. Geertjan Wielenga

Global Variables. However, when global variables are used in a function block or control modules, they must be declared as external

A generic framework for game development

Eclipse installation, configuration and operation


Java Forum Nord Dirk Mahler

JBoss SOAP Web Services User Guide. Version: M5

Netbeans 6.0. José Maria Silveira Neto. Sun Campus Ambassador

GlassFish v3. Building an ex tensible modular Java EE application server. Jerome Dochez and Ludovic Champenois Sun Microsystems, Inc.

Eclipse 4 RCP application Development COURSE OUTLINE

Server-side OSGi with Apache Sling. Felix Meschberger Day Management AG 124

Java with Eclipse: Setup & Getting Started

Intelligent Event Processer (IEP) Tutorial Detection of Insider Stock Trading

<Insert Picture Here> What's New in NetBeans IDE 7.2

SDK Code Examples Version 2.4.2

Development. with NetBeans 5.0. A Quick Start in Basic Web and Struts Applications. Geertjan Wielenga

Developing Eclipse Plug-ins* Learning Objectives. Any Eclipse product is composed of plug-ins

NetBeans Platform for Beginners

Installation Guide of the Change Management API Reference Implementation

Client-Server Architecture & J2EE Platform Technologies Overview Ahmed K. Ezzat

Case Studies of Running the Platform. NetBeans UML Servlet JSP GlassFish EJB

Certified Selenium Professional VS-1083

Elements of Advanced Java Programming

White Paper March 1, Integrating AR System with Single Sign-On (SSO) authentication systems

Oracle Java Micro Edition Software Development Kit

BEST WEB PROGRAMMING LANGUAGES TO LEARN ON YOUR OWN TIME

What Is NetBeans? Free and open-source based > Open source since June, 2000 > Large community of users and developers

Maven or how to automate java builds, tests and version management with open source tools

Web Application Architecture (based J2EE 1.4 Tutorial)

Oracle WebLogic Foundation of Oracle Fusion Middleware. Lawrence Manickam Toyork Systems Inc

Accessing Data with ADOBE FLEX 4.6

Jenkins: The Definitive Guide

SIM900 Eclipse environment install Application Note_V1.00

Spectrum Technology Platform. Version 9.0. Spectrum Spatial Administration Guide

Securing SAS Web Applications with SiteMinder

Sage 100 ERP. ebusiness Web Services Installation and Reference Guide

CS 209 Programming in Java #1

Getting Started with the Internet Communications Engine

The Benefits of Modular Programming

JSR-303 Bean Validation

Content. Development Tools 2(63)

Tutorial: Time Of Day Part 2 GUI Design in NetBeans

Introduction to Sun ONE Application Server 7

Editors Comparison (NetBeans IDE, Eclipse, IntelliJ IDEA)

SAP BusinessObjects Business Intelligence platform Document Version: 4.1 Support Package Web Application Deployment Guide

Implementing SQI via SOAP Web-Services

Build management & Continuous integration. with Maven & Hudson

Developer Guide: Unwired Server Management API. Sybase Unwired Platform 2.1

Oracle WebLogic Server

WebSphere v5 Administration, Network Deployment Edition

Sabre Red Apps. Developer Toolkit Overview. October 2014

Learning GlassFish for Tomcat Users

Architectural Overview

Application Development With Data Studio

An Overview of Java. overview-1

NetBeans IDE Field Guide

Crystal Reports for Eclipse

Release Bulletin EAServer for HP-UX Itanium and IBM AIX

BEAJRockit Mission Control. Using JRockit Mission Control in the Eclipse IDE

Building Applications with JBuilder

Corticon Studio: Extensions Guide

ID TECH UniMag Android SDK User Manual

Java ME & NetBeans Mobility. Petr Suchomel Architect, NetBeans Mobility Sun Microsystems

CSI 2132 Lab 8. Outline. Web Programming JSP 23/03/2012

JavaFX Session Agenda

SAP BusinessObjects Business Intelligence platform Document Version: 4.2 Support Package Web Application Deployment Guide for Windows

Applets, RMI, JDBC Exam Review

INTRODUCTION TO JAVA BEANS

Course Name: Course in JSP Course Code: P5

REAL TERRACOTTA. Real-world scalability patterns with Terracotta. SERGIO BOSSA Pro-Netics / Sourcesense

Practical Android Projects Lucas Jordan Pieter Greyling

Getting Started. SAP HANA Cloud End-to-End-Development Scenarios. Develop your first End-to-End SAP HANA Cloud Application Scenario. Version 1.4.

A Java-based system support for distributed applications on the Internet

Sun Microsystems Inc. Java Transaction Service (JTS)

Elixir Schedule Designer User Manual

Smooks Dev Tools Reference Guide. Version: GA

Running a Program on an AVD

Networks and Services

VOL. 2, NO. 1, January 2012 ISSN ARPN Journal of Science and Technology ARPN Journals. All rights reserved

Using the vcenter Orchestrator Plug-In for Microsoft Active Directory

Apache Server Implementation Guide

Gain. Pain to. From. Swing and the NetBeans Platform in the real world

Introduction to Eclipse, Creating Eclipse plug-ins and the Overture editor. David Holst Møller Engineering College of Aarhus

Crystal Reports Integration Plugin for JIRA

Oracle Service Bus Examples and Tutorials

Transcription:

Introduction to the NetBeans Platform Institute for System Software Johannes Kepler University Linz, Austria http://ssw.jku.at Thomas Wuerthinger wuerthinger@ssw.jku.at 1

NetBeans IDE (Java, C/C++, PHP, JavaScript, Groovy, Ruby,...) Rich Client Platform Only Java (Swing) Supported by Sun Microsystems Important Concepts: Modules Filesystem Lookup Nodes and Actions 2

Sources of Information NetBeans source code (http://www.netbeans.org/downloads/zip.html) API Javadoc (http://bits.netbeans.org/dev/javadoc/index.html) Planet NetBeans (http://planetnetbeans.org/de/index.html) Numerous NetBeans bloggers (e.g. http://blogs.sun.com/geertjan/) 3

Architecture (1) NetBeans IDE NetBeans Platform NetBeans Application Swing / JDK Java VM 4

Architecture (2) NetBeans IDE NetBeans Application NetBeans Platform Swing / JDK Java VM 5

Deployment NetBeans IDE NetBeans Application NetBeans Platform Swing / JDK Java VM Standalone: Deployment including required platform / IDE modules Plugin: Deployment only with user-defined modules 6

Module System Module Suite (= Deployment Unit) Module A (= JAR File) META-INF/manifest.mf layer.xml META-INF/services/* *.class Bundle.properties Module B... Module C... Well-defined module dependencies Lazy loading / Unloading layer.xml for declarative registrations (file system) Bundle.properties for internationalization 7

Information Hiding Public packages are explicitely defined in manifest.mf (project.xml). Module A Module B Implementation Public API 8

Module Dependencies Modules can only use classes of modules they explicitely depend on. Module A Module B No circles! Module C 9

Window System Global actions Window Mode TopComponent with multiple instances Singleton TopComponent 10

File System (1) Module A Module B Result X X X Y Y Z + +... = Y Z a b c d a b c d Declarative specifications of virtual folders and files File system is union of file systems of all current modules 11

File System (2) <filesystem> <folder name="actions"> <folder name="window"> <file name="testaction.instance"> <attr name="displayname" value="test"/> </file> </folder> </folder> Reference to Java class <folder name="menu"> Reference to other file <folder name="window"> <file name="testaction.shadow"> <attr name="originalfile" stringvalue="actions/window/sample-testaction.instance"/> </file> </folder> </folder> <folder name="windows2"> <folder name="components"> <file name="topcomponent.settings" url="topcomponentsettings.xml"/> </folder> </folder> Reference to physical file </filesystem> Use.instance_hidden to hide existing entries 12

File System (3) ROOT Actions Menu Window2 TestAction.instance displayname= Test TestAction.shadow TestTopComponent.settings Java Class TestAction File TopComponentSettings.xml 13

Lookup System Container of Java object instances lookup all instances of X.class x1, x2 Lookup x1 y x2 a InstanceContent content = new InstanceContent(); Lookup lookup = new AbstractLookup(content); Collection<? extends Integer> result; result = lookup.lookupall(integer.class); content.add(2); content.add(3); result = lookup.lookupall(integer.class); content.add("vier"); result = lookup.lookupall(integer.class); Collection c = lookup.lookupall(object.class); content.remove(3); result = lookup.lookupall(integer.class); // empty list // {2, 3} // {2, 3} // {2, 3, "vier"} // {2} 14

Lookup Example Usage give me a SaveCookie SaveAction s == null? s Editor yes disable action no enable action on action invocation: call s.save() interface SaveCookie { void save(); } 15

Proxy Lookups Lookup Lookup is union of delegates to one of Lookup Lookup Frequently used lookups in NetBeans Lookup.getDefault() is the global lookup Utilities.actionsGlobalContext() delegates to lookup of current active window Lookup of a view (e.g. ListView, TreeView) delegates to lookup of current selected item 16

Dependency Removal TextFilter WordEngine UpperCaseFilter File META-INF/services/at.ssw.TextFilter at.ssw.uppercasefilter TextFilter filter = Lookup.getDefault().lookup(TextFilter.class); String s = filter.process("test"); 17

Lookup Listening Lookup.Result<Integer> result = lookup.lookupresult(integer.class); result.addlookuplistener(new MyLookupListener()); class MyLookupListener { public void resultchanged(lookupevent e) { Lookup.Result<Integer> result = (Lookup.Result<Integer>)e.getSource(); System.out.println("Lookup changed!"); } for (Integer i : result.allinstances()) { System.out.println(i); } } 18

Explorer and Nodes API TopComponent TreeTableView ExplorerManager Node Children 19

JavaBeans Specification of a JavaBean - via special public Java methods (Introspection) - via BeanInfo object JavaBeans expose Properties and Events Persistence 20

Nodes and Actions (1)? extends Cookie provides in lookup asks for Node Action 21

Nodes and Actions (2) Action accesses Lookup Utilities.actionsGlobalContext delegates Lookup of active top component delegates Lookup of ExplorerManager delegates Lookup of selected Nodes is provided by Node 22

Backward Compability (1) SaveAction uses ISaveablePart IEditorPart AbstractTextEditor extends MyTextEditor Introducing a new method in save interface? SaveAction uses SaveCookie SaveCookieImpl provides MyTopComponent 23

Backward Compability (2) SaveAction SaveAction2 ISaveablePart ISaveablePart2 IEditorPart IEditorPart2 AbstractTextEditor AbstractTextEditor2 cannot extend both! MyTextEditor 24

Backward Compability (3) SaveAction SaveAction2 SaveCookie SaveCookie2 SaveCookieImpl SaveCookieImpl2 can provide both! MyTopComponent 25