Author: yradtsevich
Date: 2011-03-10 14:42:17 -0500 (Thu, 10 Mar 2011)
New Revision: 29663
Modified:
branches/jbosstools-3.2.x/jst/plugins/org.jboss.tools.jst.css/src/org/jboss/tools/jst/css/dialog/AbstractCSSDialog.java
Log:
https://issues.jboss.org/browse/JBIDE-8414 : Preview Edit is not working for New CSS Class
Dialog
- fixed. correct event checking is used
Modified:
branches/jbosstools-3.2.x/jst/plugins/org.jboss.tools.jst.css/src/org/jboss/tools/jst/css/dialog/AbstractCSSDialog.java
===================================================================
---
branches/jbosstools-3.2.x/jst/plugins/org.jboss.tools.jst.css/src/org/jboss/tools/jst/css/dialog/AbstractCSSDialog.java 2011-03-10
19:31:11 UTC (rev 29662)
+++
branches/jbosstools-3.2.x/jst/plugins/org.jboss.tools.jst.css/src/org/jboss/tools/jst/css/dialog/AbstractCSSDialog.java 2011-03-10
19:42:17 UTC (rev 29663)
@@ -165,9 +165,14 @@
browser = CSSBrowser.createCSSBrowser(previewComposite, SWT.BORDER | SWT.MOZILLA);
browser.setText(generateBrowserPage());
browser.setLayoutData(gridData);
+
browser.addMouseListener(new MouseAdapter() {
+ /* TODO: yradtsevich: Deduplicate code. Method
+ * org.jboss.tools.jst.css.view.CSSPreview.createPartControl(Composite)
+ * has the same MouseListener in it.
+ * This duplicate code may cause issues like JBIDE-8414 */
public void mouseDoubleClick(MouseEvent e) {
- if (e.widget == browser) {
+ if (browser.isBrowserEvent(e)) {
browser.setEnabled(false);
previewComposite.setMaximizedControl(previewText);
previewText.setFocus();