Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Schindl2010-04-21 14:44:28 +0000
committerThomas Schindl2010-04-21 14:44:28 +0000
commit0c247170a7882420493e22b135aad3497a675177 (patch)
treed2bf1445805637bede1ec2a94cff23d7766c6ba8 /bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/dialogs
parent3ea5760d5f68a253f60610e6a4a1097f5a68ea64 (diff)
downloadorg.eclipse.e4.tools-0c247170a7882420493e22b135aad3497a675177.tar.gz
org.eclipse.e4.tools-0c247170a7882420493e22b135aad3497a675177.tar.xz
org.eclipse.e4.tools-0c247170a7882420493e22b135aad3497a675177.zip
[Bug 304584] - [Tooling] Implement Workbench-Model-Toolingv20100421-1130
* some NLS stuff
Diffstat (limited to 'bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/dialogs')
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/dialogs/AbstractCommandSelectionDialog.java13
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/dialogs/ContributionClassDialog.java19
2 files changed, 17 insertions, 15 deletions
diff --git a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/dialogs/AbstractCommandSelectionDialog.java b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/dialogs/AbstractCommandSelectionDialog.java
index d81e9228..b178f7f7 100644
--- a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/dialogs/AbstractCommandSelectionDialog.java
+++ b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/dialogs/AbstractCommandSelectionDialog.java
@@ -14,6 +14,7 @@ import java.util.ArrayList;
import java.util.List;
import org.eclipse.e4.tools.emf.ui.common.IModelResource;
+import org.eclipse.e4.tools.emf.ui.internal.Messages;
import org.eclipse.e4.tools.emf.ui.internal.PatternFilter;
import org.eclipse.e4.ui.model.application.MApplication;
import org.eclipse.e4.ui.model.application.MModelComponent;
@@ -70,7 +71,7 @@ public abstract class AbstractCommandSelectionDialog extends TitleAreaDialog {
container.setLayout(new GridLayout(2, false));
Label l = new Label(container, SWT.NONE);
- l.setText("Command-Id");
+ l.setText(Messages.AbstractCommandSelectionDialog_Label_CommandId);
Text searchText = new Text(container, SWT.BORDER | SWT.SEARCH | SWT.ICON_SEARCH);
searchText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
@@ -142,10 +143,10 @@ public abstract class AbstractCommandSelectionDialog extends TitleAreaDialog {
styledString.append(cmd.getCommandName());
}
if( cmd.getDescription() != null ) {
- styledString.append(" - " + cmd.getDescription(),StyledString.DECORATIONS_STYLER);
+ styledString.append(" - " + cmd.getDescription(),StyledString.DECORATIONS_STYLER); //$NON-NLS-1$
}
if( cmd.getElementId() != null ) {
- styledString.append(" - " + cmd.getElementId(),StyledString.DECORATIONS_STYLER);
+ styledString.append(" - " + cmd.getElementId(),StyledString.DECORATIONS_STYLER); //$NON-NLS-1$
}
cell.setText(styledString.getString());
cell.setStyleRanges(styledString.getStyleRanges());
@@ -157,17 +158,17 @@ public abstract class AbstractCommandSelectionDialog extends TitleAreaDialog {
public String getText(Object element) {
MCommand command = (MCommand) element;
- String s = "";
+ String s = ""; //$NON-NLS-1$
if( command.getCommandName() != null ) {
s += command.getCommandName();
}
if( command.getDescription() != null ) {
- s += " " + command.getDescription();
+ s += " " + command.getDescription(); //$NON-NLS-1$
}
if( command.getElementId() != null ) {
- s += " " + command.getElementId();
+ s += " " + command.getElementId(); //$NON-NLS-1$
}
return s;
diff --git a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/dialogs/ContributionClassDialog.java b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/dialogs/ContributionClassDialog.java
index 6406389b..175a5467 100644
--- a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/dialogs/ContributionClassDialog.java
+++ b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/dialogs/ContributionClassDialog.java
@@ -16,6 +16,7 @@ import org.eclipse.core.resources.IProject;
import org.eclipse.e4.tools.emf.ui.common.IClassContributionProvider.ContributionData;
import org.eclipse.e4.tools.emf.ui.common.IClassContributionProvider.ContributionResultHandler;
import org.eclipse.e4.tools.emf.ui.common.IClassContributionProvider.Filter;
+import org.eclipse.e4.tools.emf.ui.internal.Messages;
import org.eclipse.e4.tools.emf.ui.internal.common.ClassContributionCollector;
import org.eclipse.e4.ui.model.application.MContribution;
import org.eclipse.e4.ui.model.application.impl.ApplicationPackageImpl;
@@ -67,9 +68,9 @@ public class ContributionClassDialog extends TitleAreaDialog {
protected Control createDialogArea(Composite parent) {
Composite comp = (Composite) super.createDialogArea(parent);
- getShell().setText("Find Contribution Class");
- setTitle("Find Contribution Class");
- setMessage("Enter the name of the contributing class");
+ getShell().setText(Messages.ContributionClassDialog_ShellTitle);
+ setTitle(Messages.ContributionClassDialog_DialogTitle);
+ setMessage(Messages.ContributionClassDialog_DialogMessage);
getShell().addDisposeListener(new DisposeListener() {
@@ -78,14 +79,14 @@ public class ContributionClassDialog extends TitleAreaDialog {
}
});
- javaClassImage = new Image(getShell().getDisplay(), getClass().getClassLoader().getResourceAsStream("/icons/full/obj16/class_obj.gif"));
+ javaClassImage = new Image(getShell().getDisplay(), getClass().getClassLoader().getResourceAsStream("/icons/full/obj16/class_obj.gif")); //$NON-NLS-1$
Composite container = new Composite(comp, SWT.NONE);
container.setLayoutData(new GridData(GridData.FILL_BOTH));
container.setLayout(new GridLayout(2,false));
Label l = new Label(container, SWT.NONE);
- l.setText("Classname");
+ l.setText(Messages.ContributionClassDialog_Label_Classname);
final Text t = new Text(container, SWT.BORDER | SWT.SEARCH | SWT.ICON_SEARCH);
t.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
@@ -103,12 +104,12 @@ public class ContributionClassDialog extends TitleAreaDialog {
StyledString styledString = new StyledString(data.className, null);
if( data.bundleName != null ) {
- styledString.append(" - " + data.bundleName, StyledString.DECORATIONS_STYLER);
+ styledString.append(" - " + data.bundleName, StyledString.DECORATIONS_STYLER); //$NON-NLS-1$
}
if( data.sourceType != null ) {
- styledString.append(" - ", StyledString.DECORATIONS_STYLER);
- styledString.append(data.sourceType + "", StyledString.COUNTER_STYLER);
+ styledString.append(" - ", StyledString.DECORATIONS_STYLER); //$NON-NLS-1$
+ styledString.append(data.sourceType + "", StyledString.COUNTER_STYLER); //$NON-NLS-1$
}
if( data.iconPath == null ) {
@@ -154,7 +155,7 @@ public class ContributionClassDialog extends TitleAreaDialog {
IStructuredSelection s = (IStructuredSelection) viewer.getSelection();
if( ! s.isEmpty() ) {
ContributionData cd = (ContributionData) s.getFirstElement();
- String uri = "platform:/plugin/" + cd.bundleName + "/" + cd.className;
+ String uri = "platform:/plugin/" + cd.bundleName + "/" + cd.className; //$NON-NLS-1$ //$NON-NLS-2$
Command cmd = SetCommand.create(editingDomain, contribution, ApplicationPackageImpl.Literals.CONTRIBUTION__CONTRIBUTION_URI, uri);
if( cmd.canExecute() ) {
editingDomain.getCommandStack().execute(cmd);

Back to the top