JBoss Tools SVN: r28353 - branches/jbosstools-3.2.0.CR1/runtime/plugins/org.jboss.tools.runtime.ui/src/org/jboss/tools/runtime/ui/dialogs.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2011-01-18 08:52:13 -0500 (Tue, 18 Jan 2011)
New Revision: 28353
Modified:
branches/jbosstools-3.2.0.CR1/runtime/plugins/org.jboss.tools.runtime.ui/src/org/jboss/tools/runtime/ui/dialogs/SearchRuntimePathDialog.java
Log:
JBIDE-8125 [JBossTools Runtimes] no runtimes except for server runtime are added
Modified: branches/jbosstools-3.2.0.CR1/runtime/plugins/org.jboss.tools.runtime.ui/src/org/jboss/tools/runtime/ui/dialogs/SearchRuntimePathDialog.java
===================================================================
--- branches/jbosstools-3.2.0.CR1/runtime/plugins/org.jboss.tools.runtime.ui/src/org/jboss/tools/runtime/ui/dialogs/SearchRuntimePathDialog.java 2011-01-18 13:48:03 UTC (rev 28352)
+++ branches/jbosstools-3.2.0.CR1/runtime/plugins/org.jboss.tools.runtime.ui/src/org/jboss/tools/runtime/ui/dialogs/SearchRuntimePathDialog.java 2011-01-18 13:52:13 UTC (rev 28353)
@@ -235,9 +235,10 @@
protected void okPressed() {
getShell().setCursor(Display.getCurrent().getSystemCursor(SWT.CURSOR_WAIT));
Set<IRuntimeDetector> detectors = RuntimeCoreActivator.getRuntimeDetectors();
+ List<ServerDefinition> definitions = getServerDefinitions(true);
for( IRuntimeDetector detector:detectors) {
if (detector.isEnabled()) {
- detector.initializeRuntimes(getServerDefinitions(true));
+ detector.initializeRuntimes(definitions);
}
}
getShell().setCursor(null);
15 years, 2 months
JBoss Tools SVN: r28352 - branches/jbosstools-3.2.0.CR1/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-01-18 08:48:03 -0500 (Tue, 18 Jan 2011)
New Revision: 28352
Modified:
branches/jbosstools-3.2.0.CR1/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloud.java
Log:
cleaned unneeded notification
Modified: branches/jbosstools-3.2.0.CR1/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloud.java
===================================================================
--- branches/jbosstools-3.2.0.CR1/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloud.java 2011-01-18 13:29:40 UTC (rev 28351)
+++ branches/jbosstools-3.2.0.CR1/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloud.java 2011-01-18 13:48:03 UTC (rev 28352)
@@ -38,7 +38,6 @@
public class DeltaCloud extends ObservablePojo {
public static final String PROP_INSTANCES = "instances";
- public static final String PROP_INSTANCES_REMOVED = "instancesRemoved";
public static final String PROP_IMAGES = "images";
public static final String PROP_NAME = "name";
@@ -501,7 +500,6 @@
if (result) {
if (DeltaCloudInstance.Action.DESTROY.equals(action)) {
repo.remove(instance);
- firePropertyChange(PROP_INSTANCES_REMOVED, null, instance);
}
// TODO: remove notification with all instanceRepo, replace by
// notifying the changed instance
15 years, 2 months
JBoss Tools SVN: r28351 - in branches/jbosstools-3.2.0.CR1/hibernatetools/plugins: org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/workbench and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: dgeraskov
Date: 2011-01-18 08:29:40 -0500 (Tue, 18 Jan 2011)
New Revision: 28351
Modified:
branches/jbosstools-3.2.0.CR1/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/workbench/LazyDatabaseSchemaWorkbenchAdapter.java
branches/jbosstools-3.2.0.CR1/hibernatetools/plugins/org.hibernate.eclipse/lib/tools/hibernate-tools.jar
Log:
https://issues.jboss.org/browse/JBIDE-6396
Fixed and moved to hibernate-tools 3.4.0.CR1
Modified: branches/jbosstools-3.2.0.CR1/hibernatetools/plugins/org.hibernate.eclipse/lib/tools/hibernate-tools.jar
===================================================================
(Binary files differ)
Modified: branches/jbosstools-3.2.0.CR1/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/workbench/LazyDatabaseSchemaWorkbenchAdapter.java
===================================================================
--- branches/jbosstools-3.2.0.CR1/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/workbench/LazyDatabaseSchemaWorkbenchAdapter.java 2011-01-18 13:29:25 UTC (rev 28350)
+++ branches/jbosstools-3.2.0.CR1/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/workbench/LazyDatabaseSchemaWorkbenchAdapter.java 2011-01-18 13:29:40 UTC (rev 28351)
@@ -56,11 +56,9 @@
@SuppressWarnings("unchecked")
public synchronized Object[] getChildren(Object o, final IProgressMonitor monitor) {
LazyDatabaseSchema dbs = getLazyDatabaseSchema( o );
- final DefaultDatabaseCollector db = new DefaultDatabaseCollector();
-
ConsoleConfiguration consoleConfiguration = dbs.getConsoleConfiguration();
try{
- readDatabaseSchema(monitor, db, consoleConfiguration, dbs.getReverseEngineeringStrategy());
+ DefaultDatabaseCollector db = readDatabaseSchema(monitor, consoleConfiguration, dbs.getReverseEngineeringStrategy());
List<TableContainer> result = new ArrayList<TableContainer>();
@@ -101,30 +99,30 @@
return getLazyDatabaseSchema(o).getConsoleConfiguration();
}
- protected void readDatabaseSchema(final IProgressMonitor monitor, final DefaultDatabaseCollector db, ConsoleConfiguration consoleConfiguration, final ReverseEngineeringStrategy strategy) {
+ protected DefaultDatabaseCollector readDatabaseSchema(final IProgressMonitor monitor, ConsoleConfiguration consoleConfiguration, final ReverseEngineeringStrategy strategy) {
final Configuration configuration = consoleConfiguration.buildWith(null, false);
+ return (DefaultDatabaseCollector) consoleConfiguration.execute(new ExecutionContext.Command() {
- consoleConfiguration.execute(new ExecutionContext.Command() {
-
public Object execute() {
+ DefaultDatabaseCollector db = null;
Settings settings = configuration.buildSettings();
ConnectionProvider connectionProvider = null;
try {
connectionProvider = settings.getConnectionProvider();
JDBCReader reader = JDBCReaderFactory.newJDBCReader(configuration.getProperties(), settings, strategy);
+ db = new DefaultDatabaseCollector(reader.getMetaDataDialect());
reader.readDatabaseSchema(db, settings.getDefaultCatalogName(), settings.getDefaultSchemaName(), new ProgressListenerMonitor(monitor));
+ return db;
} catch(HibernateException he) {
HibernateConsolePlugin.getDefault().logErrorMessage(HibernateConsoleMessages.LazyDatabaseSchemaWorkbenchAdapter_problem_while_reading_database_schema, he);
- return new Object[] { HibernateConsoleMessages.LazyDatabaseSchemaWorkbenchAdapter_schema_not_available};
}
finally {
if (connectionProvider!=null) {
connectionProvider.close();
}
}
-
- return null;
+ return null;
}
});
}
15 years, 2 months
JBoss Tools SVN: r28350 - in trunk/hibernatetools/plugins: org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/workbench and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: dgeraskov
Date: 2011-01-18 08:29:25 -0500 (Tue, 18 Jan 2011)
New Revision: 28350
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/workbench/LazyDatabaseSchemaWorkbenchAdapter.java
trunk/hibernatetools/plugins/org.hibernate.eclipse/lib/tools/hibernate-tools.jar
Log:
https://issues.jboss.org/browse/JBIDE-6396
Fixed and moved to hibernate-tools 3.4.0.CR1
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse/lib/tools/hibernate-tools.jar
===================================================================
(Binary files differ)
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 2011-01-18 12:50:25 UTC (rev 28349)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/workbench/LazyDatabaseSchemaWorkbenchAdapter.java 2011-01-18 13:29:25 UTC (rev 28350)
@@ -56,11 +56,11 @@
@SuppressWarnings("unchecked")
public synchronized Object[] getChildren(Object o, final IProgressMonitor monitor) {
LazyDatabaseSchema dbs = getLazyDatabaseSchema( o );
- final DefaultDatabaseCollector db = new DefaultDatabaseCollector();
ConsoleConfiguration consoleConfiguration = dbs.getConsoleConfiguration();
+
try{
- readDatabaseSchema(monitor, db, consoleConfiguration, dbs.getReverseEngineeringStrategy());
+ DefaultDatabaseCollector db = readDatabaseSchema(monitor, consoleConfiguration, dbs.getReverseEngineeringStrategy());
List<TableContainer> result = new ArrayList<TableContainer>();
@@ -101,30 +101,30 @@
return getLazyDatabaseSchema(o).getConsoleConfiguration();
}
- protected void readDatabaseSchema(final IProgressMonitor monitor, final DefaultDatabaseCollector db, ConsoleConfiguration consoleConfiguration, final ReverseEngineeringStrategy strategy) {
+ protected DefaultDatabaseCollector readDatabaseSchema(final IProgressMonitor monitor, ConsoleConfiguration consoleConfiguration, final ReverseEngineeringStrategy strategy) {
final Configuration configuration = consoleConfiguration.buildWith(null, false);
+ return (DefaultDatabaseCollector) consoleConfiguration.execute(new ExecutionContext.Command() {
- consoleConfiguration.execute(new ExecutionContext.Command() {
-
public Object execute() {
+ DefaultDatabaseCollector db = null;
Settings settings = configuration.buildSettings();
ConnectionProvider connectionProvider = null;
try {
connectionProvider = settings.getConnectionProvider();
JDBCReader reader = JDBCReaderFactory.newJDBCReader(configuration.getProperties(), settings, strategy);
+ db = new DefaultDatabaseCollector(reader.getMetaDataDialect());
reader.readDatabaseSchema(db, settings.getDefaultCatalogName(), settings.getDefaultSchemaName(), new ProgressListenerMonitor(monitor));
+ return db;
} catch(HibernateException he) {
HibernateConsolePlugin.getDefault().logErrorMessage(HibernateConsoleMessages.LazyDatabaseSchemaWorkbenchAdapter_problem_while_reading_database_schema, he);
- return new Object[] { HibernateConsoleMessages.LazyDatabaseSchemaWorkbenchAdapter_schema_not_available};
}
finally {
if (connectionProvider!=null) {
connectionProvider.close();
}
}
-
- return null;
+ return null;
}
});
}
15 years, 2 months
JBoss Tools SVN: r28349 - branches/jbosstools-3.2.0.CR1/ws/tests/org.jboss.tools.ws.creation.core.test/src/org/jboss/tools/ws/creation/core/test.
by jbosstools-commits@lists.jboss.org
Author: Grid.Qian
Date: 2011-01-18 07:50:25 -0500 (Tue, 18 Jan 2011)
New Revision: 28349
Modified:
branches/jbosstools-3.2.0.CR1/ws/tests/org.jboss.tools.ws.creation.core.test/src/org/jboss/tools/ws/creation/core/test/JBossWSCreationCoreTestSuite.java
Log:
JBIDE-8046: disable the tests
Modified: branches/jbosstools-3.2.0.CR1/ws/tests/org.jboss.tools.ws.creation.core.test/src/org/jboss/tools/ws/creation/core/test/JBossWSCreationCoreTestSuite.java
===================================================================
--- branches/jbosstools-3.2.0.CR1/ws/tests/org.jboss.tools.ws.creation.core.test/src/org/jboss/tools/ws/creation/core/test/JBossWSCreationCoreTestSuite.java 2011-01-18 10:50:59 UTC (rev 28348)
+++ branches/jbosstools-3.2.0.CR1/ws/tests/org.jboss.tools.ws.creation.core.test/src/org/jboss/tools/ws/creation/core/test/JBossWSCreationCoreTestSuite.java 2011-01-18 12:50:25 UTC (rev 28349)
@@ -26,8 +26,8 @@
public static Test suite ()
{
TestSuite suite = new TestSuite(JBossWSCreationCoreTestSuite.class.getName());
- suite.addTestSuite(JBossWSTopDownCommandTest.class);
- suite.addTestSuite(JBossWSJavaFirstCommandTest.class);
+ //suite.addTestSuite(JBossWSTopDownCommandTest.class);
+ //suite.addTestSuite(JBossWSJavaFirstCommandTest.class);
suite.addTestSuite(JBossWSClientCommandTest.class);
suite.addTestSuite(JBossWSMergeWebXMLCommandTest.class);
suite.addTestSuite(JBossWSClientSampleCreationCommandTest.class);
15 years, 2 months
JBoss Tools SVN: r28348 - branches/jbosstools-3.2.0.CR1/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-18 05:50:59 -0500 (Tue, 18 Jan 2011)
New Revision: 28348
Modified:
branches/jbosstools-3.2.0.CR1/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/ManageKeysPageModel.java
Log:
cleanup
Modified: branches/jbosstools-3.2.0.CR1/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/ManageKeysPageModel.java
===================================================================
--- branches/jbosstools-3.2.0.CR1/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/ManageKeysPageModel.java 2011-01-18 10:50:44 UTC (rev 28347)
+++ branches/jbosstools-3.2.0.CR1/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/ManageKeysPageModel.java 2011-01-18 10:50:59 UTC (rev 28348)
@@ -54,13 +54,13 @@
if (selectedKey == null) {
return null;
}
- cloud.deleteKey(selectedKey.getId());
- int index = keys.indexOf(selectedKey);
- keys.remove(selectedKey);
- fireIndexedPropertyChange(PROP_KEYS, index, selectedKey, null);
- DeltaCloudKey key = selectedKey;
+ DeltaCloudKey keyToDelete = selectedKey;
+ cloud.deleteKey(keyToDelete.getId());
+ int index = keys.indexOf(keyToDelete);
+ keys.remove(keyToDelete);
+ fireIndexedPropertyChange(PROP_KEYS, index, keyToDelete, null);
setSelectedKey(index - 1);
- return key;
+ return keyToDelete;
}
public void removeKeyLocally(DeltaCloudKey key) throws DeltaCloudException, FileNotFoundException {
15 years, 2 months
JBoss Tools SVN: r28347 - 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-18 05:50:44 -0500 (Tue, 18 Jan 2011)
New Revision: 28347
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/ManageKeysPageModel.java
Log:
cleanup
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/ManageKeysPageModel.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/ManageKeysPageModel.java 2011-01-18 10:38:33 UTC (rev 28346)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/ManageKeysPageModel.java 2011-01-18 10:50:44 UTC (rev 28347)
@@ -54,13 +54,13 @@
if (selectedKey == null) {
return null;
}
- cloud.deleteKey(selectedKey.getId());
- int index = keys.indexOf(selectedKey);
- keys.remove(selectedKey);
- fireIndexedPropertyChange(PROP_KEYS, index, selectedKey, null);
- DeltaCloudKey key = selectedKey;
+ DeltaCloudKey keyToDelete = selectedKey;
+ cloud.deleteKey(keyToDelete.getId());
+ int index = keys.indexOf(keyToDelete);
+ keys.remove(keyToDelete);
+ fireIndexedPropertyChange(PROP_KEYS, index, keyToDelete, null);
setSelectedKey(index - 1);
- return key;
+ return keyToDelete;
}
public void removeKeyLocally(DeltaCloudKey key) throws DeltaCloudException, FileNotFoundException {
15 years, 2 months
JBoss Tools SVN: r28346 - 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-18 05:38:33 -0500 (Tue, 18 Jan 2011)
New Revision: 28346
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/ManageKeysPage.java
Log:
[JBIDE-8096] added check for pem-folder being writable
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/ManageKeysPage.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/ManageKeysPage.java 2011-01-18 10:37:53 UTC (rev 28345)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/ManageKeysPage.java 2011-01-18 10:38:33 UTC (rev 28346)
@@ -66,7 +66,6 @@
/**
* @author Jeff Johnston
* @author André Dietisheim
- * @author Rob Stryker
*/
public class ManageKeysPage extends WizardPage {
@@ -166,7 +165,6 @@
return newButton;
}
-
private Button createDeleteButton(Composite container, DataBindingContext dbc) {
Button deleteButton = new Button(container, SWT.NULL);
deleteButton.setText(WizardMessages.getString(DELETE));
@@ -326,15 +324,17 @@
}
});
-
pemText = new Text(composite, SWT.BORDER);
pemText.setLayoutData(UIUtils.createFormData(nameText,5,null,0,persist, 5, browse, -5));
+
init();
+
ModifyListener listener = new ModifyListener() {
public void modifyText(ModifyEvent e) {
verify();
}
};
+
nameText.addModifyListener(listener);
pemText.addModifyListener(listener);
persist.addSelectionListener(new SelectionAdapter(){
@@ -342,31 +342,40 @@
verify();
}
});
+
return composite;
}
+
private void init() {
persist.setSelection(true);
pemText.setText(model.getInitialKeyStorePath());
verify();
}
+
private void verify() {
persistBool = persist.getSelection();
pem = pemText.getText();
name = nameText.getText();
- if( !(new File(pem).exists())) {
+ File pemFolder = new File(pem);
+ if( !pemFolder.exists()) {
setErrorMessage("Key folder does not exist.");
+ } else if( !pemFolder.canWrite()) {
+ setErrorMessage("Key folder is not writable.");
} else if( Arrays.asList(existingKeys).contains(name)){
setErrorMessage("Key id is already used, please choose another id.");
} else {
setErrorMessage(null);
}
}
+
public String getKeyId() {
return name;
}
+
public String getFolder() {
return pem;
}
+
public boolean shouldPersist() {
return persistBool;
}
15 years, 2 months
JBoss Tools SVN: r28345 - branches/jbosstools-3.2.0.CR1/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-18 05:37:53 -0500 (Tue, 18 Jan 2011)
New Revision: 28345
Modified:
branches/jbosstools-3.2.0.CR1/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/ManageKeysPage.java
Log:
[JBIDE-8096] added check for pem-folder being writable
Modified: branches/jbosstools-3.2.0.CR1/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/ManageKeysPage.java
===================================================================
--- branches/jbosstools-3.2.0.CR1/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/ManageKeysPage.java 2011-01-18 10:21:04 UTC (rev 28344)
+++ branches/jbosstools-3.2.0.CR1/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/ManageKeysPage.java 2011-01-18 10:37:53 UTC (rev 28345)
@@ -14,21 +14,17 @@
import java.text.MessageFormat;
import java.util.Arrays;
-import org.eclipse.core.databinding.Binding;
import org.eclipse.core.databinding.DataBindingContext;
import org.eclipse.core.databinding.UpdateListStrategy;
import org.eclipse.core.databinding.UpdateSetStrategy;
import org.eclipse.core.databinding.UpdateValueStrategy;
import org.eclipse.core.databinding.beans.BeanProperties;
import org.eclipse.core.databinding.conversion.Converter;
-import org.eclipse.core.databinding.observable.value.IObservableValue;
-import org.eclipse.core.databinding.observable.value.WritableValue;
import org.eclipse.core.runtime.Assert;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.jface.databinding.fieldassist.ControlDecorationSupport;
import org.eclipse.jface.databinding.swt.WidgetProperties;
import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.jface.dialogs.MessageDialog;
@@ -64,7 +60,6 @@
import org.jboss.tools.deltacloud.ui.ErrorUtils;
import org.jboss.tools.deltacloud.ui.SWTImagesFactory;
import org.jboss.tools.internal.deltacloud.ui.common.databinding.validator.ObjectNotNullToBoolean;
-import org.jboss.tools.internal.deltacloud.ui.common.databinding.validator.ValidWritableFilePathValidator;
import org.jboss.tools.internal.deltacloud.ui.utils.UIUtils;
import org.jboss.tools.internal.deltacloud.ui.utils.WizardUtils;
@@ -80,7 +75,6 @@
private final static String NEW = "NewButton.label"; //$NON-NLS-1$
private final static String DELETE = "DeleteButton.label"; //$NON-NLS-1$
private final static String CREATE_KEY_TITLE = "CreateKey.title"; //$NON-NLS-1$
- private final static String CREATE_KEY_MSG = "CreateKey.msg"; //$NON-NLS-1$
private final static String CONFIRM_KEY_DELETE_TITLE = "ConfirmKeyDelete.title"; //$NON-NLS-1$
private final static String CONFIRM_KEY_DELETE_MSG = "ConfirmKeyDelete.msg"; //$NON-NLS-1$
@@ -164,16 +158,6 @@
refreshKeys();
}
- private void addKeyStoreLocationDecoration(Text keyStoreText, DataBindingContext dbc) {
- IObservableValue observable = new WritableValue();
- Binding binding = dbc.bindValue(
- WidgetProperties.text(SWT.Modify).observe(keyStoreText),
- observable,
- new UpdateValueStrategy().setBeforeSetValidator(new ValidWritableFilePathValidator()),
- new UpdateValueStrategy().setBeforeSetValidator(new ValidWritableFilePathValidator()));
- ControlDecorationSupport.create(binding, SWT.LEFT | SWT.TOP);
- }
-
private Button createNewButton(Composite container, DataBindingContext dbc) {
Button newButton = new Button(container, SWT.NULL);
newButton.setText(WizardMessages.getString(NEW));
@@ -181,28 +165,6 @@
return newButton;
}
- private void bindKeyStoreText(Text keyStoreText, DataBindingContext dbc) {
- dbc.bindValue(
- WidgetProperties.text(SWT.Modify).observe(keyStoreText),
- BeanProperties.value(ManageKeysPageModel.PROP_KEY_STORE_PATH).observe(model));
- }
-
- private SelectionListener onKeyStoreLocationBrowse() {
- return new SelectionAdapter() {
-
- @Override
- public void widgetSelected(SelectionEvent e) {
- DirectoryDialog dialog = new DirectoryDialog(getShell(), SWT.NONE);
- dialog.setFilterPath(model.getKeyStorePath());
- dialog.setText("Choose a directory to store new keys");
- String keyStorePath = dialog.open();
- if (keyStorePath != null && keyStorePath.length() > 0) {
- model.setKeyStorePath(keyStorePath);
- }
- }
- };
- }
-
private Button createDeleteButton(Composite container, DataBindingContext dbc) {
Button deleteButton = new Button(container, SWT.NULL);
deleteButton.setText(WizardMessages.getString(DELETE));
@@ -362,15 +324,17 @@
}
});
-
pemText = new Text(composite, SWT.BORDER);
pemText.setLayoutData(UIUtils.createFormData(nameText,5,null,0,persist, 5, browse, -5));
+
init();
+
ModifyListener listener = new ModifyListener() {
public void modifyText(ModifyEvent e) {
verify();
}
};
+
nameText.addModifyListener(listener);
pemText.addModifyListener(listener);
persist.addSelectionListener(new SelectionAdapter(){
@@ -378,31 +342,40 @@
verify();
}
});
+
return composite;
}
+
private void init() {
persist.setSelection(true);
pemText.setText(model.getInitialKeyStorePath());
verify();
}
+
private void verify() {
persistBool = persist.getSelection();
pem = pemText.getText();
name = nameText.getText();
- if( !(new File(pem).exists())) {
+ File pemFolder = new File(pem);
+ if( !pemFolder.exists()) {
setErrorMessage("Key folder does not exist.");
+ } else if( !pemFolder.canWrite()) {
+ setErrorMessage("Key folder is not writable.");
} else if( Arrays.asList(existingKeys).contains(name)){
setErrorMessage("Key id is already used, please choose another id.");
} else {
setErrorMessage(null);
}
}
+
public String getKeyId() {
return name;
}
+
public String getFolder() {
return pem;
}
+
public boolean shouldPersist() {
return persistBool;
}
15 years, 2 months
JBoss Tools SVN: r28344 - 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-18 05:21:04 -0500 (Tue, 18 Jan 2011)
New Revision: 28344
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/ManageKeysPage.java
Log:
removed unnused methods
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/ManageKeysPage.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/ManageKeysPage.java 2011-01-18 10:20:07 UTC (rev 28343)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/ManageKeysPage.java 2011-01-18 10:21:04 UTC (rev 28344)
@@ -14,21 +14,17 @@
import java.text.MessageFormat;
import java.util.Arrays;
-import org.eclipse.core.databinding.Binding;
import org.eclipse.core.databinding.DataBindingContext;
import org.eclipse.core.databinding.UpdateListStrategy;
import org.eclipse.core.databinding.UpdateSetStrategy;
import org.eclipse.core.databinding.UpdateValueStrategy;
import org.eclipse.core.databinding.beans.BeanProperties;
import org.eclipse.core.databinding.conversion.Converter;
-import org.eclipse.core.databinding.observable.value.IObservableValue;
-import org.eclipse.core.databinding.observable.value.WritableValue;
import org.eclipse.core.runtime.Assert;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.jface.databinding.fieldassist.ControlDecorationSupport;
import org.eclipse.jface.databinding.swt.WidgetProperties;
import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.jface.dialogs.MessageDialog;
@@ -64,7 +60,6 @@
import org.jboss.tools.deltacloud.ui.ErrorUtils;
import org.jboss.tools.deltacloud.ui.SWTImagesFactory;
import org.jboss.tools.internal.deltacloud.ui.common.databinding.validator.ObjectNotNullToBoolean;
-import org.jboss.tools.internal.deltacloud.ui.common.databinding.validator.ValidWritableFilePathValidator;
import org.jboss.tools.internal.deltacloud.ui.utils.UIUtils;
import org.jboss.tools.internal.deltacloud.ui.utils.WizardUtils;
@@ -81,7 +76,6 @@
private final static String NEW = "NewButton.label"; //$NON-NLS-1$
private final static String DELETE = "DeleteButton.label"; //$NON-NLS-1$
private final static String CREATE_KEY_TITLE = "CreateKey.title"; //$NON-NLS-1$
- private final static String CREATE_KEY_MSG = "CreateKey.msg"; //$NON-NLS-1$
private final static String CONFIRM_KEY_DELETE_TITLE = "ConfirmKeyDelete.title"; //$NON-NLS-1$
private final static String CONFIRM_KEY_DELETE_MSG = "ConfirmKeyDelete.msg"; //$NON-NLS-1$
@@ -165,16 +159,6 @@
refreshKeys();
}
- private void addKeyStoreLocationDecoration(Text keyStoreText, DataBindingContext dbc) {
- IObservableValue observable = new WritableValue();
- Binding binding = dbc.bindValue(
- WidgetProperties.text(SWT.Modify).observe(keyStoreText),
- observable,
- new UpdateValueStrategy().setBeforeSetValidator(new ValidWritableFilePathValidator()),
- new UpdateValueStrategy().setBeforeSetValidator(new ValidWritableFilePathValidator()));
- ControlDecorationSupport.create(binding, SWT.LEFT | SWT.TOP);
- }
-
private Button createNewButton(Composite container, DataBindingContext dbc) {
Button newButton = new Button(container, SWT.NULL);
newButton.setText(WizardMessages.getString(NEW));
@@ -182,28 +166,7 @@
return newButton;
}
- private void bindKeyStoreText(Text keyStoreText, DataBindingContext dbc) {
- dbc.bindValue(
- WidgetProperties.text(SWT.Modify).observe(keyStoreText),
- BeanProperties.value(ManageKeysPageModel.PROP_KEY_STORE_PATH).observe(model));
- }
- private SelectionListener onKeyStoreLocationBrowse() {
- return new SelectionAdapter() {
-
- @Override
- public void widgetSelected(SelectionEvent e) {
- DirectoryDialog dialog = new DirectoryDialog(getShell(), SWT.NONE);
- dialog.setFilterPath(model.getKeyStorePath());
- dialog.setText("Choose a directory to store new keys");
- String keyStorePath = dialog.open();
- if (keyStorePath != null && keyStorePath.length() > 0) {
- model.setKeyStorePath(keyStorePath);
- }
- }
- };
- }
-
private Button createDeleteButton(Composite container, DataBindingContext dbc) {
Button deleteButton = new Button(container, SWT.NULL);
deleteButton.setText(WizardMessages.getString(DELETE));
15 years, 2 months