From 980b8c0be0711781aa11f5f01e6e115a9a5beec5 Mon Sep 17 00:00:00 2001 From: james Date: Mon, 13 May 2002 14:09:18 +0000 Subject: Make image initialization static --- .../team/internal/ccvs/ui/CVSDecorationRunnable.java | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'bundles/org.eclipse.team.cvs.ui') diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSDecorationRunnable.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSDecorationRunnable.java index e3577eda4..5193df6b1 100644 --- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSDecorationRunnable.java +++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSDecorationRunnable.java @@ -52,10 +52,17 @@ public class CVSDecorationRunnable implements Runnable { List decorations = new ArrayList(); private final static int NUM_TO_BATCH = 50; + static { + dirty = new CachedImageDescriptor(TeamUIPlugin.getPlugin().getImageDescriptor(ISharedImages.IMG_DIRTY_OVR)); + checkedIn = new CachedImageDescriptor(TeamUIPlugin.getPlugin().getImageDescriptor(ISharedImages.IMG_CHECKEDIN_OVR)); + checkedOut = new CachedImageDescriptor(TeamUIPlugin.getPlugin().getImageDescriptor(ISharedImages.IMG_CHECKEDOUT_OVR)); + merged = new CachedImageDescriptor(CVSUIPlugin.getPlugin().getImageDescriptor(ICVSUIConstants.IMG_MERGED)); + } + /* * Define a cached image descriptor which only creates the image data once */ - public class CachedImageDescriptor extends ImageDescriptor { + public static class CachedImageDescriptor extends ImageDescriptor { ImageDescriptor descriptor; ImageData data; public CachedImageDescriptor(ImageDescriptor descriptor) { @@ -71,10 +78,6 @@ public class CVSDecorationRunnable implements Runnable { /* package */ CVSDecorationRunnable(IDecorationNotifier notifier) { - dirty = new CachedImageDescriptor(TeamUIPlugin.getPlugin().getImageDescriptor(ISharedImages.IMG_DIRTY_OVR)); - checkedIn = new CachedImageDescriptor(TeamUIPlugin.getPlugin().getImageDescriptor(ISharedImages.IMG_CHECKEDIN_OVR)); - checkedOut = new CachedImageDescriptor(TeamUIPlugin.getPlugin().getImageDescriptor(ISharedImages.IMG_CHECKEDOUT_OVR)); - merged = new CachedImageDescriptor(CVSUIPlugin.getPlugin().getImageDescriptor(ICVSUIConstants.IMG_MERGED)); this.notifier = notifier; } -- cgit v1.2.3