Externalized strings
This commit is contained in:
@ -54,7 +54,7 @@ public class NavigateContribution {
|
||||
WaveformViewer waveformViewerPart = (WaveformViewer) part.getObject();
|
||||
RelationType relationTypeFilter = waveformViewerPart.getRelationTypeFilter();
|
||||
MCommand command = modelService.findElements(application,
|
||||
"com.minres.scviewer.e4.application.command.setrelationtype", MCommand.class, null).get(0);
|
||||
"com.minres.scviewer.e4.application.command.setrelationtype", MCommand.class, null).get(0); //$NON-NLS-1$
|
||||
MCommandParameter commandParameter = command.getParameters().get(0);
|
||||
for(RelationType relationType:waveformViewerPart.getAllRelationTypes()){
|
||||
// MDirectMenuItem dynamicItem = modelService.createModelElement(MDirectMenuItem.class);
|
||||
@ -69,15 +69,15 @@ public class NavigateContribution {
|
||||
MParameter parameter=modelService.createModelElement(MParameter.class);
|
||||
parameter.setName(commandParameter.getElementId());
|
||||
parameter.setValue(relationType.getName());
|
||||
parameter.setContributorURI("platform:/plugin/com.minres.scviewer.e4.application");
|
||||
parameter.setContributorURI("platform:/plugin/com.minres.scviewer.e4.application"); //$NON-NLS-1$
|
||||
MHandledMenuItem handledMenuItem= modelService.createModelElement(MHandledMenuItem.class);
|
||||
handledMenuItem.setLabel(relationType.getName());
|
||||
if(relationTypeFilter.equals(relationType)){
|
||||
handledMenuItem.setEnabled(false);
|
||||
handledMenuItem.setIconURI("platform:/plugin/com.minres.scviewer.e4.application/icons/tick.png");
|
||||
handledMenuItem.setIconURI("platform:/plugin/com.minres.scviewer.e4.application/icons/tick.png"); //$NON-NLS-1$
|
||||
}else
|
||||
handledMenuItem.setIconURI("platform:/plugin/com.minres.scviewer.e4.application/icons/empty.png");
|
||||
handledMenuItem.setContributorURI("platform:/plugin/com.minres.scviewer.e4.application");
|
||||
handledMenuItem.setIconURI("platform:/plugin/com.minres.scviewer.e4.application/icons/empty.png"); //$NON-NLS-1$
|
||||
handledMenuItem.setContributorURI("platform:/plugin/com.minres.scviewer.e4.application"); //$NON-NLS-1$
|
||||
handledMenuItem.setCommand(command);
|
||||
handledMenuItem.getParameters().add(parameter);
|
||||
items.add(handledMenuItem);
|
||||
|
@ -31,6 +31,7 @@ import org.eclipse.swt.widgets.Composite;
|
||||
|
||||
import com.minres.scviewer.database.ITx;
|
||||
import com.minres.scviewer.database.RelationType;
|
||||
import com.minres.scviewer.e4.application.Messages;
|
||||
import com.minres.scviewer.e4.application.parts.PartListener;
|
||||
import com.minres.scviewer.e4.application.parts.WaveformViewer;
|
||||
|
||||
@ -49,7 +50,7 @@ public class RelationTypeToolControl extends PartListener implements ISelectionC
|
||||
WaveformViewer waveformViewerPart;
|
||||
|
||||
/** The dummy. */
|
||||
RelationType dummy = RelationType.create("------------");
|
||||
RelationType dummy = RelationType.create(Messages.RelationTypeToolControl_0);
|
||||
|
||||
/**
|
||||
* Instantiates a new relation type tool control.
|
||||
@ -72,7 +73,7 @@ public class RelationTypeToolControl extends PartListener implements ISelectionC
|
||||
comboViewer = new ComboViewer(parent, SWT.NONE);
|
||||
Combo comboBox = comboViewer.getCombo();
|
||||
comboBox.setBounds(0, 0, 26, 22);
|
||||
comboBox.setText("Select");
|
||||
comboBox.setText(Messages.RelationTypeToolControl_1);
|
||||
comboViewer.setContentProvider(new ArrayContentProvider());
|
||||
comboViewer.setInput(new RelationType[] {dummy});
|
||||
comboViewer.setSelection(new StructuredSelection(dummy));
|
||||
|
Reference in New Issue
Block a user