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 51551 Details for
Bug 133941
[Properties] Can't contribute properties page for non IAdaptable
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Merged patch
133941patch2 (text/plain), 3.11 KB, created by
Tod Creasey
on 2006-10-06 11:13:13 EDT
(
hide
)
Description:
Merged patch
Filename:
MIME Type:
Creator:
Tod Creasey
Created:
2006-10-06 11:13:13 EDT
Size:
3.11 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.ui.views >Index: src/org/eclipse/ui/views/properties/PropertySheetEntry.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.ui.views/src/org/eclipse/ui/views/properties/PropertySheetEntry.java,v >retrieving revision 1.25 >diff -u -r1.25 PropertySheetEntry.java >--- src/org/eclipse/ui/views/properties/PropertySheetEntry.java 12 Sep 2006 18:58:38 -0000 1.25 >+++ src/org/eclipse/ui/views/properties/PropertySheetEntry.java 6 Oct 2006 15:16:34 -0000 >@@ -19,6 +19,8 @@ > import java.util.Map; > > import org.eclipse.core.commands.common.EventManager; >+import org.eclipse.core.runtime.IAdaptable; >+import org.eclipse.core.runtime.Platform; > import org.eclipse.jface.viewers.CellEditor; > import org.eclipse.jface.viewers.ICellEditorListener; > import org.eclipse.jface.viewers.ILabelProvider; >@@ -244,7 +246,8 @@ > PropertySheetEntry entry = createChildEntry(); > entry.setDescriptor(d); > entry.setParent(this); >- entry.setPropertySourceProvider(propertySourceProvider); >+ entry >+ .setPropertySourceProvider(getPropertySourceProvider(values[0])); > entry.refreshValues(); > newEntries[i] = entry; > } >@@ -459,18 +462,20 @@ > return (IPropertySource) sources.get(object); > > IPropertySource result = null; >- IPropertySourceProvider provider = propertySourceProvider; >- >- if (provider == null && object != null) { >- provider = (IPropertySourceProvider) ViewsPlugin.getAdapter(object, >- IPropertySourceProvider.class, false); >- } >+ IPropertySourceProvider provider = getPropertySourceProvider(object); > > if (provider != null) { > result = provider.getPropertySource(object); >+ } else if (object instanceof IPropertySource) { >+ result = (IPropertySource) object; >+ } else if (object instanceof IAdaptable) { >+ result = (IPropertySource) ((IAdaptable) object) >+ .getAdapter(IPropertySource.class); > } else { >- result = (IPropertySource)ViewsPlugin.getAdapter(object, IPropertySource.class, false); >- } >+ if (object != null) >+ result = (IPropertySource) ViewsPlugin.getAdapter(object, >+ IPropertySource.class, false); >+ } > > sources.put(object, result); > return result; >@@ -562,7 +567,8 @@ > entry = createChildEntry(); > entry.setDescriptor(d); > entry.setParent(this); >- entry.setPropertySourceProvider(propertySourceProvider); >+ entry >+ .setPropertySourceProvider(getPropertySourceProvider(values[0])); > entriesChanged = true; > } > entry.refreshValues(); >@@ -703,6 +709,19 @@ > } > > /** >+ * @param object >+ * @return >+ */ >+ public IPropertySourceProvider getPropertySourceProvider(Object object) { >+ if (propertySourceProvider == null && object != null) { >+ return (IPropertySourceProvider) Platform.getAdapterManager() >+ .getAdapter(object, IPropertySourceProvider.class); >+ } else { >+ return propertySourceProvider; >+ } >+ } >+ >+ /** > * Set the value for this entry. > * <p> > * We set the given value as the value for all our value objects. We then
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 Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 133941
:
37252
|
37327
|
45255
|
45256
| 51551