Author: mareshkau
Date: 2009-01-30 11:13:01 -0500 (Fri, 30 Jan 2009)
New Revision: 13401
Modified:
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/messages/JstUIMessages.java
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/messages/messages.properties
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/CSSStyleDialog.java
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/StyleComposite.java
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/tabs/TabQuickEditControl.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-3644, preview tab doesn't disappers anymore,
eclipse doesn't support disabling tabs, so when no edited properties, on preview tab
shows message -No Edited Properties-
Modified:
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/messages/JstUIMessages.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/messages/JstUIMessages.java 2009-01-30
15:40:19 UTC (rev 13400)
+++
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/messages/JstUIMessages.java 2009-01-30
16:13:01 UTC (rev 13401)
@@ -100,4 +100,5 @@
public static String PREVIEW_SHEET_TAB_NAME;
public static String DEFAULT_PREVIEW_TEXT;
public static String DEFAULT_TEXT_FOR_BROWSER_PREVIEW;
+ public static String CSS_NO_EDITED_PROPERTIES;
}
Modified:
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/messages/messages.properties
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/messages/messages.properties 2009-01-30
15:40:19 UTC (rev 13400)
+++
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/messages/messages.properties 2009-01-30
16:13:01 UTC (rev 13401)
@@ -13,6 +13,7 @@
CSS_CLASS_DIALOG_FILE_LABEL=CSS file:
CSS_CLASS_DIALOG_STYLE_CLASS_LABEL=Style class:
+CSS_NO_EDITED_PROPERTIES=No Edited Properties
CSS_BROWSE_BUTTON_TOOLTIP=Browse
CSS_CLEAR_STYLE_SHEET=Clear style sheet
Modified:
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/CSSStyleDialog.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/CSSStyleDialog.java 2009-01-30
15:40:19 UTC (rev 13400)
+++
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/CSSStyleDialog.java 2009-01-30
16:13:01 UTC (rev 13401)
@@ -75,7 +75,10 @@
@Override
protected Control createDialogArea(final Composite parent) {
final Composite composite = (Composite) super.createDialogArea(parent);
-
+ if(composite.getLayoutData()!=null && composite.getLayoutData()
instanceof GridData) {
+ ((GridData)composite.getLayoutData()).widthHint=500;
+ ((GridData)composite.getLayoutData()).heightHint=500;
+ }
Split split = new Split(composite, SWT.VERTICAL);
GridLayout layout = new GridLayout();
@@ -202,7 +205,7 @@
}
browserContainer.layout();
}
-
+
/* (non-Javadoc)
* @see
org.eclipse.swt.events.MouseListener#mouseDown(org.eclipse.swt.events.MouseEvent)
*/
Modified:
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/StyleComposite.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/StyleComposite.java 2009-01-30
15:40:19 UTC (rev 13400)
+++
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/StyleComposite.java 2009-01-30
16:13:01 UTC (rev 13401)
@@ -25,7 +25,6 @@
import org.eclipse.swt.widgets.TabItem;
import org.jboss.tools.jst.jsp.messages.JstUIMessages;
import org.jboss.tools.jst.jsp.outline.cssdialog.common.CSSModel;
-import org.jboss.tools.jst.jsp.outline.cssdialog.common.Constants;
import org.jboss.tools.jst.jsp.outline.cssdialog.events.ManualChangeStyleListener;
import org.jboss.tools.jst.jsp.outline.cssdialog.events.StyleAttributes;
import org.jboss.tools.jst.jsp.outline.cssdialog.parsers.BaseListener;
@@ -212,11 +211,12 @@
tabFolder.setSelection(TAB_TEXT_FONT_NUMBER);
- if (styleAttributes.getAttributeMap().size() > SIZE_NULL) {
- tabQuickEdit = new TabItem(tabFolder, SWT.NONE);
- tabQuickEdit.setText(JstUIMessages.QUICK_EDIT_TAB_NAME);
- tabQuickEdit.setToolTipText(JstUIMessages.QUICK_EDIT_TAB_NAME);
- tabQuickEdit.setControl(createTabQuickEditContol(tabFolder));
+ tabQuickEdit = new TabItem(tabFolder, SWT.NONE);
+ tabQuickEdit.setText(JstUIMessages.QUICK_EDIT_TAB_NAME);
+ tabQuickEdit.setToolTipText(JstUIMessages.QUICK_EDIT_TAB_NAME);
+ tabQuickEdit.setControl(createTabQuickEditContol(tabFolder));
+
+ if (styleAttributes.getAttributeMap().size() > SIZE_NULL) {
tabFolder.setSelection(tabQuickEdit);
lastSelectedTab = tabQuickEdit;
}
@@ -416,7 +416,8 @@
lastSelectedTab = tabQuickEdit;
} else {
if (tabQuickEdit != null && !tabQuickEdit.isDisposed()) {
- tabQuickEdit.dispose();
+// tabQuickEdit.dispose();
+ tabQuickEditControl.updateData();
}
tabFolder.redraw();
}
Modified:
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/tabs/TabQuickEditControl.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/tabs/TabQuickEditControl.java 2009-01-30
15:40:19 UTC (rev 13400)
+++
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/tabs/TabQuickEditControl.java 2009-01-30
16:13:01 UTC (rev 13401)
@@ -110,6 +110,12 @@
for (String key : styleAttributes.keySet()) {
listKeys.add(key);
}
+
+ if(listKeys.size()==0) {
+ label = new Label(this, SWT.CENTER);
+ label.setText(JstUIMessages.CSS_NO_EDITED_PROPERTIES);
+ }
+ System.out.println();
Collections.sort(listKeys);
updateDataFromStyleAttributes = true;
for (String key : listKeys) {