Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 127840 Details for
Bug 246224
[Contributions] Accessing SharedImages in plugin.xml (for ex. org.eclipse.ui.menus)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Patch v06
Shared Images v06.txt (text/plain), 3.92 KB, created by
Prakash Rangaraj
on 2009-03-06 12:39:38 EST
(
hide
)
Description:
Patch v06
Filename:
MIME Type:
Creator:
Prakash Rangaraj
Created:
2009-03-06 12:39:38 EST
Size:
3.92 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.ui.workbench >Index: Eclipse UI/org/eclipse/ui/internal/WorkbenchImages.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchImages.java,v >retrieving revision 1.65 >diff -u -r1.65 WorkbenchImages.java >--- Eclipse UI/org/eclipse/ui/internal/WorkbenchImages.java 6 Jan 2009 21:08:54 -0000 1.65 >+++ Eclipse UI/org/eclipse/ui/internal/WorkbenchImages.java 6 Mar 2009 17:37:09 -0000 >@@ -70,6 +70,8 @@ > > private static ImageRegistry imageRegistry; > >+ private static boolean isInitialized; >+ > /* Declare Common paths */ > > public final static String ICONS_PATH = "$nl$/icons/full/";//$NON-NLS-1$ >@@ -595,6 +597,7 @@ > imageRegistry = new ImageRegistry(); > descriptors = new HashMap(); > declareImages(); >+ isInitialized = true; > } > > /** >@@ -620,4 +623,12 @@ > public static ImageDescriptor getWorkbenchImageDescriptor(String relativePath){ > return ImageDescriptor.createFromURL(BundleUtility.find(PlatformUI.PLUGIN_ID, ICONS_PATH + relativePath)); > } >+ >+ /** >+ * Returns whether the image registry is been initialized or not >+ * @return <code>true</code> if initialized, <code>false</code> otherwise >+ */ >+ public static boolean isInitialized() { >+ return isInitialized; >+ } > } >Index: Eclipse UI/org/eclipse/ui/internal/SharedImages.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/SharedImages.java,v >retrieving revision 1.7 >diff -u -r1.7 SharedImages.java >--- Eclipse UI/org/eclipse/ui/internal/SharedImages.java 8 May 2006 20:55:34 -0000 1.7 >+++ Eclipse UI/org/eclipse/ui/internal/SharedImages.java 6 Mar 2009 17:37:08 -0000 >@@ -46,4 +46,11 @@ > public ImageDescriptor getImageDescriptor(String symbolicName) { > return WorkbenchImages.getImageDescriptor(symbolicName); > } >+ /** >+ * Returns whether the image registry is been initialized or not >+ * @return <code>true</code> if initialized, <code>false</code> otherwise >+ */ >+ public boolean isInitialized() { >+ return WorkbenchImages.isInitialized(); >+ } > } >Index: Eclipse UI/org/eclipse/ui/plugin/AbstractUIPlugin.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/plugin/AbstractUIPlugin.java,v >retrieving revision 1.51 >diff -u -r1.51 AbstractUIPlugin.java >--- Eclipse UI/org/eclipse/ui/plugin/AbstractUIPlugin.java 5 Mar 2009 22:46:30 -0000 1.51 >+++ Eclipse UI/org/eclipse/ui/plugin/AbstractUIPlugin.java 6 Mar 2009 17:37:10 -0000 >@@ -34,6 +34,7 @@ > import org.eclipse.swt.widgets.Display; > import org.eclipse.ui.IWorkbench; > import org.eclipse.ui.PlatformUI; >+import org.eclipse.ui.internal.SharedImages; > import org.eclipse.ui.internal.WWinPluginAction; > import org.eclipse.ui.internal.util.BundleUtility; > import org.eclipse.ui.preferences.ScopedPreferenceStore; >@@ -664,12 +665,13 @@ > throw new IllegalArgumentException(); > } > >-// commented out temporarily - see bug 246224 comment 18 >-// ImageDescriptor imageDescriptor = PlatformUI.getWorkbench() >-// .getSharedImages().getImageDescriptor(imageFilePath); >-// if (imageDescriptor != null) >-// return imageDescriptor; // found in the shared images >- >+ SharedImages sharedImages = (SharedImages) PlatformUI.getWorkbench() >+ .getSharedImages(); >+ if(sharedImages.isInitialized()) { >+ ImageDescriptor imageDescriptor = sharedImages.getImageDescriptor(imageFilePath); >+ if (imageDescriptor != null) >+ return imageDescriptor; // found in the shared images >+ } > // if the bundle is not ready then there is no image > Bundle bundle = Platform.getBundle(pluginId); > if (!BundleUtility.isReady(bundle)) {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 246224
:
116534
|
117425
|
117426
|
121422
|
127448
|
127613
|
127798
|
127799
|
127800
| 127840 |
127858