Java Code Examples for org.eclipse.compare.CompareUI#disposeOnShutdown()

The following examples show how to use org.eclipse.compare.CompareUI#disposeOnShutdown() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ResourceSelectionTreeDecorator.java    From APICloud-Studio with GNU General Public License v3.0 6 votes vote down vote up
public Image getImage(Image base, int kind) {

		Object key= base;

//		kind &= 3;

		Image[] a= (Image[]) fgMap.get(key);
		if (a == null) {
			a= new Image[6];
			fgMap.put(key, a);
		}
		Image b= a[kind];
		if (b == null) {
			boolean onLeft = kind == PROPERTY_CHANGE;
			b= new DiffImage(base, fgImages[kind], 22, onLeft).createImage();
			CompareUI.disposeOnShutdown(b);
			a[kind]= b;
		}
		return b;
	}
 
Example 2
Source File: RepositoriesViewDecorator.java    From APICloud-Studio with GNU General Public License v3.0 5 votes vote down vote up
public Image getImage(Image base) {
	Image decoratedImage = (Image) fgMap.get(base);
	if (decoratedImage != null) {
		return decoratedImage;
	}
	decoratedImage = new DiffImage(base, locked, 18, false).createImage();
	fgMap.put(base, decoratedImage);
	CompareUI.disposeOnShutdown(decoratedImage);
	return decoratedImage;
}