Eclipse Search

Loading

Mar 24, 2011

A short tutorial on Intro / Welcome

Welcome page in Eclipse provides you a unique way to introduce your product to the new users. Its very flexible and can be extended by other plugins. You can create the entire Welcome view by yourself by extending the org.eclipse.ui.intro and provide all the contents you want. That is little tedius, and in this tutorial, we are going to explore an easier one - the CustomizableIntroPart.

Read More ...

Feb 4, 2011

Adding a new editorAction for Orion

In case you have not heard it yet, Orion is the new Web IDE from Eclipse. In a blog entry introducing Orion, I said that this one is going to stand out from the crowd and going to rule the world. Why can't the other Web IDEs do that? Because, Orion, walking in the path of Eclipse, will provide the ability to customize and extend. Now with Orion 0.2 M5, you can extend the editor and provide your own editorAction. This is the first and only "extension point" available, but for sure, more will follow.

For this tip, we are going to add a Dictionary look up action to the editor. The action will open up Google Dictionary in a popup window for the selected text in the editor. Yes, popup windows are so ugly, and a div would be lot better, I'll do the beautification later, so for now disable your popup blockers.

Read More...

Jan 17, 2011

Beware of Plagiarism ...

Thanks to one of the readers of my blog, I came across this entry: http://eclipse-perspectivecustomization.blogspot.com/2011/01/top-10-mistakes-in-eclipse-plug-in.html That was a complete copy-paste from my top 10 mistakes blog entry. I did a little search and found all of the blog entries are copy-pasted from elsewhere.

Wonder what would be the intention of having such a blog :-(

Jan 13, 2011

"Web" is the name of the game ...

For a long time, there are multiple efforts for the concept of "single sourcing": One code base; runs on Web and Desktop without any/much change. I've always strongly rejected the idea of it. Checking out the promising demos of the technology, the pointy-haired Boss simply dreams of the 50% cut in his development cost by choosing the technology. He can be easily convinced that the users don't have to be trained for two different UIs to achieve the same thing right, resulting in cutting cost in documentation, training, bug-fixing etc. Well, fact is far beyond that and the Dilbert in you will understand the practical difficulties.

Web and Desktop are two different beasts. What does it mean for a right click in the browser? Or what does it means for a Back/Refresh button in the Desktop? Both the platforms have their own metaphor. You can't simply throw a Web UI to the Desktop or vice-versa. That's why whenever someone shows me demo of "the brand new framework" for creating both UIs with single source, I would say, "wait for an year for this framework to die". Within an year, there would be an another framework attempting the same.

Orion is different. Its the Web IDE from Eclipse, yet it doesn't try to "leverage" the existing Existing IDE code and present the same UI. Instead its written from the group up. Few months back, when I saw a demo for the StyledText for the web, I was thoroughly impressed. It could handle huge files with ease - which is the bottleneck of other online IDEs. Now that its out to the public as Orion, I'm seeing a lot of +ve reviews and few -ve questions as well. One of the primary question is "How many developers need a Web IDE?". Well, I don't have an exact count. But take away is simple. The market for Web based IDEs is brewing up (eg: SkywriterCloud 9) and you would see many more of these in the near future. Just as Eclipse became *the* IDE, Orion is going to be *the* Web IDE. Period.

Dec 3, 2010

Contributing Workbench Wizards thru Commands

You must have been used this JDT toolbar quite often.



The New Class tool item is contributed as an Action in plugin.xml (id "org.eclipse.jdt.ui.actions.NewTypeDropDown"), and then the Menu on the Action is contributed via code. In this tip, let us see how to do the same via command framework and without any code.

Read More...

Oct 18, 2010

New features on Mac

Windowless application:

       SWT now supports an application level menu, so now its possible for an app to have a MenuBar without any Shell

Here is the code sample:

package com.eclipse_tips.mac.sample;

import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Event;
import org.eclipse.swt.widgets.Listener;
import org.eclipse.swt.widgets.Menu;
import org.eclipse.swt.widgets.MenuItem;
import org.eclipse.swt.widgets.Shell;

public class WindowlessApp {

 private static int windowCount;

 public static void main(String[] args) {
  final Display display = new Display();

  Menu appMenuBar = display.getAppMenuBar();
  
  final MenuItem windowMenu = new MenuItem(appMenuBar, SWT.CASCADE);
  windowMenu.setText("Window");
  Menu windowSubMenu = new Menu(null, SWT.DROP_DOWN);
  windowMenu.setMenu(windowSubMenu);
  
  createNWMenuItem(display, windowSubMenu);
  
  while (!display.isDisposed()) {
   if (!display.readAndDispatch())
    display.sleep();
  }
  display.dispose();
 }

 private static Shell createNewWindow(final Display display) {

  windowCount++;
  Shell shell = new Shell(display);
  Menu bar = new Menu(shell, SWT.BAR);
  shell.setMenuBar(bar);
  shell.setText("Window #" + windowCount);

  MenuItem fileItem = new MenuItem(bar, SWT.CASCADE);
  fileItem.setText("&File" + windowCount);

  Menu submenu = new Menu(shell, SWT.DROP_DOWN);
  fileItem.setMenu(submenu);

  MenuItem item = new MenuItem(submenu, SWT.PUSH);
  item.addListener(SWT.Selection, new Listener() {
   public void handleEvent(Event e) {
    System.out.println("Select All");
   }
  });
  item.setText("Select All");
  
  createNWMenuItem(display, submenu);

  return shell;
 }

 private static void createNWMenuItem(final Display display, Menu submenu) {
  MenuItem newWindowItem = new MenuItem(submenu, SWT.PUSH);
  newWindowItem.addListener(SWT.Selection, new Listener() {

   public void handleEvent(Event e) {
    Shell window = createNewWindow(display);
    window.setSize(300, 200);
    window.open();
   }
  });
  newWindowItem.setText("New Window");
  
 }

}


Native ToolBar:

     The native toolBar is now supported and it looks awesome. Here is the modified SWT ToolBar snippet in action:

SWT Native Toolbar on Mac

Window menu items:

    Eclipse adds support to the standard 'Minimize', 'Zoom' & 'Bring All to Front' menu items in the Window menu:



Mac standard menu items in Window menu


Proxy Icon:

     Eclipse now supports proxy icons in the window title. You can drag those icons to other apps or Cmd+click to directly navigate any folder in the file's hierarchy:
Proxy Icon in Eclipse Workbench


Note, these are available in the latest Nightly builds of 3.7 and are subjected to change before the release :-)

Jun 14, 2010

Top 3 things I want in Eclipse 3.7 (Indigo)

3.6 packages are coming to the mirror servers near you, and the reviews are hitting the Planet Eclipse already. Moving on to 3.7, what are the top most features I would love to see in Indigo?

3) Deprecate Actions framework

      Commands are powerful,flexible and better than Actions in many different ways. Actions are simple enough and useful if don't need the flexibility in an RCP application. But for a bigger and extensible app like IDE, Commands make sense. Would be lot better if we get rid of Actions and make all the contributions thru Commands.

2) Packaging in Mac

     The first impression on Eclipse for a Mac user is that its distributed as zip file - not a dmg. Unzipping it does has a Eclipse.app, but it has no features of a Mac Application. Packing it as a complete .app would be a great thing (and giving the ability to pack RCP apps in a similar way) A non-Mac user will have no idea of why/how useful this feature is, and so they don't really care about it :-(

1) PDE Custom Attribute

     The custom attribute in the Manifest editor is a boon to every plug-in developer. It opens up a number of opportunities. The two images are might show off what is possible:



Thats just my wish list. Whats yours?

Apr 27, 2010

Eclipse Day India


It was one hell of a ride. Finalizing the website for registration to designing of the schedule, all the choices were carefully evaluated. No wonder the professional event organizers are paid that much. Despite Murphy's laws being proved few times and issues like halls in different floors, most of the people whom I've met over Eclipse Day India were quite happy about the event. People were pinging me (despite my "rude" status in IM) & Ankur and asking how can they help in this event. Thanks for everyone for sponsoring, helping and attending the event. A special thanks goes to Lynn from the foundation for patiently answering all our queries and helping us.

I presented the two talks. An hour long OSGi tutorial and a lightning talk on Top 10 mistakes in Eclipse plug-in development. Many people said the OSGi tutorial was good. They liked the part that most of it were hands on session instead of slides & bullet points. I've uploaded my presentation and more slides from the presentation will be available from here. On a slightly different note, the people who gave correct answer for the question in the Top 10 presentation were very experienced people. What's happening to the younger generation of developers?



Mar 12, 2010

API Tooling Tutorial

Do you know that adding a new field to an interface or adding a new non-default constructor to a class can break the binary compatibility of your API? There are so many other things like these that can possibly break the compatibility. Either you can spend a lot of your time reviewing all the new added/modified API for breaking changes (before that, you need to spend more amount of time in finding them) or simply use PDE's API tooling to do it for you as you develop.

The tutorial gives an introduction about what API Tooling is and how to setup and use for you project. Click here to read the API Tooling Tutorial.

Feb 8, 2010

Eclipse Day in Bangalore - registrations open

Today the registrations open for Eclipse Day in Bangalore. The entry is *free*, but you have to register to get the ticket. The tickets are limited, so hurry up.

The deadline for talk submissions are fast approaching and you have only one week left. Again, hurry up :-)

We also have a calendar published in the wiki. You can subscribe to it in your calendar, so you won't miss any dates.