Author: dmaliarevich
Date: 2011-09-21 09:26:05 -0400 (Wed, 21 Sep 2011)
New Revision: 34926
Modified:
trunk/jst/plugins/org.jboss.tools.jst.css/src/org/jboss/tools/jst/css/dialog/tabs/TabQuickEditControl.java
trunk/jst/plugins/org.jboss.tools.jst.css/src/org/jboss/tools/jst/css/properties/CSSPropertyPage.java
trunk/jst/plugins/org.jboss.tools.jst.css/src/org/jboss/tools/jst/css/properties/QuickEditSection.java
Log:
https://issues.jboss.org/browse/JBIDE-9739 , selectionChanged(..) notification was fixed.
Modified:
trunk/jst/plugins/org.jboss.tools.jst.css/src/org/jboss/tools/jst/css/dialog/tabs/TabQuickEditControl.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.css/src/org/jboss/tools/jst/css/dialog/tabs/TabQuickEditControl.java 2011-09-21
13:18:17 UTC (rev 34925)
+++
trunk/jst/plugins/org.jboss.tools.jst.css/src/org/jboss/tools/jst/css/dialog/tabs/TabQuickEditControl.java 2011-09-21
13:26:05 UTC (rev 34926)
@@ -46,22 +46,20 @@
}
/**
- * Initialize method.s
+ * Adds content to the tab.
*/
private void addContent() {
-
- ArrayList<String> listKeys = new ArrayList<String>(getStyleAttributes()
- .keySet());
-
+ /*
+ * Called from QuickEditSection.setInput(..)
+ * StyleAttributes() should be already updated
+ */
+ ArrayList<String> listKeys = new
ArrayList<String>(getStyleAttributes().keySet());
if (listKeys.size() == 0) {
Label label = new Label(this, SWT.CENTER);
label.setText(JstUIMessages.CSS_NO_EDITED_PROPERTIES);
}
-
Collections.sort(listKeys);
-
for (String key : listKeys) {
-
String value = getStyleAttributes().get(key);
if (value != null && value.length() > 0) {
addLabel(this, key + Constants.COLON);
Modified:
trunk/jst/plugins/org.jboss.tools.jst.css/src/org/jboss/tools/jst/css/properties/CSSPropertyPage.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.css/src/org/jboss/tools/jst/css/properties/CSSPropertyPage.java 2011-09-21
13:18:17 UTC (rev 34925)
+++
trunk/jst/plugins/org.jboss.tools.jst.css/src/org/jboss/tools/jst/css/properties/CSSPropertyPage.java 2011-09-21
13:26:05 UTC (rev 34926)
@@ -95,9 +95,15 @@
//added by Maksim Areshkay as fix for
https://issues.jboss.org/browse/JBIDE-8523
//here we should process only elements of StyleContainer or set selection to
null(clean)
if(newSelectedObject==null||(newSelectedObject instanceof StyleContainer)){
- super.selectionChanged(part, selection);
selectedObject = newSelectedObject;
update();
+ /*
+ *
https://issues.jboss.org/browse/JBIDE-9739
+ * {super} should be called after the selection has been updated.
+ * Because TabQuickEditControl's addContent() method uses
+ * getStyleAttributes() to fill in the tab content.
+ */
+ super.selectionChanged(part, selection);
}
}
Modified:
trunk/jst/plugins/org.jboss.tools.jst.css/src/org/jboss/tools/jst/css/properties/QuickEditSection.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.css/src/org/jboss/tools/jst/css/properties/QuickEditSection.java 2011-09-21
13:18:17 UTC (rev 34925)
+++
trunk/jst/plugins/org.jboss.tools.jst.css/src/org/jboss/tools/jst/css/properties/QuickEditSection.java 2011-09-21
13:26:05 UTC (rev 34926)
@@ -31,6 +31,10 @@
@Override
public void setInput(IWorkbenchPart part, ISelection selection) {
+ /*
+ * Called after super.selectionChanged(..) from
+ * CSSPropertyPage.selectionChanged(..)
+ */
getSectionControl().update();
getTabComposite().layout(true, true);
super.setInput(part, selection);