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 168810 Details for
Bug 312418
Update problem within ScrollableSelectionFeedbackPolicy, when moving container figure
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 incorporating proposed changes to alternative patch.
FEEDBACK_POLICY_PATCH.txt (text/plain), 4.03 KB, created by
Alexander Nyßen
on 2010-05-17 15:51:40 EDT
(
hide
)
Description:
Patch incorporating proposed changes to alternative patch.
Filename:
MIME Type:
Creator:
Alexander Nyßen
Created:
2010-05-17 15:51:40 EDT
Size:
4.03 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.gef >Index: src/org/eclipse/gef/editpolicies/ScrollableSelectionFeedbackEditPolicy.java >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.gef/plugins/org.eclipse.gef/src/org/eclipse/gef/editpolicies/ScrollableSelectionFeedbackEditPolicy.java,v >retrieving revision 1.1 >diff -u -r1.1 ScrollableSelectionFeedbackEditPolicy.java >--- src/org/eclipse/gef/editpolicies/ScrollableSelectionFeedbackEditPolicy.java 12 Mar 2010 19:57:20 -0000 1.1 >+++ src/org/eclipse/gef/editpolicies/ScrollableSelectionFeedbackEditPolicy.java 17 May 2010 19:49:02 -0000 >@@ -47,7 +47,7 @@ > * > * @author Alexander Nyssen > * @author Philip Ritzkopf >- * >+ * > * @since 3.6 > */ > public class ScrollableSelectionFeedbackEditPolicy extends SelectionEditPolicy { >@@ -100,18 +100,18 @@ > */ > public void activate() { > super.activate(); >- // register all necessary listeners >+ // register listeners to all viewports in the host figure's path; >+ // listeners >+ // to the host figure itself will be registered within showFeedback() >+ // and >+ // unregistered within hideFeedback() > for (Iterator iterator = ViewportUtilities.getViewportsPath( > getHostFigureViewport(), > ViewportUtilities.getRootViewport(getHostFigure())).iterator(); iterator > .hasNext();) { > Viewport viewport = (Viewport) iterator.next(); >- viewport >- .addPropertyChangeListener(viewportViewLocationChangeListener); >- >+ viewport.addPropertyChangeListener(viewportViewLocationChangeListener); > } >- getHostFigure().addLayoutListener(layoutListener); >- getHostFigure().addFigureListener(figureListener); > } > > /** >@@ -179,7 +179,6 @@ > * Creates the primary layer feedback figures. > */ > protected void createNodeFeedbackFigures() { >- > // create ghost feedback for node children > for (Iterator iterator = getHost().getChildren().iterator(); iterator > .hasNext();) { >@@ -194,16 +193,15 @@ > * @see org.eclipse.gef.editpolicies.SelectionEditPolicy#deactivate() > */ > public void deactivate() { >- // remove all registered listeners >- getHostFigure().removeFigureListener(figureListener); >- getHostFigure().removeLayoutListener(layoutListener); >+ // remove viewport listeners; listener to host figure, which were >+ // registered during showSelection() will be unregistered during >+ // hideSelection(), so they do not have to be unregistered here > for (Iterator iterator = ViewportUtilities.getViewportsPath( > getHostFigureViewport(), > ViewportUtilities.getRootViewport(getHostFigure())).iterator(); iterator > .hasNext();) { > Viewport viewport = (Viewport) iterator.next(); >- viewport >- .removePropertyChangeListener(viewportViewLocationChangeListener); >+ viewport.removePropertyChangeListener(viewportViewLocationChangeListener); > > } > super.deactivate(); >@@ -252,6 +250,10 @@ > * @see org.eclipse.gef.editpolicies.SelectionEditPolicy#hideSelection() > */ > protected void hideSelection() { >+ // remove figure and layout listeners >+ getHostFigure().removeLayoutListener(layoutListener); >+ getHostFigure().removeFigureListener(figureListener); >+ // hide any still active feedback > hideFeedback(); > } > >@@ -298,8 +300,7 @@ > List connectionLayerChildren = getLayer(LayerConstants.CONNECTION_LAYER) > .getChildren(); > for (Iterator iterator = connectionLayerChildren.iterator(); iterator >- .hasNext() >- && !connectionLayerChildExceedsClientArea;) { >+ .hasNext() && !connectionLayerChildExceedsClientArea;) { > IFigure connectionLayerChild = (IFigure) iterator.next(); > connectionLayerChildExceedsClientArea = (ViewportUtilities > .getNearestEnclosingViewport(connectionLayerChild) == ((IScrollableFigure) getHostFigure()) >@@ -325,6 +326,10 @@ > // showing the feedback. > getHost().getViewer().reveal(getHost()); > updateFeedback(); >+ // register figure and layout listeners needed to update the feedback >+ // figures upon changes to the host figure. >+ getHostFigure().addLayoutListener(layoutListener); >+ getHostFigure().addFigureListener(figureListener); > } > > /**
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 312418
:
168025
|
168802
| 168810