Skip to content

Commit

Permalink
TEIIDDES-3044 (cntd2)
Browse files Browse the repository at this point in the history
 * i18n changes/fixes
  • Loading branch information
blafond committed Jun 8, 2017
1 parent efff2ad commit 35ec616
Show file tree
Hide file tree
Showing 22 changed files with 243 additions and 338 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,30 @@ public class Messages extends NLS {
public static String ExportDDLToWorkspaceDialog_defaultFileName;
public static String ExportDDLToWorkspaceDialog_Ok;

public static String Create;
public static String Edit;
public static String Delete;
public static String GenerateSourceModel;
public static String CreateDataSource;
public static String CreateConnectionProfile;
public static String LocalAndDeployedConnections;
public static String DefaultServer;
public static String ChangeDefaultServer;
public static String Name;
public static String TeiidVersion;
public static String Start;
public static String Stop;
public static String DefaultServerConnected;
public static String DefaultServerNotConnected;
public static String ServerConnected;
public static String StopServer;
public static String StartServer;
public static String ServerNotStarted;
public static String LocalProfiles;
public static String Deployed;
public static String DeployedNotConnected;
public static String jndi_name;

static {
NLS.initializeMessages("org.teiid.designer.datasources.ui.messages", Messages.class); //$NON-NLS-1$
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,3 +179,26 @@ ExportDDLToWorkspaceDialog_browseButton=Browse...
ExportDDLToWorkspaceDialog_defaultFileName=exportedDDL.ddl
ExportDDLToWorkspaceDialog_Ok=Click OK to Export the DDL.

Create=Create
Edit=Edit
Delete=Delete
GenerateSourceModel=Generate Source Model
CreateDataSource=Create Data Source
CreateConnectionProfile=Create Connection Profile
LocalAndDeployedConnections=Local and Deployed Connections
DefaultServer=Default Server
ChangeDefaultServer=Change Default Server;
Name=Name
TeiidVersion=Teiid Version
Start=Start
Stop=Stop
DefaultServerConnected=Default Server Connected
DefaultServerNotConnected=Default Server Not Connected
ServerConnected=Server Connected
StopServer=Stop Server
StartServer=Start Server
ServerNotStarted=Server Not Started
LocalProfiles=Local Profiles
Deployed=Deployed
DeployedNotConnected=Deployed <not connected>
jndi_name=jndi-name
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@
import org.teiid.designer.datasources.ui.Messages;
import org.teiid.designer.datasources.ui.UiConstants;
import org.teiid.designer.datasources.ui.wizard.ITeiidImportServer;
import org.teiid.designer.ui.common.util.LayoutDebugger;
import org.teiid.designer.ui.common.util.WidgetUtil;


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ public void run() {
}
};

this.createAction = new Action("Create") { //$NON-NLS-1$
this.createAction = new Action(Messages.Create) { //$NON-NLS-1$
@Override
public void run() {
if( isDataSourceSelected() || isDataSourceTreeSelected() ) {
Expand All @@ -139,7 +139,7 @@ public void run() {
};
this.createAction.setImageDescriptor(UiPlugin.getDefault().getImageDescriptor(IMAGES.ADD_CONNECTION));

this.editAction = new Action("Edit") { //$NON-NLS-1$
this.editAction = new Action(Messages.Edit) { //$NON-NLS-1$
@Override
public void run() {
if( isProfileSelected() ) {
Expand All @@ -151,7 +151,7 @@ public void run() {
};
this.editAction.setImageDescriptor(UiPlugin.getDefault().getImageDescriptor(IMAGES.EDIT_CONNECTION));

this.deleteAction = new Action("Delete") { //$NON-NLS-1$
this.deleteAction = new Action(Messages.Delete) { //$NON-NLS-1$
@Override
public void run() {
if( isProfileSelected() ) {
Expand All @@ -163,7 +163,7 @@ public void run() {
};
this.deleteAction.setImageDescriptor(UiPlugin.getDefault().getImageDescriptor(IMAGES.REMOVE_CONNECTION));

this.generateSourceModelAction = new Action("Generate Source Model") { //$NON-NLS-1$
this.generateSourceModelAction = new Action(Messages.GenerateSourceModel) { //$NON-NLS-1$
@Override
public void run() {
if( isProfileSelected() ) {
Expand All @@ -176,7 +176,7 @@ public void run() {
};
this.generateSourceModelAction.setImageDescriptor(UiPlugin.getDefault().getImageDescriptor(IMAGES.GENERATE_SOURCE_MODEL));

this.createDataSourceFromProfileAction = new Action("Create Data Source") { //$NON-NLS-1$
this.createDataSourceFromProfileAction = new Action(Messages.CreateDataSource) { //$NON-NLS-1$
@Override
public void run() {
if( isProfileSelected() ) {
Expand All @@ -186,7 +186,7 @@ public void run() {
};
this.createDataSourceFromProfileAction.setImageDescriptor(UiPlugin.getDefault().getImageDescriptor(IMAGES.CREATE_DATA_SOURCE));

this.createDataSourceAction = new Action("Create Data Source") { //$NON-NLS-1$
this.createDataSourceAction = new Action(Messages.CreateDataSource) { //$NON-NLS-1$
@Override
public void run() {
if( isDataSourceSelected() ) {
Expand Down Expand Up @@ -233,7 +233,7 @@ public void widgetSelected(SelectionEvent e) {

deleteCPButton = new Button(panel, SWT.PUSH);
deleteCPButton.setImage(UiPlugin.getDefault().getImage(IMAGES.REMOVE_CONNECTION));
deleteCPButton.setToolTipText("Delete");//Messages.dataSourcePanel_deleteButtonTooltip);
deleteCPButton.setToolTipText(Messages.Delete);
deleteCPButton.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
deleteCPButton.setEnabled(false);
deleteCPButton.addSelectionListener(new SelectionAdapter() {
Expand All @@ -252,7 +252,7 @@ public void widgetSelected(SelectionEvent e) {

editCPButton = new Button(panel, SWT.PUSH);
editCPButton.setImage(UiPlugin.getDefault().getImage(IMAGES.EDIT_CONNECTION));
editCPButton.setToolTipText("Edit"); //Messages.dataSourcePanel_editButtonTooltip);
editCPButton.setToolTipText(Messages.Edit);
editCPButton.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
editCPButton.setEnabled(false);
editCPButton.addSelectionListener(new SelectionAdapter() {
Expand Down Expand Up @@ -295,16 +295,16 @@ void setButtonsState() {

if( isDataSourceSelected() || isDataSourceTreeSelected() ) {
if( manager.isServerAvailable() ) {
newCPButton.setToolTipText("Create Data Source");
newCPButton.setToolTipText(Messages.CreateDataSource);
}
if( isDataSourceSelected() ) {
selection = true;
}
} else if( isProfileSelected() ) {
newCPButton.setToolTipText("Create Connection Profile");
newCPButton.setToolTipText(Messages.CreateConnectionProfile);
selection = true;
} else {
newCPButton.setToolTipText("Create Connection Profile");
newCPButton.setToolTipText(Messages.CreateConnectionProfile);
}
// IStructuredSelection obj = (IStructuredSelection)treeViewer.getSelection();
// if( !obj.isEmpty() &&
Expand Down Expand Up @@ -507,7 +507,6 @@ private void handleImportFromProfile() {
if( !obj.isEmpty() && obj.getFirstElement() instanceof IConnectionProfile ) {
IConnectionProfile profile = (IConnectionProfile)obj.getFirstElement();
if( profile.getCategory().getName().equals(UiConstants.DATABASE_CONNECTIONS) ) {
System.out.println(" Profile Category = " + profile.getCategory().getName());
Properties props = new Properties();
props.setProperty("profileId", profile.getName());
ModelerUiViewUtils.launchWizard(ModelActionConstants.WizardsIDs.JDBC_IMPORT, new StructuredSelection(), new Properties(), true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
import org.teiid.designer.ui.common.dialog.AbstractPasswordDialog;
import org.teiid.designer.ui.common.eventsupport.SelectionUtilities;
import org.teiid.designer.ui.viewsupport.ModelIdentifier;
import org.teiid.designer.ui.viewsupport.ModelUtilities;


/**
Expand All @@ -58,11 +57,6 @@ private static String getString( final String id ) {
return DqpUiConstants.UTIL.getString(I18N_PREFIX + id);
}

private static String getString( final String id,
final Object value ) {
return DqpUiConstants.UTIL.getString(I18N_PREFIX + id, value);
}

private String pwd;
private ConnectionInfoProviderFactory providerFactory;

Expand Down Expand Up @@ -129,8 +123,6 @@ public void run() {
Collection<ModelResource> relationalModels = getRelationalModelsWithConnections();
final CreateDataSourceWizard dialog = new CreateDataSourceWizard(iww.getShell(), teiidServer, relationalModels, profile);

// wizard.init(iww.getWorkbench(), new StructuredSelection());
// final WizardDialog dialog = new WizardDialog(wizard.getShell(), wizard);
final int rc = dialog.open();
if (rc != Window.OK)
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ public void dragStart(DragSourceEvent event) {
if (!selection.isEmpty() && selection.size() == 1) {
event.doit = true;
event.detail = DND.DROP_NONE;
System.out.println(" DND Object = " + selection.getFirstElement().toString() );

ConnectionProfileTransfer.getInstance().setObject(selection.getFirstElement());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Display;
import org.eclipse.ui.forms.ManagedForm;
import org.eclipse.ui.forms.widgets.Form;
import org.eclipse.ui.forms.widgets.FormToolkit;
import org.eclipse.ui.forms.widgets.ScrolledForm;
import org.teiid.designer.datasources.ui.UiPlugin;
Expand All @@ -26,11 +25,6 @@ public class DataSourcesPanel extends ManagedForm {

private ScrolledForm parentForm;
private DataSourcesSection sourcesSection;
private DefaultServerSection serverSection;
//
// private AdvisorHyperLinkListener linkListener;
//
// private StatusActionHandler actionHandler;

/**
* @since 4.3
Expand All @@ -53,22 +47,17 @@ private void initGUI(GlobalConnectionManager manager) {
Color bkgdColor = toolkit.getColors().getBackground();
parentForm.setBackground(bkgdColor);

//this.parentForm.setText(Messages.TeiidActionsManager);

this.parentForm.setLayout(new GridLayout());

this.parentForm.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));

FormUtil.tweakColors(toolkit, parentForm.getDisplay());
this.parentForm.setBackground(bkgdColor);

Form form = this.parentForm.getForm();
this.parentForm.getForm();

// contributeToMenu(form.getMenuManager());

// this.linkListener = new AdvisorHyperLinkListener(this.getForm(), this.toolkit, this.actionHandler);

Composite body = parentForm.getBody();

//int nColumns = 2;
GridLayout gl = new GridLayout(2, false);
body.setLayout(gl);
Expand All @@ -77,7 +66,7 @@ private void initGUI(GlobalConnectionManager manager) {

sourcesSection = new DataSourcesSection(toolkit, body);

serverSection = new DefaultServerSection(toolkit, body, sourcesSection);
new DefaultServerSection(toolkit, body, sourcesSection);
}

@Override
Expand Down Expand Up @@ -111,11 +100,4 @@ public FormToolkit getToolkit() {
public void updateStatus( Status theStatus ) {

}



// private void contributeToMenu( IMenuManager menuMgr ) {
// AdvisorActionFactory.addActionsLibraryToMenu(menuMgr);
// menuMgr.update(true);
// }
}
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,5 @@ private void createContributions() {
PerspectiveObject.TOP_RIGHT);

contributions[0] = connectorsView;
//
// PerspectiveObject serversView =
// new PerspectiveObject(
// org.teiid.designer.ui.UiConstants.Extensions.TE,
// false,
// PerspectiveObject.TOP_RIGHT);
// contributions[1] = serversView;
}
}

0 comments on commit 35ec616

Please sign in to comment.