Author: snjeza
Date: 2011-10-18 13:38:59 -0400 (Tue, 18 Oct 2011)
New Revision: 35766
Modified:
trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/editors/GettingStartedPage.java
trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/model/FeedsEntry.java
Log:
JBIDE-9368 Dashboard(s) for easy news aggregation, twitter and easy additional/3rd party
plugin installation and project template/creation
Modified:
trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/editors/GettingStartedPage.java
===================================================================
---
trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/editors/GettingStartedPage.java 2011-10-18
16:25:50 UTC (rev 35765)
+++
trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/editors/GettingStartedPage.java 2011-10-18
17:38:59 UTC (rev 35766)
@@ -61,6 +61,7 @@
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Text;
import org.eclipse.ui.INewWizard;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.PlatformUI;
@@ -905,11 +906,12 @@
return;
}
String text = entry.getFormString();
- final FormText formText = toolkit.createFormText(composite, true);
+ FormText formText = toolkit.createFormText(composite, true);
TableWrapData td = new TableWrapData();
td.indent = 2;
- Point size = composite.computeSize(SWT.DEFAULT, SWT.DEFAULT);
+ Point size = newsScrollComposite.computeSize(SWT.DEFAULT, SWT.DEFAULT);
td.maxWidth = size.x - 2;
+ formText.setLayoutData(td);
try {
// to avoid illegal argumentexception on formtext fields.
// we replace the HTML entity with the standard xml version
@@ -918,7 +920,15 @@
formText.setText(text, true, true);
} catch(IllegalArgumentException se) {
- formText.setText("Problem rendering entry - " +
se.getMessage(),false,false);
+ formText.dispose();
+ formText = toolkit.createFormText(composite, false);
+ formText.setLayoutData(td);
+ try {
+ formText.setText("Problem rendering entry - " +
StringEscapeUtils.unescapeXml(se.getMessage()), false, false);
+ } catch (Exception e1) {
+ JBossCentralActivator.log(se);
+ }
+ continue;
}
//Display display = Display.getCurrent();
//formText.setFont(getLinkFont(display));
@@ -949,13 +959,20 @@
}
pageBook.showPage(composite);
+ composite.layout(true, true);
form.reflow(true);
form.redraw();
recomputeScrollComposite(scrollable, pageBook);
}
protected void resize() {
- Point size = form.getBody().getSize();
+ Point size;
+ if (Platform.OS_MACOSX.equals(Platform.getOS())) {
+ size = form.getSize();
+ size.y = form.getBody().getSize().y;
+ } else {
+ size = form.getBody().getSize();
+ }
GridData gd;
Point computedSize;
int widthHint = size.x/2 - 40;
Modified:
trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/model/FeedsEntry.java
===================================================================
---
trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/model/FeedsEntry.java 2011-10-18
16:25:50 UTC (rev 35765)
+++
trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/model/FeedsEntry.java 2011-10-18
17:38:59 UTC (rev 35766)
@@ -113,7 +113,7 @@
buffer.append("</span>");
buffer.append(" ");
buffer.append("<span color=\"author\"
font=\"author\">");
- buffer.append(author);
+ buffer.append(StringEscapeUtils.unescapeXml(author));
buffer.append("</span>");
cr = true;
}
@@ -125,7 +125,7 @@
cr = false;
if (shortDescription != null && !shortDescription.isEmpty()) {
buffer.append("<span font=\"description\">");
- buffer.append(shortDescription);
+ buffer.append(StringEscapeUtils.unescapeHtml(shortDescription));
buffer.append("</span>");
cr = true;
}
Show replies by date