javawiki.org becomes richclient2.eu

…the rest remains constant. My employer decided to host my expressions about the eclipse-framework and prepared a new blog, where also other client-technologies will be mentioned and is accessible under http://www.richclient2.eu.

Add comment July 6th, 2006

A SWT Calendar widget

Today I want to show how to use of the open-source project SWT-Calendar. With a few lines of code you can implement a wonderful small calendar widget for SWT, that is not delivered by default.

I’ve written a tiny RCP where you can select a date.

Calendar RCP
If you click on the text-field you can edit and save a date. This dialog is very easy to integrate in your RCP, will preselect the date of the text-field and will solve all your problems with the missing calendar-widget. :)
The Calendar Dialog

Downloads
Download the Calendar-Demo as Plug-In (Source included - 56kByte)
Download the Calendar-Demo as RCO (Source inluded - 6,2Mbyte)

Add comment April 10th, 2006

Getting rid of “Convert Line Delimiters to”

If you're having dependencies to org.eclipse.ui.ide and you launch your RCP you'll automatically get an entry in the menu-bar that is called "Convert Line Delimiters to" and also "Last Edit Location", although you don't need it. To remove this entries place the following lines in your ApplicationActionBarAdvisor

JAVA:
  1.  
  2. ActionSetRegistry reg = WorkbenchPlugin.getDefault().getActionSetRegistry();
  3. IActionSetDescriptor[] actionSets = reg.getActionSets();
  4. // removing annoying gotoLastPosition Message.
  5. String actionSetId = "org.eclipse.ui.edit.text.actionSet.navigation"; //$NON-NLS-1$
  6. for (int i = 0; i <actionSets.length; i++)
  7. {
  8.     if (!actionSets[i].getId().equals(actionSetId))
  9.         continue;
  10.     IExtension ext = actionSets[i].getConfigurationElement()
  11.         .getDeclaringExtension();
  12.     reg.removeExtension(ext, new Object[] { actionSets[i] });
  13. }
  14. // Removing convert line delimiters menu.
  15. actionSetId = "org.eclipse.ui.edit.text.actionSet.convertLineDelimitersTo"; //$NON-NLS-1$
  16. for (int i = 0; i <actionSets.length; i++)
  17. {
  18.     if (!actionSets[i].getId().equals(actionSetId))
  19.         continue;
  20.     IExtension ext = actionSets[i].getConfigurationElement()
  21.         .getDeclaringExtension();
  22.     reg.removeExtension(ext, new Object[] { actionSets[i] });
  23. }
  24.  
  25.  

2 comments March 20th, 2006

JRE-Bundling with the Look & Feel of the current XP-Theme

It is always recommended to deliver a JRE with your Eclipse-Product, because it has tow major advantages.

  1. The client needn't to install java (probably he doesn't have the rights or the competence).
  2. You can be sure that all your clients use the same version and vendor of the vm.

But theres also a great advantage: Sun doesn't provide by default a manifest-file for displaying the widgets in the current theme of your operating-system (see http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6178745), but uses the default look&feel of Windows. To fix this you need to the javaw.exe.manifest, located in your org.eclipse.swt.win32.win32.x86_x.y.z.jar-Plugin Package.

To bundle your VM, just create a folder "jre" in your [Eclipse-Root]-Directory copy the vm, take the Manifest-file and copy it to [Eclipse-Root]/jre/bin

Add comment March 19th, 2006

Enhancing the Combo-Widget with Images

Probably you was already faced with the requirement to add small icons to your pulldowns. That looks very nice, but unfortunately there is no common SWT-Widget to realize this.
Fortunately the Eclipse-Framework is OpenSource and we can reprodruce the structure of a SWT-ComboBox. A Combo is not more than a text-field and a small button with an arrow. In addition is a event-handler implemented that shows a Composite as a tooltip with the entries of the "combo-list". We just have to take this class and change the structure of the content. We don't want to have a org.eclipse.swt.widgets.List, but a org.eclipse.swt.widgets.Table with multiple org.eclipse.swt.widgets.TableItems where you can specify an image...

Continue Reading Add comment March 3rd, 2006

Best-Practice: Developing a Model-Based Editor - Editor-Implementation

Developing a Model-Based Editor - TOC

  1. Intro
  2. Preparation
  3. Editor-Inputs
  4. Editor-Implementation

TBD

5 comments March 3rd, 2006

Best-Practice: Developing a Model-Based Editor - Editor-Inputs

Developing a Model-Based Editor - TOC

  1. Intro
  2. Preparation
  3. Editor-Inputs
  4. Editor-Implementation

TBD

4 comments March 3rd, 2006

Best-Practice: Developing a Model-Based Editor - Preparation

In our example we want to provide an simple editor for the object org.javawiki.model.SubProcess and a MultiPageEditor with two pages for the object org.javawiki.model.Step. At first we define the extension points. The assignment which object-signature is linked with a special editor is realized in the EditorContributor. This class knows the correct editor-id (specified in your plugin.xml) to a special Object.

Continue Reading 3 comments March 2nd, 2006

Best-Practice: Developing a Model-Based Editor - Intro

A very important element of the Eclipse-Framework are editors. Editors are among views the fundamental element for user-interaction.
Eclipse provides a wonderful framework for creating editors with a reserved area (the "editor area"), where you don't have to care for common behaviour. Just implement the contribution of the input and provide an implementation for saving the edited input...

Continue Reading 6 comments March 2nd, 2006

Polish up your JFace-Viewer! Sorting a table

Today I want to show how to add a sorter to your JFace-Table. The requirement is to sort descending und ascending by clicking on the TableColumn-Header. JFace already provides sorting-functionality. We just have to provide something like an alogrithm to arrange the items. For that we implemented the CollectionSorter that uses the default Collator from ViewerSorter...

Continue Reading Add comment January 18th, 2006

Previous Posts


Categories

Links

Feeds