JBoss Tools SVN: r41811 - in trunk/openshift/plugins: org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/console and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2012-06-08 08:55:01 -0400 (Fri, 08 Jun 2012)
New Revision: 41811
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.egit.core/src/org/jboss/tools/openshift/egit/core/EGitUtils.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/console/ConsoleUtils.java
Log:
[JBIDE-12138] added null-checks to avoid NPE's
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.egit.core/src/org/jboss/tools/openshift/egit/core/EGitUtils.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.egit.core/src/org/jboss/tools/openshift/egit/core/EGitUtils.java 2012-06-08 12:51:41 UTC (rev 41810)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.egit.core/src/org/jboss/tools/openshift/egit/core/EGitUtils.java 2012-06-08 12:55:01 UTC (rev 41811)
@@ -565,6 +565,10 @@
private static Collection<RemoteRefUpdate> getFailedUpdates(PushResult pushResult) {
List<RemoteRefUpdate> failedRefUpdates = new ArrayList<RemoteRefUpdate>();
+ if (pushResult == null
+ || pushResult.getRemoteUpdates() == null) {
+ return failedRefUpdates;
+ }
for (RemoteRefUpdate update : pushResult.getRemoteUpdates()) {
if (org.eclipse.jgit.transport.RemoteRefUpdate.Status.OK
!= update.getStatus()) {
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/console/ConsoleUtils.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/console/ConsoleUtils.java 2012-06-08 12:51:41 UTC (rev 41810)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/console/ConsoleUtils.java 2012-06-08 12:55:01 UTC (rev 41811)
@@ -131,6 +131,9 @@
Iterator<URIish> i = uris.iterator();
while(i.hasNext()) {
URIish uri = i.next();
+ if (pushOperationResult.getPushResult(uri) == null) {
+ continue;
+ }
for (RemoteRefUpdate update : pushOperationResult.getPushResult(uri).getRemoteUpdates()) {
result.append(getOneResultAsString(pushOperationResult, uri, update));
}
13 years, 10 months
JBoss Tools SVN: r41810 - in branches/jbosstools-3.3.x/openshift/plugins: org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/console and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2012-06-08 08:51:41 -0400 (Fri, 08 Jun 2012)
New Revision: 41810
Modified:
branches/jbosstools-3.3.x/openshift/plugins/org.jboss.tools.openshift.egit.core/src/org/jboss/tools/openshift/egit/core/EGitUtils.java
branches/jbosstools-3.3.x/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/console/ConsoleUtils.java
Log:
[JBIDE-12138] added null-checks to avoid NPE's
Modified: branches/jbosstools-3.3.x/openshift/plugins/org.jboss.tools.openshift.egit.core/src/org/jboss/tools/openshift/egit/core/EGitUtils.java
===================================================================
--- branches/jbosstools-3.3.x/openshift/plugins/org.jboss.tools.openshift.egit.core/src/org/jboss/tools/openshift/egit/core/EGitUtils.java 2012-06-08 11:48:36 UTC (rev 41809)
+++ branches/jbosstools-3.3.x/openshift/plugins/org.jboss.tools.openshift.egit.core/src/org/jboss/tools/openshift/egit/core/EGitUtils.java 2012-06-08 12:51:41 UTC (rev 41810)
@@ -565,6 +565,10 @@
private static Collection<RemoteRefUpdate> getFailedUpdates(PushResult pushResult) {
List<RemoteRefUpdate> failedRefUpdates = new ArrayList<RemoteRefUpdate>();
+ if (pushResult == null
+ || pushResult.getRemoteUpdates() == null) {
+ return failedRefUpdates;
+ }
for (RemoteRefUpdate update : pushResult.getRemoteUpdates()) {
if (org.eclipse.jgit.transport.RemoteRefUpdate.Status.OK
!= update.getStatus()) {
Modified: branches/jbosstools-3.3.x/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/console/ConsoleUtils.java
===================================================================
--- branches/jbosstools-3.3.x/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/console/ConsoleUtils.java 2012-06-08 11:48:36 UTC (rev 41809)
+++ branches/jbosstools-3.3.x/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/console/ConsoleUtils.java 2012-06-08 12:51:41 UTC (rev 41810)
@@ -131,6 +131,9 @@
Iterator<URIish> i = uris.iterator();
while(i.hasNext()) {
URIish uri = i.next();
+ if (pushOperationResult.getPushResult(uri) == null) {
+ continue;
+ }
for (RemoteRefUpdate update : pushOperationResult.getPushResult(uri).getRemoteUpdates()) {
result.append(getOneResultAsString(pushOperationResult, uri, update));
}
13 years, 10 months
JBoss Tools SVN: r41809 - in trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal: ui/console and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: max.andersen(a)jboss.com
Date: 2012-06-08 07:48:36 -0400 (Fri, 08 Jun 2012)
New Revision: 41809
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/behaviour/ExpressPublishMethod.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/console/ConsoleUtils.java
Log:
JBIDE-12138 avoid forced push on repositories without users consent
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/behaviour/ExpressPublishMethod.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/behaviour/ExpressPublishMethod.java 2012-06-08 11:46:55 UTC (rev 41808)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/behaviour/ExpressPublishMethod.java 2012-06-08 11:48:36 UTC (rev 41809)
@@ -10,6 +10,7 @@
*******************************************************************************/
package org.jboss.tools.openshift.express.internal.core.behaviour;
+import org.eclipse.jface.dialogs.IDialogConstants;
import org.eclipse.core.resources.IContainer;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
@@ -203,31 +204,53 @@
throw new CoreException(new Status(IStatus.ERROR, OpenShiftUIActivator.PLUGIN_ID,
NLS.bind("No repository found for project {0}. Please ensure it is shared via git.", p.getName())));
}
- try {
+
+
if( changed != 0 && requestCommitAndPushApproval(p.getName(), changed)) {
monitor.beginTask("Publishing " + p.getName(), 300);
EGitUtils.commit(p, new SubProgressMonitor(monitor, 100));
committed = true;
}
-
+
+ try {
+
if( committed || (changed == 0 && requestPushApproval(p.getName()))) {
if( !committed )
monitor.beginTask("Publishing " + p.getName(), 200);
result = EGitUtils.push(remoteName, repo, new SubProgressMonitor(monitor, 100));
monitor.done();
+
+
}
+
+
} catch(CoreException ce) {
- // Comes if either commit or push has failed
- if( ce.getMessage().contains("UP_TO_DATE"))
+ // Comes if push has failed
+ if( ce.getMessage()!=null && ce.getMessage().contains("UP_TO_DATE")) {
+ ConsoleUtils.appendToConsole(behaviour.getServer(), "\n\nRepository already uptodate.");
return null;
+ }
try {
- result = EGitUtils.pushForce(remoteName, repo, new SubProgressMonitor(monitor, 100));
+ if(requestApproval("Error: '" + ce.getMessage() + "' occurred while pushing.\n\nIf the commit history is not correct on the remote repository, a forced push (git push -f) might be the right thing to do. This will though overwrite the remote repository!\n\n Do you want to do a forced push and overwrite any remote changes ? ",
+ "Attempt push force ?", false)) {
+ result = EGitUtils.pushForce(remoteName, repo, new SubProgressMonitor(monitor, 100));
+ } else {
+ // printing out variation of the standard git output meesage.
+ ConsoleUtils.appendToConsole(behaviour.getServer(), "\n\nERROR: " + ce.getLocalizedMessage() + "\n\n" +
+ "To prevent you from losing history, non-fast-forward updates were rejected" +
+ "\nMerge the remote changes (e.g. 'Team > Fetch from Upstream' in Eclipse or 'git pull' on command line ) before pushing again. " +
+ "\nSee the 'Note about fast-forwards' section of 'git push --help' for details.");
+ }
monitor.done();
} catch(CoreException ce2) {
- // even the push force failed, and we don't have a valid result to check :(
- // can only throw it i guess
- throw ce2;
+ if( ce.getMessage()!=null && ce.getMessage().contains("UP_TO_DATE")) {
+ ConsoleUtils.appendToConsole(behaviour.getServer(), "\n(Forced push) Repository already uptodate.");
+ return null;
+ } else {
+ // even the push force failed, and we don't have a valid result to check :(
+ throw ce2;
+ }
}
}
@@ -236,8 +259,8 @@
}
return result;
}
+
-
private void shareProjects(final IProject[] projects) {
Display.getDefault().asyncExec(new Runnable() {
public void run() {
@@ -273,12 +296,34 @@
final boolean[] b = new boolean[1];
Display.getDefault().syncExec(new Runnable() {
public void run() {
- b[0] = MessageDialog.openQuestion(getActiveShell(), title, message);
+ b[0] = openQuestion(getActiveShell(), title, message, true);
}
});
return b[0];
}
+
+ private boolean openQuestion(Shell shell, String title, String message, boolean defaultAnswer) {
+ String[] labels = new String[] { IDialogConstants.YES_LABEL, IDialogConstants.NO_LABEL };
+ int defaultValue = defaultAnswer ? 0 : 1;
+ MessageDialog dialog = new MessageDialog(shell, title, null, message, MessageDialog.QUESTION, labels, defaultValue);
+ return dialog.open() == 0;
+ }
+ /** Opens question dialog where you can control what will be the default button activated.
+ *
+ * @parem defaultAnswer if true Yes is the default answer, if false No
+ *
+ **/
+ protected boolean requestApproval(final String message, final String title, final boolean defaultAnswer) {
+ final boolean[] b = new boolean[1];
+ Display.getDefault().syncExec(new Runnable() {
+ public void run() {
+ b[0] = openQuestion(getActiveShell(), title, message, defaultAnswer);
+ }
+ });
+ return b[0];
+ }
+
protected static Shell getActiveShell() {
Display display = Display.getDefault();
final Shell[] ret = new Shell[1];
@@ -309,7 +354,7 @@
public static IProgressMonitor submon( final IProgressMonitor parent, final int ticks ) {
- return submon( parent, ticks, SubProgressMonitor.SUPPRESS_SUBTASK_LABEL );
+ return submon( parent, ticks, SubProgressMonitor.PREPEND_MAIN_LABEL_TO_SUBTASK);
}
public static IProgressMonitor submon( final IProgressMonitor parent,
final int ticks, final int style ) {
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/console/ConsoleUtils.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/console/ConsoleUtils.java 2012-06-08 11:46:55 UTC (rev 41808)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/console/ConsoleUtils.java 2012-06-08 11:48:36 UTC (rev 41809)
@@ -10,6 +10,7 @@
******************************************************************************/
package org.jboss.tools.openshift.express.internal.ui.console;
+import java.io.IOException;
import java.util.Iterator;
import java.util.Set;
@@ -28,6 +29,7 @@
import org.eclipse.ui.console.IConsoleManager;
import org.eclipse.ui.console.IConsoleView;
import org.eclipse.ui.console.MessageConsole;
+import org.eclipse.ui.console.MessageConsoleStream;
import org.eclipse.wst.server.core.IServer;
import org.jboss.ide.eclipse.as.ui.UIUtil;
import org.jboss.tools.openshift.express.internal.core.behaviour.ExpressServerUtils;
@@ -184,7 +186,13 @@
public static void appendToConsole(IServer server, String message ) {
if (ExpressServerUtils.isOpenShiftRuntime(server)) {
final MessageConsole console = ConsoleUtils.findMessageConsole(server.getId());
- console.newMessageStream().print(message);
+ MessageConsoleStream newMessageStream = console.newMessageStream();
+ newMessageStream.print(message);
+ try {
+ newMessageStream.close();
+ } catch (IOException e) {
+ // ignore
+ }
Display.getDefault().asyncExec(new Runnable() {
public void run() {
ConsoleUtils.displayConsoleView(console);
13 years, 10 months
JBoss Tools SVN: r41808 - trunk/as/tests.
by jbosstools-commits@lists.jboss.org
Author: ljelinko
Date: 2012-06-08 07:46:55 -0400 (Fri, 08 Jun 2012)
New Revision: 41808
Added:
trunk/as/tests/org.jboss.ide.eclipse.as.ui.bot.test/
Log:
Folder for new plugin for SWTBot tests.
13 years, 10 months
JBoss Tools SVN: r41807 - in branches/jbosstools-3.3.x/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal: ui/console and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: max.andersen(a)jboss.com
Date: 2012-06-08 07:45:40 -0400 (Fri, 08 Jun 2012)
New Revision: 41807
Modified:
branches/jbosstools-3.3.x/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/behaviour/ExpressPublishMethod.java
branches/jbosstools-3.3.x/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/console/ConsoleUtils.java
Log:
JBIDE-12138 avoid forced push on repositories without users consent
Modified: branches/jbosstools-3.3.x/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/behaviour/ExpressPublishMethod.java
===================================================================
--- branches/jbosstools-3.3.x/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/behaviour/ExpressPublishMethod.java 2012-06-08 11:19:32 UTC (rev 41806)
+++ branches/jbosstools-3.3.x/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/behaviour/ExpressPublishMethod.java 2012-06-08 11:45:40 UTC (rev 41807)
@@ -10,6 +10,7 @@
*******************************************************************************/
package org.jboss.tools.openshift.express.internal.core.behaviour;
+import org.eclipse.jface.dialogs.IDialogConstants;
import org.eclipse.core.resources.IContainer;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
@@ -203,31 +204,53 @@
throw new CoreException(new Status(IStatus.ERROR, OpenShiftUIActivator.PLUGIN_ID,
NLS.bind("No repository found for project {0}. Please ensure it is shared via git.", p.getName())));
}
- try {
+
+
if( changed != 0 && requestCommitAndPushApproval(p.getName(), changed)) {
monitor.beginTask("Publishing " + p.getName(), 300);
EGitUtils.commit(p, new SubProgressMonitor(monitor, 100));
committed = true;
}
-
+
+ try {
+
if( committed || (changed == 0 && requestPushApproval(p.getName()))) {
if( !committed )
monitor.beginTask("Publishing " + p.getName(), 200);
result = EGitUtils.push(remoteName, repo, new SubProgressMonitor(monitor, 100));
monitor.done();
+
+
}
+
+
} catch(CoreException ce) {
- // Comes if either commit or push has failed
- if( ce.getMessage().contains("UP_TO_DATE"))
+ // Comes if push has failed
+ if( ce.getMessage()!=null && ce.getMessage().contains("UP_TO_DATE")) {
+ ConsoleUtils.appendToConsole(behaviour.getServer(), "\n\nRepository already uptodate.");
return null;
+ }
try {
- result = EGitUtils.pushForce(remoteName, repo, new SubProgressMonitor(monitor, 100));
+ if(requestApproval("Error: '" + ce.getMessage() + "' occurred while pushing.\n\nIf the commit history is not correct on the remote repository, a forced push (git push -f) might be the right thing to do. This will though overwrite the remote repository!\n\n Do you want to do a forced push and overwrite any remote changes ? ",
+ "Attempt push force ?", false)) {
+ result = EGitUtils.pushForce(remoteName, repo, new SubProgressMonitor(monitor, 100));
+ } else {
+ // printing out variation of the standard git output meesage.
+ ConsoleUtils.appendToConsole(behaviour.getServer(), "\n\nERROR: " + ce.getLocalizedMessage() + "\n\n" +
+ "To prevent you from losing history, non-fast-forward updates were rejected" +
+ "\nMerge the remote changes (e.g. 'Team > Fetch from Upstream' in Eclipse or 'git pull' on command line ) before pushing again. " +
+ "\nSee the 'Note about fast-forwards' section of 'git push --help' for details.");
+ }
monitor.done();
} catch(CoreException ce2) {
- // even the push force failed, and we don't have a valid result to check :(
- // can only throw it i guess
- throw ce2;
+ if( ce.getMessage()!=null && ce.getMessage().contains("UP_TO_DATE")) {
+ ConsoleUtils.appendToConsole(behaviour.getServer(), "\n(Forced push) Repository already uptodate.");
+ return null;
+ } else {
+ // even the push force failed, and we don't have a valid result to check :(
+ throw ce2;
+ }
}
}
@@ -236,8 +259,8 @@
}
return result;
}
+
-
private void shareProjects(final IProject[] projects) {
Display.getDefault().asyncExec(new Runnable() {
public void run() {
@@ -273,12 +296,34 @@
final boolean[] b = new boolean[1];
Display.getDefault().syncExec(new Runnable() {
public void run() {
- b[0] = MessageDialog.openQuestion(getActiveShell(), title, message);
+ b[0] = openQuestion(getActiveShell(), title, message, true);
}
});
return b[0];
}
+
+ private boolean openQuestion(Shell shell, String title, String message, boolean defaultAnswer) {
+ String[] labels = new String[] { IDialogConstants.YES_LABEL, IDialogConstants.NO_LABEL };
+ int defaultValue = defaultAnswer ? 0 : 1;
+ MessageDialog dialog = new MessageDialog(shell, title, null, message, MessageDialog.QUESTION, labels, defaultValue);
+ return dialog.open() == 0;
+ }
+ /** Opens question dialog where you can control what will be the default button activated.
+ *
+ * @parem defaultAnswer if true Yes is the default answer, if false No
+ *
+ **/
+ protected boolean requestApproval(final String message, final String title, final boolean defaultAnswer) {
+ final boolean[] b = new boolean[1];
+ Display.getDefault().syncExec(new Runnable() {
+ public void run() {
+ b[0] = openQuestion(getActiveShell(), title, message, defaultAnswer);
+ }
+ });
+ return b[0];
+ }
+
protected static Shell getActiveShell() {
Display display = Display.getDefault();
final Shell[] ret = new Shell[1];
@@ -309,7 +354,7 @@
public static IProgressMonitor submon( final IProgressMonitor parent, final int ticks ) {
- return submon( parent, ticks, SubProgressMonitor.SUPPRESS_SUBTASK_LABEL );
+ return submon( parent, ticks, SubProgressMonitor.PREPEND_MAIN_LABEL_TO_SUBTASK);
}
public static IProgressMonitor submon( final IProgressMonitor parent,
final int ticks, final int style ) {
Modified: branches/jbosstools-3.3.x/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/console/ConsoleUtils.java
===================================================================
--- branches/jbosstools-3.3.x/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/console/ConsoleUtils.java 2012-06-08 11:19:32 UTC (rev 41806)
+++ branches/jbosstools-3.3.x/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/console/ConsoleUtils.java 2012-06-08 11:45:40 UTC (rev 41807)
@@ -10,6 +10,7 @@
******************************************************************************/
package org.jboss.tools.openshift.express.internal.ui.console;
+import java.io.IOException;
import java.util.Iterator;
import java.util.Set;
@@ -28,6 +29,7 @@
import org.eclipse.ui.console.IConsoleManager;
import org.eclipse.ui.console.IConsoleView;
import org.eclipse.ui.console.MessageConsole;
+import org.eclipse.ui.console.MessageConsoleStream;
import org.eclipse.wst.server.core.IServer;
import org.jboss.ide.eclipse.as.ui.UIUtil;
import org.jboss.tools.openshift.express.internal.core.behaviour.ExpressServerUtils;
@@ -184,7 +186,13 @@
public static void appendToConsole(IServer server, String message ) {
if (ExpressServerUtils.isOpenShiftRuntime(server)) {
final MessageConsole console = ConsoleUtils.findMessageConsole(server.getId());
- console.newMessageStream().print(message);
+ MessageConsoleStream newMessageStream = console.newMessageStream();
+ newMessageStream.print(message);
+ try {
+ newMessageStream.close();
+ } catch (IOException e) {
+ // ignore
+ }
Display.getDefault().asyncExec(new Runnable() {
public void run() {
ConsoleUtils.displayConsoleView(console);
13 years, 10 months
JBoss Tools SVN: r41806 - trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2012-06-08 07:19:32 -0400 (Fri, 08 Jun 2012)
New Revision: 41806
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ProjectAndServerAdapterSettingsWizardPage.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ProjectAndServerAdapterSettingsWizardPageModel.java
Log:
[JBIDE-12134] moved validation from model to UI and implemented a MultiValidator in the way it is implemented in all other pages
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ProjectAndServerAdapterSettingsWizardPage.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ProjectAndServerAdapterSettingsWizardPage.java 2012-06-08 11:18:39 UTC (rev 41805)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ProjectAndServerAdapterSettingsWizardPage.java 2012-06-08 11:19:32 UTC (rev 41806)
@@ -15,12 +15,14 @@
import org.eclipse.core.databinding.DataBindingContext;
import org.eclipse.core.databinding.beans.BeanProperties;
+import org.eclipse.core.databinding.observable.list.IObservableList;
+import org.eclipse.core.databinding.observable.list.WritableList;
import org.eclipse.core.databinding.observable.value.IObservableValue;
import org.eclipse.core.databinding.validation.MultiValidator;
-import org.eclipse.core.databinding.validation.ValidationStatus;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
import org.eclipse.jface.databinding.fieldassist.ControlDecorationSupport;
import org.eclipse.jface.databinding.swt.ISWTObservableValue;
import org.eclipse.jface.databinding.swt.WidgetProperties;
@@ -33,6 +35,7 @@
import org.eclipse.jface.layout.GridDataFactory;
import org.eclipse.jface.layout.GridLayoutFactory;
import org.eclipse.jface.wizard.IWizard;
+import org.eclipse.jgit.util.StringUtils;
import org.eclipse.osgi.util.NLS;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.SelectionAdapter;
@@ -46,6 +49,7 @@
import org.eclipse.ui.dialogs.WorkingSetGroup;
import org.jboss.tools.common.ui.databinding.InvertingBooleanConverter;
import org.jboss.tools.common.ui.databinding.ValueBindingBuilder;
+import org.jboss.tools.openshift.express.internal.ui.OpenShiftUIActivator;
/**
* @author Andre Dietisheim
@@ -146,10 +150,10 @@
ValueBindingBuilder.bind(WidgetProperties.enabled().observe(browseProjectsButton))
.notUpdating(newProjectObservable).converting(new InvertingBooleanConverter()).in(dbc);
- final IObservableValue existingProjectValidityObservable = BeanProperties.value(
- ProjectAndServerAdapterSettingsWizardPageModel.PROPERTY_EXISTING_PROJECT_VALIDITY).observe(pageModel);
- final UseExistingOpenProjectValidator existingProjectValidator = new UseExistingOpenProjectValidator(
- existingProjectValidityObservable);
+ final IObservableValue applicationNameModelObservable = BeanProperties.value(
+ GitCloningSettingsWizardPageModel.PROPERTY_APPLICATION_NAME).observe(pageModel);
+ final UseExistingOpenProjectValidator existingProjectValidator =
+ new UseExistingOpenProjectValidator(applicationNameModelObservable, newProjectObservable, projectNameModelObservable);
dbc.addValidationStatusProvider(existingProjectValidator);
ControlDecorationSupport.create(existingProjectValidator, SWT.LEFT | SWT.TOP);
@@ -255,27 +259,60 @@
class UseExistingOpenProjectValidator extends MultiValidator {
- private final IObservableValue existingProjectValidityObservable;
+ private final IObservableValue applicationNameObservable;
+ private final IObservableValue newProjectObservable;
+ private final IObservableValue projectNameObservable;
- public UseExistingOpenProjectValidator(IObservableValue existingProjectValidityObservable) {
- this.existingProjectValidityObservable = existingProjectValidityObservable;
+ public UseExistingOpenProjectValidator(IObservableValue applicationNameObservable, IObservableValue newProjectObservable, IObservableValue projectNameObservable) {
+ this.applicationNameObservable = applicationNameObservable;
+ this.newProjectObservable = newProjectObservable;
+ this.projectNameObservable = projectNameObservable;
}
@Override
- protected IStatus validate() {
- final IStatus existingProjectValidityStatus = (IStatus) existingProjectValidityObservable.getValue();
-
- if (existingProjectValidityStatus == null) {
- return ValidationStatus.ok();
+ public IStatus validate() {
+ IStatus status = Status.OK_STATUS;
+ final String projectName = (String) projectNameObservable.getValue();
+ final Boolean isNewProject = (Boolean) newProjectObservable.getValue();
+ if (isNewProject) {
+ final String applicationName = (String) applicationNameObservable.getValue();
+ if (StringUtils.isEmptyOrNull(applicationName)) {
+ status = OpenShiftUIActivator.createErrorStatus("You have to choose an application name");
+ } else {
+ final IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(applicationName);
+ if(project.exists()) {
+ status = OpenShiftUIActivator.createErrorStatus(
+ NLS.bind("A project named {0} already exists in the workspace.", applicationName));
+ }
+ }
+ } else {
+ if (projectName == null || projectName.isEmpty()) {
+ status = OpenShiftUIActivator.createErrorStatus("Select an open project in the workspace.");
+ } else {
+ final IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(projectName);
+ if (!project.exists()) {
+ status = OpenShiftUIActivator.createErrorStatus(
+ NLS.bind("The project {0} does not exist in your workspace.", projectName));
+ } else if (!project.isOpen()) {
+ status = OpenShiftUIActivator.createErrorStatus(
+ NLS.bind("The project {0} is not open.", projectName));
+ }
+ }
}
- return existingProjectValidityStatus;
+ return status;
}
+
+ @Override
+ public IObservableList getTargets() {
+ WritableList targets = new WritableList();
+ targets.add(projectNameObservable);
+ return targets;
+ }
}
@Override
protected void onPageActivated(DataBindingContext dbc) {
setPageTitle();
- pageModel.validateExistingProject();
}
private void setPageTitle() {
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ProjectAndServerAdapterSettingsWizardPageModel.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ProjectAndServerAdapterSettingsWizardPageModel.java 2012-06-08 11:18:39 UTC (rev 41805)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ProjectAndServerAdapterSettingsWizardPageModel.java 2012-06-08 11:19:32 UTC (rev 41806)
@@ -10,13 +10,10 @@
******************************************************************************/
package org.jboss.tools.openshift.express.internal.ui.wizard;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.osgi.util.NLS;
+import java.beans.PropertyChangeEvent;
+import java.beans.PropertyChangeListener;
+
import org.jboss.tools.common.ui.databinding.ObservableUIPojo;
-import org.jboss.tools.openshift.express.internal.ui.OpenShiftUIActivator;
/**
* @author Andre Dietisheim
@@ -25,6 +22,8 @@
*/
public class ProjectAndServerAdapterSettingsWizardPageModel extends ObservableUIPojo {
+ public static final String PROPERTY_APPLICATION_NAME = "applicationName";
+
/** whether this is a new project or not. */
public static final String PROPERTY_IS_NEW_PROJECT = "newProject";
@@ -34,24 +33,32 @@
/** whether this a server adapter should be created, or not. */
public static final String PROPERTY_CREATE_SERVER_ADAPTER = "createServerAdapter";
- /** Whether the existing project is a valid one or not. */
- public static final String PROPERTY_EXISTING_PROJECT_VALIDITY = "existingProjectValidity";
-
private IOpenShiftExpressWizardModel wizardModel;
- private IStatus existingProjectValidity;
-
public ProjectAndServerAdapterSettingsWizardPageModel(IOpenShiftExpressWizardModel wizardModel) {
this.wizardModel = wizardModel;
setNewProject(true);
+ wizardModel.addPropertyChangeListener(IOpenShiftExpressWizardModel.APPLICATION_NAME, onWizardApplicationNameChanged());
}
+ /**
+ * Listener to propagate the application name changes from the underlying WizardModel into this WizardPageModel, so that properties can be affected here, too.
+ * @return
+ */
+ private PropertyChangeListener onWizardApplicationNameChanged() {
+ return new PropertyChangeListener() {
+ @Override
+ public void propertyChange(PropertyChangeEvent evt) {
+ firePropertyChange(PROPERTY_APPLICATION_NAME, evt.getOldValue(), evt.getNewValue());
+ }
+ };
+ }
+
public void setNewProject(boolean newProject) {
firePropertyChange(PROPERTY_IS_NEW_PROJECT, wizardModel.isNewProject(), wizardModel.setNewProject(newProject));
if(wizardModel.isNewProject()) {
setProjectName(null);
}
- validateExistingProject();
}
public boolean isNewProject() {
@@ -69,7 +76,6 @@
public void setProjectName(String projectName) {
firePropertyChange(PROPERTY_PROJECT_NAME, wizardModel.getProjectName(), wizardModel.setProjectName(projectName));
- validateExistingProject();
}
public String getProjectName() {
@@ -79,46 +85,4 @@
public String getApplicationName() {
return wizardModel.getApplicationName();
}
-
- public IStatus validateExistingProject() {
- IStatus status = Status.OK_STATUS;
- final String applicationName = getApplicationName();
- if (isNewProject()) {
- if (applicationName == null) {
- status = OpenShiftUIActivator.createErrorStatus("You have to choose an application name");
- } else {
- final IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(applicationName);
- if(project.exists()) {
- status = OpenShiftUIActivator.createErrorStatus(
- NLS.bind("A project named {0} already exists in the workspace.", applicationName));
- }
- }
- } else {
- final String projectName = wizardModel.getProjectName();
- if (projectName == null || projectName.isEmpty()) {
- status = OpenShiftUIActivator.createErrorStatus("Select an open project in the workspace.");
- } else {
- final IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(projectName);
- if (!project.exists()) {
- status = OpenShiftUIActivator.createErrorStatus(
- NLS.bind("The project {0} does not exist in your workspace.", projectName));
- } else if (!project.isOpen()) {
- status = OpenShiftUIActivator.createErrorStatus(
- NLS.bind("The project {0} is not open.", projectName));
- }
- }
- }
- setExistingProjectValidity(status);
- return status;
- }
-
- public void setExistingProjectValidity(IStatus status) {
- firePropertyChange(PROPERTY_EXISTING_PROJECT_VALIDITY, this.existingProjectValidity,
- this.existingProjectValidity = status);
- }
-
- public IStatus getExistingProjectValidity() {
- return this.existingProjectValidity;
- }
-
}
13 years, 10 months
JBoss Tools SVN: r41805 - branches/jbosstools-3.3.x/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2012-06-08 07:18:39 -0400 (Fri, 08 Jun 2012)
New Revision: 41805
Modified:
branches/jbosstools-3.3.x/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ProjectAndServerAdapterSettingsWizardPage.java
branches/jbosstools-3.3.x/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ProjectAndServerAdapterSettingsWizardPageModel.java
Log:
[JBIDE-12134] moved validation from model to UI and implemented a MultiValidator in the way it is implemented in all other pages
Modified: branches/jbosstools-3.3.x/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ProjectAndServerAdapterSettingsWizardPage.java
===================================================================
--- branches/jbosstools-3.3.x/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ProjectAndServerAdapterSettingsWizardPage.java 2012-06-08 02:01:57 UTC (rev 41804)
+++ branches/jbosstools-3.3.x/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ProjectAndServerAdapterSettingsWizardPage.java 2012-06-08 11:18:39 UTC (rev 41805)
@@ -15,12 +15,14 @@
import org.eclipse.core.databinding.DataBindingContext;
import org.eclipse.core.databinding.beans.BeanProperties;
+import org.eclipse.core.databinding.observable.list.IObservableList;
+import org.eclipse.core.databinding.observable.list.WritableList;
import org.eclipse.core.databinding.observable.value.IObservableValue;
import org.eclipse.core.databinding.validation.MultiValidator;
-import org.eclipse.core.databinding.validation.ValidationStatus;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
import org.eclipse.jface.databinding.fieldassist.ControlDecorationSupport;
import org.eclipse.jface.databinding.swt.ISWTObservableValue;
import org.eclipse.jface.databinding.swt.WidgetProperties;
@@ -33,6 +35,7 @@
import org.eclipse.jface.layout.GridDataFactory;
import org.eclipse.jface.layout.GridLayoutFactory;
import org.eclipse.jface.wizard.IWizard;
+import org.eclipse.jgit.util.StringUtils;
import org.eclipse.osgi.util.NLS;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.SelectionAdapter;
@@ -46,6 +49,7 @@
import org.eclipse.ui.dialogs.WorkingSetGroup;
import org.jboss.tools.common.ui.databinding.InvertingBooleanConverter;
import org.jboss.tools.common.ui.databinding.ValueBindingBuilder;
+import org.jboss.tools.openshift.express.internal.ui.OpenShiftUIActivator;
/**
* @author Andre Dietisheim
@@ -146,10 +150,10 @@
ValueBindingBuilder.bind(WidgetProperties.enabled().observe(browseProjectsButton))
.notUpdating(newProjectObservable).converting(new InvertingBooleanConverter()).in(dbc);
- final IObservableValue existingProjectValidityObservable = BeanProperties.value(
- ProjectAndServerAdapterSettingsWizardPageModel.PROPERTY_EXISTING_PROJECT_VALIDITY).observe(pageModel);
- final UseExistingOpenProjectValidator existingProjectValidator = new UseExistingOpenProjectValidator(
- existingProjectValidityObservable);
+ final IObservableValue applicationNameModelObservable = BeanProperties.value(
+ GitCloningSettingsWizardPageModel.PROPERTY_APPLICATION_NAME).observe(pageModel);
+ final UseExistingOpenProjectValidator existingProjectValidator =
+ new UseExistingOpenProjectValidator(applicationNameModelObservable, newProjectObservable, projectNameModelObservable);
dbc.addValidationStatusProvider(existingProjectValidator);
ControlDecorationSupport.create(existingProjectValidator, SWT.LEFT | SWT.TOP);
@@ -255,27 +259,60 @@
class UseExistingOpenProjectValidator extends MultiValidator {
- private final IObservableValue existingProjectValidityObservable;
+ private final IObservableValue applicationNameObservable;
+ private final IObservableValue newProjectObservable;
+ private final IObservableValue projectNameObservable;
- public UseExistingOpenProjectValidator(IObservableValue existingProjectValidityObservable) {
- this.existingProjectValidityObservable = existingProjectValidityObservable;
+ public UseExistingOpenProjectValidator(IObservableValue applicationNameObservable, IObservableValue newProjectObservable, IObservableValue projectNameObservable) {
+ this.applicationNameObservable = applicationNameObservable;
+ this.newProjectObservable = newProjectObservable;
+ this.projectNameObservable = projectNameObservable;
}
@Override
- protected IStatus validate() {
- final IStatus existingProjectValidityStatus = (IStatus) existingProjectValidityObservable.getValue();
-
- if (existingProjectValidityStatus == null) {
- return ValidationStatus.ok();
+ public IStatus validate() {
+ IStatus status = Status.OK_STATUS;
+ final String projectName = (String) projectNameObservable.getValue();
+ final Boolean isNewProject = (Boolean) newProjectObservable.getValue();
+ if (isNewProject) {
+ final String applicationName = (String) applicationNameObservable.getValue();
+ if (StringUtils.isEmptyOrNull(applicationName)) {
+ status = OpenShiftUIActivator.createErrorStatus("You have to choose an application name");
+ } else {
+ final IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(applicationName);
+ if(project.exists()) {
+ status = OpenShiftUIActivator.createErrorStatus(
+ NLS.bind("A project named {0} already exists in the workspace.", applicationName));
+ }
+ }
+ } else {
+ if (projectName == null || projectName.isEmpty()) {
+ status = OpenShiftUIActivator.createErrorStatus("Select an open project in the workspace.");
+ } else {
+ final IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(projectName);
+ if (!project.exists()) {
+ status = OpenShiftUIActivator.createErrorStatus(
+ NLS.bind("The project {0} does not exist in your workspace.", projectName));
+ } else if (!project.isOpen()) {
+ status = OpenShiftUIActivator.createErrorStatus(
+ NLS.bind("The project {0} is not open.", projectName));
+ }
+ }
}
- return existingProjectValidityStatus;
+ return status;
}
+
+ @Override
+ public IObservableList getTargets() {
+ WritableList targets = new WritableList();
+ targets.add(projectNameObservable);
+ return targets;
+ }
}
@Override
protected void onPageActivated(DataBindingContext dbc) {
setPageTitle();
- pageModel.validateExistingProject();
}
private void setPageTitle() {
Modified: branches/jbosstools-3.3.x/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ProjectAndServerAdapterSettingsWizardPageModel.java
===================================================================
--- branches/jbosstools-3.3.x/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ProjectAndServerAdapterSettingsWizardPageModel.java 2012-06-08 02:01:57 UTC (rev 41804)
+++ branches/jbosstools-3.3.x/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ProjectAndServerAdapterSettingsWizardPageModel.java 2012-06-08 11:18:39 UTC (rev 41805)
@@ -10,13 +10,10 @@
******************************************************************************/
package org.jboss.tools.openshift.express.internal.ui.wizard;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.osgi.util.NLS;
+import java.beans.PropertyChangeEvent;
+import java.beans.PropertyChangeListener;
+
import org.jboss.tools.common.ui.databinding.ObservableUIPojo;
-import org.jboss.tools.openshift.express.internal.ui.OpenShiftUIActivator;
/**
* @author Andre Dietisheim
@@ -25,6 +22,8 @@
*/
public class ProjectAndServerAdapterSettingsWizardPageModel extends ObservableUIPojo {
+ public static final String PROPERTY_APPLICATION_NAME = "applicationName";
+
/** whether this is a new project or not. */
public static final String PROPERTY_IS_NEW_PROJECT = "newProject";
@@ -34,24 +33,32 @@
/** whether this a server adapter should be created, or not. */
public static final String PROPERTY_CREATE_SERVER_ADAPTER = "createServerAdapter";
- /** Whether the existing project is a valid one or not. */
- public static final String PROPERTY_EXISTING_PROJECT_VALIDITY = "existingProjectValidity";
-
private IOpenShiftExpressWizardModel wizardModel;
- private IStatus existingProjectValidity;
-
public ProjectAndServerAdapterSettingsWizardPageModel(IOpenShiftExpressWizardModel wizardModel) {
this.wizardModel = wizardModel;
setNewProject(true);
+ wizardModel.addPropertyChangeListener(IOpenShiftExpressWizardModel.APPLICATION_NAME, onWizardApplicationNameChanged());
}
+ /**
+ * Listener to propagate the application name changes from the underlying WizardModel into this WizardPageModel, so that properties can be affected here, too.
+ * @return
+ */
+ private PropertyChangeListener onWizardApplicationNameChanged() {
+ return new PropertyChangeListener() {
+ @Override
+ public void propertyChange(PropertyChangeEvent evt) {
+ firePropertyChange(PROPERTY_APPLICATION_NAME, evt.getOldValue(), evt.getNewValue());
+ }
+ };
+ }
+
public void setNewProject(boolean newProject) {
firePropertyChange(PROPERTY_IS_NEW_PROJECT, wizardModel.isNewProject(), wizardModel.setNewProject(newProject));
if(wizardModel.isNewProject()) {
setProjectName(null);
}
- validateExistingProject();
}
public boolean isNewProject() {
@@ -69,7 +76,6 @@
public void setProjectName(String projectName) {
firePropertyChange(PROPERTY_PROJECT_NAME, wizardModel.getProjectName(), wizardModel.setProjectName(projectName));
- validateExistingProject();
}
public String getProjectName() {
@@ -79,46 +85,4 @@
public String getApplicationName() {
return wizardModel.getApplicationName();
}
-
- public IStatus validateExistingProject() {
- IStatus status = Status.OK_STATUS;
- final String applicationName = getApplicationName();
- if (isNewProject()) {
- if (applicationName == null) {
- status = OpenShiftUIActivator.createErrorStatus("You have to choose an application name");
- } else {
- final IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(applicationName);
- if(project.exists()) {
- status = OpenShiftUIActivator.createErrorStatus(
- NLS.bind("A project named {0} already exists in the workspace.", applicationName));
- }
- }
- } else {
- final String projectName = wizardModel.getProjectName();
- if (projectName == null || projectName.isEmpty()) {
- status = OpenShiftUIActivator.createErrorStatus("Select an open project in the workspace.");
- } else {
- final IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(projectName);
- if (!project.exists()) {
- status = OpenShiftUIActivator.createErrorStatus(
- NLS.bind("The project {0} does not exist in your workspace.", projectName));
- } else if (!project.isOpen()) {
- status = OpenShiftUIActivator.createErrorStatus(
- NLS.bind("The project {0} is not open.", projectName));
- }
- }
- }
- setExistingProjectValidity(status);
- return status;
- }
-
- public void setExistingProjectValidity(IStatus status) {
- firePropertyChange(PROPERTY_EXISTING_PROJECT_VALIDITY, this.existingProjectValidity,
- this.existingProjectValidity = status);
- }
-
- public IStatus getExistingProjectValidity() {
- return this.existingProjectValidity;
- }
-
}
13 years, 10 months
JBoss Tools SVN: r41804 - trunk/documentation/guides/JBDS_Release_Notes/en-US.
by jbosstools-commits@lists.jboss.org
Author: irooskov(a)redhat.com
Date: 2012-06-07 22:01:57 -0400 (Thu, 07 Jun 2012)
New Revision: 41804
Modified:
trunk/documentation/guides/JBDS_Release_Notes/en-US/Article_Info.xml
trunk/documentation/guides/JBDS_Release_Notes/en-US/Known_Issues.xml
Log:
updated
Modified: trunk/documentation/guides/JBDS_Release_Notes/en-US/Article_Info.xml
===================================================================
--- trunk/documentation/guides/JBDS_Release_Notes/en-US/Article_Info.xml 2012-06-08 01:24:28 UTC (rev 41803)
+++ trunk/documentation/guides/JBDS_Release_Notes/en-US/Article_Info.xml 2012-06-08 02:01:57 UTC (rev 41804)
@@ -8,7 +8,7 @@
<productname>JBoss Developer Studio</productname>
<productnumber>5.0</productnumber>
<edition>5.0.0</edition>
- <pubsnumber>6</pubsnumber>
+ <pubsnumber>7</pubsnumber>
<abstract>
<para>
These release notes contain important information related to the JBoss Developer Studio. New features, known issues, resources, and other current issues are addressed here.
Modified: trunk/documentation/guides/JBDS_Release_Notes/en-US/Known_Issues.xml
===================================================================
--- trunk/documentation/guides/JBDS_Release_Notes/en-US/Known_Issues.xml 2012-06-08 01:24:28 UTC (rev 41803)
+++ trunk/documentation/guides/JBDS_Release_Notes/en-US/Known_Issues.xml 2012-06-08 02:01:57 UTC (rev 41804)
@@ -3,18 +3,23 @@
<title>
Known Issues in version 5.0.0
</title>
- <para>
+ <para>
+ There were no known issues at the time of release.
+ </para>
+<!-- <para>
Following is a list of known issues at the time of release.
- </para>
-<!-- <formalpara>
- <title>General Known Issues</title>
- <para>
- <itemizedlist>
- <listitem>
- <para>
- </para>
- </listitem>
- </itemizedlist>
- </para>
- </formalpara> -->
+ </para> -->
+ <!-- <variablelist> -->
+ <!-- JBIDE-11635 -->
+ <!-- <varlistentry>
+ <term>
+ <ulink url="https://issues.jboss.org/jira/browse/JBIDE-11635">JBIDE-11635</ulink>
+ </term>
+ <listitem>
+ <para>
+ When JAX-RS services are tested through JAX-RS Tooling and Web Service Tester integration, the URL of the service can include details about required parameters. If the included parameters require values to be specified, a dialog prompting for these values now appears to the user and validation of the values occurs if the service includes a Regular Expression. This new feature ensures all values are gathered and verified before testing the service, minimizing returned errors.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist> -->
</section>
13 years, 10 months
JBoss Tools SVN: r41803 - trunk/documentation/guides/GettingStartedGuide/en-US.
by jbosstools-commits@lists.jboss.org
Author: irooskov(a)redhat.com
Date: 2012-06-07 21:24:28 -0400 (Thu, 07 Jun 2012)
New Revision: 41803
Modified:
trunk/documentation/guides/GettingStartedGuide/en-US/Book_Info.xml
trunk/documentation/guides/GettingStartedGuide/en-US/installation.xml
Log:
updated with correction
Modified: trunk/documentation/guides/GettingStartedGuide/en-US/Book_Info.xml
===================================================================
--- trunk/documentation/guides/GettingStartedGuide/en-US/Book_Info.xml 2012-06-08 01:06:24 UTC (rev 41802)
+++ trunk/documentation/guides/GettingStartedGuide/en-US/Book_Info.xml 2012-06-08 01:24:28 UTC (rev 41803)
@@ -8,7 +8,7 @@
<productname>JBoss Developer Studio</productname>
<productnumber>5.0</productnumber>
<edition>5.0.0</edition>
-<pubsnumber>23</pubsnumber>
+<pubsnumber>24</pubsnumber>
<abstract>
<para>The Getting Started Guide explains the JBoss Developer Studio.</para>
</abstract>
Modified: trunk/documentation/guides/GettingStartedGuide/en-US/installation.xml
===================================================================
--- trunk/documentation/guides/GettingStartedGuide/en-US/installation.xml 2012-06-08 01:06:24 UTC (rev 41802)
+++ trunk/documentation/guides/GettingStartedGuide/en-US/installation.xml 2012-06-08 01:24:28 UTC (rev 41803)
@@ -665,9 +665,9 @@
<para>
Once you have configured the <filename>InstallConfigRecord.xml</filename> file for your needs, the following command can be run on the command line to begin installation:
</para>
- <programlisting>
- java -jar /path/to/installer.jar /path/to/InstallConfigRecord.xml
- </programlisting>
+<programlisting>
+java -jar /path/to/installer.jar /path/to/InstallConfigRecord.xml
+</programlisting>
<formalpara>
<title>Current limitations</title>
<para>
13 years, 10 months
JBoss Tools SVN: r41802 - in trunk/documentation/guides/GettingStartedGuide/en-US: images/manage and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: irooskov(a)redhat.com
Date: 2012-06-07 21:06:24 -0400 (Thu, 07 Jun 2012)
New Revision: 41802
Modified:
trunk/documentation/guides/GettingStartedGuide/en-US/Book_Info.xml
trunk/documentation/guides/GettingStartedGuide/en-US/images/manage/eap5runtime.png
trunk/documentation/guides/GettingStartedGuide/en-US/images/manage/manage_1.png
trunk/documentation/guides/GettingStartedGuide/en-US/images/manage/manage_15.png
trunk/documentation/guides/GettingStartedGuide/en-US/images/manage/manage_16.png
trunk/documentation/guides/GettingStartedGuide/en-US/images/manage/manage_17.png
trunk/documentation/guides/GettingStartedGuide/en-US/images/manage/manage_3.png
trunk/documentation/guides/GettingStartedGuide/en-US/images/manage/manage_4.png
trunk/documentation/guides/GettingStartedGuide/en-US/images/manage/manage_6.png
trunk/documentation/guides/GettingStartedGuide/en-US/images/manage/manage_8.png
trunk/documentation/guides/GettingStartedGuide/en-US/images/manage/manage_9.png
trunk/documentation/guides/GettingStartedGuide/en-US/manage.xml
Log:
updated, rewriting chapter 7 for new server
Modified: trunk/documentation/guides/GettingStartedGuide/en-US/Book_Info.xml
===================================================================
--- trunk/documentation/guides/GettingStartedGuide/en-US/Book_Info.xml 2012-06-08 00:45:13 UTC (rev 41801)
+++ trunk/documentation/guides/GettingStartedGuide/en-US/Book_Info.xml 2012-06-08 01:06:24 UTC (rev 41802)
@@ -8,7 +8,7 @@
<productname>JBoss Developer Studio</productname>
<productnumber>5.0</productnumber>
<edition>5.0.0</edition>
-<pubsnumber>22</pubsnumber>
+<pubsnumber>23</pubsnumber>
<abstract>
<para>The Getting Started Guide explains the JBoss Developer Studio.</para>
</abstract>
Modified: trunk/documentation/guides/GettingStartedGuide/en-US/images/manage/eap5runtime.png
===================================================================
(Binary files differ)
Modified: trunk/documentation/guides/GettingStartedGuide/en-US/images/manage/manage_1.png
===================================================================
(Binary files differ)
Modified: trunk/documentation/guides/GettingStartedGuide/en-US/images/manage/manage_15.png
===================================================================
(Binary files differ)
Modified: trunk/documentation/guides/GettingStartedGuide/en-US/images/manage/manage_16.png
===================================================================
(Binary files differ)
Modified: trunk/documentation/guides/GettingStartedGuide/en-US/images/manage/manage_17.png
===================================================================
(Binary files differ)
Modified: trunk/documentation/guides/GettingStartedGuide/en-US/images/manage/manage_3.png
===================================================================
(Binary files differ)
Modified: trunk/documentation/guides/GettingStartedGuide/en-US/images/manage/manage_4.png
===================================================================
(Binary files differ)
Modified: trunk/documentation/guides/GettingStartedGuide/en-US/images/manage/manage_6.png
===================================================================
(Binary files differ)
Modified: trunk/documentation/guides/GettingStartedGuide/en-US/images/manage/manage_8.png
===================================================================
(Binary files differ)
Modified: trunk/documentation/guides/GettingStartedGuide/en-US/images/manage/manage_9.png
===================================================================
(Binary files differ)
Modified: trunk/documentation/guides/GettingStartedGuide/en-US/manage.xml
===================================================================
--- trunk/documentation/guides/GettingStartedGuide/en-US/manage.xml 2012-06-08 00:45:13 UTC (rev 41801)
+++ trunk/documentation/guides/GettingStartedGuide/en-US/manage.xml 2012-06-08 01:06:24 UTC (rev 41802)
@@ -1,212 +1,30 @@
<?xml version="1.0" encoding="UTF-8"?>
<chapter id="manage">
- <?dbhtml filename="manage.html"?>
- <chapterinfo>
- <keywordset>
- <keyword>JBoss Developer Studio</keyword>
- <keyword>Eclipse</keyword>
- <keyword>Deploy</keyword>
- <keyword>Deployment</keyword>
- <keyword>JBoss</keyword>
- </keywordset>
- </chapterinfo>
-
- <title condition="jbds">Manage a JBoss Server within JBoss Developer Studio</title>
- <title condition="jbt">Manage a JBoss Server within JBoss Tools</title>
- <para>
- In this chapter we'll focus more on how to operate the <property>JBoss AS</property> from <property condition="jbds">JBoss Developer Studio</property><property condition="jbt">JBoss Tools</property>.
- </para>
- <para condition="jbds">
- <property>JBoss Developer Studio: Portfolio Edition</property> ships with <property>JBoss EAP</property>. When you followed the default installation of <property>JBoss Developer Studio</property>, you should already have a JBoss EAP Server installed and defined. To run JBoss AS you need you will need to have JDK 6 installed.
- </para>
-
- <para condition="jbt">
- <property>JBoss Tools</property> can be used to operate a wide range of <property>JBoss Application Server</property> versions, which can be downloaded from the <ulink url="http://www.jboss.org/jbossas/downloads.html">JBoss Application Server</ulink> website.
- </para>
-
- <!--<note>
- <title>Note:</title>
- <para>You can leave <property>JDK 1.5</property> configuration for <property>JBoss Developer Studio</property> and set <property>JDK 6</property> as <property>JRE</property> only for <property>JBoss EAP Server</property>. For this you need to select <menuchoice>
- <guimenuitem>Windows</guimenuitem>
- <guimenuitem>Preferences</guimenuitem>
- </menuchoice>, and then click <menuchoice>
- <guimenuitem>Server</guimenuitem>
- <guimenuitem>Runtime Environments</guimenuitem>
- </menuchoice>. On the opened preference page you should select <property>JBoss EAP Runtime</property> and clicking the <guibutton>Edit</guibutton> button. In <property>Edit Server Runtime Environment</property> dialog you can configure <property>Jave Runtime Environment</property> by clicking the <guibutton>JRE</guibutton> button. </para>
- </note>-->
-
- <section id="JBossbundled">
- <?dbhtml filename="JBossbundled.html"?>
- <title condition="jbds">How to Manage the JBoss Server Bundled in JBoss Developer Studio</title>
- <title condition="jbt">How to Manage JBoss AS with JBoss Tools</title>
- <para>This section covers the basics of working with the <property>JBoss Server</property>
- supported directly by <property>JBoss Developer Studio</property> via bundled AS plug-in. The server points to
- the JBoss Enterprise Application Platform Runtime shipped with <property>JBoss Developer Studio</property>.</para>
-
- <figure>
- <title>JBoss Enterprise Application Platform Runtime</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/manage/eap5runtime.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>To read more about AS plug-in, refer to the Server Manager guide.</para>
- <section id="StartingServer">
- <?dbhtml filename="StartingServer.html"?>
- <title>Starting JBoss Server</title>
- <para>Starting <property>JBoss Server</property> is quite simple. <property>JBoss
- Developer Studio</property> allows you to control its behavior with the help of
- a special toolbar, where you could start it in a regular or debug mode, stop it or
- restart it.</para>
-
- <itemizedlist>
- <listitem>
- <para>To launch the server click the green-with-white-arrow icon in the <property>Servers</property> view or right click server name in this view and click the <guibutton>Start</guibutton> button. If this view is not open, select <menuchoice><guimenuitem>Window</guimenuitem><guimenuitem>Show View</guimenuitem><guimenuitem>Other</guimenuitem><guimenuitem>Server</guimenuitem><guimenuitem>Servers</guimenuitem></menuchoice>
- </para>
- </listitem>
- </itemizedlist>
- <figure>
- <title>Starting from Icon</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/manage/manage_1.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>While launching, server output is written to the <property>Console
- view</property>:</para>
-
- <figure>
- <title>Console Output</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/manage/manage_3.png"/>
- </imageobject>
- </mediaobject>
- </figure>
- <para>When the server is started you should see <emphasis><property>Started</property></emphasis> in the square brackets right next its name in the <property>Servers</property> view.</para>
-
- <figure>
- <title>Server is Started</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/manage/manage_4.png"/>
- </imageobject>
- </mediaobject>
- </figure>
- <!--para>To see event log after the server is started, expand <property>Event
- Log</property> branch beneath <property>Servers</property>:</para>
- <figure>
- <title>Event Log</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/manage/manage_5.png"/>
- </imageobject>
- </mediaobject>
- </figure-->
- </section>
-
- <section id="StoppingJBoss">
- <?dbhtml filename="StoppingJBoss.html"?>
- <title>Stopping the JBoss Server</title>
- <para>To stop the server, click the <guibutton>Stop</guibutton> button icon in <property>Servers</property> or right click the server name and press <guimenuitem>Stop</guimenuitem>.
- </para>
-
- <figure>
- <title>Stopping Server</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/manage/manage_6.png"/>
- </imageobject>
- </mediaobject>
- </figure>
- <para>When the server is stopped you will see <emphasis>
- <property>Stopped</property>
- </emphasis> in the square brackets next to its name.</para>
- </section>
- <section id="ServerPreferences">
- <?dbhtml filename="ServerPreferences.html"?>
- <title>Server Container Preferences</title>
- <para>You can control how <property>JBoss Developer Studio</property> interacts with
- server containers in the <property>Server editor</property>. Double-click the server
- to open it in the editor.</para>
-
- <figure>
- <title>Server Overview</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/manage/manage_8.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>Here you can specify some common settings: host name, server name, runtime as well
- as settings related to publishing, timeouts and server ports.</para>
-
- </section>
- </section>
-
- <section id="JBossInstances">
- <?dbhtml filename="JBossInstances.html"?>
- <title>How to Use Your Own JBoss Server Instance with JBoss Developer Studio</title>
+ <title>Setting up a JBoss runtime and managing the server</title>
<para>Although <property>JBoss Developer Studio</property> works closely with
- <property>JBoss EAP 5</property> we do not ultimately tie you to any particular
+ <property>JBoss Enterprise Application Platform 6</property> we do not ultimately tie you to any particular
server for deployment. There are some servers that Studio supports directly (via the
- bundled Eclipse WTP plug-ins). In this section we discuss how to manage self-installed
- JBoss AS. Suppose you want to deploy the application to <property>JBoss 4.2.3
- server</property>. First of all you need to install it.</para>
- <section id="JBossInstalling">
- <?dbhtml filename="JBossInstalling.html"?>
- <title>JBoss Server Installation</title>
- <itemizedlist>
- <listitem>
- <para>Download the binary package of JBoss AS, e.g. <property>JBoss 4.2.3</property> and save
- it on your computer: <ulink url="http://labs.jboss.com/jbossas/downloads">http://labs.jboss.com/jbossas/downloads</ulink>
- </para>
- </listitem>
- </itemizedlist>
- <para>It does not matter where on your system you install JBoss server.</para>
-
+ bundled Eclipse WTP plug-ins). In this chapter we discuss how to manage a JBoss server.</para>
<note>
- <title>Note:</title>
- <para>The installation of JBoss server into a directory that has a name containing
- spaces provokes problems in some situations with Sun-based VMs. Try to avoid
- using installation folders that contain spaces in their names.</para>
+ <para>
+ This chapter assumes you have a JBoss application server installed on your system. If you do not, consult the installation instructions that accompanied your server.
+ </para>
</note>
- <para>There is no requirement for root access to run JBoss Server on UNIX/Linux systems
- because none of the default ports are within the 0-1023 privileged port
- range.</para>
- <itemizedlist>
- <listitem>
- <para>After you have the binary archive you want to install, use the JDK jar
- tool (or any other ZIP extraction tool) to extract the <filename>jboss-4.2.3.GA.zip</filename>
- archive contents into a location of your choice. The <filename>jboss-4.2.3.GA.tgz</filename>
- archive is a gzipped tar file that requires a gnutar compatible tar which
- can handle the long pathnames in the archive. The extraction process will
- create a <filename>jboss-4.2.3.GA</filename> directory. </para>
- </listitem>
- </itemizedlist>
- </section>
-
<section id="AddingJBossServer">
<?dbhtml filename="AddingJBossServer.html"?>
- <title>Adding and Configuring JBoss Server</title>
- <para>Now we should add the just installed server into server manager in <property>JBoss Developer Studio</property>.</para>
+ <title>Adding and configuring a JBoss server runtime</title>
<itemizedlist>
<listitem>
- <para>Select the <property>Servers</property> view by selecting <menuchoice><guimenuitem>Window</guimenuitem><guimenuitem>Show View</guimenuitem><guimenuitem>Other</guimenuitem><guimenuitem>Server</guimenuitem><guimenuitem>Servers</guimenuitem></menuchoice>.
+ <para>Select the <property>Servers</property> view by navigating to <menuchoice><guimenuitem>Window</guimenuitem><guimenuitem>Show View</guimenuitem><guimenuitem>Other</guimenuitem><guimenuitem>Server</guimenuitem><guimenuitem>Servers</guimenuitem></menuchoice>.
</para>
</listitem>
<listitem>
- <para>Right click anywhere in this view and select <menuchoice><guimenuitem>New</guimenuitem><guimenuitem>Server</guimenuitem></menuchoice>.
+ <para>Click the <guibutton>new server wizard</guibutton> text in the <guilabel>Servers</guilabel> view or if this is not your first server, right-click anywhere in the view and select <menuchoice><guimenuitem>New</guimenuitem><guimenuitem>Server</guimenuitem></menuchoice>.
</para>
</listitem>
<listitem>
- <para>Select <menuchoice><guimenuitem>JBoss Community</guimenuitem><guimenuitem>JBoss 4.2 Server</guimenuitem></menuchoice>
+ <para>Select the server option that matches your installed server.
</para>
</listitem>
</itemizedlist>
@@ -219,22 +37,16 @@
</mediaobject>
</figure>
- <note>
- <title>Note:</title>
-
- <para>Now in the <property>New Server wizard</property> there is a separation between the .org servers (the <emphasis><property>JBoss Community</property></emphasis> category) and product server that comes bundled with JBoss EAP (the <emphasis><property>JBoss Enterprise Middleware</property></emphasis> category).</para>
- </note>
-
<itemizedlist>
<listitem>
- <para>To create a new runtime, which Jboss AS 4.2 matches to, click the <guibutton>Next</guibutton> button
+ <para>To setup the new runtime, click the <guibutton>Next</guibutton> button.
</para>
</listitem>
</itemizedlist>
- <itemizedlist>
+<!-- <itemizedlist>
<listitem>
- <para>In the next step you need to specify the location of the Server and define JRE to be used.</para>
+ <para>In the next step you need to specify the location of the Server and define the JDK to be used.</para>
</listitem>
</itemizedlist>
<figure>
@@ -247,15 +59,14 @@
</figure>
<note>
<title>Note:</title>
- <para>When adding a new server you will need to specify what JRE to use. It is
+ <para>When adding a new server you will need to specify what JDK to use. It is
important to set this value to a full JDK, not JRE. Again, you need a full JDK
to run Web applications, JRE will not be enough.</para>
</note>
-
+ -->
<itemizedlist>
<listitem>
- <para>In the next dialog verify the specified information and if something is
- unfair go back and correct it</para>
+ <para>In the next dialog verify the specified information and set local or remote server information.</para>
</listitem>
</itemizedlist>
<figure>
@@ -268,8 +79,8 @@
</figure>
<itemizedlist>
<listitem>
- <para>In the last wizard's dialog modify the projects that are
- configured on the server and click the <guibutton>Finish</guibutton> button.</para>
+ <para>Lastly, a screen will appear that will allow you yo modify projects that are
+ to be configured for the server. Click the <guibutton>Finish</guibutton> button.</para>
</listitem>
</itemizedlist>
<figure>
@@ -289,8 +100,97 @@
</imageobject>
</mediaobject>
</figure>
- <para>Now, we are ready to create the first web application.</para>
</section>
+ <section id="StartingServer">
+ <?dbhtml filename="StartingServer.html"?>
+ <title>Starting JBoss Server</title>
+ <para>Starting <property>JBoss Server</property> is quite simple. <property>JBoss
+ Developer Studio</property> allows you to control its behavior with the help of
+ a special toolbar, where you could start it in a regular or debug mode, stop it or
+ restart it.</para>
+
+ <itemizedlist>
+ <listitem>
+ <para>To launch the server click the green-with-white-arrow icon in the <property>Servers</property> view or right click server name in this view and click the <guibutton>Start</guibutton> button. If this view is not open, select <menuchoice>
+ <guimenuitem>Window</guimenuitem>
+ <guimenuitem>Show View</guimenuitem>
+ <guimenuitem>Other</guimenuitem>
+ <guimenuitem>Server</guimenuitem>
+ <guimenuitem>Servers</guimenuitem>
+ </menuchoice>
+ </para>
+ </listitem>
+ </itemizedlist>
+ <figure>
+ <title>Starting from Icon</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/manage/manage_1.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>While launching, server output is written to the <property>Console
+ view</property>:</para>
+
+ <figure>
+ <title>Console Output</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/manage/manage_3.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>When the server is started you should see <emphasis>
+ <property>Started</property>
+ </emphasis> in the square brackets right next its name in the <property>Servers</property> view.</para>
+
+ <figure>
+ <title>Server is Started</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/manage/manage_4.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+
+ <section id="StoppingJBoss">
+ <?dbhtml filename="StoppingJBoss.html"?>
+ <title>Stopping the JBoss Server</title>
+ <para>To stop the server, click the <guibutton>Stop</guibutton> button icon in <property>Servers</property> or right click the server name and press <guimenuitem>Stop</guimenuitem>.
+ </para>
+
+ <figure>
+ <title>Stopping Server</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/manage/manage_6.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>When the server is stopped you will see <emphasis>
+ <property>Stopped</property>
+ </emphasis> in the square brackets next to its name.</para>
+ </section>
+ <section id="ServerPreferences">
+ <?dbhtml filename="ServerPreferences.html"?>
+ <title>Server Container Preferences</title>
+ <para>You can control how <property>JBoss Developer Studio</property> interacts with
+ server containers in the <property>Server editor</property>. Double-click the server
+ to open it in the editor.</para>
+
+ <figure>
+ <title>Server Overview</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/manage/manage_8.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
- </section>
+ <para>Here you can specify some common settings: host name, server name, runtime as well
+ as settings related to publishing, timeouts and server ports.</para>
+
+ </section>
</chapter>
13 years, 10 months