JBoss Tools SVN: r28774 - in branches/jbosstools-3.2.x/archives/plugins/org.jboss.ide.eclipse.archives.ui/src/main/org/jboss/ide/eclipse/archives/ui: util/composites and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2011-01-31 11:17:33 -0500 (Mon, 31 Jan 2011)
New Revision: 28774
Modified:
branches/jbosstools-3.2.x/archives/plugins/org.jboss.ide.eclipse.archives.ui/src/main/org/jboss/ide/eclipse/archives/ui/ArchivesUIMessages.properties
branches/jbosstools-3.2.x/archives/plugins/org.jboss.ide.eclipse.archives.ui/src/main/org/jboss/ide/eclipse/archives/ui/util/composites/ArchiveSourceDestinationComposite.java
Log:
JBIDE-7788 Fileset Wizard has wrong layout
Modified: branches/jbosstools-3.2.x/archives/plugins/org.jboss.ide.eclipse.archives.ui/src/main/org/jboss/ide/eclipse/archives/ui/ArchivesUIMessages.properties
===================================================================
--- branches/jbosstools-3.2.x/archives/plugins/org.jboss.ide.eclipse.archives.ui/src/main/org/jboss/ide/eclipse/archives/ui/ArchivesUIMessages.properties 2011-01-31 16:04:33 UTC (rev 28773)
+++ branches/jbosstools-3.2.x/archives/plugins/org.jboss.ide.eclipse.archives.ui/src/main/org/jboss/ide/eclipse/archives/ui/ArchivesUIMessages.properties 2011-01-31 16:17:33 UTC (rev 28774)
@@ -11,8 +11,8 @@
Workspace=Workspace...
Variables=Variables...
RelativeTo=Relative to
-Workspace2=workspace
-Filesystem2=file system
+Workspace2=Workspace relative
+Filesystem2=Filesystem relative
PathDoesNotExistInFilesystem={0} does not exist in the filesystem
ErrorConvertingPaths=Unable to convert workspace path into global path: {0}
ErrorStringSubstitution=Error during string substitution: {0}
Modified: branches/jbosstools-3.2.x/archives/plugins/org.jboss.ide.eclipse.archives.ui/src/main/org/jboss/ide/eclipse/archives/ui/util/composites/ArchiveSourceDestinationComposite.java
===================================================================
--- branches/jbosstools-3.2.x/archives/plugins/org.jboss.ide.eclipse.archives.ui/src/main/org/jboss/ide/eclipse/archives/ui/util/composites/ArchiveSourceDestinationComposite.java 2011-01-31 16:04:33 UTC (rev 28773)
+++ branches/jbosstools-3.2.x/archives/plugins/org.jboss.ide.eclipse.archives.ui/src/main/org/jboss/ide/eclipse/archives/ui/util/composites/ArchiveSourceDestinationComposite.java 2011-01-31 16:17:33 UTC (rev 28774)
@@ -98,11 +98,11 @@
protected void layoutWidgets() {
pathImage.setLayoutData(createFormData(0,0,null,0,0,0,null,0));
text.setLayoutData(createFormData(0,0,null,0,pathImage,5,100,0));
- filesystemButton.setLayoutData(createFormData(text,5,null,0,null,0,100,-5));
- workspaceButton.setLayoutData(createFormData(text,5,null,0,null,0,filesystemButton,-5));
- variablesButton.setLayoutData(createFormData(text,5,null,0,null,0,workspaceButton,-5));
- fsRadioButton.setLayoutData(createFormData(text,5,null,0,null,0,variablesButton,-5));
- wsRadioButton.setLayoutData(createFormData(text,5,null,0,null,0,fsRadioButton,-5));
+ filesystemButton.setLayoutData(createFormData(text,5,null,0,workspaceButton,5,null,0));
+ workspaceButton.setLayoutData(createFormData(text,5,null,0,variablesButton,5,null,0));
+ variablesButton.setLayoutData(createFormData(text,5,null,0,wsRadioButton,5,null,0));
+ fsRadioButton.setLayoutData(createFormData(text,5,null,0,0,0,null,0));
+ wsRadioButton.setLayoutData(createFormData(text,5,null,0,fsRadioButton,5,null,0));
relativeTo.setLayoutData(createFormData(text,8,null,0,null,0,wsRadioButton,-5));
}
13 years, 11 months
JBoss Tools SVN: r28773 - in trunk/archives/plugins/org.jboss.ide.eclipse.archives.ui/src/main/org/jboss/ide/eclipse/archives/ui: util/composites and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2011-01-31 11:04:33 -0500 (Mon, 31 Jan 2011)
New Revision: 28773
Modified:
trunk/archives/plugins/org.jboss.ide.eclipse.archives.ui/src/main/org/jboss/ide/eclipse/archives/ui/ArchivesUIMessages.properties
trunk/archives/plugins/org.jboss.ide.eclipse.archives.ui/src/main/org/jboss/ide/eclipse/archives/ui/util/composites/ArchiveSourceDestinationComposite.java
Log:
JBIDE-7788 Fileset Wizard has wrong layout
Modified: trunk/archives/plugins/org.jboss.ide.eclipse.archives.ui/src/main/org/jboss/ide/eclipse/archives/ui/ArchivesUIMessages.properties
===================================================================
--- trunk/archives/plugins/org.jboss.ide.eclipse.archives.ui/src/main/org/jboss/ide/eclipse/archives/ui/ArchivesUIMessages.properties 2011-01-31 15:58:43 UTC (rev 28772)
+++ trunk/archives/plugins/org.jboss.ide.eclipse.archives.ui/src/main/org/jboss/ide/eclipse/archives/ui/ArchivesUIMessages.properties 2011-01-31 16:04:33 UTC (rev 28773)
@@ -11,8 +11,8 @@
Workspace=Workspace...
Variables=Variables...
RelativeTo=Relative to
-Workspace2=workspace\nrelative
-Filesystem2=filesystem\nrelative
+Workspace2=Workspace Relative
+Filesystem2=Filesystem Relative
PathDoesNotExistInFilesystem={0} does not exist in the filesystem
ErrorConvertingPaths=Unable to convert workspace path into global path: {0}
ErrorStringSubstitution=Error during string substitution: {0}
Modified: trunk/archives/plugins/org.jboss.ide.eclipse.archives.ui/src/main/org/jboss/ide/eclipse/archives/ui/util/composites/ArchiveSourceDestinationComposite.java
===================================================================
--- trunk/archives/plugins/org.jboss.ide.eclipse.archives.ui/src/main/org/jboss/ide/eclipse/archives/ui/util/composites/ArchiveSourceDestinationComposite.java 2011-01-31 15:58:43 UTC (rev 28772)
+++ trunk/archives/plugins/org.jboss.ide.eclipse.archives.ui/src/main/org/jboss/ide/eclipse/archives/ui/util/composites/ArchiveSourceDestinationComposite.java 2011-01-31 16:04:33 UTC (rev 28773)
@@ -95,11 +95,11 @@
protected void layoutWidgets() {
pathImage.setLayoutData(createFormData(0,0,null,0,0,0,null,0));
text.setLayoutData(createFormData(0,0,null,0,pathImage,5,100,0));
- filesystemButton.setLayoutData(createFormData(text,5,null,0,null,0,100,-5));
- workspaceButton.setLayoutData(createFormData(text,5,null,0,null,0,filesystemButton,-5));
- variablesButton.setLayoutData(createFormData(text,5,null,0,null,0,workspaceButton,-5));
- fsRadioButton.setLayoutData(createFormData(text,5,null,0,null,0,variablesButton,-5));
- wsRadioButton.setLayoutData(createFormData(text,5,null,0,null,0,fsRadioButton,-5));
+ filesystemButton.setLayoutData(createFormData(text,5,null,0,workspaceButton,5,null,0));
+ workspaceButton.setLayoutData(createFormData(text,5,null,0,variablesButton,5,null,0));
+ variablesButton.setLayoutData(createFormData(text,5,null,0,wsRadioButton,5,null,0));
+ fsRadioButton.setLayoutData(createFormData(text,5,null,0,0,0,null,0));
+ wsRadioButton.setLayoutData(createFormData(text,5,null,0,fsRadioButton,5,null,0));
relativeTo.setLayoutData(createFormData(text,8,null,0,0,5,0,5));
}
13 years, 11 months
JBoss Tools SVN: r28772 - trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-01-31 10:58:43 -0500 (Mon, 31 Jan 2011)
New Revision: 28772
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstancePage.java
Log:
[JBIDE-8259] added content proposals for cloud name, cloud url, username
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstancePage.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstancePage.java 2011-01-31 15:57:56 UTC (rev 28771)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstancePage.java 2011-01-31 15:58:43 UTC (rev 28772)
@@ -212,7 +212,7 @@
keyLabel.setText(WizardMessages.getString(KEY_LABEL));
GridDataFactory.fillDefaults().align(SWT.LEFT, SWT.CENTER).applyTo(keyLabel);
keyText = new Text(container, SWT.BORDER | SWT.SINGLE);
- DeltaCloudUIUtils.createPreferencesProposalAdapter(nameText, KEY_PROPOSAL_KEY);
+ DeltaCloudUIUtils.createPreferencesProposalAdapter(keyText, KEY_PROPOSAL_KEY);
GridDataFactory.fillDefaults().align(SWT.FILL, SWT.CENTER).applyTo(keyText);
Button keyManageButton = new Button(container, SWT.NULL);
keyManageButton.setText(WizardMessages.getString(MANAGE_BUTTON_LABEL));
13 years, 11 months
JBoss Tools SVN: r28771 - in trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui: wizards and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-01-31 10:57:56 -0500 (Mon, 31 Jan 2011)
New Revision: 28771
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/utils/DeltaCloudUIUtils.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/CloudConnectionPage.java
Log:
[JBIDE-8259] added content proposals for cloud name, cloud url, username
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/utils/DeltaCloudUIUtils.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/utils/DeltaCloudUIUtils.java 2011-01-31 15:51:06 UTC (rev 28770)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/utils/DeltaCloudUIUtils.java 2011-01-31 15:57:56 UTC (rev 28771)
@@ -15,8 +15,8 @@
import org.eclipse.jface.fieldassist.SimpleContentProposalProvider;
import org.eclipse.jface.fieldassist.TextContentAdapter;
import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.DisposeEvent;
-import org.eclipse.swt.events.DisposeListener;
+import org.eclipse.swt.events.FocusAdapter;
+import org.eclipse.swt.events.FocusEvent;
import org.eclipse.swt.widgets.Text;
import org.jboss.tools.deltacloud.ui.Activator;
import org.jboss.tools.internal.deltacloud.ui.preferences.StringEntriesPreferenceValue;
@@ -30,16 +30,15 @@
final StringEntriesPreferenceValue preferencesValues = new StringEntriesPreferenceValue(",", preferencesKey, Activator.PLUGIN_ID);
SimpleContentProposalProvider proposalProvider = new SimpleContentProposalProvider(preferencesValues.get());
proposalProvider.setFiltering(true);
- text.addDisposeListener(new DisposeListener() {
-
+ text.addFocusListener(new FocusAdapter() {
+
@Override
- public void widgetDisposed(DisposeEvent e) {
- String currentValue = text.getText();
- preferencesValues.add(currentValue);
+ public void focusLost(FocusEvent e) {
+ preferencesValues.add(text.getText());
preferencesValues.store();
}
- });
+ });
KeyStroke keyStroke = KeyStroke.getInstance(SWT.CONTROL, ' ');
ContentProposalAdapter proposalAdapter = new ContentProposalAdapter(text, new TextContentAdapter(), proposalProvider, keyStroke, null);
proposalAdapter.setProposalAcceptanceStyle(ContentProposalAdapter.PROPOSAL_REPLACE);
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/CloudConnectionPage.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/CloudConnectionPage.java 2011-01-31 15:51:06 UTC (rev 28770)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/CloudConnectionPage.java 2011-01-31 15:57:56 UTC (rev 28771)
@@ -74,10 +74,10 @@
*/
public class CloudConnectionPage extends WizardPage {
+ private static final String NAME_PROPOSAL_KEY = "cloud/name";
private static final String USERNAME_PROPOSAL_KEY = "cloud/username";
-
private static final String URL_PROPOSAL_KEY = "cloud/url";
-
+
private static final int CLOUDTYPE_CHECK_DELAY = 1000;
private static final String DESCRIPTION = "CloudConnection.desc"; //$NON-NLS-1$
@@ -334,7 +334,7 @@
Label nameLabel = new Label(container, SWT.NULL);
nameLabel.setText(WizardMessages.getString(NAME_LABEL));
Text nameText = new Text(container, SWT.BORDER | SWT.SINGLE);
- DeltaCloudUIUtils.createPreferencesProposalAdapter(nameText, NAME_PROPOSAL_KEY());
+ DeltaCloudUIUtils.createPreferencesProposalAdapter(nameText, NAME_PROPOSAL_KEY);
bindName(dbc, nameText);
// url
@@ -487,10 +487,6 @@
setControl(container);
}
- private String NAME_PROPOSAL_KEY() {
- return "cloud/name";
- }
-
/**
* Enables/Disables (credentials) test button on url validity changes.
*
13 years, 11 months
JBoss Tools SVN: r28770 - trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-01-31 10:51:06 -0500 (Mon, 31 Jan 2011)
New Revision: 28770
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/CloudConnectionPage.java
Log:
[JBIDE-8259] added content proposals for cloud name, cloud url, username
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/CloudConnectionPage.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/CloudConnectionPage.java 2011-01-31 15:46:02 UTC (rev 28769)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/CloudConnectionPage.java 2011-01-31 15:51:06 UTC (rev 28770)
@@ -342,7 +342,7 @@
urlLabel.setText(WizardMessages.getString(URL_LABEL));
Point p1 = urlLabel.computeSize(SWT.DEFAULT, SWT.DEFAULT);
Text urlText = new Text(container, SWT.BORDER | SWT.SINGLE);
- DeltaCloudUIUtils.createPreferencesProposalAdapter(nameText, URL_PROPOSAL_KEY);
+ DeltaCloudUIUtils.createPreferencesProposalAdapter(urlText, URL_PROPOSAL_KEY);
dbc.bindValue(
WidgetProperties.text(SWT.Modify).observe(urlText),
BeanProperties.value(
@@ -367,7 +367,7 @@
Label usernameLabel = new Label(container, SWT.NULL);
usernameLabel.setText(WizardMessages.getString(USERNAME_LABEL));
Text usernameText = new Text(container, SWT.BORDER | SWT.SINGLE);
- DeltaCloudUIUtils.createPreferencesProposalAdapter(nameText, USERNAME_PROPOSAL_KEY);
+ DeltaCloudUIUtils.createPreferencesProposalAdapter(usernameText, USERNAME_PROPOSAL_KEY);
IObservableValue usernameObservable = WidgetProperties.text(SWT.Modify).observe(usernameText);
dbc.bindValue(
usernameObservable,
13 years, 11 months
JBoss Tools SVN: r28769 - in trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui: wizards and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-01-31 10:46:02 -0500 (Mon, 31 Jan 2011)
New Revision: 28769
Removed:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/PreferencesContentProposalProvider.java
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/utils/DeltaCloudUIUtils.java
Log:
[JBIDE-8259] added content proposals for cloud name, cloud url, username
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/utils/DeltaCloudUIUtils.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/utils/DeltaCloudUIUtils.java 2011-01-31 15:23:36 UTC (rev 28768)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/utils/DeltaCloudUIUtils.java 2011-01-31 15:46:02 UTC (rev 28769)
@@ -10,34 +10,38 @@
******************************************************************************/
package org.jboss.tools.internal.deltacloud.ui.utils;
+import org.eclipse.jface.bindings.keys.KeyStroke;
import org.eclipse.jface.fieldassist.ContentProposalAdapter;
+import org.eclipse.jface.fieldassist.SimpleContentProposalProvider;
import org.eclipse.jface.fieldassist.TextContentAdapter;
+import org.eclipse.swt.SWT;
import org.eclipse.swt.events.DisposeEvent;
import org.eclipse.swt.events.DisposeListener;
import org.eclipse.swt.widgets.Text;
import org.jboss.tools.deltacloud.ui.Activator;
-import org.jboss.tools.internal.deltacloud.ui.wizards.PreferencesContentProposalProvider;
+import org.jboss.tools.internal.deltacloud.ui.preferences.StringEntriesPreferenceValue;
/**
* @author André Dietisheim
*/
public class DeltaCloudUIUtils {
- private static char[] ACTIVATION_CHARS = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ:.,-".toCharArray();
-
public static ContentProposalAdapter createPreferencesProposalAdapter(final Text text, String preferencesKey) {
- final PreferencesContentProposalProvider proposalProvider = new PreferencesContentProposalProvider(preferencesKey, Activator.PLUGIN_ID);
+ final StringEntriesPreferenceValue preferencesValues = new StringEntriesPreferenceValue(",", preferencesKey, Activator.PLUGIN_ID);
+ SimpleContentProposalProvider proposalProvider = new SimpleContentProposalProvider(preferencesValues.get());
proposalProvider.setFiltering(true);
text.addDisposeListener(new DisposeListener() {
@Override
public void widgetDisposed(DisposeEvent e) {
String currentValue = text.getText();
- proposalProvider.add(currentValue);
- proposalProvider.save();
+ preferencesValues.add(currentValue);
+ preferencesValues.store();
}
});
- ContentProposalAdapter proposalAdapter = new ContentProposalAdapter(text, new TextContentAdapter(), proposalProvider, null, ACTIVATION_CHARS);
+
+ KeyStroke keyStroke = KeyStroke.getInstance(SWT.CONTROL, ' ');
+ ContentProposalAdapter proposalAdapter = new ContentProposalAdapter(text, new TextContentAdapter(), proposalProvider, keyStroke, null);
proposalAdapter.setProposalAcceptanceStyle(ContentProposalAdapter.PROPOSAL_REPLACE);
return proposalAdapter;
}
Deleted: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/PreferencesContentProposalProvider.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/PreferencesContentProposalProvider.java 2011-01-31 15:23:36 UTC (rev 28768)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/PreferencesContentProposalProvider.java 2011-01-31 15:46:02 UTC (rev 28769)
@@ -1,36 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 Red Hat, Inc.
- * Distributed under license by Red Hat, Inc. All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.jboss.tools.internal.deltacloud.ui.wizards;
-
-import org.eclipse.jface.fieldassist.SimpleContentProposalProvider;
-import org.jboss.tools.internal.deltacloud.ui.preferences.StringEntriesPreferenceValue;
-
-/**
- * @author André Dietisheim
- */
-public class PreferencesContentProposalProvider extends SimpleContentProposalProvider {
-
- private StringEntriesPreferenceValue preferencesValues;
-
- public PreferencesContentProposalProvider(String preferencesKey, String pluginId) {
- super(new String[] {});
- this.preferencesValues = new StringEntriesPreferenceValue(",", preferencesKey, pluginId);
- setProposals(preferencesValues.get());
- }
-
- public void add(String newEntry) {
- preferencesValues.add(newEntry);
- }
-
- public void save() {
- preferencesValues.store();
- }
-}
13 years, 11 months
JBoss Tools SVN: r28768 - trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-01-31 10:23:36 -0500 (Mon, 31 Jan 2011)
New Revision: 28768
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstancePage.java
Log:
[JBIDE-8254] [JBIDE-8253]
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstancePage.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstancePage.java 2011-01-31 15:22:32 UTC (rev 28767)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstancePage.java 2011-01-31 15:23:36 UTC (rev 28768)
@@ -72,6 +72,7 @@
import org.jboss.tools.internal.deltacloud.ui.common.databinding.validator.MandatoryStringValidator;
import org.jboss.tools.internal.deltacloud.ui.common.databinding.validator.SelectedComboItemValidator;
import org.jboss.tools.internal.deltacloud.ui.utils.DataBindingUtils;
+import org.jboss.tools.internal.deltacloud.ui.utils.DeltaCloudUIUtils;
/**
* @author Jeff Jonston
@@ -79,6 +80,10 @@
*/
public class NewInstancePage extends WizardPage {
+ private static final String NAME_PROPOSAL_KEY = "instance/name";
+ private static final String IMAGE_PROPOSAL_KEY = "instance/image";
+ private static final String KEY_PROPOSAL_KEY = "instance/key";
+
private static final int IMAGE_CHECK_DELAY = 500;
private static final int KEY_CHECK_DELAY = 500;
@@ -175,12 +180,14 @@
nameLabel.setText(WizardMessages.getString(NAME_LABEL));
GridDataFactory.fillDefaults().align(SWT.LEFT, SWT.CENTER).applyTo(nameLabel);
this.nameText = new Text(container, SWT.BORDER | SWT.SINGLE);
+ DeltaCloudUIUtils.createPreferencesProposalAdapter(nameText, NAME_PROPOSAL_KEY);
GridDataFactory.fillDefaults().span(2, 1).grab(true, false).applyTo(nameText);
Label imageLabel = new Label(container, SWT.NULL);
imageLabel.setText(WizardMessages.getString(IMAGE_LABEL));
GridDataFactory.fillDefaults().align(SWT.LEFT, SWT.CENTER).applyTo(imageLabel);
this.imageText = new Text(container, SWT.BORDER | SWT.SINGLE);
+ DeltaCloudUIUtils.createPreferencesProposalAdapter(imageText, IMAGE_PROPOSAL_KEY);
GridDataFactory.fillDefaults().grab(true, false).applyTo(imageText);
Button findImageButton = new Button(container, SWT.NULL);
findImageButton.setText(WizardMessages.getString(FIND_BUTTON_LABEL));
@@ -205,6 +212,7 @@
keyLabel.setText(WizardMessages.getString(KEY_LABEL));
GridDataFactory.fillDefaults().align(SWT.LEFT, SWT.CENTER).applyTo(keyLabel);
keyText = new Text(container, SWT.BORDER | SWT.SINGLE);
+ DeltaCloudUIUtils.createPreferencesProposalAdapter(nameText, KEY_PROPOSAL_KEY);
GridDataFactory.fillDefaults().align(SWT.FILL, SWT.CENTER).applyTo(keyText);
Button keyManageButton = new Button(container, SWT.NULL);
keyManageButton.setText(WizardMessages.getString(MANAGE_BUTTON_LABEL));
@@ -419,7 +427,7 @@
if (value instanceof String
&& ((String) value).length() > 0) {
if (doesKeyExist((String) value)) {
- if (!isKeyKnowToSsh((String) value)) {
+ if (!isKeyKnownToSsh((String) value)) {
return ValidationStatus
.warning(
"Key not found under SSH preferences, might be needed for login after launch.");
@@ -431,7 +439,7 @@
"The key is not known to cloud \"{0}\"", cloud.getName()));
}
- private boolean isKeyKnowToSsh(String keyName) {
+ private boolean isKeyKnownToSsh(String keyName) {
if (keyName == null) {
return false;
}
13 years, 11 months
JBoss Tools SVN: r28767 - branches/jbosstools-3.2.x/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-01-31 10:22:32 -0500 (Mon, 31 Jan 2011)
New Revision: 28767
Modified:
branches/jbosstools-3.2.x/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstancePage.java
branches/jbosstools-3.2.x/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstanceWizard.java
branches/jbosstools-3.2.x/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/SshPrivateKeysPreferences.java
Log:
[JBIDE-8253][JBUIDE-8254]
Modified: branches/jbosstools-3.2.x/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstancePage.java
===================================================================
--- branches/jbosstools-3.2.x/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstancePage.java 2011-01-31 14:33:47 UTC (rev 28766)
+++ branches/jbosstools-3.2.x/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstancePage.java 2011-01-31 15:22:32 UTC (rev 28767)
@@ -10,6 +10,7 @@
*******************************************************************************/
package org.jboss.tools.internal.deltacloud.ui.wizards;
+import java.io.File;
import java.text.MessageFormat;
import java.util.ArrayList;
import java.util.Arrays;
@@ -403,12 +404,10 @@
WidgetProperties.text(SWT.Modify).observeDelayed(KEY_CHECK_DELAY, text),
BeanProperties.value(NewInstancePageModel.class, NewInstancePageModel.PROPERTY_KEYID).observe(model),
new UpdateValueStrategy()
- .setBeforeSetValidator(
+ .setAfterGetValidator(
new MandatoryStringValidator(WizardMessages.getString(MUST_ENTER_A_KEYNAME)))
.setBeforeSetValidator(
new KeyValidator()),
- // TODO: internationalize strings
-
null);
ControlDecorationSupport.create(textBinding, SWT.LEFT | SWT.TOP);
}
@@ -420,6 +419,11 @@
if (value instanceof String
&& ((String) value).length() > 0) {
if (doesKeyExist((String) value)) {
+ if (!isKeyKnownToSsh((String) value)) {
+ return ValidationStatus
+ .warning(
+ "Key not found under SSH preferences, might be needed for login after launch.");
+ }
return ValidationStatus.ok();
}
}
@@ -427,6 +431,20 @@
"The key is not known to cloud \"{0}\"", cloud.getName()));
}
+ private boolean isKeyKnownToSsh(String keyName) {
+ if (keyName == null) {
+ return false;
+ }
+ for (String key :SshPrivateKeysPreferences.getKeys()) {
+ File file = new File(key);
+ if (file.getName().equals(keyName)
+ || file.getName().startsWith(keyName + ".")) {
+ return true;
+ }
+ }
+ return false;
+ }
+
private boolean doesKeyExist(String keyId) {
try {
return cloud.getKey(keyId) != null;
Modified: branches/jbosstools-3.2.x/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstanceWizard.java
===================================================================
--- branches/jbosstools-3.2.x/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstanceWizard.java 2011-01-31 14:33:47 UTC (rev 28766)
+++ branches/jbosstools-3.2.x/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstanceWizard.java 2011-01-31 15:22:32 UTC (rev 28767)
@@ -10,13 +10,9 @@
*******************************************************************************/
package org.jboss.tools.internal.deltacloud.ui.wizards;
-import java.io.File;
-import java.io.FileNotFoundException;
-
import org.eclipse.core.runtime.Assert;
import org.eclipse.core.runtime.preferences.InstanceScope;
import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.dialogs.MessageDialogWithToggle;
import org.eclipse.jface.wizard.Wizard;
import org.jboss.tools.common.jobs.ChainedJob;
@@ -107,7 +103,6 @@
Exception e = null;
try {
if (isProceed()) {
- warnSshPrivateKey(keyId);
instance = cloud.createInstance(name, imageId, realmId, profileId, keyId, memory, storage);
if (instance != null) {
result = true;
@@ -130,23 +125,6 @@
return result;
}
- private void warnSshPrivateKey(String keyId) {
- try {
- File file = PemFileManager.getFile(keyId, SshPrivateKeysPreferences.getSshKeyDirectory());
- boolean isKnowPrivateKey = SshPrivateKeysPreferences.contains(file.getAbsolutePath());
-
- if (!isKnowPrivateKey) {
- MessageDialog
- .openWarning(
- getShell(),
- "Instance key is not private key",
- "The instance key you have chosen is not known to the ssh subsystem. If you need this key to connect to your instance, you'll have to download it and add it to the private keys in the SSH preferences.");
- }
- } catch (FileNotFoundException e) {
-
- }
- }
-
private void scheduleJobs() {
ChainedJob first =
new InstanceStateJob(
Modified: branches/jbosstools-3.2.x/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/SshPrivateKeysPreferences.java
===================================================================
--- branches/jbosstools-3.2.x/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/SshPrivateKeysPreferences.java 2011-01-31 14:33:47 UTC (rev 28766)
+++ branches/jbosstools-3.2.x/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/SshPrivateKeysPreferences.java 2011-01-31 15:22:32 UTC (rev 28767)
@@ -49,20 +49,9 @@
public static void add(String keyName) {
sshPrivateKeyPreference.add(keyName);
}
-
- /**
- * Adds the given keyName to the ssh-preferences
- *
- * @param keyName
- * the name of the key to add
- */
- public static boolean contains(String keyName) {
- for (String privateKey : sshPrivateKeyPreference.get()) {
- if (privateKey.equals(keyName)) {
- return true;
- }
- }
- return false;
+
+ public static String[] getKeys() {
+ return sshPrivateKeyPreference.get();
}
/**
13 years, 11 months
JBoss Tools SVN: r28766 - trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/wizards.
by jbosstools-commits@lists.jboss.org
Author: dgeraskov
Date: 2011-01-31 09:33:47 -0500 (Mon, 31 Jan 2011)
New Revision: 28766
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/wizards/ConsoleConfigurationWizardPage.java
Log:
removed System out printlns.
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/wizards/ConsoleConfigurationWizardPage.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/wizards/ConsoleConfigurationWizardPage.java 2011-01-31 14:28:46 UTC (rev 28765)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/wizards/ConsoleConfigurationWizardPage.java 2011-01-31 14:33:47 UTC (rev 28766)
@@ -280,16 +280,10 @@
if (tabs[i].isValid(currentLaunchConfig)) {
if (messageWarning == null) {
messageWarning = tabs[i].getMessage();
- if(messageWarning!=null) {
- System.out.println(NLS.bind(HibernateConsoleMessages.ConsoleConfigurationWizardPage_warnings, tabs[i].getName(), messageWarning));
- }
}
} else {
if (messageError == null) {
messageError = tabs[i].getErrorMessage();
- if(messageError!=null) {
- System.out.println(NLS.bind(HibernateConsoleMessages.ConsoleConfigurationWizardPage_errors, tabs[i].getName(), messageError));
- }
}
}
}
13 years, 11 months
JBoss Tools SVN: r28765 - trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/preferences.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-01-31 09:28:46 -0500 (Mon, 31 Jan 2011)
New Revision: 28765
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/preferences/StringEntriesPreferenceValue.java
Log:
[JBIDE-8259] added content proposals for cloud name, cloud url, username
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/preferences/StringEntriesPreferenceValue.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/preferences/StringEntriesPreferenceValue.java 2011-01-31 14:27:12 UTC (rev 28764)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/preferences/StringEntriesPreferenceValue.java 2011-01-31 14:28:46 UTC (rev 28765)
@@ -113,6 +113,10 @@
doStore(concatenate(currentValues));
}
+ public void store() {
+ store(null);
+ }
+
protected String concatenate(String[] values) {
StringBuilder builder = new StringBuilder();
for (int i = 0; i < values.length; i++) {
13 years, 11 months