JBoss Tools SVN: r35874 - in branches/jbosstools-3.3.0.M4/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central: actions and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2011-10-20 19:09:25 -0400 (Thu, 20 Oct 2011)
New Revision: 35874
Modified:
branches/jbosstools-3.3.0.M4/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/JBossCentralActivator.java
branches/jbosstools-3.3.0.M4/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/actions/OpenJBossBlogsHandler.java
branches/jbosstools-3.3.0.M4/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/jobs/RefreshBlogsJob.java
branches/jbosstools-3.3.0.M4/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/jobs/RefreshNewsJob.java
Log:
JBIDE-9849 why is there both a feed and a atom url - isn't one sufficient ?
Modified: branches/jbosstools-3.3.0.M4/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/JBossCentralActivator.java
===================================================================
--- branches/jbosstools-3.3.0.M4/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/JBossCentralActivator.java 2011-10-20 22:50:24 UTC (rev 35873)
+++ branches/jbosstools-3.3.0.M4/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/JBossCentralActivator.java 2011-10-20 23:09:25 UTC (rev 35874)
@@ -105,14 +105,10 @@
public static final String NEW_PROJECT_EXAMPLES_WIZARD_ID = "org.jboss.tools.project.examples.wizard.NewProjectExamplesWizard";
- public static final String BLOG_URL = "http://planet.jboss.org/feeds/blogs";
+ public static final String BLOGS_URL = "http://planet.jboss.org/feeds/blogs";
- public static final String BLOGS_ATOM_URL = "http://planet.jboss.org/feeds/blogs";
-
- public static final String NEWS_URL = "http://pipes.yahoo.com/pipes/pipe.run?_id=660682be8ddf4b5db0cce318826f8a53";
+ public static final String NEWS_URL = "http://planet.jboss.org/feeds/news";
- public static final String NEWS_ATOM_URL = "http://pipes.yahoo.com/pipes/pipe.run?_id=660682be8ddf4b5db0cce318826f8a5...";
-
public static final String FORM_END_TAG = "</p></form>";
public static final String FORM_START_TAG = "<form><p>";
public static final String CANCELED = FORM_START_TAG + "<span color=\"header\" font=\"header\">Canceled.</span>" + FORM_END_TAG;
Modified: branches/jbosstools-3.3.0.M4/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/actions/OpenJBossBlogsHandler.java
===================================================================
--- branches/jbosstools-3.3.0.M4/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/actions/OpenJBossBlogsHandler.java 2011-10-20 22:50:24 UTC (rev 35873)
+++ branches/jbosstools-3.3.0.M4/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/actions/OpenJBossBlogsHandler.java 2011-10-20 23:09:25 UTC (rev 35874)
@@ -22,7 +22,7 @@
@Override
public String getLocation() {
- return JBossCentralActivator.BLOG_URL;
+ return JBossCentralActivator.BLOGS_URL;
}
}
Modified: branches/jbosstools-3.3.0.M4/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/jobs/RefreshBlogsJob.java
===================================================================
--- branches/jbosstools-3.3.0.M4/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/jobs/RefreshBlogsJob.java 2011-10-20 22:50:24 UTC (rev 35873)
+++ branches/jbosstools-3.3.0.M4/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/jobs/RefreshBlogsJob.java 2011-10-20 23:09:25 UTC (rev 35874)
@@ -39,7 +39,7 @@
private List<FeedsEntry> entries = new ArrayList<FeedsEntry>();
private Exception exception;
- public static RefreshBlogsJob INSTANCE = new RefreshBlogsJob(JBossCentralActivator.BLOGS_ATOM_URL);
+ public static RefreshBlogsJob INSTANCE = new RefreshBlogsJob(JBossCentralActivator.BLOGS_URL);
private String blogsurl;
Modified: branches/jbosstools-3.3.0.M4/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/jobs/RefreshNewsJob.java
===================================================================
--- branches/jbosstools-3.3.0.M4/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/jobs/RefreshNewsJob.java 2011-10-20 22:50:24 UTC (rev 35873)
+++ branches/jbosstools-3.3.0.M4/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/jobs/RefreshNewsJob.java 2011-10-20 23:09:25 UTC (rev 35874)
@@ -39,7 +39,7 @@
private List<FeedsEntry> entries = new ArrayList<FeedsEntry>();
private Exception exception;
- public static RefreshNewsJob INSTANCE = new RefreshNewsJob(JBossCentralActivator.NEWS_ATOM_URL);
+ public static RefreshNewsJob INSTANCE = new RefreshNewsJob(JBossCentralActivator.NEWS_URL);
private String newsurl;
13 years, 2 months
JBoss Tools SVN: r35873 - trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/editors.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2011-10-20 18:50:24 -0400 (Thu, 20 Oct 2011)
New Revision: 35873
Modified:
trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/editors/GettingStartedPage.java
Log:
JBIDE-9368 Dashboard(s) for easy news aggregation, twitter and easy additional/3rd party plugin installation and project template/creation
Modified: trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/editors/GettingStartedPage.java
===================================================================
--- trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/editors/GettingStartedPage.java 2011-10-20 22:45:34 UTC (rev 35872)
+++ trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/editors/GettingStartedPage.java 2011-10-20 22:50:24 UTC (rev 35873)
@@ -33,6 +33,7 @@
import org.eclipse.core.runtime.jobs.IJobChangeEvent;
import org.eclipse.core.runtime.jobs.IJobChangeListener;
import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.core.runtime.preferences.IEclipsePreferences;
import org.eclipse.jface.action.ToolBarManager;
import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.jface.layout.GridDataFactory;
@@ -51,17 +52,20 @@
import org.eclipse.swt.events.ControlEvent;
import org.eclipse.swt.events.DisposeEvent;
import org.eclipse.swt.events.DisposeListener;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.graphics.Rectangle;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.layout.RowLayout;
+import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Text;
import org.eclipse.ui.INewWizard;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.PlatformUI;
@@ -144,6 +148,8 @@
private FormText newsExceptionText;
private Composite newsComposite;
private RefreshNewsJobChangeListener refreshNewsJobChangeListener;
+ private Section settingsSection;
+ private Composite settingsComposite;
public GettingStartedPage(FormEditor editor) {
super(editor, ID, "Getting Started");
@@ -167,13 +173,14 @@
createProjectsSection(toolkit, left);
createTutorialsSection(toolkit, left);
createDocumentationSection(toolkit, left);
+ createSettingsSection(toolkit, left);
toolkit.paintBordersFor(left);
-
+
Composite right = createComposite(toolkit, body);
createNewsSection(toolkit, right);
createBlogsSection(toolkit, right);
toolkit.paintBordersFor(right);
-
+
final ControlAdapter controlAdapter = new ControlAdapter() {
@Override
@@ -635,10 +642,39 @@
addHyperlink(toolkit, documentationComposite, "Screencasts", "http://docs.jboss.org/tools/movies/");
addHyperlink(toolkit, documentationComposite, "Issue Tracker", "https://issues.jboss.org/browse/JBIDE");
-
documentationSection.setClient(documentationComposite);
}
+
+ public void createSettingsSection(FormToolkit toolkit, Composite parent) {
+ settingsSection = createSection(toolkit, parent, "Settings", ExpandableComposite.TITLE_BAR|ExpandableComposite.TWISTIE|ExpandableComposite.EXPANDED);
+ GridData gd = new GridData(SWT.FILL, SWT.FILL, false, false);
+ settingsSection.setLayoutData(gd);
+
+ settingsComposite = toolkit.createComposite(settingsSection);
+ GridLayout layout = new GridLayout(1, true);
+ layout.horizontalSpacing = 30;
+ settingsComposite.setLayout(layout);
+ GridDataFactory.fillDefaults().grab(true, true).applyTo(settingsComposite);
+
+ Button showOnStartup = toolkit.createButton(settingsComposite, "Show on Startup", SWT.CHECK);
+ showOnStartup.setLayoutData(new GridData(SWT.BEGINNING, SWT.BOTTOM, false, false));
+ showOnStartup.setBackground(settingsComposite.getBackground());
+ showOnStartup.setSelection(JBossCentralActivator.getDefault().showJBossCentralOnStartup());
+ showOnStartup.addSelectionListener(new SelectionAdapter() {
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ IEclipsePreferences preferences = JBossCentralActivator.getDefault().getPreferences();
+ boolean showOnStartup = preferences.getBoolean(JBossCentralActivator.SHOW_JBOSS_CENTRAL_ON_STARTUP, JBossCentralActivator.SHOW_JBOSS_CENTRAL_ON_STARTUP_DEFAULT_VALUE);
+ preferences.putBoolean(JBossCentralActivator.SHOW_JBOSS_CENTRAL_ON_STARTUP, !showOnStartup);
+ JBossCentralActivator.getDefault().savePreferences();
+ }
+
+ });
+
+ settingsSection.setClient(settingsComposite);
+ }
+
private void addHyperlink(FormToolkit toolkit, Composite composite, String text, final String url) {
Hyperlink link = toolkit.createHyperlink(composite,
text, SWT.NONE);
@@ -1025,6 +1061,12 @@
computedSize = documentationSection.computeSize(SWT.DEFAULT, SWT.DEFAULT);
documentationSection.setSize(widthHint, computedSize.y);
+ gd = (GridData) settingsSection.getLayoutData();
+ gd.widthHint = widthHint;
+ gd.grabExcessVerticalSpace = false;
+ computedSize = settingsSection.computeSize(SWT.DEFAULT, SWT.DEFAULT);
+ settingsSection.setSize(widthHint, computedSize.y);
+
gd = (GridData) projectsSection.getLayoutData();
//gridData.heightHint = size.y - 40;
gd.widthHint = widthHint;
13 years, 2 months
JBoss Tools SVN: r35872 - branches/jbosstools-3.3.0.M4/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/editors.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2011-10-20 18:45:34 -0400 (Thu, 20 Oct 2011)
New Revision: 35872
Modified:
branches/jbosstools-3.3.0.M4/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/editors/GettingStartedPage.java
Log:
JBIDE-9368 Dashboard(s) for easy news aggregation, twitter and easy additional/3rd party plugin installation and project template/creation
Modified: branches/jbosstools-3.3.0.M4/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/editors/GettingStartedPage.java
===================================================================
--- branches/jbosstools-3.3.0.M4/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/editors/GettingStartedPage.java 2011-10-20 22:26:49 UTC (rev 35871)
+++ branches/jbosstools-3.3.0.M4/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/editors/GettingStartedPage.java 2011-10-20 22:45:34 UTC (rev 35872)
@@ -33,6 +33,7 @@
import org.eclipse.core.runtime.jobs.IJobChangeEvent;
import org.eclipse.core.runtime.jobs.IJobChangeListener;
import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.core.runtime.preferences.IEclipsePreferences;
import org.eclipse.jface.action.ToolBarManager;
import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.jface.layout.GridDataFactory;
@@ -51,17 +52,20 @@
import org.eclipse.swt.events.ControlEvent;
import org.eclipse.swt.events.DisposeEvent;
import org.eclipse.swt.events.DisposeListener;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.graphics.Rectangle;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.layout.RowLayout;
+import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Text;
import org.eclipse.ui.INewWizard;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.PlatformUI;
@@ -144,6 +148,8 @@
private FormText newsExceptionText;
private Composite newsComposite;
private RefreshNewsJobChangeListener refreshNewsJobChangeListener;
+ private Section settingsSection;
+ private Composite settingsComposite;
public GettingStartedPage(FormEditor editor) {
super(editor, ID, "Getting Started");
@@ -167,13 +173,14 @@
createProjectsSection(toolkit, left);
createTutorialsSection(toolkit, left);
createDocumentationSection(toolkit, left);
+ createSettingsSection(toolkit, left);
toolkit.paintBordersFor(left);
-
+
Composite right = createComposite(toolkit, body);
createNewsSection(toolkit, right);
createBlogsSection(toolkit, right);
toolkit.paintBordersFor(right);
-
+
final ControlAdapter controlAdapter = new ControlAdapter() {
@Override
@@ -635,10 +642,39 @@
addHyperlink(toolkit, documentationComposite, "Screencasts", "http://docs.jboss.org/tools/movies/");
addHyperlink(toolkit, documentationComposite, "Issue Tracker", "https://issues.jboss.org/browse/JBIDE");
-
documentationSection.setClient(documentationComposite);
}
+
+ public void createSettingsSection(FormToolkit toolkit, Composite parent) {
+ settingsSection = createSection(toolkit, parent, "Settings", ExpandableComposite.TITLE_BAR|ExpandableComposite.TWISTIE|ExpandableComposite.EXPANDED);
+ GridData gd = new GridData(SWT.FILL, SWT.FILL, false, false);
+ settingsSection.setLayoutData(gd);
+
+ settingsComposite = toolkit.createComposite(settingsSection);
+ GridLayout layout = new GridLayout(1, true);
+ layout.horizontalSpacing = 30;
+ settingsComposite.setLayout(layout);
+ GridDataFactory.fillDefaults().grab(true, true).applyTo(settingsComposite);
+
+ Button showOnStartup = toolkit.createButton(settingsComposite, "Show on Startup", SWT.CHECK);
+ showOnStartup.setLayoutData(new GridData(SWT.BEGINNING, SWT.BOTTOM, false, false));
+ showOnStartup.setBackground(settingsComposite.getBackground());
+ showOnStartup.setSelection(JBossCentralActivator.getDefault().showJBossCentralOnStartup());
+ showOnStartup.addSelectionListener(new SelectionAdapter() {
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ IEclipsePreferences preferences = JBossCentralActivator.getDefault().getPreferences();
+ boolean showOnStartup = preferences.getBoolean(JBossCentralActivator.SHOW_JBOSS_CENTRAL_ON_STARTUP, JBossCentralActivator.SHOW_JBOSS_CENTRAL_ON_STARTUP_DEFAULT_VALUE);
+ preferences.putBoolean(JBossCentralActivator.SHOW_JBOSS_CENTRAL_ON_STARTUP, !showOnStartup);
+ JBossCentralActivator.getDefault().savePreferences();
+ }
+
+ });
+
+ settingsSection.setClient(settingsComposite);
+ }
+
private void addHyperlink(FormToolkit toolkit, Composite composite, String text, final String url) {
Hyperlink link = toolkit.createHyperlink(composite,
text, SWT.NONE);
@@ -1025,6 +1061,12 @@
computedSize = documentationSection.computeSize(SWT.DEFAULT, SWT.DEFAULT);
documentationSection.setSize(widthHint, computedSize.y);
+ gd = (GridData) settingsSection.getLayoutData();
+ gd.widthHint = widthHint;
+ gd.grabExcessVerticalSpace = false;
+ computedSize = settingsSection.computeSize(SWT.DEFAULT, SWT.DEFAULT);
+ settingsSection.setSize(widthHint, computedSize.y);
+
gd = (GridData) projectsSection.getLayoutData();
//gridData.heightHint = size.y - 40;
gd.widthHint = widthHint;
13 years, 2 months
JBoss Tools SVN: r35871 - in trunk: common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/databinding and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-10-20 18:26:49 -0400 (Thu, 20 Oct 2011)
New Revision: 35871
Modified:
trunk/as/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/AdapterWizardPage.java
trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/databinding/ValueBindingBuilder.java
Log:
[JBIDE-9947] switched bindings to new ValueBindingBuilder
Modified: trunk/as/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/AdapterWizardPage.java
===================================================================
--- trunk/as/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/AdapterWizardPage.java 2011-10-20 22:25:25 UTC (rev 35870)
+++ trunk/as/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/AdapterWizardPage.java 2011-10-20 22:26:49 UTC (rev 35871)
@@ -134,12 +134,12 @@
ValueBindingBuilder
.bind(WidgetProperties.text(SWT.Modify).observe(gitUriValueText))
.notUpdating(BeanProperties.value(AdapterWizardPageModel.PROPERTY_GIT_URI).observe(model))
- .using(dbc);
+ .in(dbc);
ValueBindingBuilder
.bind(WidgetProperties.enabled().observe(gitUriValueText))
.notUpdating(BeanProperties.value(AdapterWizardPageModel.PROPERTY_LOADING).observe(model))
.converting(new InvertingBooleanConverter())
- .using(dbc);
+ .in(dbc);
// bind loading state to page complete
ValueBindingBuilder
@@ -156,7 +156,7 @@
}
}
})
- .using(dbc);
+ .in(dbc);
Label repoPathLabel = new Label(cloneGroup, SWT.NONE);
GridDataFactory.fillDefaults().align(SWT.LEFT, SWT.CENTER).applyTo(repoPathLabel);
@@ -179,7 +179,7 @@
.converting(new InvertingBooleanConverter())
.to(WidgetProperties.enabled().observe(repoPathText))
.notUpdatingParticipant()
- .using(dbc);
+ .in(dbc);
Button browseRepoPathButton = new Button(cloneGroup, SWT.PUSH);
browseRepoPathButton.setText("Browse");
@@ -191,7 +191,7 @@
.converting(new InvertingBooleanConverter())
.to(WidgetProperties.enabled().observe(browseRepoPathButton))
.notUpdatingParticipant()
- .using(dbc);
+ .in(dbc);
defaultRepoButtonSelection.setValue(true);
@@ -218,7 +218,7 @@
.converting(new InvertingBooleanConverter())
.to(WidgetProperties.enabled().observe(remoteNameText))
.notUpdatingParticipant()
- .using(dbc);
+ .in(dbc);
defaultRemoteNameSelection.setValue(true);
Link sshPrefsLink = new Link(cloneGroup, SWT.NONE);
@@ -327,7 +327,7 @@
ValueBindingBuilder
.bind(WidgetProperties.text().observe(domainValueLabel))
.notUpdating(BeanProperties.value(AdapterWizardPageModel.PROPERTY_APPLICATION_URL).observe(model))
- .using(dbc);
+ .in(dbc);
// appLabel = new Label(c, SWT.NONE);
Label modeLabel = new Label(c, SWT.NONE);
modeLabel.setText("Mode");
Modified: trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/databinding/ValueBindingBuilder.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/databinding/ValueBindingBuilder.java 2011-10-20 22:25:25 UTC (rev 35870)
+++ trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/databinding/ValueBindingBuilder.java 2011-10-20 22:26:49 UTC (rev 35871)
@@ -65,7 +65,7 @@
this.targetDefinition = targetDefinition;
}
- public Binding using(DataBindingContext dbc) {
+ public Binding in(DataBindingContext dbc) {
return bind(targetDefinition, this, dbc);
}
}
13 years, 2 months
JBoss Tools SVN: r35870 - in trunk: common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/databinding and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-10-20 18:25:25 -0400 (Thu, 20 Oct 2011)
New Revision: 35870
Modified:
trunk/as/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/AdapterWizardPage.java
trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/databinding/ValueBindingBuilder.java
Log:
[JBIDE-9947] switched bindings to new ValueBindingBuilder
Modified: trunk/as/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/AdapterWizardPage.java
===================================================================
--- trunk/as/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/AdapterWizardPage.java 2011-10-20 21:57:28 UTC (rev 35869)
+++ trunk/as/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/AdapterWizardPage.java 2011-10-20 22:25:25 UTC (rev 35870)
@@ -16,7 +16,6 @@
import java.util.List;
import org.eclipse.core.databinding.DataBindingContext;
-import org.eclipse.core.databinding.UpdateValueStrategy;
import org.eclipse.core.databinding.beans.BeanProperties;
import org.eclipse.core.databinding.observable.list.IObservableList;
import org.eclipse.core.databinding.observable.value.IObservableValue;
@@ -62,9 +61,9 @@
import org.eclipse.wst.server.ui.internal.wizard.WizardTaskUtil;
import org.eclipse.wst.server.ui.wizard.WizardFragment;
import org.jboss.ide.eclipse.as.core.util.IJBossToolingConstants;
-import org.jboss.tools.common.ui.databinding.ValueBindingBuilder;
import org.jboss.tools.common.ui.databinding.DataBindingUtils;
import org.jboss.tools.common.ui.databinding.InvertingBooleanConverter;
+import org.jboss.tools.common.ui.databinding.ValueBindingBuilder;
import org.jboss.tools.common.ui.ssh.SshPrivateKeysPreferences;
import org.jboss.tools.openshift.express.client.ICartridge;
import org.jboss.tools.openshift.express.client.OpenShiftException;
@@ -130,25 +129,23 @@
gitUriValueText = new Text(cloneGroup, SWT.BORDER);
gitUriValueText.setEditable(false);
// gitUriValueText.setBackground(cloneGroup.getBackground());
- GridDataFactory.fillDefaults().span(3, 1).align(SWT.FILL, SWT.CENTER).grab(true, false)
- .applyTo(gitUriValueText);
- dbc.bindValue(
- WidgetProperties.text(SWT.Modify).observe(gitUriValueText)
- , BeanProperties.value(AdapterWizardPageModel.PROPERTY_GIT_URI).observe(model)
- , new UpdateValueStrategy(UpdateValueStrategy.POLICY_NEVER)
- , null);
- dbc.bindValue(
- WidgetProperties.enabled().observe(gitUriValueText)
- , BeanProperties.value(AdapterWizardPageModel.PROPERTY_LOADING).observe(model)
- , new UpdateValueStrategy(UpdateValueStrategy.POLICY_NEVER)
- , new UpdateValueStrategy().setConverter(new InvertingBooleanConverter()));
+ GridDataFactory
+ .fillDefaults().span(3, 1).align(SWT.FILL, SWT.CENTER).grab(true, false).applyTo(gitUriValueText);
+ ValueBindingBuilder
+ .bind(WidgetProperties.text(SWT.Modify).observe(gitUriValueText))
+ .notUpdating(BeanProperties.value(AdapterWizardPageModel.PROPERTY_GIT_URI).observe(model))
+ .using(dbc);
+ ValueBindingBuilder
+ .bind(WidgetProperties.enabled().observe(gitUriValueText))
+ .notUpdating(BeanProperties.value(AdapterWizardPageModel.PROPERTY_LOADING).observe(model))
+ .converting(new InvertingBooleanConverter())
+ .using(dbc);
// bind loading state to page complete
- dbc.bindValue(
- new WritableValue(false, Boolean.class)
- , BeanProperties.value(AdapterWizardPageModel.PROPERTY_LOADING).observe(model)
- , new UpdateValueStrategy(UpdateValueStrategy.POLICY_NEVER)
- , new UpdateValueStrategy().setAfterGetValidator(new IValidator() {
+ ValueBindingBuilder
+ .bind(new WritableValue(false, Boolean.class))
+ .notUpdating(BeanProperties.value(AdapterWizardPageModel.PROPERTY_LOADING).observe(model))
+ .validatingAfterGet(new IValidator() {
@Override
public IStatus validate(Object value) {
@@ -158,7 +155,8 @@
return ValidationStatus.cancel("Loading...");
}
}
- }));
+ })
+ .using(dbc);
Label repoPathLabel = new Label(cloneGroup, SWT.NONE);
GridDataFactory.fillDefaults().align(SWT.LEFT, SWT.CENTER).applyTo(repoPathLabel);
@@ -176,22 +174,24 @@
.align(SWT.LEFT, SWT.CENTER).align(SWT.FILL, SWT.CENTER).grab(true, false).applyTo(repoPathText);
DataBindingUtils.bindMandatoryTextField(
repoPathText, "Location", AdapterWizardPageModel.PROPERTY_REPO_PATH, model, dbc);
- dbc.bindValue(
- defaultRepoButtonSelection
- , WidgetProperties.enabled().observe(repoPathText)
- , new UpdateValueStrategy().setConverter(new InvertingBooleanConverter())
- , new UpdateValueStrategy(UpdateValueStrategy.POLICY_NEVER));
+ ValueBindingBuilder
+ .bind(defaultRepoButtonSelection)
+ .converting(new InvertingBooleanConverter())
+ .to(WidgetProperties.enabled().observe(repoPathText))
+ .notUpdatingParticipant()
+ .using(dbc);
Button browseRepoPathButton = new Button(cloneGroup, SWT.PUSH);
browseRepoPathButton.setText("Browse");
GridDataFactory.fillDefaults()
.align(SWT.LEFT, SWT.CENTER).hint(100, SWT.DEFAULT).applyTo(browseRepoPathButton);
browseRepoPathButton.addSelectionListener(onRepoPath());
- dbc.bindValue(
- defaultRepoButtonSelection
- , WidgetProperties.enabled().observe(browseRepoPathButton)
- , new UpdateValueStrategy().setConverter(new InvertingBooleanConverter())
- , new UpdateValueStrategy(UpdateValueStrategy.POLICY_NEVER));
+ ValueBindingBuilder
+ .bind(defaultRepoButtonSelection)
+ .converting(new InvertingBooleanConverter())
+ .to(WidgetProperties.enabled().observe(browseRepoPathButton))
+ .notUpdatingParticipant()
+ .using(dbc);
defaultRepoButtonSelection.setValue(true);
@@ -213,11 +213,12 @@
remoteNameText, "Remote name", AdapterWizardPageModel.PROPERTY_REMOTE_NAME, model, dbc);
IObservableValue defaultRemoteNameSelection = WidgetProperties.selection().observe(defaultRemoteNameButton);
- dbc.bindValue(
- defaultRemoteNameSelection
- , WidgetProperties.enabled().observe(remoteNameText)
- , new UpdateValueStrategy().setConverter(new InvertingBooleanConverter())
- , new UpdateValueStrategy(UpdateValueStrategy.POLICY_NEVER));
+ ValueBindingBuilder
+ .bind(defaultRemoteNameSelection)
+ .converting(new InvertingBooleanConverter())
+ .to(WidgetProperties.enabled().observe(remoteNameText))
+ .notUpdatingParticipant()
+ .using(dbc);
defaultRemoteNameSelection.setValue(true);
Link sshPrefsLink = new Link(cloneGroup, SWT.NONE);
Modified: trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/databinding/ValueBindingBuilder.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/databinding/ValueBindingBuilder.java 2011-10-20 21:57:28 UTC (rev 35869)
+++ trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/databinding/ValueBindingBuilder.java 2011-10-20 22:25:25 UTC (rev 35870)
@@ -13,8 +13,9 @@
import org.eclipse.core.databinding.Binding;
import org.eclipse.core.databinding.DataBindingContext;
import org.eclipse.core.databinding.UpdateValueStrategy;
+import org.eclipse.core.databinding.conversion.IConverter;
import org.eclipse.core.databinding.observable.value.IObservableValue;
-import org.eclipse.core.runtime.Assert;
+import org.eclipse.core.databinding.validation.IValidator;
/**
*
@@ -39,6 +40,36 @@
, modelDefinition.getStrategy());
}
+ public static class TargetDefinition extends BindingParticipantDefinition<TargetDefinition> {
+
+ public TargetDefinition(IObservableValue target) {
+ super(target);
+ }
+
+ public ModelDefinition to(IObservableValue model) {
+ return new ModelDefinition(model, this);
+ }
+
+ public ModelDefinition notUpdating(IObservableValue model) {
+ notUpdatingParticipant();
+ return to(model);
+ }
+ }
+
+ public static class ModelDefinition extends BindingParticipantDefinition<ModelDefinition> {
+
+ private TargetDefinition targetDefinition;
+
+ public ModelDefinition(IObservableValue model, TargetDefinition targetDefinition) {
+ super(model);
+ this.targetDefinition = targetDefinition;
+ }
+
+ public Binding using(DataBindingContext dbc) {
+ return bind(targetDefinition, this, dbc);
+ }
+ }
+
private abstract static class BindingParticipantDefinition<PARTICIPANT> {
private IObservableValue observable;
@@ -48,7 +79,7 @@
this.observable = observable;
}
- public PARTICIPANT withoutUpdate() {
+ public PARTICIPANT notUpdatingParticipant() {
return withStrategy(new UpdateValueStrategy(UpdateValueStrategy.POLICY_NEVER));
}
@@ -58,37 +89,48 @@
return (PARTICIPANT) this;
}
- public IObservableValue getObservable() {
- return observable;
+ @SuppressWarnings("unchecked")
+ public PARTICIPANT validatingAfterGet(IValidator validator) {
+ ensureHasStrategy();
+ strategy.setAfterGetValidator(validator);
+ return (PARTICIPANT) this;
}
- public UpdateValueStrategy getStrategy() {
- return strategy;
+ @SuppressWarnings("unchecked")
+ public PARTICIPANT validatingAfterConvert(IValidator validator) {
+ ensureHasStrategy();
+ strategy.setAfterConvertValidator(validator);
+ return (PARTICIPANT) this;
}
- }
- public static class TargetDefinition extends BindingParticipantDefinition<TargetDefinition> {
-
- public TargetDefinition(IObservableValue target) {
- super(target);
+ @SuppressWarnings("unchecked")
+ public PARTICIPANT validatingBeforeSet(IValidator validator) {
+ ensureHasStrategy();
+ strategy.setBeforeSetValidator(validator);
+ return (PARTICIPANT) this;
}
- public ModelDefinition to(IObservableValue model) {
- return new ModelDefinition(model, this);
+ @SuppressWarnings("unchecked")
+ public PARTICIPANT converting(IConverter converter) {
+ ensureHasStrategy();
+ strategy.setConverter(converter);
+ return (PARTICIPANT) this;
}
- }
- public static class ModelDefinition extends BindingParticipantDefinition<ModelDefinition> {
-
- private TargetDefinition targetDefinition;
-
- public ModelDefinition(IObservableValue model, TargetDefinition targetDefinition) {
- super(model);
- this.targetDefinition = targetDefinition;
+ private UpdateValueStrategy ensureHasStrategy() {
+ if (strategy == null) {
+ this.strategy = new UpdateValueStrategy();
+ }
+ return strategy;
}
+
+ IObservableValue getObservable() {
+ return observable;
+ }
- public Binding using(DataBindingContext dbc) {
- return bind(targetDefinition, this, dbc);
+ UpdateValueStrategy getStrategy() {
+ return strategy;
}
}
+
}
13 years, 2 months
JBoss Tools SVN: r35869 - trunk/as/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: 2011-10-20 17:57:28 -0400 (Thu, 20 Oct 2011)
New Revision: 35869
Modified:
trunk/as/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/AdapterWizardPage.java
Log:
[JBIDE-9947] corrected page description
Modified: trunk/as/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/AdapterWizardPage.java
===================================================================
--- trunk/as/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/AdapterWizardPage.java 2011-10-20 21:55:54 UTC (rev 35868)
+++ trunk/as/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/AdapterWizardPage.java 2011-10-20 21:57:28 UTC (rev 35869)
@@ -95,8 +95,8 @@
public AdapterWizardPage(ImportProjectWizard wizard, ImportProjectWizardModel model) {
super(
"Import Project",
- "Please select the destination for your local copy of the OpenShift Express repository, "
- + "what branch to clone and setup your server adapter, ",
+ "Select the Git clone destination, the branch to clone "
+ + "and configure your server adapter ",
"Server Adapter",
wizard);
this.model = new AdapterWizardPageModel(model);
13 years, 2 months
JBoss Tools SVN: r35868 - trunk/as/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: 2011-10-20 17:55:54 -0400 (Thu, 20 Oct 2011)
New Revision: 35868
Modified:
trunk/as/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/AdapterWizardPage.java
Log:
[JBIDE-9947] corrected layout
Modified: trunk/as/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/AdapterWizardPage.java
===================================================================
--- trunk/as/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/AdapterWizardPage.java 2011-10-20 21:16:48 UTC (rev 35867)
+++ trunk/as/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/AdapterWizardPage.java 2011-10-20 21:55:54 UTC (rev 35868)
@@ -297,7 +297,7 @@
private void fillServerAdapterGroup(Group serverAdapterGroup) {
Composite c = new Composite(serverAdapterGroup, SWT.NONE);
- GridLayoutFactory.fillDefaults().numColumns(3).margins(6, 6).spacing(12, 8).applyTo(c);
+ GridLayoutFactory.fillDefaults().numColumns(3).spacing(12, 8).applyTo(c);
serverAdapterCheckbox = new Button(c, SWT.CHECK);
serverAdapterCheckbox.setText("Create a JBoss server adapter");
@@ -325,8 +325,7 @@
DataBindingContext dbc = getDatabindingContext();
ValueBindingBuilder
.bind(WidgetProperties.text().observe(domainValueLabel))
- .withoutUpdate()
- .to(BeanProperties.value(AdapterWizardPageModel.PROPERTY_APPLICATION_URL).observe(model))
+ .notUpdating(BeanProperties.value(AdapterWizardPageModel.PROPERTY_APPLICATION_URL).observe(model))
.using(dbc);
// appLabel = new Label(c, SWT.NONE);
Label modeLabel = new Label(c, SWT.NONE);
13 years, 2 months
JBoss Tools SVN: r35867 - trunk/site.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2011-10-20 17:16:48 -0400 (Thu, 20 Oct 2011)
New Revision: 35867
Modified:
trunk/site/site.xml
Log:
fixed feature ID name for jboss.central
Modified: trunk/site/site.xml
===================================================================
--- trunk/site/site.xml 2011-10-20 20:22:12 UTC (rev 35866)
+++ trunk/site/site.xml 2011-10-20 21:16:48 UTC (rev 35867)
@@ -25,7 +25,7 @@
<feature url="features/org.drools.eclipse.task.feature_0.0.0.jar" id="org.drools.eclipse.task.feature" version="0.0.0" />
<feature url="features/org.guvnor.tools.feature_0.0.0.jar" id="org.guvnor.tools.feature" version="0.0.0" />
<feature url="features/org.jboss.tools.project.examples.feature_0.0.0.jar" id="org.jboss.tools.project.examples.feature" version="0.0.0" />
- <feature url="features/org.jboss.tools.central.feature_0.0.0.jar" id="org.jboss.tools.project.central.feature" version="0.0.0" />
+ <feature url="features/org.jboss.tools.central.feature_0.0.0.jar" id="org.jboss.tools.central.feature" version="0.0.0" />
<feature url="features/org.jboss.tools.community.project.examples.feature_0.0.0.jar" id="org.jboss.tools.community.project.examples.feature" version="0.0.0" />
<feature url="features/org.jboss.tools.maven.feature_0.0.0.jar" id="org.jboss.tools.maven.feature" version="0.0.0" />
13 years, 2 months
JBoss Tools SVN: r35866 - trunk/as/tests/org.jboss.ide.eclipse.as.egit.test/META-INF.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-10-20 16:22:12 -0400 (Thu, 20 Oct 2011)
New Revision: 35866
Modified:
trunk/as/tests/org.jboss.ide.eclipse.as.egit.test/META-INF/MANIFEST.MF
Log:
[JBIDE-9871] corrected version of required bundle org.jboss.ide.eclipse.as.egit.core
Modified: trunk/as/tests/org.jboss.ide.eclipse.as.egit.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/as/tests/org.jboss.ide.eclipse.as.egit.test/META-INF/MANIFEST.MF 2011-10-20 20:19:44 UTC (rev 35865)
+++ trunk/as/tests/org.jboss.ide.eclipse.as.egit.test/META-INF/MANIFEST.MF 2011-10-20 20:22:12 UTC (rev 35866)
@@ -5,7 +5,7 @@
Bundle-Version: 2.3.0.qualifier
Bundle-Activator: org.jboss.ide.eclipse.as.egit.internal.test.EGitTestActivator
Bundle-Vendor: JBoss by Red Hat
-Require-Bundle: org.jboss.ide.eclipse.as.egit.core;bundle-version="0.0.1",
+Require-Bundle: org.jboss.ide.eclipse.as.egit.core;bundle-version="2.3.0",
org.eclipse.egit.core;bundle-version="1.0.0",
org.eclipse.jgit;bundle-version="[1.0.0,2.0.0)",
org.eclipse.core.runtime,
13 years, 2 months
JBoss Tools SVN: r35865 - trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/validation.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2011-10-20 16:19:44 -0400 (Thu, 20 Oct 2011)
New Revision: 35865
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/validation/DefenitionErrorsValidationTest.java
Log:
JBIDE-9244
https://issues.jboss.org/browse/JBIDE-9244
Message about invalid type restriction is modified to be consistent with different kinds of restriction.
Modified: trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/validation/DefenitionErrorsValidationTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/validation/DefenitionErrorsValidationTest.java 2011-10-20 20:06:25 UTC (rev 35864)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/validation/DefenitionErrorsValidationTest.java 2011-10-20 20:19:44 UTC (rev 35865)
@@ -34,7 +34,7 @@
*/
public void testLegalTypesInTyped() throws Exception {
IFile petShopFile = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/PetShop.java");
- AbstractResourceMarkerTest.assertMarkerIsCreated(petShopFile, CDIValidationMessages.ILLEGAL_TYPE_IN_TYPED_DECLARATION_IN_PRODUCER_FIELD, 25);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(petShopFile, CDIValidationMessages.ILLEGAL_TYPE_IN_TYPED_DECLARATION, 25);
}
/**
13 years, 2 months