dev/Sorting/Thoughts

Journal of development Sorting Thoughts and more…

Avoid pitfalls with property testers in a RCP app

Posted on Dec 16, 2012 in Eclipse, Java, Programming

Sorting Thoughts Context Menu
For a new Sorting Thoughts feature that give the user access to context based action items in a context menu, I learned again that Eclipse and the Command Core Expressions are sometimes not very clear. When you leave the trivial way, you can waste many many time to find the right solution.

At first glance it seems to be very easy, I thought I must only register and implement a property tester and all is fine. But I was wrong. Without the help of Robert Wloch article “Property Testers with Command Core Expressions” I never thought that I have to implement a start up trigger (IStartup) and a ISelectionChangedListener too. So, if you want implement context based menu entries with property testers read the article first.

Links

Read More

Platform check in Eclipse 3.5

Posted on Jul 8, 2009 in Eclipse, Java

To check the running platform in an Eclipse 3.5 plugin or RCP app use this:

org.eclipse.jface/src/org/eclipse/jface/util/Util.java

...
        /**
	 * Note: this may be made internal in 3.5
	 * @return true for windows platforms
	 * @since 3.5
	 */
	public static final boolean isWindows() {
		final String ws = SWT.getPlatform();
		return WS_WIN32.equals(ws) || WS_WPF.equals(ws);
	}
	
	/**
	 * Note: this may be made internal in 3.5
	 * @return true for mac platforms
	 * @since 3.5
	 */
	public static final boolean isMac() {
		final String ws = SWT.getPlatform();
		return WS_CARBON.equals(ws) || WS_COCOA.equals(ws);
	}
...
 
Read More

How-to: Eclipse Commands

Posted on Feb 8, 2009 in Eclipse, Java, Links

If you searching for good eclipse commads instructions, see here…

Six good articles by Prakash G.R.:

Other articles:

and the standard set of references:

Read More

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.

Close