plug in development through net beans

30
This Material is Distribued during “Hands on Session on Firefox Plugin Developmet” jointly organised by Mozilla Campus Representatives (Reps) & Computer Society of India VIT Univeristy Students Branch at VIT University, Vellore} Mozilla Firfox Plugin Development Through NetBeans

Upload: praneesh-kataru

Post on 12-Nov-2014

1.313 views

Category:

Documents


0 download

DESCRIPTION

This is a simple document that will guide you through making Add Ons for FireFox Web Browser using Fox Beans Plug In for NetBeans 6.5.1+

TRANSCRIPT

Page 1: Plug in Development Through Net Beans

{© This Material is Distribued during “Hands on Session on Firefox Plugin Developmet” jointly organised by Mozilla Campus Representatives (Reps) & Computer Society of India VIT Univeristy Students Branch at VIT University, Vellore}

Mozilla Firfox Plugin Development Through NetBeans

Page 2: Plug in Development Through Net Beans

Mozilla Firfox Plugin Development Through NetBeans

Author : K Praneesh Kumar Yadav (Mozilla Campus Rep. – VIT University) Date:20/09/2009 Queries @ : [email protected]

{© This Material is Distribued during “Hands on Session on Firefox Plugin Developmet” jointly organised by Mozilla Campus Representatives (Reps) & Computer Society of India VIT Univeristy Students Branch at VIT University, Vellore}

-----------------------------------------------------------------------------------------------------------------------------------------------------------

Hi… Welcome to PlugIn Devlopment Tutorial..! The following tutorial will guide you through various steps involved in developing plugins for Mozilla FireFox Web Browser using NetBeans.

Software Requirements:

IDE: NetBeans IDE 6.5.1 + Java : As a prerequisite for installing NetBeans (www.netbeans.org)

Plug Ins : FoxBean Plugin for NetBeans (http://www.teesoft.info) FireFox WebBrowser Offcourse !!! (http://www.mozilla.com/en-US/firefox/personal.html)

Miscellanious: - DOM Inspector (Firefox PlugIn)- XUL Editor ()

Starting off….

Step 1: Creating the Required Environment

Step:1.1 : - Install NetBeans version >= 6.5.1 so as to get all the necessary updated Editor Libraries, which are required for adding FoxBean plugin to NetBeans.

Step: 1.2:- Adding FoxBean Plugin (com-teesoft-foxbeans.nbm) to your NetBeans.

Select Downloaded .nbm file in your Computer

{© This Material is Distribued during “Hands on Session on Firefox Plugin Developmet” jointly organised by Mozilla Campus Representatives (Reps) & Computer Society of India VIT Univeristy Students Branch at VIT University, Vellore}

Page 3: Plug in Development Through Net Beans

Step 2: Creating Your Own Plugin (here it is HelloWorld – donot give any space between words of your Plugin Name)

Step 2.1 :- Once the FoxBean plugin is installed you can find the following screen once you select “File -> New Project” in your NetBeans.

Select “Mozilla Addons -> Mozilla Addon Project” and click “Next”

{© This Material is Distribued during “Hands on Session on Firefox Plugin Developmet” jointly organised by Mozilla Campus Representatives (Reps) & Computer Society of India VIT Univeristy Students Branch at VIT University, Vellore}

Your FireFox AddOn Name Here !!

Page 4: Plug in Development Through Net Beans

Screen Once You Click Finish !!

The Major Task – Open All Individual Files that you can find on the Left Pane and replace “{appname}” with “YourApplicationName”

{© This Material is Distribued during “Hands on Session on Firefox Plugin Developmet” jointly organised by Mozilla Campus Representatives (Reps) & Computer Society of India VIT Univeristy Students Branch at VIT University, Vellore}

The Maximum Version of Browser in which you want your plug in to run

<- Click Generate to Get This

Write Sample Description About Your Plug In Here !!

Your Name Here !!

Page 5: Plug in Development Through Net Beans

Step: 2.2 :- Editing the files in “<default packages>”

“The following Screen Shots will guide through the Process of Editing the Files”

- install.rdf file contains all the details about the Plug In

- install.js file contains descriptions about the installation procedures for the particular Plug In

{© This Material is Distribued during “Hands on Session on Firefox Plugin Developmet” jointly organised by Mozilla Campus Representatives (Reps) & Computer Society of India VIT Univeristy Students Branch at VIT University, Vellore}

This Portion of File is Edited

Page 6: Plug in Development Through Net Beans

- chrome.manifest file contains the detailed descriptions of the files that are needed during the execution of the plug in

Step 2.3 :- Editing the files in content package

- contents.rdf file contains the description of other files that the plug in is using. As the plug in has to be presented with the browser we have to overlay (or include) certain part of our code with browser files. All the browser files precede with “chrome:” extension (rounded in the above figure). Any other files that are required for our plug in can

be included here.

{© This Material is Distribued during “Hands on Session on Firefox Plugin Developmet” jointly organised by Mozilla Campus Representatives (Reps) & Computer Society of India VIT Univeristy Students Branch at VIT University, Vellore}

Few Details about the Plug In being developed

Page 7: Plug in Development Through Net Beans

XUL – XML User Interface Language. This language is designed for handling User Interfaces for Mozilla Products. It is also an Open Source Project from Mozilla.org. All the User Interface components required can be designed with the help of this language. XUL Explorer, an application which helps to create user interfaces easily can also be used to generate the code and view preview of the UI being developed.

- overlay.xul is a XUL file that defines the interface for the current plug in. Any number of XUL files can be written for a plug in. Each file can represent different interface modules.

- the above file represents the initial file which overlays the browser menu with the current plug in’s name such that the plugin can be accessed.

{© This Material is Distribued during “Hands on Session on Firefox Plugin Developmet” jointly organised by Mozilla Campus Representatives (Reps) & Computer Society of India VIT Univeristy Students Branch at VIT University, Vellore}

refer “locale” section

- the command for action that has to be performed once the menu option for the current plug in is invoked i.e, whenever the user clicks the menu item for the current plug in the browser window the function onMenuItemCommand(event) is invoke. This function is in turn defined in

overlay.js – a java script file .

Page 8: Plug in Development Through Net Beans

{© This Material is Distribued during “Hands on Session on Firefox Plugin Developmet” jointly organised by Mozilla Campus Representatives (Reps) & Computer Society of India VIT Univeristy Students Branch at VIT University, Vellore}

The overlay.js

Initially it shows errors as in here (->)

Replace the {appname} with name of your application and it sets right

Page 9: Plug in Development Through Net Beans

{© This Material is Distribued during “Hands on Session on Firefox Plugin Developmet” jointly organised by Mozilla Campus Representatives (Reps) & Computer Society of India VIT Univeristy Students Branch at VIT University, Vellore}

Page 10: Plug in Development Through Net Beans

{© This Material is Distribued during “Hands on Session on Firefox Plugin Developmet” jointly organised by Mozilla Campus Representatives (Reps) & Computer Society of India VIT Univeristy Students Branch at VIT University, Vellore}

Page 11: Plug in Development Through Net Beans

Adding Your Code ----

{© This Material is Distribued during “Hands on Session on Firefox Plugin Developmet” jointly organised by Mozilla Campus Representatives (Reps) & Computer Society of India VIT Univeristy Students Branch at VIT University, Vellore}

Page 12: Plug in Development Through Net Beans

{© This Material is Distribued during “Hands on Session on Firefox Plugin Developmet” jointly organised by Mozilla Campus Representatives (Reps) & Computer Society of India VIT Univeristy Students Branch at VIT University, Vellore}

Page 13: Plug in Development Through Net Beans

{© This Material is Distribued during “Hands on Session on Firefox Plugin Developmet” jointly organised by Mozilla Campus Representatives (Reps) & Computer Society of India VIT Univeristy Students Branch at VIT University, Vellore}

Page 14: Plug in Development Through Net Beans

{© This Material is Distribued during “Hands on Session on Firefox Plugin Developmet” jointly organised by Mozilla Campus Representatives (Reps) & Computer Society of India VIT Univeristy Students Branch at VIT University, Vellore}

Page 15: Plug in Development Through Net Beans

Preferences

{© This Material is Distribued during “Hands on Session on Firefox Plugin Developmet” jointly organised by Mozilla Campus Representatives (Reps) & Computer Society of India VIT Univeristy Students Branch at VIT University, Vellore}

Page 16: Plug in Development Through Net Beans

Skin

{© This Material is Distribued during “Hands on Session on Firefox Plugin Developmet” jointly organised by Mozilla Campus Representatives (Reps) & Computer Society of India VIT Univeristy Students Branch at VIT University, Vellore}

Page 17: Plug in Development Through Net Beans

{© This Material is Distribued during “Hands on Session on Firefox Plugin Developmet” jointly organised by Mozilla Campus Representatives (Reps) & Computer Society of India VIT Univeristy Students Branch at VIT University, Vellore}

Page 18: Plug in Development Through Net Beans

{© This Material is Distribued during “Hands on Session on Firefox Plugin Developmet” jointly organised by Mozilla Campus Representatives (Reps) & Computer Society of India VIT Univeristy Students Branch at VIT University, Vellore}

Page 19: Plug in Development Through Net Beans

{© This Material is Distribued during “Hands on Session on Firefox Plugin Developmet” jointly organised by Mozilla Campus Representatives (Reps) & Computer Society of India VIT Univeristy Students Branch at VIT University, Vellore}

Page 20: Plug in Development Through Net Beans

Editing build.xml

{© This Material is Distribued during “Hands on Session on Firefox Plugin Developmet” jointly organised by Mozilla Campus Representatives (Reps) & Computer Society of India VIT Univeristy Students Branch at VIT University, Vellore}

Page 21: Plug in Development Through Net Beans

{© This Material is Distribued during “Hands on Session on Firefox Plugin Developmet” jointly organised by Mozilla Campus Representatives (Reps) & Computer Society of India VIT Univeristy Students Branch at VIT University, Vellore}

Page 22: Plug in Development Through Net Beans

{© This Material is Distribued during “Hands on Session on Firefox Plugin Developmet” jointly organised by Mozilla Campus Representatives (Reps) & Computer Society of India VIT Univeristy Students Branch at VIT University, Vellore}

Page 23: Plug in Development Through Net Beans

{© This Material is Distribued during “Hands on Session on Firefox Plugin Developmet” jointly organised by Mozilla Campus Representatives (Reps) & Computer Society of India VIT Univeristy Students Branch at VIT University, Vellore}

Page 24: Plug in Development Through Net Beans

{© This Material is Distribued during “Hands on Session on Firefox Plugin Developmet” jointly organised by Mozilla Campus Representatives (Reps) & Computer Society of India VIT Univeristy Students Branch at VIT University, Vellore}

Page 25: Plug in Development Through Net Beans

{© This Material is Distribued during “Hands on Session on Firefox Plugin Developmet” jointly organised by Mozilla Campus Representatives (Reps) & Computer Society of India VIT Univeristy Students Branch at VIT University, Vellore}

Page 26: Plug in Development Through Net Beans

{© This Material is Distribued during “Hands on Session on Firefox Plugin Developmet” jointly organised by Mozilla Campus Representatives (Reps) & Computer Society of India VIT Univeristy Students Branch at VIT University, Vellore}

Page 27: Plug in Development Through Net Beans

{© This Material is Distribued during “Hands on Session on Firefox Plugin Developmet” jointly organised by Mozilla Campus Representatives (Reps) & Computer Society of India VIT Univeristy Students Branch at VIT University, Vellore}

Page 28: Plug in Development Through Net Beans

THANK YOU

{© This Material is Distribued during “Hands on Session on Firefox Plugin Developmet” jointly organised by Mozilla Campus Representatives (Reps) & Computer Society of India VIT Univeristy Students Branch at VIT University, Vellore}