Creating a plug-in project in Java

Creator Data Matrix ECC200 in Java Creating a plug-in project
Creating a plug-in project
Printing Data Matrix ECC200 In Java
Using Barcode generator for Java Control to generate, create Data Matrix image in Java applications.
22 CREATING A PLUG-IN PROJECT
Print Bar Code In Java
Using Barcode generator for Java Control to generate, create barcode image in Java applications.
The first step is to create a plug-in project using the Eclipse New Project wizard In addition to creating a new project, this wizard has a number of different code generation options for creating sample plug-in code such as views, editors, and actions To keep things simple and focus only on the essentials of plug-in creation, select only the Plug-in with a view option as outlined below
Scanning Bar Code In Java
Using Barcode decoder for Java Control to read, scan read, scan image in Java applications.
221 New plug-in project wizard From the File menu, select New > Project to launch the new project wizard (see Figure 2-1) On this first page of the wizard, select Plug-in Development in the left hand list and then Plug-in Project on the right, followed by the Next button
Making Data Matrix 2d Barcode In C#.NET
Using Barcode creator for VS .NET Control to generate, create Data Matrix image in .NET framework applications.
TT 2 A Simple Plug-in Example
DataMatrix Encoder In .NET Framework
Using Barcode generator for ASP.NET Control to generate, create ECC200 image in ASP.NET applications.
Figure 2-1
Data Matrix Generation In Visual Studio .NET
Using Barcode drawer for .NET framework Control to generate, create Data Matrix ECC200 image in .NET applications.
New Project wizard page 1 selecting a project type
ECC200 Generator In Visual Basic .NET
Using Barcode creator for Visual Studio .NET Control to generate, create Data Matrix ECC200 image in Visual Studio .NET applications.
On the next page of the wizard (see Figure 2-2), enter the name of the project; in this case, it s comqualityeclipsefavorites, which is the same as
Draw UPC A In Java
Using Barcode drawer for Java Control to generate, create UPC A image in Java applications.
Creating a plug-in project
Code 39 Full ASCII Generation In Java
Using Barcode generator for Java Control to generate, create Code-39 image in Java applications.
the Favorites plug-in identifier Click the Next button 3 discusses plug-in identifiers and other aspects of plug-in architecture in more detail
Code 128 Code Set B Generation In Java
Using Barcode creation for Java Control to generate, create Code 128B image in Java applications.
Figure 2-2
Creating Bar Code In Java
Using Barcode drawer for Java Control to generate, create barcode image in Java applications.
New Project wizard page 2 naming the project
Making Data Matrix In Java
Using Barcode drawer for Java Control to generate, create Data Matrix 2d barcode image in Java applications.
Tip: The project can be named anything, but it is easier to name it the same as
ISBN Generator In Java
Using Barcode creation for Java Control to generate, create International Standard Book Number image in Java applications.
TT 2 A Simple Plug-in Example
Scanning Code39 In VS .NET
Using Barcode reader for VS .NET Control to read, scan read, scan image in VS .NET applications.
the plug-in identifier By convention, this is the plug-in project naming scheme that the Eclipse organization uses for most of its work Because of this, the new project wizard assumes that the project name and the plug-in identifier are the same
Code 39 Creator In VS .NET
Using Barcode printer for ASP.NET Control to generate, create Code 3/9 image in ASP.NET applications.
The next page of the wizard (see Figure 2-3) provides fields for specifying the plug-in identifier and Java project information For the purposes of this example, all of the default values provided by the new plug-in project wizard are correct, so click the Next button
Encode Code 128A In Visual C#.NET
Using Barcode drawer for .NET framework Control to generate, create Code 128 image in .NET applications.
Creating a plug-in project
UPC Code Printer In .NET Framework
Using Barcode drawer for Visual Studio .NET Control to generate, create UPC A image in VS .NET applications.
Figure 2-3
Data Matrix 2d Barcode Drawer In Visual Basic .NET
Using Barcode drawer for VS .NET Control to generate, create Data Matrix ECC200 image in .NET applications.
New Project wizard page 3 naming the plug-in
Code 128 Code Set A Drawer In VB.NET
Using Barcode generator for VS .NET Control to generate, create ANSI/AIM Code 128 image in .NET framework applications.
The project wizard next displays the various plug-in pieces that can be automatically generated by the wizard (see Figure 2-4) There are many dif-
Decoding GS1 - 13 In VS .NET
Using Barcode decoder for .NET framework Control to read, scan read, scan image in .NET applications.
TT 2 A Simple Plug-in Example
ferent options on this page for generating quite a bit of sample code It is useful to try out each option and review the code that is generated, but for the purposes of this example, select Plug-in with a view and click the Next button
Creating a plug-in project
Figure 2-4
New Project wizard page 4 selecting a plug-in type
222 Define the Plug-in Each plug-in has an XML manifest file named pluginxml that defines the plug-in and how it relates to other plug-ins in the system, plus a Java class that represents the plug-in programmatically This next wizard page (see Figure 2-5) displays options for generating both the plug-in manifest and plug-in Java class For this example, uncheck the Add support for resource bundles and Add access to the workspace checkboxes to simplify the code that is generated The code generated by these two checkboxes will be covered in later chapters
Tip: Although it is easier to let the plug-in wizard generate additional methods, these methods tend to clutter the plug-in class and would be better placed elsewhere For Example, the Add support for resource bundles checkbox generates methods in the plug-in class that would be better if placed in a separate class dedicated to accessing resource bundles
TT 2 A Simple Plug-in Example
Figure 2-5
New Project wizard page 5 describing the plug-in
Creating a plug-in project
223 Define the view Selecting view code generation options is the next step in this process (see Figure 2-6) Most of the default values on this page are correct for this example Change only the View Category Name field and uncheck the Add the view to the resource perspective checkbox to simplify the generated plug-in manifest file Finally, uncheck each of the code generation options on the last wizard page and click the Finish button (see Figure 2-7) Each of these checkboxes represents code that could be generated as part of the Favorites view We ll cover these in subsequent chapters
TT 2 A Simple Plug-in Example
Figure 2-6
New Project wizard page 6 defining the view
Creating a plug-in project
Figure 2-7
New Project wizard page 7 code generation options for the view
TT 2 A Simple Plug-in Example
224 Project welcome page After you click the Finish button, the new plug-in project is created and the plug-in manifest editor is automatically opened (see Figure 2-8) The first page of this editor displays information about code the wizard generated and tips for working with the new plug-in project Other aspects of the plugin manifest editor are discussed below in the Plug-in manifest section of this chapter