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 67808 Details for
Bug 187825
[PropertiesView] Set initial expanded node and text color
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
patch for the enhancement
187825 .txt (text/plain), 3.02 KB, created by
Patrick Chuong
on 2007-05-18 11:11:54 EDT
(
hide
)
Description:
patch for the enhancement
Filename:
MIME Type:
Creator:
Patrick Chuong
Created:
2007-05-18 11:11:54 EDT
Size:
3.02 KB
patch
obsolete
>Index: PropertySheetViewer.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.ui.views/src/org/eclipse/ui/views/properties/PropertySheetViewer.java,v >retrieving revision 1.32 >diff -u -r1.32 PropertySheetViewer.java >--- PropertySheetViewer.java 8 May 2006 20:53:18 -0000 1.32 >+++ PropertySheetViewer.java 18 May 2007 15:09:46 -0000 >@@ -42,6 +42,7 @@ > import org.eclipse.swt.events.SelectionEvent; > import org.eclipse.swt.events.TreeEvent; > import org.eclipse.swt.events.TreeListener; >+import org.eclipse.swt.graphics.Color; > import org.eclipse.swt.graphics.Image; > import org.eclipse.swt.graphics.Point; > import org.eclipse.swt.graphics.Rectangle; >@@ -369,6 +370,24 @@ > } else { > updateCategory((PropertySheetCategory) node, item); > } >+ >+ // set the item expanded state and text color >+ if (node instanceof PropertySheetEntry) { >+ IPropertyDescriptor descriptor = ((PropertySheetEntry)node).getDescriptor(); >+ if (descriptor instanceof IPropertyDescriptor2) { >+ IPropertyDescriptor2 descriptor2 = ((IPropertyDescriptor2)descriptor); >+ if (descriptor2.isExpanded()) { >+ createChildren(item); >+ item.setExpanded(true); >+ } >+ >+ int color = descriptor2.getTextColor(); >+ Color textColor = getControl().getDisplay().getSystemColor(color); >+ if (textColor != null) { >+ item.setForeground(1, textColor); >+ } >+ } >+ } > } > > /** >Index: src/org/eclipse/ui/views/properties/IPropertyDescriptor2.java >=================================================================== >RCS file: src/org/eclipse/ui/views/properties/IPropertyDescriptor2.java >diff -N src/org/eclipse/ui/views/properties/IPropertyDescriptor2.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/ui/views/properties/IPropertyDescriptor2.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,35 @@ >+/******************************************************************************* >+ * Copyright (c) 2007 IBM Corporation and others. >+ * All rights reserved. This program and the accompanying materials >+ * are made available under the terms of the Eclipse Public License v1.0 >+ * which accompanies this distribution, and is available at >+ * http://www.eclipse.org/legal/epl-v10.html >+ * >+ * Contributors: >+ * IBM Corporation - initial API and implementation >+ ******************************************************************************/ >+ >+package org.eclipse.ui.views.properties; >+ >+import org.eclipse.swt.SWT; >+ >+/** >+ * @since 3.2 >+ * >+ */ >+public interface IPropertyDescriptor2 extends IPropertyDescriptor { >+ /** >+ * Determine whether the property should be expanded. >+ * >+ * @return true if it should be expanded. >+ */ >+ boolean isExpanded(); >+ >+ /** >+ * Get the text color, can be one of the system color. >+ * >+ * @see SWT.COLOR_BLACK >+ * @return one of the SWT color. >+ */ >+ int getTextColor(); >+}
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 187825
: 67808