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 88466 Details for
Bug 217320
Palette drawers should be able to have no icon
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Patch with proposed solution.
GEF_SupportNoIconOnDrawer.txt (text/plain), 3.14 KB, created by
Cherie Revells
on 2008-01-31 16:23:00 EST
(
hide
)
Description:
Patch with proposed solution.
Filename:
MIME Type:
Creator:
Cherie Revells
Created:
2008-01-31 16:23:00 EST
Size:
3.14 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.gef >Index: src/org/eclipse/gef/palette/PaletteDrawer.java >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.gef/plugins/org.eclipse.gef/src/org/eclipse/gef/palette/PaletteDrawer.java,v >retrieving revision 1.12 >diff -u -r1.12 PaletteDrawer.java >--- src/org/eclipse/gef/palette/PaletteDrawer.java 30 Mar 2005 21:27:02 -0000 1.12 >+++ src/org/eclipse/gef/palette/PaletteDrawer.java 31 Jan 2008 21:21:42 -0000 >@@ -1,5 +1,5 @@ > /******************************************************************************* >- * Copyright (c) 2000, 2005 IBM Corporation and others. >+ * Copyright (c) 2000, 2008 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 >@@ -56,6 +56,7 @@ > > private int initialState; > private Object drawerType; >+private boolean showDefaultIcon = true; > > /** > * Constructor >@@ -157,5 +158,28 @@ > initialState = state; > listeners.firePropertyChange(PROPERTY_INITIAL_STATUS, oldState, state); > } >- >+ >+/** >+ * Should the default icon be shown for this drawer if no icon is set? >+ * >+ * @return true if the default icon should be shown if no icon is set; false >+ * otherwise >+ * @since 3.4 >+ */ >+public boolean showDefaultIcon() { >+ return showDefaultIcon; >+} >+ >+/** >+ * Should the default icon be shown for this drawer if no icon is set? >+ * >+ * @param showDefaultIcon >+ * true if the default icon should be shown if no icon is set; false >+ * otherwise >+ * @since 3.4 >+ */ >+public void setShowDefaultIcon(boolean showDefaultIcon) { >+ this.showDefaultIcon = showDefaultIcon; >+} >+ > } >Index: src/org/eclipse/gef/internal/ui/palette/editparts/DrawerEditPart.java >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.gef/plugins/org.eclipse.gef/src/org/eclipse/gef/internal/ui/palette/editparts/DrawerEditPart.java,v >retrieving revision 1.24 >diff -u -r1.24 DrawerEditPart.java >--- src/org/eclipse/gef/internal/ui/palette/editparts/DrawerEditPart.java 19 Oct 2007 19:47:06 -0000 1.24 >+++ src/org/eclipse/gef/internal/ui/palette/editparts/DrawerEditPart.java 31 Jan 2008 21:21:42 -0000 >@@ -1,5 +1,5 @@ > /******************************************************************************* >- * Copyright (c) 2000, 2007 IBM Corporation and others. >+ * Copyright (c) 2000, 2008 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 >@@ -188,8 +188,8 @@ > protected void refreshVisuals() { > getDrawerFigure().setToolTip(createToolTip()); > >- ImageDescriptor img = getPaletteEntry().getSmallIcon(); >- if (img == null) { >+ ImageDescriptor img = getDrawer().getSmallIcon(); >+ if (img == null && getDrawer().showDefaultIcon()) { > img = InternalImages.DESC_FOLDER_OPEN; > } > setImageDescriptor(img);
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
Flags:
ahunter.eclipse
:
iplog+
Actions:
View
|
Diff
Attachments on
bug 217320
: 88466