Author: elvisisking
Date: 2010-11-02 15:22:53 -0400 (Tue, 02 Nov 2010)
New Revision: 26194
Modified:
trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/docs/images/ServerDialog.png
trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/src/org/jboss/tools/modeshape/rest/RestClientI18n.java
trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/src/org/jboss/tools/modeshape/rest/RestClientI18n.properties
trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/src/org/jboss/tools/modeshape/rest/wizards/ServerPage.java
Log:
JBIDE-7465 Error because the Server URL was setup incorrectly. Added a label to ServerPage
that gives the URL format and an example URL. Changed the screen image of ServerPage in
the documentation.
Modified:
trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/docs/images/ServerDialog.png
===================================================================
(Binary files differ)
Modified:
trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/src/org/jboss/tools/modeshape/rest/RestClientI18n.java
===================================================================
---
trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/src/org/jboss/tools/modeshape/rest/RestClientI18n.java 2010-11-02
17:39:28 UTC (rev 26193)
+++
trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/src/org/jboss/tools/modeshape/rest/RestClientI18n.java 2010-11-02
19:22:53 UTC (rev 26194)
@@ -167,6 +167,7 @@
public static I18n serverPageTestConnectionDialogSuccessMsg;
public static I18n serverPageTitle;
public static I18n serverPageUrlLabel;
+ public static I18n serverPageUrlTemplateLabel;
public static I18n serverPageUrlToolTip;
public static I18n serverPageUserLabel;
public static I18n serverPageUserToolTip;
Modified:
trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/src/org/jboss/tools/modeshape/rest/RestClientI18n.properties
===================================================================
---
trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/src/org/jboss/tools/modeshape/rest/RestClientI18n.properties 2010-11-02
17:39:28 UTC (rev 26193)
+++
trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/src/org/jboss/tools/modeshape/rest/RestClientI18n.properties 2010-11-02
19:22:53 UTC (rev 26194)
@@ -161,6 +161,7 @@
serverPageTestConnectionDialogSuccessMsg = Successfully connected using the specified
server properties.
serverPageTitle = Enter Server Information
serverPageUrlLabel = URL:
+serverPageUrlTemplateLabel = The URL format is
'<protocol>://<host>:<port>/<context>' and the default
context is 'modeshape-rest'. A sample URL would be
'http://localhost:8080/modeshape-rest'.
serverPageUrlToolTip = The URL used to connect to the server
serverPageUserLabel = User:
serverPageUserToolTip = The user login used when connecting to the server
Modified:
trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/src/org/jboss/tools/modeshape/rest/wizards/ServerPage.java
===================================================================
---
trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/src/org/jboss/tools/modeshape/rest/wizards/ServerPage.java 2010-11-02
17:39:28 UTC (rev 26193)
+++
trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/src/org/jboss/tools/modeshape/rest/wizards/ServerPage.java 2010-11-02
19:22:53 UTC (rev 26194)
@@ -11,10 +11,12 @@
*/
package org.jboss.tools.modeshape.rest.wizards;
+import static org.jboss.tools.modeshape.rest.IUiConstants.BLANK_IMAGE;
import static org.jboss.tools.modeshape.rest.IUiConstants.SERVER_DIALOG_HELP_CONTEXT;
import org.eclipse.jface.dialogs.IDialogConstants;
import org.eclipse.jface.dialogs.IMessageProvider;
import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.resource.JFaceResources;
import org.eclipse.jface.wizard.WizardPage;
import org.eclipse.swt.SWT;
import org.eclipse.swt.custom.BusyIndicator;
@@ -301,6 +303,24 @@
handleUrlModified(((Text)e.widget).getText());
}
});
+
+ // add a blank image to push text over a bit
+ Label lblImage = new Label(pnl, SWT.NONE);
+ lblImage.setLayoutData(new GridData(SWT.CENTER, SWT.CENTER, false, false));
+ lblImage.setImage(Activator.getDefault().getImage(BLANK_IMAGE));
+
+ // add the text on the URL format
+ StyledText st = new StyledText(pnl, SWT.READ_ONLY | SWT.MULTI | SWT.NO_FOCUS |
SWT.WRAP);
+ st.setText(RestClientI18n.serverPageUrlTemplateLabel.text());
+
st.setBackground(Display.getDefault().getSystemColor(SWT.COLOR_WIDGET_BACKGROUND));
+ st.setFont(JFaceResources.getTextFont());
+ st.setCaret(null);
+ GridData gd = new GridData(SWT.FILL, SWT.CENTER, true, true);
+ gd.grabExcessVerticalSpace = false;
+ gd.horizontalIndent = 4;
+ gd.verticalIndent = 8;
+ gd.widthHint = 150;
+ st.setLayoutData(gd);
}
/**
Show replies by date