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 238065 Details for
Bug 130728
Selection state of ToggleSnapToGeometryAction and ToggleGridAction
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Patch to track checked status correctly
Bug130728.patch (text/plain), 3.28 KB, created by
Kevin Milburn
on 2013-12-05 07:42:57 EST
(
hide
)
Description:
Patch to track checked status correctly
Filename:
MIME Type:
Creator:
Kevin Milburn
Created:
2013-12-05 07:42:57 EST
Size:
3.28 KB
patch
obsolete
>diff --git a/org.eclipse.gef/src/org/eclipse/gef/ui/actions/ToggleGridAction.java b/org.eclipse.gef/src/org/eclipse/gef/ui/actions/ToggleGridAction.java >index 349586f..c95b6f7 100644 >--- a/org.eclipse.gef/src/org/eclipse/gef/ui/actions/ToggleGridAction.java >+++ b/org.eclipse.gef/src/org/eclipse/gef/ui/actions/ToggleGridAction.java >@@ -7,6 +7,7 @@ > * > * Contributors: > * IBM Corporation - initial API and implementation >+ * Kevin Milburn - fix Bug 130728 - Selection state of ToggleSnapToGeometryAction and ToggleGridAction > *******************************************************************************/ > package org.eclipse.gef.ui.actions; > >@@ -58,14 +59,14 @@ > } > > /** >- * @see org.eclipse.jface.action.IAction#run() >+ * @see org.eclipse.jface.action.IAction#setChecked(boolean) > */ >- public void run() { >- boolean val = !isChecked(); >+ public void setChecked(boolean checked) { > diagramViewer.setProperty(SnapToGrid.PROPERTY_GRID_VISIBLE, >- new Boolean(val)); >+ Boolean.valueOf(checked)); > diagramViewer.setProperty(SnapToGrid.PROPERTY_GRID_ENABLED, >- new Boolean(val)); >+ Boolean.valueOf(checked)); >+ super.setChecked(checked); > } > > } >diff --git a/org.eclipse.gef/src/org/eclipse/gef/ui/actions/ToggleRulerVisibilityAction.java b/org.eclipse.gef/src/org/eclipse/gef/ui/actions/ToggleRulerVisibilityAction.java >index 23fac70..82b292d 100644 >--- a/org.eclipse.gef/src/org/eclipse/gef/ui/actions/ToggleRulerVisibilityAction.java >+++ b/org.eclipse.gef/src/org/eclipse/gef/ui/actions/ToggleRulerVisibilityAction.java >@@ -7,6 +7,7 @@ > * > * Contributors: > * IBM Corporation - initial API and implementation >+ * Kevin Milburn - fix Bug 130728 - Selection state of ToggleSnapToGeometryAction and ToggleGridAction > *******************************************************************************/ > package org.eclipse.gef.ui.actions; > >@@ -59,11 +60,12 @@ > } > > /** >- * @see org.eclipse.jface.action.IAction#run() >+ * @see org.eclipse.jface.action.IAction#setChecked(boolean) > */ >- public void run() { >+ public void setChecked(boolean checked) { > diagramViewer.setProperty(RulerProvider.PROPERTY_RULER_VISIBILITY, >- new Boolean(!isChecked())); >+ Boolean.valueOf(checked)); >+ super.setChecked(checked); > } > > } >diff --git a/org.eclipse.gef/src/org/eclipse/gef/ui/actions/ToggleSnapToGeometryAction.java b/org.eclipse.gef/src/org/eclipse/gef/ui/actions/ToggleSnapToGeometryAction.java >index 542495f..4f9d636 100644 >--- a/org.eclipse.gef/src/org/eclipse/gef/ui/actions/ToggleSnapToGeometryAction.java >+++ b/org.eclipse.gef/src/org/eclipse/gef/ui/actions/ToggleSnapToGeometryAction.java >@@ -7,6 +7,7 @@ > * > * Contributors: > * IBM Corporation - initial API and implementation >+ * Kevin Milburn - fix Bug 130728 - Selection state of ToggleSnapToGeometryAction and ToggleGridAction > *******************************************************************************/ > package org.eclipse.gef.ui.actions; > >@@ -57,11 +58,12 @@ > } > > /** >- * @see org.eclipse.jface.action.IAction#run() >+ * @see org.eclipse.jface.action.IAction#setChecked(boolean) > */ >- public void run() { >+ public void setChecked(boolean checked) { > diagramViewer.setProperty(SnapToGeometry.PROPERTY_SNAP_ENABLED, >- new Boolean(!isChecked())); >+ Boolean.valueOf(checked)); >+ super.setChecked(checked); > } > > }
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 130728
: 238065