View RSS Feed

Eclipse

Eclipse is a multi-language software development environment comprising an integrated development environment (IDE) and an extensible plug-in system.

  1. Extract superclass

    by , 11-20-2011 at 05:49 PM (My Java Tips)
    Inheritance is a very useful feature that object oriented languages provide. Normally you write parent class first and then the child class. When the design of the application is not final, you tend to put more code in a class than required. At some instance, you realize, that you may make a super class and put some methods in it. Eclipse provide an easy way to do this.


    Lets take an example. We have following class:


    Java Code:
    public class CSVFile{
    ...
  2. Extract Interface

    by , 11-20-2011 at 05:43 PM (My Java Tips)
    Eclipse provides the possibility to extract interface from a class. You may call it reverse engineering since rule of thumb is to write the interface first and then write the classes implementing it. But sometimes, it’s the other way around. You write a class and then you want to generate the appropriate interface for it. Lets see how to do this.


    I wrote a class that has to do with text extraction from CSV files. I named it CSVFile.

    Java Code:
    import java.util.ArrayList;
    ...
  3. IDL Plugin for Eclipse

    by , 11-19-2011 at 06:06 PM (My Java Tips)
    Developers working on CORBA often complains that writing IDL takes time. If you are new to it, you are bound to make a lot of mistakes. You need something to assist you in writing IDL. Fortunately, Eclipse has a plugin for this.



    Eclipse CORBA plugin can be downloaded from:
    http://sourceforge.net/project/showf...roup_id=111345

    You need Eclipse 3.2 or higher to use this plugin.

    ...
  4. Creating a Simple Plug-in using PDE

    by , 11-17-2011 at 07:01 PM (My Java Tips)
    To get a better idea of how to develop plug-ins using PDE, you will create a simple workbench view. In this post, Ill give you some basic understanding.


    To get started, launch your Eclipse SDK and choose an empty workspace. When you close the Welcome page, you should find yourself in the Java perspective, by default (however, it is not required that you are in the Java perspective in order to proceed). First, you will use the New Plug-in wizard to create the plug-in. Then, you will ...
    Categories
    Eclipse
  5. Eclipse Plug-in Development Environment

    by , 11-17-2011 at 06:58 PM (My Java Tips)
    The Eclipse Plug-in Development Environment (PDE) provides a set of tools that assist the developer in every stage of plug-in development from genesis to deployment. The Plug-in Development Environment (PDE) is freely distributed as part of the Eclipse SDK, and serves as a good example of an Eclipse-based IDE tool.




    In PDE, each plug-in under development is represented by a single Java project. Plug-in projects have certain unique characteristics that make them what ...
    Categories
    Eclipse
  6. PDE - Preparing the workbench

    by , 11-17-2011 at 06:54 PM (My Java Tips)
    This post will help you in preparing the PDE workbench.




    From the default Resource perspective, open the PDE perspective via Window > Open Perspective > Other and choose Plug-in Development from the offered list.


    In addition to the main views and toolbar actions that are useful for Java development, the PDE perspective adds shortcuts to very frequently used wizards ...
    Categories
    Eclipse
  7. PDE Concepts

    by , 11-17-2011 at 06:50 PM (My Java Tips)
    In this post, I will introduce some PDE concepts to the audience.



    Host vs. runtime

    When you start up the workbench, you will use it to work on your projects that define the plug-ins you are building. The workbench instance that you are running as you develop your plug-in using the PDE and other tools is the host instance. The features available in this instance will come exclusively from the plug-ins that are installed with your application.

    Once ...
  8. Creating a plug-in project

    by , 11-17-2011 at 06:38 PM (My Java Tips)
    In this post, I will show you step by step how to create a plugin project.


    To create a plug-in project, bring up the New Plug-in Project creation wizard via File > New > Plug-in Project.


    It is a convention that plug-in project names are the same as plug-in IDs, but they can be different.

    The plug-in project can be created in one of two flavors: a Java project or ...

    Updated 11-17-2011 at 06:45 PM by Java Tip

    Categories
    Eclipse
  9. Plug-in manifest editor

    by , 11-17-2011 at 06:34 PM (My Java Tips)
    Lets talk about plugin manifest editor. When the plug-in project is created, the manifest file is open in the plug-in manifest editor.


    This multi-page editor is the central place to manage your plug-in and can be used to edit all the plug-in's file (manifest.mf , plugin.xml and build.properties).

    When you use the editor's forms, PDE transparently handles the task of writing the ...
  10. Plugin project - Overview page

    by , 11-17-2011 at 06:30 PM (My Java Tips)
    This post is about the overview page for plugin project.



    The Overview page is designed to be a quick reference on how to develop, test and deploy a plug-in. It is also a navigational center where you can follow the hyperlinks to navigate a particular page or execute a particular command.

    Plugin overview

    The Plug-in Content section explains the structure and content ...
  11. Plugin project - Dependencies page (II)

    by , 11-17-2011 at 06:26 PM (My Java Tips)
    In this post, I will talk about the Eclipse project's dependencies page.



    The Dependencies page shows the dependencies that your plug-in has on other plug-ins. You must list on this page all the plug-ins that contribute code required on your plug-in project's classpath to compile. When you modify the list of dependencies and save the file, PDE will automatically update your classpath.
    ...
  12. Plugin Runtime Page

    by , 11-17-2011 at 06:20 PM (My Java Tips)
    The Runtime page shows all the packages that your plug-in makes visible to other plug-ins.


    Press the Add button in the Exported Packages section to add the com.example.xyz and com.example.xyz.actions packages to the list.


    The Package Visibility section allows you to control on a per-package basis the visibility of your plug-in code to downstream plug-ins.

    The ...
    Categories
    Eclipse
  13. Eclipse project - Extension page

    by , 11-17-2011 at 06:16 PM (My Java Tips)
    Extensions are the central mechanism for contributing behavior to the platform. Unless your plug-in is a simple Java API library made available to other plug-ins, new behavior is contributed as an extension.


    The Extensions page is where you can add, remove and modify the extensions your plug-in contributes to the platform.


    Each extension point comes with an xml schema specifying ...
    Categories
    Eclipse
  14. Eclipse Plugin Project - Extension Points

    by , 11-17-2011 at 06:08 PM (My Java Tips)
    Extension points define new function points for the platform that other plug-ins can plug into.


    The Extension Points page is the place to add, remove and edit extension point declared by your plug-in.


    An extension point has three attributes:

    - id - a required attribute whose value is a simple name
    - name - a required attribute whose value is a translatable ...
  15. Plugin project - Build configuration page

    by , 11-17-2011 at 06:02 PM (My Java Tips)
    The Build Configuration page contains all the information needed to build, package and export the plug-in. It appears as a page in the plug-in manifest editor, but note that changes made to it will be written by PDE to the build.properties file of the plug-in. This file solely guides the build process.




    The Runtime Information section lists all the libraries that you want to build. For ...
  16. Eclipse Plugin Project - Source pages

    by , 11-17-2011 at 05:59 PM (My Java Tips)
    This post is about the source pages of Eclipse plugin project.


    Following are the points of interest:

    - The plug-in editor manages all three plug-in files at the same time.

    - The manifest.mf file is where all the plug-in data and dependencies is stored.

    Review the next part of this post.
    The plugin.xml file contains the extensions and extension points declared ...
  17. Running a plug-in

    by , 11-16-2011 at 07:38 PM (My Java Tips)
    As you develop your plug-in in the workspace, the incremental Java compiler will compile your Java source code and place the .class files into the bin directory of your PDE project. When you are ready to test your plug-in, you can launch a separate Eclipse application instance to test your new plug-in.


    The easiest way to launch an Eclipse application is via the link in the Testing section of the plug-in manifest editor's Overview page. This will immediately create a second Eclipse ...
  18. Changing Java for projects

    by , 11-14-2011 at 05:37 PM (My Java Tips)
    Sometimes you want to keep legacy code and for that you have to use older version of Java. These days, people are working in Java 5 and Java 6. But still developers are using legacy code which means using Java 1.3 and Java 1.4. In this post, I will brief you how to change the Java version for projects in Eclipse.


    Eclipse provides support for changing the Java version through few clicks. Eclipse 3.3.0 has Java 5.0 configured. So if you do not specify Java version, your project will ...
    Categories
    Eclipse
  19. Changing Console properties

    by , 11-14-2011 at 05:31 PM (My Java Tips)
    Eclipse provides a console window in which you see the output of your Java program. Normally default properties are sufficient and developers are satisfied with it. In some cases, you might want to change the look and feel of the console window. I'll write about this in this post.


    The default console looks like this:


    Now lets try to change the look and feel. Click
    ...
    Tags: console, eclipse Add / Edit Tags
    Categories
    Eclipse
  20. Generating Interface from a Class

    by , 11-14-2011 at 05:27 PM (My Java Tips)
    Some times you have a class with concrete methods and you want to declare an interface with all the methods in the class. You may call it backtracking. In this post, I will write about how to do this in Eclipse.


    Suppose we have a class called Students that has methods defined in it. We want to generate the interface for it in Eclipse. Simply right click the class name, or simply right click anywhere in the code and select Refactor > Extract interface. A new window will open. Name ...
  21. Viewing Outline of a Class

    by , 11-14-2011 at 05:20 PM (My Java Tips)
    Eclipse includes a useful feature called outline. It helps the developer to get a birds eyes view of the class. In this post, I will explore it.


    You can display outline panel of your class by Navigate > Show in > Outline.

    Eclipse Outline



    Outline will show all the methods and fields in the class. It used special symbols for private, public, static fields ...
    Tags: eclipse, outline Add / Edit Tags
    Categories
    Eclipse
  22. Comparing files

    by , 11-10-2011 at 05:24 PM (My Java Tips)
    While working on projects, sometimes you wish to see the changes you made since last version of the file. This is important to rollback changes or simple to know what new has been added or what has been removed. Eclipse provides a useful feature for this very purpose. In this post, I will write about compare feature.


    Whenever you save a Java file, Eclipse keep a copy of the older one if this feature is enabled. This is required for comparing files in case you need that. To view the ...
    Categories
    Eclipse
  23. Creating JavaDocs in Eclipse

    by , 11-09-2011 at 05:42 PM (My Java Tips)
    Java Docs are of great importance for Java programmers. Every Java programmer uses it to know which functions are to be used to achieve the results.
    Java Docs provide useful information including:
    - Which classes exist in a package
    - Purpose of each class
    - Constructors in a class
    - Methods in a class
    - Method parameters and return types
    - Deprecated methods
    - Exceptions that a method raises
    - Version and Author of the class
    - ...
    Categories
    Eclipse
  24. Creating JavaDocs – An Example

    by , 11-09-2011 at 05:33 PM (My Java Tips)
    You are developing a software in a team and you are assigned to work on a particular package. You worked on it and submitted it after completion. The development team has to use the classes and methods written by you. To use them, they have to know a lot of things.


    For a class, they should know:
    - Constructors of class
    - Is class a static?
    Etc

    For a method, they should know:
    - Is method static?
    - Return type of method.
    - Parameter ...
    Categories
    Eclipse
  25. Open Resource Window

    by , 11-07-2011 at 06:08 PM (My Java Tips)
    Eclipse provides a window called ‘Open Resource’ window to locate the required files in no time.




    You can find it under the Navigate. Its shortcut is Ctrl+Shift+R. ‘Open Resource’ window allows you to type a search for any file that exists in your workspace. You are free to use wildcards like ? to replace a single character or * to replace an entire string. It is amazingly fast and useful.
    Name:  openresource.PNG
Views: 179
Size:  16.4 KB

    Let me present a use case. ...
    Categories
    Eclipse
  26. Linking files with Editor

    by , 11-07-2011 at 04:50 PM (My Java Tips)
    There is a very useful Eclipse feature that is normally not used by the developers. Its called ‘Link with Editor’. I'll write about it.


    In complex projects, lot of files are involved. To search a rile, you may use Open Resource window – which is really very useful. Then you may click the file and can see/modify the contents. You might want to see where the file lies in the project. Obviously lots of folders are involved and its not easy to manually search for the file. You can simple ...

    Updated 11-07-2011 at 05:09 PM by Java Tip

    Categories
    Eclipse
  27. Preparing development environment for J2EE dev/JBoss

    by , 11-06-2011 at 05:25 PM (My Java Tips)
    I will show how to prepare development environment for J2EE development using JBoss. Download and install the JBoss. I will be using jboss-4.2.2.GA. Now download the latest Java EE Eclipse from eclipse.org. I have version 3.3.2.


    You should have all the required plugins for J2EE development with JBoss in your Eclipse. Navigate to:

    Help > Software updates > Find and Install > Search for new features to install > New remote site

    You can name ...
    Categories
    Eclipse , EJB , Java EE , JBoss , JSF
  28. Debugging Remote Java Application

    by , 11-05-2011 at 06:38 PM (My Java Tips)
    Debugging is very helpful is following the flow of an application and knowing what happens when. You get list of variables with their values and you can flow what exactly is happening. It really helps is identifying the problem areas. Debugging in Eclipse is really simple and easy. I assume that you have done debugging in Eclipse.




    Debugging a J2EE application is a bit tricky since the application is deployed in web/application container. JBoss provides support for ...
    Categories
    Eclipse , Java EE , JBoss
  29. Eclipse - Show View

    by , 11-05-2011 at 06:35 PM (My Java Tips)
    Java developers working in Eclispe should be aware of the windows that Eclipse provides for assistance. You may turn them on/off when ever required.



    Select Window > Show view from menu bar to see the available views.Name:  eclipse_views.PNG
Views: 265
Size:  34.5 KB

    Once you have a view, you can slide it to the appropriate place you want. I agree that it will take some space and this will reduce your working area. But can always minimize a view. Also, double clicking the view ...
    Categories
    Eclipse
  30. Debugging - All references of a class/object

    by , 11-04-2011 at 06:48 PM (My Java Tips)
    Consider the following scenario. You have a class and you with to see all the references of it. It’s definitely worth seeing that. Eclipse 3.3 provides this functionality.


    Mark a class (whose references you want to see) in the Java editor and choose All Instanced from the context menu.

    If you want to display references of the specific object, follow the following procedure:

    In the Variable window, right click on the object and choose All References. A ...
    Categories
    Eclipse
Page 1 of 3 123 LastLast