Eclipse RCP Miscs Series 2
Perspective listener-- Define the behavior what to do when perspective is activated or changed.
IWorkbenchWindow.addPerspectiveListener(IPerspectiveListener listener) and removePerspectiveListener(IPerspectiveListener listener).
Allow user to bring job dialog back
After checked the Checkbox "always run in background", there would be no way to re-show it, so RCP application should define one preference to allow user to reshow the dialog.
protected void createFieldEditors()
{
runInBackground = new BooleanFieldEditor(
IPreferenceConstants.RUN_IN_BACKGROUND,
"Always run in background",
getFieldEditorParent());
addField(runInBackground);
}
public boolean performOk()
{
try
{
WorkbenchPlugin
.getDefault()
.getPreferenceStore()
.setValue(IPreferenceConstants.RUN_IN_BACKGROUND, runInBackground.getBooleanValue());
}
catch (IOException e)
{
e.printStackTrace();
}
return super.performOk();
}
Since SWT/JFace 3.3, your TreeViewer's lable provider can extend ColumnLabelProvider, and implement the cool getTooltip() methods, and enable it by ColumnViewerToolTipSupport.enableFor (viewer);
1. Outside of your rcp project, type
mvn3
org.sonatype.tycho:maven-tycho-plugin:generate-poms -DgroupId=se.mattiasholmqvist -Dtycho.targetPlatform=~/dev/eclipse-3.6.1-delta/
This will create a pom.xml for the current directory (parent project) and a pom.xml for each eclipse project.
2. Building the product
mvn3
clean package -Dtycho.targetPlatform=~/dev/eclipse-3.6.1-delta/
Export product to other platforms
1. Download and install Eclipse DelatPack
In the page, http://download.eclipse.org/eclipse/downloads/, search DeltaPack.
2. Configure org.sonatype.tycho/maven-osgi-packaging-plugin in pom.xml: set the environment values for the target platform.
You can get these values form the delta pack:
org.eclipse.equinox.launcher.${ws}.${os}.${arch}_1.1.0.v20100503
For instance, from
org.eclipse.equinox.launcher.motif.aix.ppc_1.1.0.v20100503, we can see to build a AIX product:
ws should be motif, os should be aix, arch should be ppc.
A concrete example: