Skip to content

Commit

Permalink
TEIIDDES-1799: Fixes Change button in REST war dialog
Browse files Browse the repository at this point in the history
* Fixes cut n paste mistake where the wrong textbox content is set

* Moves Change button to the end of the text box so as to match the line
  of the jar location text boxes

* Disables the browse buttons as well as the jar locations when pre-8.1
  target version is set.
  • Loading branch information
Paul Richardson committed Jul 31, 2013
1 parent 4758395 commit 548ca41
Showing 1 changed file with 12 additions and 13 deletions.
Expand Up @@ -9,7 +9,6 @@

import java.util.Collections;
import java.util.Properties;

import org.eclipse.core.resources.IFile;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.jface.dialogs.IDialogSettings;
Expand All @@ -32,14 +31,12 @@
import org.eclipse.swt.widgets.Group;
import org.eclipse.swt.widgets.Text;
import org.teiid.core.designer.util.I18nUtil;
import org.teiid.designer.core.util.StringUtilities;
import org.teiid.designer.runtime.ui.DqpUiConstants;
import org.teiid.designer.runtime.ui.DqpUiPlugin;
import org.teiid.designer.runtime.ui.DqpUiStringUtil;
import org.teiid.designer.ui.common.InternalUiConstants;
import org.teiid.designer.ui.common.util.WidgetFactory;
import org.teiid.designer.ui.common.util.WidgetUtil;
import org.teiid.designer.ui.common.util.WizardUtil;
import org.teiid.designer.ui.viewsupport.DesignerProperties;


Expand Down Expand Up @@ -235,7 +232,7 @@ private void createDeploymentInfoComposite( final Composite parent ) {
WidgetFactory.createLabel(pnlContents, GridData.HORIZONTAL_ALIGN_BEGINNING, 1, this.WARFILELOCATION);

// WAR file save location textfield
this.txfWarFileDeploymentLocation = WidgetFactory.createTextField(pnlContents, GridData.FILL_HORIZONTAL, 2);
this.txfWarFileDeploymentLocation = WidgetFactory.createTextField(pnlContents, GridData.FILL_HORIZONTAL, 1);
text = getString("warFileSaveLocationTooltip"); //$NON-NLS-1$
this.txfWarFileDeploymentLocation.setToolTipText(text);

Expand Down Expand Up @@ -415,10 +412,8 @@ void restoreDefaultButtonPressed() {
this.txfJNDIName.setText(WarDataserviceModel.getInstance().getJndiNameDefault());
this.targetVersionCombo.setText(_82_or_greater);
this.engineJarFileLocation.setText(""); //$NON-NLS-1$
this.engineJarFileLocation.setEnabled(true);
this.commonCoreJarFileLocation.setText(""); //$NON-NLS-1$
this.commonCoreJarFileLocation.setEnabled(true);

handleVersionSelected();
}

void handleWarBrowseSourceSelected() {
Expand All @@ -429,7 +424,7 @@ void handleWarBrowseSourceSelected() {
String selectedUnit = folderDialog.open();

if (selectedUnit != null) {
this.engineJarFileLocation.setText(selectedUnit);
this.txfWarFileDeploymentLocation.setText(selectedUnit);
}
}

Expand Down Expand Up @@ -468,12 +463,16 @@ void handleVersionSelected() {

boolean version82_OrGreater = false;
if (this.targetVersionCombo.getText().equals(getString("82Text"))){ //$NON-NLS-1$
version82_OrGreater=true;
this.engineJarFileLocation.setEnabled(true);
this.commonCoreJarFileLocation.setEnabled(true);
version82_OrGreater = true;
this.engineJarFileLocation.setEnabled(true);
this.selectEngineJar.setEnabled(true);
this.commonCoreJarFileLocation.setEnabled(true);
this.selectCommonCoreJar.setEnabled(true);
}else{
this.engineJarFileLocation.setEnabled(false);
this.commonCoreJarFileLocation.setEnabled(false);
this.engineJarFileLocation.setEnabled(false);
this.selectEngineJar.setEnabled(false);
this.commonCoreJarFileLocation.setEnabled(false);
this.selectCommonCoreJar.setEnabled(false);
}
RestWarDataserviceModel.getInstance().setVersion82_OrGreater(version82_OrGreater);
}
Expand Down

0 comments on commit 548ca41

Please sign in to comment.