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 8453 Details for
Bug 21756
[PropertiesView] incorrect SetPropertyValueCommand#undo implementation
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Patch to add new API (instead of JavaDoc patch)
org.eclipse.ui.views.properties-patch-for-IPropertySourceExtension.txt (text/plain), 5.88 KB, created by
Gunnar Wagenknecht
on 2004-03-10 05:03:06 EST
(
hide
)
Description:
Patch to add new API (instead of JavaDoc patch)
Filename:
MIME Type:
Creator:
Gunnar Wagenknecht
Created:
2004-03-10 05:03:06 EST
Size:
5.88 KB
patch
obsolete
>Index: IPropertySource.java >=================================================================== >retrieving revision 1.6 >diff -u -r1.6 IPropertySource.java >--- IPropertySource.java 24 Jun 2003 14:52:54 -0000 1.6 >+++ IPropertySource.java 10 Mar 2004 09:50:35 -0000 >@@ -1,5 +1,5 @@ > /******************************************************************************* >- * Copyright (c) 2000, 2003 IBM Corporation and others. >+ * Copyright (c) 2000, 2004 IBM Corporation and others. > * All rights reserved. This program and the accompanying materials > * are made available under the terms of the Common Public License v1.0 > * which accompanies this distribution, and is available at >@@ -7,6 +7,7 @@ > * > * Contributors: > * IBM Corporation - initial API and implementation >+ * Gunnar Wagenknecht - fix for bug 21756 (https://bugs.eclipse.org/bugs/show_bug.cgi?id=21756) > *******************************************************************************/ > package org.eclipse.ui.views.properties; > >@@ -29,6 +30,7 @@ > * @see org.eclipse.core.runtime.IAdaptable > * @see org.eclipse.core.runtime.Platform#getAdapterManager() > * @see org.eclipse.ui.views.properties.PropertySheetPage >+ * @see org.eclipse.ui.views.properties.IPropertySourceExtension > */ > public interface IPropertySource { > >@@ -99,13 +101,18 @@ > public Object getPropertyValue(Object id); > /** > * Returns whether the value of the property with the given id has changed from >- * its default value. Returns <code>false</code> if the notion of default value >- * is not meaningful for the specified property, or if this source does not have >+ * its default value. Returns <code>false</code> if this source does not have > * the specified property. >+ * <p> >+ * If the notion of default value is not meaningful for the specified property >+ * than <code>true</code> is returned. >+ * </p> > * > * @param id the id of the property > * @return <code>true</code> if the value of the specified property has changed >- * from its original default value, and <code>false</code> otherwise >+ * from its original default value or if the specified property does not have >+ * a meaningfull default value, and <code>false</code> otherwise >+ * @see IPropertySourceExtension#isPropertyResettable(Object) > */ > public boolean isPropertySet(Object id); > /** >Index: PropertySheetEntry.java >=================================================================== >retrieving revision 1.7 >diff -u -r1.7 PropertySheetEntry.java >--- PropertySheetEntry.java 10 Mar 2003 22:09:05 -0000 1.7 >+++ PropertySheetEntry.java 10 Mar 2004 09:50:36 -0000 >@@ -1,5 +1,5 @@ > /******************************************************************************* >- * Copyright (c) 2000, 2003 IBM Corporation and others. >+ * Copyright (c) 2000, 2004 IBM Corporation and others. > * All rights reserved. This program and the accompanying materials > * are made available under the terms of the Common Public License v1.0 > * which accompanies this distribution, and is available at >@@ -7,6 +7,7 @@ > * > * Contributors: > * IBM Corporation - initial API and implementation >+ * Gunnar Wagenknecht - fix for bug 21756 (https://bugs.eclipse.org/bugs/show_bug.cgi?id=21756) > *******************************************************************************/ > > package org.eclipse.ui.views.properties; >@@ -512,6 +513,13 @@ > for (int i = 0; i < objects.length; i++){ > IPropertySource source = getPropertySource(objects[i]); > if (source.isPropertySet(descriptor.getId())) { >+ // fix for https://bugs.eclipse.org/bugs/show_bug.cgi?id=21756 >+ if(source instanceof IPropertySourceExtension) { >+ IPropertySourceExtension extendedSource = (IPropertySourceExtension) source; >+ // continue with next if property id not resettable >+ if (!extendedSource.isPropertyResettable(descriptor.getId())) >+ continue; >+ } > source.resetPropertyValue(descriptor.getId()); > change = true; > } >Index: src/org/eclipse/ui/views/properties/IPropertySourceExtension.java >=================================================================== >RCS file: src/org/eclipse/ui/views/properties/IPropertySourceExtension.java >diff -N src/org/eclipse/ui/views/properties/IPropertySourceExtension.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/ui/views/properties/IPropertySourceExtension.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,36 @@ >+/******************************************************************************* >+ * Copyright (c) 2000, 2004 IBM Corporation and others. >+ * All rights reserved. This program and the accompanying materials >+ * are made available under the terms of the Common Public License v1.0 >+ * which accompanies this distribution, and is available at >+ * http://www.eclipse.org/legal/cpl-v10.html >+ * >+ * Contributors: >+ * Gunnar Wagenknecht - initial API and implementation >+ *******************************************************************************/ >+package org.eclipse.ui.views.properties; >+ >+/** >+ * Extension to the standard <code>IPropertySource</code> interface. >+ * <p> >+ * This interface provides extended API to <code>IPropertySource</code> >+ * to allow an easier indication of properties that have a default value >+ * and can be resetted. >+ * </p> >+ * >+ * @since 3.0 >+ * @see org.eclipse.ui.views.properties.IPropertySource >+ */ >+public interface IPropertySourceExtension extends IPropertySource >+{ >+ /** >+ * Returns whether the value of the property with the specified id >+ * is resettable to a default value. >+ * >+ * @param id the id of the property >+ * @return <code>true</code> if the property with the specified id has >+ * a meaningfull default value to which it can be resetted to, and >+ * <code>false</code> otherwise >+ */ >+ boolean isPropertyResettable(Object id); >+}
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 21756
:
8452
|
8453
|
10225
|
20599