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 112716 Details for
Bug 172077
[PropertiesDialog] PropertyDialog shows bad messages for non-IWorkbenchAdapter objects
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
Patch to make changes from description
patch-172077.txt (text/plain), 4.87 KB, created by
Trevor
on 2008-09-16 20:00:26 EDT
(
hide
)
Description:
Patch to make changes from description
Filename:
MIME Type:
Creator:
Trevor
Created:
2008-09-16 20:00:26 EDT
Size:
4.87 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.ui.workbench >Index: Eclipse UI/org/eclipse/ui/internal/dialogs/PropertyDialog.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/PropertyDialog.java,v >retrieving revision 1.30 >diff -u -r1.30 PropertyDialog.java >--- Eclipse UI/org/eclipse/ui/internal/dialogs/PropertyDialog.java 9 May 2008 14:13:11 -0000 1.30 >+++ Eclipse UI/org/eclipse/ui/internal/dialogs/PropertyDialog.java 16 Sep 2008 23:59:53 -0000 >@@ -7,6 +7,7 @@ > * > * Contributors: > * IBM Corporation - initial API and implementation >+ * Trevor Kaufman (endante@gmail.com) - bug 172077 > *******************************************************************************/ > package org.eclipse.ui.internal.dialogs; > >@@ -65,14 +66,27 @@ > .iterator(); > String name = getName(element); > if (!pages.hasNext()) { >+ String message; >+ if (name == null) { >+ message = WorkbenchMessages.PropertyDialog_noNameNoPropertyMessage; >+ } else { >+ message = NLS.bind( >+ WorkbenchMessages.PropertyDialog_noPropertyMessage, >+ name); >+ } >+ > MessageDialog.openInformation(shell, >- WorkbenchMessages.PropertyDialog_messageTitle, NLS.bind( >- WorkbenchMessages.PropertyDialog_noPropertyMessage, >- name)); >+ WorkbenchMessages.PropertyDialog_messageTitle, message); > return null; > } >- title = NLS >- .bind(WorkbenchMessages.PropertyDialog_propertyMessage, name); >+ >+ if (name == null) { >+ title = WorkbenchMessages.PropertyDialog_noNamePropertyMessage; >+ } else { >+ title = NLS.bind(WorkbenchMessages.PropertyDialog_propertyMessage, >+ name); >+ } >+ > PropertyDialog propertyDialog = new PropertyDialog(shell, pageManager, > new StructuredSelection(element)); > >@@ -95,14 +109,14 @@ > * > * @param element > * the element >- * @return the name of the element >+ * @return the name of the element or <code>null</code> if the name cannot be retrieved > */ > private static String getName(Object element) { > IWorkbenchAdapter adapter = (IWorkbenchAdapter)Util.getAdapter(element, IWorkbenchAdapter.class); > if (adapter != null) { > return adapter.getLabel(element); > } >- return "";//$NON-NLS-1$ >+ return null; > } > > /** >Index: Eclipse UI/org/eclipse/ui/internal/messages.properties >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/messages.properties,v >retrieving revision 1.383 >diff -u -r1.383 messages.properties >--- Eclipse UI/org/eclipse/ui/internal/messages.properties 30 May 2008 17:10:15 -0000 1.383 >+++ Eclipse UI/org/eclipse/ui/internal/messages.properties 16 Sep 2008 23:59:53 -0000 >@@ -11,6 +11,7 @@ > # - Fix for Bug 57087 > # - Fix for Bug 138034 [Preferences] Label decorations page - extra space > # - Fix for Bug 128529 >+# Trevor Kaufman (endante@gmail.com) - Fix for Bug 172077 > ############################################################################### > > # package: org.eclipse.ui >@@ -478,7 +479,9 @@ > PropertyDialog_toolTip = Open Properties Dialog > PropertyDialog_messageTitle = Property Pages > PropertyDialog_noPropertyMessage = No property pages for {0}. >+PropertyDialog_noNameNoPropertyMessage = No property pages. > PropertyDialog_propertyMessage = Properties for {0} >+PropertyDialog_noNamePropertyMessage = Properties > PropertyPageNode_errorTitle = Property Page Creation Problems > PropertyPageNode_errorMessage = Unable to create the selected property page. > >Index: Eclipse UI/org/eclipse/ui/internal/WorkbenchMessages.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchMessages.java,v >retrieving revision 1.106 >diff -u -r1.106 WorkbenchMessages.java >--- Eclipse UI/org/eclipse/ui/internal/WorkbenchMessages.java 14 May 2008 17:11:06 -0000 1.106 >+++ Eclipse UI/org/eclipse/ui/internal/WorkbenchMessages.java 16 Sep 2008 23:59:53 -0000 >@@ -8,6 +8,7 @@ > * Contributors: > * IBM - Initial API and implementation > * Sebastian Davids - bug 128529 >+ * Trevor Kaufman (endante@gmail.com) - bug 172077 > *******************************************************************************/ > package org.eclipse.ui.internal; > >@@ -512,7 +513,9 @@ > public static String PropertyDialog_toolTip; > public static String PropertyDialog_messageTitle; > public static String PropertyDialog_noPropertyMessage; >+ public static String PropertyDialog_noNameNoPropertyMessage; > public static String PropertyDialog_propertyMessage; >+ public static String PropertyDialog_noNamePropertyMessage; > public static String PropertyPageNode_errorTitle; > public static String PropertyPageNode_errorMessage; >
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 172077
: 112716