JBoss Tools SVN: r38559 - trunk/bpel/site.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2012-02-09 10:23:04 -0500 (Thu, 09 Feb 2012)
New Revision: 38559
Modified:
trunk/bpel/site/site.xml
Log:
add missing bpel features
Modified: trunk/bpel/site/site.xml
===================================================================
--- trunk/bpel/site/site.xml 2012-02-09 15:16:21 UTC (rev 38558)
+++ trunk/bpel/site/site.xml 2012-02-09 15:23:04 UTC (rev 38559)
@@ -14,6 +14,13 @@
<feature url="features/org.eclipse.bpel.feature_0.0.0.jar" id="org.eclipse.bpel.feature" version="0.0.0">
<category name="JBoss Tools bpel Nightly Build Update Site"/>
</feature>
+ <feature url="features/org.eclipse.bpel.common.feature_0.0.0.jar" id="org.eclipse.bpel.common.feature" version="0.0.0">
+ <category name="JBoss Tools bpel Nightly Build Update Site"/>
+ </feature>
+ <feature url="features/org.eclipse.bpel.jboss.riftsaw.runtime.feature_0.0.0.jar" id="org.eclipse.bpel.jboss.riftsaw.runtime.feature" version="0.0.0">
+ <category name="JBoss Tools bpel Nightly Build Update Site"/>
+ </feature>
+
<feature url="features/org.eclipse.bpel.apache.ode.runtime.feature_0.0.0.jar" id="org.eclipse.bpel.apache.ode.runtime.feature" version="0.0.0">
<category name="JBoss Tools bpel Nightly Build Update Site"/>
</feature>
14 years, 2 months
JBoss Tools SVN: r38558 - in trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central: model and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2012-02-09 10:16:21 -0500 (Thu, 09 Feb 2012)
New Revision: 38558
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-10801 Problem rendering blog entry in JBoss central
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 2012-02-09 15:01:37 UTC (rev 38557)
+++ trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/editors/GettingStartedPage.java 2012-02-09 15:16:21 UTC (rev 38558)
@@ -99,8 +99,8 @@
import org.jboss.tools.central.jobs.RefreshNewsJob;
import org.jboss.tools.central.jobs.RefreshTutorialsJob;
import org.jboss.tools.central.model.FeedsEntry;
-import org.jboss.tools.project.examples.model.ProjectExampleCategory;
import org.jboss.tools.project.examples.model.ProjectExample;
+import org.jboss.tools.project.examples.model.ProjectExampleCategory;
import org.osgi.framework.Bundle;
/**
@@ -1018,42 +1018,33 @@
if (i++ > JBossCentralActivator.MAX_FEEDS) {
return;
}
- String text = entry.getFormString();
+ String text = entry.getFormString(false);
FormText formText = toolkit.createFormText(composite, true);
TableWrapData td = new TableWrapData();
td.indent = 2;
- //Point size = scrollable.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
- // TODO: should probably be done earlier on but couldn't find where.
- text = text.replaceAll(" ", " ");
- //Temporary fix for JBIDE-10801
- //FIXME find a generic way to replace entities with proper code
- text = text.replaceAll(" & ", " & ");
+ try {
formText.setText(text, true, true);
} catch(IllegalArgumentException se) {
- formText.dispose();
- formText = toolkit.createFormText(composite, false);
- formText.setLayoutData(td);
try {
- formText.setText("Problem rendering entry - " + StringEscapeUtils.unescapeHtml(se.getMessage()), false, false);
- } catch (Exception e1) {
- JBossCentralActivator.log(se);
+ text = entry.getFormString(true);
+ formText.setText(text, true, true);
+ } catch (IllegalArgumentException se2) {
+ formText.dispose();
+ formText = toolkit.createFormText(composite, false);
+ formText.setLayoutData(td);
+ try {
+ formText.setText("Problem rendering entry - " + StringEscapeUtils.unescapeHtml(se.getMessage()), false, false);
+ } catch (Exception e1) {
+ JBossCentralActivator.log(se);
+ }
}
continue;
}
- //Display display = Display.getCurrent();
- //formText.setFont(getLinkFont(display));
formText.setFont("default", JFaceResources.getDefaultFont());
formText.setFont("date", JFaceResources.getDefaultFont());
formText.setColor("date", JFaceColors.getHyperlinkText(getDisplay()));
- //formText.setForeground(JFaceColors.getHyperlinkText(getDisplay()));
formText.setFont("description", JFaceResources.getDefaultFont());
- //Font boldFont = getAuthorFont(display);
- //formText.setFont("author", boldFont);
formText.setColor("author", JFaceColors.getHyperlinkText(getDisplay()));
formText.setImage("image", getFeedsImage());
if (JBossCentralActivator.isInternalWebBrowserAvailable() && entry.getDescription() != null && !entry.getDescription().isEmpty()) {
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 2012-02-09 15:01:37 UTC (rev 38557)
+++ trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/model/FeedsEntry.java 2012-02-09 15:16:21 UTC (rev 38558)
@@ -81,7 +81,7 @@
this.date = date;
}
- public String getFormString() {
+ public String getFormString(boolean escapeXml) {
StringBuffer buffer = new StringBuffer();
buffer.append(JBossCentralActivator.FORM_START_TAG);
buffer.append("<img href=\"image\"/> ");
@@ -89,10 +89,10 @@
buffer.append("<a href=\"");
buffer.append(link);
buffer.append("\">");
- buffer.append(StringEscapeUtils.unescapeHtml(title));
+ buffer.append(escapeXml(title, escapeXml));
buffer.append("</a>");
} else {
- buffer.append(StringEscapeUtils.unescapeHtml(title));
+ buffer.append(escapeXml(title, escapeXml));
}
//buffer.append("<br/>");
boolean cr = false;
@@ -113,7 +113,7 @@
buffer.append("</span>");
buffer.append(" ");
buffer.append("<span color=\"author\" font=\"author\">");
- buffer.append(StringEscapeUtils.unescapeHtml(author));
+ buffer.append(escapeXml(author, escapeXml));
buffer.append("</span>");
cr = true;
}
@@ -125,7 +125,7 @@
cr = false;
if (shortDescription != null && !shortDescription.isEmpty()) {
buffer.append("<span font=\"description\">");
- buffer.append(StringEscapeUtils.unescapeHtml(shortDescription));
+ buffer.append(escapeXml(shortDescription, escapeXml));
buffer.append("</span>");
cr = true;
}
@@ -135,6 +135,16 @@
buffer.append(JBossCentralActivator.FORM_END_TAG);
return buffer.toString();
}
+
+ protected String escapeXml(String text, boolean escape) {
+ text = StringEscapeUtils.unescapeHtml(text);
+ if (escape) {
+ text = StringEscapeUtils.escapeXml(text);
+ }
+ text = text.replaceAll(" ", " ");
+ text = text.replaceAll("& ", "& ");
+ return text;
+ }
public String getShortDescription() {
if (description == null) {
14 years, 2 months
JBoss Tools SVN: r38557 - in trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui: wizard and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2012-02-09 10:01:37 -0500 (Thu, 09 Feb 2012)
New Revision: 38557
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/OpenConnectionDialogActionDelegate.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationConfigurationWizardPage.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/OpenShiftExpressApplicationWizard.java
Log:
Removing some delays from opening the import wizard
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/OpenConnectionDialogActionDelegate.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/OpenConnectionDialogActionDelegate.java 2012-02-09 14:25:09 UTC (rev 38556)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/OpenConnectionDialogActionDelegate.java 2012-02-09 15:01:37 UTC (rev 38557)
@@ -11,13 +11,9 @@
import org.eclipse.ui.navigator.CommonNavigator;
import org.jboss.tools.common.ui.WizardUtils;
import org.jboss.tools.openshift.express.internal.core.console.UserModel;
-import org.jboss.tools.openshift.express.internal.ui.OpenShiftUIActivator;
import org.jboss.tools.openshift.express.internal.ui.utils.Logger;
import org.jboss.tools.openshift.express.internal.ui.viewer.ConnectToOpenShiftWizard;
-import org.jboss.tools.openshift.express.internal.ui.viewer.OpenShiftExpressConsoleContentCategory;
-import com.openshift.express.client.IUser;
-
public class OpenConnectionDialogActionDelegate implements IViewActionDelegate {
private CommonNavigator view;
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationConfigurationWizardPage.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationConfigurationWizardPage.java 2012-02-09 14:25:09 UTC (rev 38556)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationConfigurationWizardPage.java 2012-02-09 15:01:37 UTC (rev 38557)
@@ -62,6 +62,7 @@
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Combo;
import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Group;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Shell;
@@ -622,6 +623,19 @@
@Override
protected void onPageActivated(final DataBindingContext dbc) {
+ // This is needed for some strange freezing issues when
+ // launching the wizard from the console view. The UI seems to freeze
+ new Thread() {
+ public void run() {
+ Display.getDefault().asyncExec(new Runnable() {
+ public void run() {
+ onPageActivated2(dbc);
+ }
+ });
+ }
+ }.start();
+ }
+ protected void onPageActivated2(final DataBindingContext dbc) {
try {
WizardUtils.runInWizard(new Job("Loading existing applications...") {
@Override
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/OpenShiftExpressApplicationWizard.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/OpenShiftExpressApplicationWizard.java 2012-02-09 14:25:09 UTC (rev 38556)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/OpenShiftExpressApplicationWizard.java 2012-02-09 15:01:37 UTC (rev 38557)
@@ -22,6 +22,7 @@
import org.eclipse.core.runtime.Status;
import org.eclipse.jface.dialogs.ErrorDialog;
import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.wizard.IWizardPage;
import org.eclipse.jgit.errors.TransportException;
import org.eclipse.osgi.util.NLS;
import org.eclipse.ui.IImportWizard;
@@ -81,21 +82,19 @@
@Override
public void addPages() {
- final IUser user = initialUser;
- try {
- if (user == null || !user.isValid()) {
- addPage(new CredentialsWizardPage(this));
- }
- } catch (OpenShiftException e) {
- // if the user's validity can't be checked, we may want to re-connect..
- addPage(new CredentialsWizardPage(this));
- }
+ addPage(new CredentialsWizardPage(this));
addPage(new ApplicationConfigurationWizardPage(this, getWizardModel()));
addPage(new ProjectAndServerAdapterSettingsWizardPage(this, getWizardModel()));
addPage(new GitCloningSettingsWizardPage(this, getWizardModel()));
}
@Override
+ public IWizardPage getStartingPage() {
+ IWizardPage[] pages = getPages();
+ return initialUser == null ? pages[0] : pages[1];
+ }
+
+ @Override
public boolean performFinish() {
try {
final DelegatingProgressMonitor delegatingMonitor = new DelegatingProgressMonitor();
14 years, 2 months
JBoss Tools SVN: r38556 - trunk/openshift/plugins/org.jboss.tools.openshift.express.client.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2012-02-09 09:25:09 -0500 (Thu, 09 Feb 2012)
New Revision: 38556
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.client/.classpath
trunk/openshift/plugins/org.jboss.tools.openshift.express.client/openshift-java-client-1.1.1-SNAPSHOT.jar
Log:
added latest client jar that offers IApplication#getUser
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.client/.classpath
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.client/.classpath 2012-02-09 14:20:53 UTC (rev 38555)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.client/.classpath 2012-02-09 14:25:09 UTC (rev 38556)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry exported="true" kind="lib" path="openshift-java-client-1.1.1-SNAPSHOT.jar"/>
+ <classpathentry exported="true" kind="lib" path="openshift-java-client-1.1.1-SNAPSHOT.jar" sourcepath="/openshift-java-client"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.client/openshift-java-client-1.1.1-SNAPSHOT.jar
===================================================================
(Binary files differ)
14 years, 2 months
JBoss Tools SVN: r38555 - 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-02-09 09:20:53 -0500 (Thu, 09 Feb 2012)
New Revision: 38555
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationConfigurationWizardPage.java
Log:
[JBIDE-10839] disabling all application widget if user checks "use existing application"
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationConfigurationWizardPage.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationConfigurationWizardPage.java 2012-02-09 14:20:09 UTC (rev 38554)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationConfigurationWizardPage.java 2012-02-09 14:20:53 UTC (rev 38555)
@@ -236,22 +236,33 @@
applicationNameLabel.setText("Name:");
GridDataFactory.fillDefaults().align(SWT.FILL, SWT.CENTER).applyTo(applicationNameLabel);
Text applicationNameText = new Text(container, SWT.BORDER);
- GridDataFactory.fillDefaults().grab(true, false).align(SWT.FILL, SWT.FILL).applyTo(applicationNameText);
+ GridDataFactory.fillDefaults()
+ .grab(true, false).align(SWT.FILL, SWT.FILL).applyTo(applicationNameText);
UIUtils.selectAllOnFocus(applicationNameText);
final IObservableValue applicationNameModelObservable = BeanProperties.value(
ApplicationConfigurationWizardPageModel.PROPERTY_APPLICATION_NAME).observe(pageModel);
final ISWTObservableValue applicationNameTextObservable = WidgetProperties.text(SWT.Modify).observe(
applicationNameText);
dbc.bindValue(applicationNameTextObservable, applicationNameModelObservable);
+ IObservableValue useExistingObservable =
+ BeanProperties.value(ApplicationConfigurationWizardPageModel.PROPERTY_USE_EXISTING_APPLICATION)
+ .observe(pageModel);
+ ValueBindingBuilder
+ .bind(WidgetProperties.enabled().observe(applicationNameText))
+ .notUpdating(useExistingObservable)
+ .converting(new InvertingBooleanConverter())
+ .in(dbc);
+
final IObservableValue applicationNameStatusObservable = BeanProperties.value(
ApplicationConfigurationWizardPageModel.PROPERTY_APPLICATION_NAME_STATUS).observe(pageModel);
Label applicationTypeLabel = new Label(container, SWT.NONE);
applicationTypeLabel.setText("Type:");
- GridDataFactory.fillDefaults().align(SWT.FILL, SWT.CENTER).span(1, 1).applyTo(applicationTypeLabel);
+ GridDataFactory.fillDefaults()
+ .align(SWT.FILL, SWT.CENTER).span(1, 1).applyTo(applicationTypeLabel);
Combo cartridgesCombo = new Combo(container, SWT.BORDER | SWT.READ_ONLY);
- GridDataFactory.fillDefaults().align(SWT.FILL, SWT.CENTER).span(1, 1).grab(true, false)
- .applyTo(cartridgesCombo);
+ GridDataFactory.fillDefaults()
+ .align(SWT.FILL, SWT.CENTER).span(1, 1).grab(true, false).applyTo(cartridgesCombo);
fillCartridgesCombo(dbc, cartridgesCombo);
final ISWTObservableValue cartridgesComboObservable = WidgetProperties.selection().observe(cartridgesCombo);
final IObservableValue selectedCartridgeModelObservable = BeanProperties.value(
@@ -259,8 +270,14 @@
dbc.bindValue(cartridgesComboObservable, selectedCartridgeModelObservable,
new UpdateValueStrategy().setConverter(new StringToCartridgeConverter()),
new UpdateValueStrategy().setConverter(new CartridgeToStringConverter()));
- final ApplicationToCreateInputValidator applicationInputValidator = new ApplicationToCreateInputValidator(
- applicationNameTextObservable, cartridgesComboObservable);
+ ValueBindingBuilder
+ .bind(WidgetProperties.enabled().observe(cartridgesCombo))
+ .notUpdating(useExistingObservable)
+ .converting(new InvertingBooleanConverter())
+ .in(dbc);
+
+ final ApplicationToCreateInputValidator applicationInputValidator =
+ new ApplicationToCreateInputValidator(applicationNameTextObservable, cartridgesComboObservable);
dbc.addValidationStatusProvider(applicationInputValidator);
/*
* final ApplicationToSelectNameValidator applicationNameValidator = new
@@ -279,20 +296,35 @@
.numColumns(2).margins(6, 6).applyTo(cartridgesGroup);
Composite tableContainer = new Composite(cartridgesGroup, SWT.NONE);
- GridDataFactory.fillDefaults().align(SWT.FILL, SWT.FILL).grab(true, true).span(1, 2).hint(400, 250)
- .applyTo(tableContainer);
+ GridDataFactory.fillDefaults()
+ .align(SWT.FILL, SWT.FILL).grab(true, true).span(1, 2).hint(400, 250).applyTo(tableContainer);
this.viewer = createTable(tableContainer);
+ ValueBindingBuilder
+ .bind(WidgetProperties.enabled().observe(viewer.getTable()))
+ .notUpdating(useExistingObservable)
+ .converting(new InvertingBooleanConverter())
+ .in(dbc);
Button checkAllButton = new Button(cartridgesGroup, SWT.PUSH);
checkAllButton.setText("&Select All");
GridDataFactory.fillDefaults()
.hint(110, SWT.DEFAULT).grab(false, false).align(SWT.FILL, SWT.TOP).applyTo(checkAllButton);
checkAllButton.addSelectionListener(onCheckAll());
+ ValueBindingBuilder
+ .bind(WidgetProperties.enabled().observe(checkAllButton))
+ .notUpdating(useExistingObservable)
+ .converting(new InvertingBooleanConverter())
+ .in(dbc);
Button uncheckAllButton = new Button(cartridgesGroup, SWT.PUSH);
uncheckAllButton.setText("&Deselect All");
GridDataFactory.fillDefaults()
.hint(110, SWT.DEFAULT).grab(false, true).align(SWT.FILL, SWT.TOP).applyTo(uncheckAllButton);
uncheckAllButton.addSelectionListener(onUncheckAll());
+ ValueBindingBuilder
+ .bind(WidgetProperties.enabled().observe(uncheckAllButton))
+ .notUpdating(useExistingObservable)
+ .converting(new InvertingBooleanConverter())
+ .in(dbc);
// bottom filler
Composite spacer = new Composite(container, SWT.NONE);
GridDataFactory.fillDefaults()
14 years, 2 months
JBoss Tools SVN: r38554 - trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2012-02-09 09:20:09 -0500 (Thu, 09 Feb 2012)
New Revision: 38554
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/ImportApplicationAction.java
Log:
Ensuring credential page is only skipped if selection is an IUser or one is explicitly provided for import also
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/ImportApplicationAction.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/ImportApplicationAction.java 2012-02-09 14:19:57 UTC (rev 38553)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/ImportApplicationAction.java 2012-02-09 14:20:09 UTC (rev 38554)
@@ -3,6 +3,7 @@
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.jface.viewers.ITreeSelection;
+import org.eclipse.jface.viewers.TreePath;
import org.eclipse.jface.wizard.WizardDialog;
import org.eclipse.swt.widgets.Display;
import org.jboss.tools.openshift.express.internal.ui.OpenShiftUIActivator;
@@ -10,6 +11,7 @@
import org.jboss.tools.openshift.express.internal.ui.wizard.OpenShiftExpressApplicationWizard;
import com.openshift.express.client.IApplication;
+import com.openshift.express.client.IUser;
public class ImportApplicationAction extends AbstractAction {
@@ -25,6 +27,12 @@
final IApplication application = (IApplication) treeSelection.getFirstElement();
//final IUser user = OpenShiftUIActivator.getDefault().getUser();
OpenShiftExpressApplicationWizard wizard = new OpenShiftExpressApplicationWizard();
+ TreePath[] paths = treeSelection.getPaths();
+ if( paths != null && paths.length == 1 ) {
+ Object user = paths[0].getParentPath().getLastSegment();
+ if( user instanceof IUser )
+ wizard.setInitialUser((IUser)user);
+ }
wizard.setSelectedApplication(application);
final IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(application.getName());
if(project.exists()) {
14 years, 2 months
JBoss Tools SVN: r38553 - trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/workbench.
by jbosstools-commits@lists.jboss.org
Author: dgeraskov
Date: 2012-02-09 09:19:57 -0500 (Thu, 09 Feb 2012)
New Revision: 38553
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/workbench/LazyDatabaseSchemaWorkbenchAdapter.java
Log:
https://issues.jboss.org/browse/JBIDE-8394
No need to synchronize the method of a "singleton". Method readDatabaseSchema calls "execute" method of consoleConfiguration which is synchronized through execution context. So the same console configuration will be blocked(as expected).
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/workbench/LazyDatabaseSchemaWorkbenchAdapter.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/workbench/LazyDatabaseSchemaWorkbenchAdapter.java 2012-02-09 14:03:33 UTC (rev 38552)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/workbench/LazyDatabaseSchemaWorkbenchAdapter.java 2012-02-09 14:19:57 UTC (rev 38553)
@@ -55,7 +55,7 @@
}
@SuppressWarnings("unchecked")
- public synchronized Object[] getChildren(Object o, final IProgressMonitor monitor) {
+ public Object[] getChildren(Object o, final IProgressMonitor monitor) {
LazyDatabaseSchema dbs = getLazyDatabaseSchema( o );
dbs.setConnected(false);
dbs.setErrorFlag(false);
14 years, 2 months
JBoss Tools SVN: r38552 - trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2012-02-09 09:03:33 -0500 (Thu, 09 Feb 2012)
New Revision: 38552
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/OpenConnectionDialogActionDelegate.java
Log:
Viewer default should / could be the user model
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/OpenConnectionDialogActionDelegate.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/OpenConnectionDialogActionDelegate.java 2012-02-09 14:02:40 UTC (rev 38551)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/OpenConnectionDialogActionDelegate.java 2012-02-09 14:03:33 UTC (rev 38552)
@@ -10,6 +10,7 @@
import org.eclipse.ui.IViewPart;
import org.eclipse.ui.navigator.CommonNavigator;
import org.jboss.tools.common.ui.WizardUtils;
+import org.jboss.tools.openshift.express.internal.core.console.UserModel;
import org.jboss.tools.openshift.express.internal.ui.OpenShiftUIActivator;
import org.jboss.tools.openshift.express.internal.ui.utils.Logger;
import org.jboss.tools.openshift.express.internal.ui.viewer.ConnectToOpenShiftWizard;
@@ -30,10 +31,7 @@
if (returnCode == Window.OK) {
Logger.debug("OpenShift Auth succeeded.");
if (view != null) {
- IUser user = OpenShiftUIActivator.getDefault().getUser();
- //view.switchToCommonViewer();
- view.getCommonViewer().setInput(new OpenShiftExpressConsoleContentCategory(user));
- //view.getCommonViewer().refresh();
+ view.getCommonViewer().setInput(UserModel.getDefault());
}
}
14 years, 2 months
JBoss Tools SVN: r38551 - in trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui: wizard and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2012-02-09 09:02:40 -0500 (Thu, 09 Feb 2012)
New Revision: 38551
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/CreateApplicationAction.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/OpenShiftExpressApplicationWizard.java
Log:
Ensuring credential page is only skipped if selection is an IUser or one is explicitly provided
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/CreateApplicationAction.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/CreateApplicationAction.java 2012-02-09 13:57:45 UTC (rev 38550)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/CreateApplicationAction.java 2012-02-09 14:02:40 UTC (rev 38551)
@@ -1,10 +1,14 @@
package org.jboss.tools.openshift.express.internal.ui.action;
import org.eclipse.jface.viewers.ITreeSelection;
+import org.eclipse.jface.wizard.IWizard;
+import org.eclipse.jface.wizard.WizardDialog;
+import org.eclipse.swt.widgets.Shell;
import org.jboss.tools.openshift.express.internal.ui.OpenShiftUIActivator;
import org.jboss.tools.openshift.express.internal.ui.messages.OpenShiftExpressUIMessages;
+import org.jboss.tools.openshift.express.internal.ui.wizard.OpenShiftExpressApplicationWizard;
-import com.openshift.express.client.IApplication;
+import com.openshift.express.client.IUser;
public class CreateApplicationAction extends AbstractAction {
@@ -21,10 +25,14 @@
* created, otherwise, it is displayed. {@inheritDoc}
*/
@Override
- public void run() {
- if (selection != null && selection instanceof ITreeSelection && ((ITreeSelection)selection).getFirstElement() instanceof IApplication) {
- final IApplication application = (IApplication) ((ITreeSelection)selection).getFirstElement();
-
+ public void run() {
+ if (selection != null && selection instanceof ITreeSelection ) {
+ Object sel = ((ITreeSelection)selection).getFirstElement();
+ if( sel instanceof IUser) {
+ OpenShiftExpressApplicationWizard wizard = new OpenShiftExpressApplicationWizard();
+ wizard.setInitialUser((IUser)sel);
+ new WizardDialog(new Shell(), wizard).open();
+ }
}
}
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/OpenShiftExpressApplicationWizard.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/OpenShiftExpressApplicationWizard.java 2012-02-09 13:57:45 UTC (rev 38550)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/OpenShiftExpressApplicationWizard.java 2012-02-09 14:02:40 UTC (rev 38551)
@@ -45,6 +45,7 @@
public class OpenShiftExpressApplicationWizard extends
AbstractOpenShiftApplicationWizard<OpenShiftExpressApplicationWizardModel> implements IImportWizard, INewWizard {
+ private IUser initialUser;
public OpenShiftExpressApplicationWizard() {
super();
setWizardModel(new OpenShiftExpressApplicationWizardModel());
@@ -68,12 +69,19 @@
public void init(IWorkbench workbench, IStructuredSelection selection) {
setWindowTitle("OpenShift Application Wizard");
setNeedsProgressMonitor(true);
+ Object o = selection.getFirstElement();
+ if( o instanceof IUser ) {
+ this.initialUser = (IUser)o;
+ }
}
+ public void setInitialUser(IUser user) {
+ this.initialUser = user;
+ }
@Override
public void addPages() {
- final IUser user = OpenShiftUIActivator.getDefault().getUser();
+ final IUser user = initialUser;
try {
if (user == null || !user.isValid()) {
addPage(new CredentialsWizardPage(this));
14 years, 2 months
JBoss Tools SVN: r38550 - 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-02-09 08:57:45 -0500 (Thu, 09 Feb 2012)
New Revision: 38550
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationConfigurationWizardPage.java
Log:
slight cleanup, reformatting for better readability
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationConfigurationWizardPage.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationConfigurationWizardPage.java 2012-02-09 13:10:55 UTC (rev 38549)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationConfigurationWizardPage.java 2012-02-09 13:57:45 UTC (rev 38550)
@@ -110,17 +110,19 @@
private Composite createApplicationSelectionGroup(Composite container, DataBindingContext dbc) {
Composite existingAppSelectionGroup = new Composite(container, SWT.NONE);
// projectGroup.setText("Project");
- GridDataFactory.fillDefaults().align(SWT.LEFT, SWT.CENTER).align(SWT.FILL, SWT.CENTER).grab(true, false)
+ GridDataFactory.fillDefaults()
+ .align(SWT.LEFT, SWT.CENTER).align(SWT.FILL, SWT.CENTER).grab(true, false)
.applyTo(existingAppSelectionGroup);
- GridLayoutFactory.fillDefaults().numColumns(3).margins(6, 6).applyTo(existingAppSelectionGroup);
+ GridLayoutFactory.fillDefaults()
+ .numColumns(3).margins(6, 6).applyTo(existingAppSelectionGroup);
// existing app checkbox
useExistingAppBtn = new Button(existingAppSelectionGroup, SWT.CHECK);
useExistingAppBtn.setText("Use the existing application");
useExistingAppBtn.setToolTipText("Select an existing application or uncheck to create a new one.");
useExistingAppBtn.setFocus();
- GridDataFactory.fillDefaults().span(1, 1).align(SWT.FILL, SWT.CENTER).grab(false, false)
- .applyTo(useExistingAppBtn);
+ GridDataFactory.fillDefaults()
+ .span(1, 1).align(SWT.FILL, SWT.CENTER).grab(false, false).applyTo(useExistingAppBtn);
final IObservableValue useExistingAppObservable = BeanProperties.value(
ApplicationConfigurationWizardPageModel.PROPERTY_USE_EXISTING_APPLICATION).observe(pageModel);
final ISWTObservableValue useExistingAppBtnSelection = WidgetProperties.selection().observe(useExistingAppBtn);
@@ -128,45 +130,33 @@
// existing app name
final Text existingAppNameText = new Text(existingAppSelectionGroup, SWT.BORDER);
- GridDataFactory.fillDefaults().align(SWT.FILL, SWT.CENTER).span(1, 1).grab(true, false)
- .applyTo(existingAppNameText);
+ GridDataFactory.fillDefaults()
+ .align(SWT.FILL, SWT.CENTER).span(1, 1).grab(true, false).applyTo(existingAppNameText);
final IObservableValue existingAppNameModelObservable = BeanProperties.value(
ApplicationConfigurationWizardPageModel.PROPERTY_EXISTING_APPLICATION_NAME).observe(pageModel);
- // observe text changes
- final ISWTObservableValue existingAppNameTextObservable = WidgetProperties.text(SWT.Modify).observe(
- existingAppNameText);
+ final ISWTObservableValue existingAppNameTextObservable =
+ WidgetProperties.text(SWT.Modify).observe(existingAppNameText);
ValueBindingBuilder.bind(existingAppNameTextObservable).to(existingAppNameModelObservable).in(dbc);
if (pageModel.getExistingApplicationName() != null) {
existingAppNameText.setText(pageModel.getExistingApplicationName());
}
- // enable the app name text when the model state is set to 'use existing app'
- ValueBindingBuilder.bind(WidgetProperties.enabled().observe(existingAppNameText))
- .notUpdating(useExistingAppObservable).in(dbc);
- // move focus to the project name text control when choosing the 'Use an existing project' option.
- useExistingAppBtn.addSelectionListener(new SelectionListener() {
+ // enable the app name text when the model state is set to 'use existing
+ // app'
+ ValueBindingBuilder
+ .bind(WidgetProperties.enabled().observe(existingAppNameText))
+ .notUpdating(useExistingAppObservable)
+ .in(dbc);
+ // move focus to the project name text control when choosing the 'Use an
+ // existing project' option.
+ useExistingAppBtn.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
existingAppNameText.setFocus();
existingAppNameText.selectAll();
}
-
- @Override
- public void widgetDefaultSelected(SelectionEvent e) {
- }
});
- // let's provide content assist on the existing project name
- ControlDecoration dec = new ControlDecoration(existingAppNameText, SWT.TOP | SWT.LEFT);
- FieldDecoration contentProposalFieldIndicator = FieldDecorationRegistry.getDefault().getFieldDecoration(
- FieldDecorationRegistry.DEC_CONTENT_PROPOSAL);
- dec.setImage(contentProposalFieldIndicator.getImage());
- dec.setDescriptionText("Auto-completion is enabled when you start typing a project name.");
- dec.setShowOnlyOnFocus(true);
+ createContentAssist(existingAppNameText);
- AutoCompleteField adapter = new AutoCompleteField(existingAppNameText, new TextContentAdapter(),
- new String[] {});
-
- adapter.setProposals(getApplicationNames());
-
Button browseAppsButton = new Button(existingAppSelectionGroup, SWT.NONE);
browseAppsButton.setText("Browse");
browseAppsButton.addSelectionListener(onBrowseApps());
@@ -177,14 +167,28 @@
final IObservableValue existingAppValidityObservable = BeanProperties.value(
ApplicationConfigurationWizardPageModel.PROPERTY_EXISTING_APPLICATION_NAME).observe(pageModel);
- final ApplicationToSelectNameValidator existingProjectValidator = new ApplicationToSelectNameValidator(
- existingAppValidityObservable, existingAppNameTextObservable, existingAppNameModelObservable);
+ final ApplicationToSelectNameValidator existingProjectValidator =
+ new ApplicationToSelectNameValidator(
+ existingAppValidityObservable, existingAppNameTextObservable, existingAppNameModelObservable);
dbc.addValidationStatusProvider(existingProjectValidator);
ControlDecorationSupport.create(existingProjectValidator, SWT.LEFT | SWT.TOP);
return existingAppSelectionGroup;
}
+ private void createContentAssist(final Text existingAppNameText) {
+ ControlDecoration dec = new ControlDecoration(existingAppNameText, SWT.TOP | SWT.LEFT);
+ FieldDecoration contentProposalFieldIndicator =
+ FieldDecorationRegistry.getDefault().getFieldDecoration(FieldDecorationRegistry.DEC_CONTENT_PROPOSAL);
+ dec.setImage(contentProposalFieldIndicator.getImage());
+ dec.setDescriptionText("Auto-completion is enabled when you start typing a project name.");
+ dec.setShowOnlyOnFocus(true);
+
+ AutoCompleteField adapter =
+ new AutoCompleteField(existingAppNameText, new TextContentAdapter(), new String[] {});
+ adapter.setProposals(getApplicationNames());
+ }
+
private String[] getApplicationNames() {
try {
List<IApplication> applications;
@@ -259,16 +263,20 @@
applicationNameTextObservable, cartridgesComboObservable);
dbc.addValidationStatusProvider(applicationInputValidator);
/*
- * final ApplicationToSelectNameValidator applicationNameValidator = new ApplicationToSelectNameValidator(us
- * applicationNameStatusObservable, applicationNameTextObservable);
+ * final ApplicationToSelectNameValidator applicationNameValidator = new
+ * ApplicationToSelectNameValidator(us applicationNameStatusObservable,
+ * applicationNameTextObservable);
* dbc.addValidationStatusProvider(applicationNameValidator);
- * ControlDecorationSupport.create(applicationNameValidator, SWT.LEFT | SWT.TOP);
+ * ControlDecorationSupport.create(applicationNameValidator, SWT.LEFT |
+ * SWT.TOP);
*/
// embeddable cartridges
Group cartridgesGroup = new Group(container, SWT.NONE);
cartridgesGroup.setText("Embeddable Cartridges");
- GridDataFactory.fillDefaults().grab(true, true).align(SWT.FILL, SWT.FILL).span(2, 1).applyTo(cartridgesGroup);
- GridLayoutFactory.fillDefaults().numColumns(2).margins(6, 6).applyTo(cartridgesGroup);
+ GridDataFactory.fillDefaults()
+ .grab(true, true).align(SWT.FILL, SWT.FILL).span(2, 1).applyTo(cartridgesGroup);
+ GridLayoutFactory.fillDefaults()
+ .numColumns(2).margins(6, 6).applyTo(cartridgesGroup);
Composite tableContainer = new Composite(cartridgesGroup, SWT.NONE);
GridDataFactory.fillDefaults().align(SWT.FILL, SWT.FILL).grab(true, true).span(1, 2).hint(400, 250)
@@ -276,28 +284,33 @@
this.viewer = createTable(tableContainer);
Button checkAllButton = new Button(cartridgesGroup, SWT.PUSH);
checkAllButton.setText("&Select All");
- GridDataFactory.fillDefaults().hint(110, SWT.DEFAULT).grab(false, false).align(SWT.FILL, SWT.TOP)
- .applyTo(checkAllButton);
+ GridDataFactory.fillDefaults()
+ .hint(110, SWT.DEFAULT).grab(false, false).align(SWT.FILL, SWT.TOP).applyTo(checkAllButton);
checkAllButton.addSelectionListener(onCheckAll());
Button uncheckAllButton = new Button(cartridgesGroup, SWT.PUSH);
uncheckAllButton.setText("&Deselect All");
- GridDataFactory.fillDefaults().hint(110, SWT.DEFAULT).grab(false, true).align(SWT.FILL, SWT.TOP)
- .applyTo(uncheckAllButton);
+ GridDataFactory.fillDefaults()
+ .hint(110, SWT.DEFAULT).grab(false, true).align(SWT.FILL, SWT.TOP).applyTo(uncheckAllButton);
uncheckAllButton.addSelectionListener(onUncheckAll());
// bottom filler
Composite spacer = new Composite(container, SWT.NONE);
- GridDataFactory.fillDefaults().span(2, 1).align(SWT.FILL, SWT.FILL).grab(true, true).applyTo(spacer);
+ GridDataFactory.fillDefaults()
+ .span(2, 1).align(SWT.FILL, SWT.FILL).grab(true, true).applyTo(spacer);
- // enabling the group if the 'use existing application' checkbox state is 'false' (unchecked)
+ // enabling the group if the 'use existing application' checkbox state
+ // is 'false' (unchecked)
final ISWTObservableValue useExistinAppBtnObservable = WidgetProperties.selection().observe(
this.useExistingAppBtn);
final ISWTObservableValue createApplicationGroupEnabled = WidgetProperties.enabled().observe(container);
- ValueBindingBuilder.bind(createApplicationGroupEnabled).notUpdatingParticipant().to(useExistinAppBtnObservable)
+ ValueBindingBuilder
+ .bind(createApplicationGroupEnabled).notUpdatingParticipant()
+ .to(useExistinAppBtnObservable)
.converting(new InvertingBooleanConverter()).in(dbc);
- // dbc.bindValue(useExistinAppBtnObservable, createApplicationGroupEnabled);
+ // dbc.bindValue(useExistinAppBtnObservable,
+ // createApplicationGroupEnabled);
}
@@ -546,11 +559,12 @@
}
/**
- * Viewer element comparer based on #equals(). The default implementation in CheckboxTableViewer compares elements
- * based on instance identity.
+ * Viewer element comparer based on #equals(). The default implementation in
+ * CheckboxTableViewer compares elements based on instance identity.
* <p>
- * We need this since the available cartridges (item listed in the viewer) are not the same instance as the ones in
- * the embedded application (items to check in the viewer).
+ * We need this since the available cartridges (item listed in the viewer)
+ * are not the same instance as the ones in the embedded application (items
+ * to check in the viewer).
*/
private static class EqualityComparer implements IElementComparer {
@@ -642,7 +656,8 @@
@Override
protected IStatus validate() {
/*
- * final IStatus applicationNameStatus = (IStatus) applicationNameStatusObservable.getValue(); if
+ * final IStatus applicationNameStatus = (IStatus)
+ * applicationNameStatusObservable.getValue(); if
* (applicationNameStatus != null) { return applicationNameStatus; }
*/
return ValidationStatus.ok();
@@ -650,7 +665,9 @@
/*
* (non-Javadoc)
- * @see org.eclipse.core.databinding.validation.MultiValidator#getTargets()
+ *
+ * @see
+ * org.eclipse.core.databinding.validation.MultiValidator#getTargets()
*/
@Override
public IObservableList getTargets() {
@@ -687,7 +704,9 @@
/*
* (non-Javadoc)
- * @see org.eclipse.core.databinding.validation.MultiValidator#getTargets()
+ *
+ * @see
+ * org.eclipse.core.databinding.validation.MultiValidator#getTargets()
*/
@Override
public IObservableList getTargets() {
14 years, 2 months