[openrtm-commit:00039] r170 - in trunk/rtmtools: jp.go.aist.rtm.systemeditor/META-INF jp.go.aist.rtm.systemeditor/src/jp/go/aist/rtm/systemeditor/nl jp.go.aist.rtm.systemeditor/src/jp/go/aist/rtm/systemeditor/ui/dialog jp.go.aist.rtm.systemeditor/src/jp/go/aist/rtm/systemeditor/ui/util jp.go.aist.rtm.systemeditor.nl1/META-INF jp.go.aist.rtm.systemeditor.nl1/src/jp/go/aist/rtm/systemeditor/nl
openrtm @ openrtm.org
openrtm @ openrtm.org
2011年 5月 9日 (月) 14:55:07 JST
Author: ta
Date: 2011-05-09 14:55:07 +0900 (Mon, 09 May 2011)
New Revision: 170
Modified:
trunk/rtmtools/jp.go.aist.rtm.systemeditor.nl1/META-INF/MANIFEST.MF
trunk/rtmtools/jp.go.aist.rtm.systemeditor.nl1/src/jp/go/aist/rtm/systemeditor/nl/messages_ja.properties
trunk/rtmtools/jp.go.aist.rtm.systemeditor/META-INF/MANIFEST.MF
trunk/rtmtools/jp.go.aist.rtm.systemeditor/src/jp/go/aist/rtm/systemeditor/nl/messages.properties
trunk/rtmtools/jp.go.aist.rtm.systemeditor/src/jp/go/aist/rtm/systemeditor/ui/dialog/ServiceConnectorCreaterDialog.java
trunk/rtmtools/jp.go.aist.rtm.systemeditor/src/jp/go/aist/rtm/systemeditor/ui/util/RTMixin.java
Log:
RTSE updates.
- update for validation of service connection dialog.
Modified: trunk/rtmtools/jp.go.aist.rtm.systemeditor/META-INF/MANIFEST.MF
===================================================================
--- trunk/rtmtools/jp.go.aist.rtm.systemeditor/META-INF/MANIFEST.MF 2011-05-02 09:47:20 UTC (rev 169)
+++ trunk/rtmtools/jp.go.aist.rtm.systemeditor/META-INF/MANIFEST.MF 2011-05-09 05:55:07 UTC (rev 170)
@@ -2,7 +2,7 @@
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: jp.go.aist.rtm.systemeditor;singleton:=true
-Bundle-Version: 1.1.0.v20110502
+Bundle-Version: 1.1.0.v20110509
Bundle-Activator: jp.go.aist.rtm.systemeditor.RTSystemEditorPlugin
Bundle-Localization: plugin
Require-Bundle:
Modified: trunk/rtmtools/jp.go.aist.rtm.systemeditor/src/jp/go/aist/rtm/systemeditor/nl/messages.properties
===================================================================
--- trunk/rtmtools/jp.go.aist.rtm.systemeditor/src/jp/go/aist/rtm/systemeditor/nl/messages.properties 2011-05-02 09:47:20 UTC (rev 169)
+++ trunk/rtmtools/jp.go.aist.rtm.systemeditor/src/jp/go/aist/rtm/systemeditor/nl/messages.properties 2011-05-09 05:55:07 UTC (rev 170)
@@ -106,6 +106,8 @@
ServiceConnectorCreaterDialog.10=Delete
ServiceConnectorCreaterDialog.11=detail...
ServiceConnectorCreaterDialog.12=unknown
+ServiceConnectorCreaterDialog.13=Unmatch interface type consumer={0} provider={1}
+ServiceConnectorCreaterDialog.14=Unmatch interface instance_name consumer={0} provider={1}
ConfigurationDialog.3=Apply
ConfigurationDialog.4=ConfigurationSet :
ConfigurationDialog.6=Constraint [
Modified: trunk/rtmtools/jp.go.aist.rtm.systemeditor/src/jp/go/aist/rtm/systemeditor/ui/dialog/ServiceConnectorCreaterDialog.java
===================================================================
--- trunk/rtmtools/jp.go.aist.rtm.systemeditor/src/jp/go/aist/rtm/systemeditor/ui/dialog/ServiceConnectorCreaterDialog.java 2011-05-02 09:47:20 UTC (rev 169)
+++ trunk/rtmtools/jp.go.aist.rtm.systemeditor/src/jp/go/aist/rtm/systemeditor/ui/dialog/ServiceConnectorCreaterDialog.java 2011-05-09 05:55:07 UTC (rev 170)
@@ -6,7 +6,6 @@
import java.util.List;
import java.util.Map;
-import jp.go.aist.rtm.systemeditor.nl.Messages;
import jp.go.aist.rtm.toolscommon.model.component.Component;
import jp.go.aist.rtm.toolscommon.model.component.ComponentFactory;
import jp.go.aist.rtm.toolscommon.model.component.ConnectorProfile;
@@ -17,14 +16,16 @@
import org.eclipse.jface.dialogs.TitleAreaDialog;
import org.eclipse.jface.viewers.ArrayContentProvider;
import org.eclipse.jface.viewers.CellEditor;
+import org.eclipse.jface.viewers.ColumnViewer;
import org.eclipse.jface.viewers.ComboBoxCellEditor;
-import org.eclipse.jface.viewers.ICellModifier;
+import org.eclipse.jface.viewers.EditingSupport;
import org.eclipse.jface.viewers.ISelectionChangedListener;
import org.eclipse.jface.viewers.ITableLabelProvider;
import org.eclipse.jface.viewers.LabelProvider;
import org.eclipse.jface.viewers.SelectionChangedEvent;
import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.jface.viewers.TableViewer;
+import org.eclipse.jface.viewers.TableViewerColumn;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.ModifyEvent;
import org.eclipse.swt.events.ModifyListener;
@@ -37,41 +38,65 @@
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Item;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Table;
-import org.eclipse.swt.widgets.TableColumn;
import org.eclipse.swt.widgets.Text;
+import static jp.go.aist.rtm.systemeditor.nl.Messages.getString;
+import static jp.go.aist.rtm.systemeditor.ui.util.RTMixin.*;
+
/**
* サービスポート間の接続のコネクタプロファイルの選択ダイアログ
* <P>
* ポート名を入力する 接続しようとしているServicePort間でマッチングを行い、必要に応じて警告を表示する。
- * ここでいうマッチングは、「PortInterfaceProfile.type」が同じで、「PortInterfaceProfile.polarity」がPROVIDEDとREQUIREDで対応することをいう。
- * ・完全一致した場合 → 警告なし ・一部一致した場合 → 警告 「Port interfaces do not match completely.」
- * ・完全不一致した場合 → 警告 「No corresponding port interface.」
*
+ * ここでいうマッチングは、PortInterfaceProfile の type、および instance_name」が同じで polarity が
+ * PROVIDED と REQUIRED で対応することをいう。
+ * <ul>
+ * <li>完全一致した場合 → 警告なし</li>
+ * <li>一部一致した場合 → 警告「Port interfaces do not match completely.」</li>
+ * <li>完全不一致した場合 → 警告「No corresponding port interface.」</li>
+ * </ul>
+ *
+ * また、対応するインスタンスをコネクタプロファイルのプロパティに設定する場合は以下のチェックを行います。
+ * <ul>
+ * <li>type が不一致 → エラー「Unmatch interface type consumer={0} provider={1}」</li>
+ * <li>instance_name が不一致 → 警告「Unmatch interface instance consumer={0}
+ * provider={1}」</li>
+ * </ul>
*/
public class ServiceConnectorCreaterDialog extends TitleAreaDialog {
static final int EXEC_BUTTON_WIDTH = 70;
- static final String LABEL_PROPERTY_CONSUMER = Messages.getString("ServiceConnectorCreaterDialog.7");
- static final String LABEL_PROPERTY_PROVIDER = Messages.getString("ServiceConnectorCreaterDialog.8");
+ static final String MSG_ERROR = getString("ServiceConnectorCreaterDialog.2");
+ static final String MSG_NOMATCH_INTERFACE = getString("ServiceConnectorCreaterDialog.3");
+ static final String MSG_UNMATCH_INTERFACE = getString("ServiceConnectorCreaterDialog.4");
- static final String LABEL_BUTTON_ADD = Messages.getString("ServiceConnectorCreaterDialog.9");
- static final String LABEL_BUTTON_DELETE = Messages.getString("ServiceConnectorCreaterDialog.10");
+ static final String MSG_UNMATCH_INTERFACE_TYPE = getString("ServiceConnectorCreaterDialog.13");
+ static final String MSG_UNMATCH_INTERFACE_INSTANCE = getString("ServiceConnectorCreaterDialog.14");
- static final String LABEL_DETAIL = Messages.getString("ServiceConnectorCreaterDialog.11");
+ static final String DIALOG_TITLE = getString("ServiceConnectorCreaterDialog.6");
- static final String LABEL_UNKNOWN = Messages.getString("ServiceConnectorCreaterDialog.12");
+ static final String LABEL_ENTER_PROFILE = getString("ServiceConnectorCreaterDialog.1");
+ static final String LABEL_NAME = getString("ServiceConnectorCreaterDialog.5");
- static final String PROPERTY_CONSUMER = "PROPERTY_CONSUMER";
- static final String PROPERTY_PROVIDER = "PROPERTY_PROVIDER";
+ static final String LABEL_PROPERTY_CONSUMER = getString("ServiceConnectorCreaterDialog.7");
+ static final String LABEL_PROPERTY_PROVIDER = getString("ServiceConnectorCreaterDialog.8");
- private Text nameText;
+ static final String LABEL_BUTTON_ADD = getString("ServiceConnectorCreaterDialog.9");
+ static final String LABEL_BUTTON_DELETE = getString("ServiceConnectorCreaterDialog.10");
+ static final String LABEL_DETAIL = getString("ServiceConnectorCreaterDialog.11");
+
+ static final String LABEL_UNKNOWN = getString("ServiceConnectorCreaterDialog.12");
+
+ static final int PROPERTY_CONSUMER = 0;
+ static final int PROPERTY_PROVIDER = 1;
+
+ Text nameText;
+
Composite detailComposite;
TableViewer interfaceTableViewer;
@@ -82,13 +107,12 @@
Point defaultDialogSize;
- private ConnectorProfile connectorProfile;
- private ConnectorProfile dialogResult;
+ ConnectorProfile connectorProfile;
+ ConnectorProfile dialogResult;
- private ServicePort first;
+ ServicePort first;
+ ServicePort second;
- private ServicePort second;
-
List<InterfaceEntry> interfaceList;
InterfaceEntry selectedEntry;
@@ -98,6 +122,8 @@
Map<String, ConnectorProfile.InterfaceId> providerMap;
List<String> providerLabels;
+ String baseMessage;
+
public ServiceConnectorCreaterDialog(Shell parentShell) {
super(parentShell);
setShellStyle(getShellStyle() | SWT.CENTER | SWT.RESIZE);
@@ -122,7 +148,7 @@
this.connectorProfile = ComponentFactory.eINSTANCE
.createConnectorProfile();
- this.connectorProfile.setName(first.getNameL() + "_" //$NON-NLS-1$
+ this.connectorProfile.setName(first.getNameL() + "_"
+ second.getNameL());
open();
@@ -181,7 +207,7 @@
mainComposite.setLayoutData(new GridData(GridData.FILL_BOTH));
Label label = new Label(mainComposite, SWT.NONE);
- label.setText(Messages.getString("ServiceConnectorCreaterDialog.1")); //$NON-NLS-1$
+ label.setText(LABEL_ENTER_PROFILE);
GridData labelLayloutData = new GridData(
GridData.HORIZONTAL_ALIGN_BEGINNING);
label.setLayoutData(labelLayloutData);
@@ -189,26 +215,26 @@
createConnectorProfileComposite(mainComposite);
- String message = Messages.getString("ServiceConnectorCreaterDialog.2"); //$NON-NLS-1$
+ baseMessage = MSG_ERROR;
try {
List<PortInterfaceProfile> interfaces1 = first.getInterfaces();
List<PortInterfaceProfile> interfaces2 = second.getInterfaces();
int countMatch = countMatch(interfaces1, interfaces2);
- if (countMatch > 0 && countMatch == countTotal(interfaces1, interfaces2)) {
- message = null;
+ if (countMatch > 0
+ && countMatch == countTotal(interfaces1, interfaces2)) {
+ baseMessage = null;
} else {
if (countMatch == 0) {
- message = Messages.getString("ServiceConnectorCreaterDialog.3"); //$NON-NLS-1$
+ baseMessage = MSG_NOMATCH_INTERFACE;
} else {
- message = Messages.getString("ServiceConnectorCreaterDialog.4"); //$NON-NLS-1$
+ baseMessage = MSG_UNMATCH_INTERFACE;
}
}
-
} catch (Exception e) {
}
- if (message != null) {
- setMessage(message, IMessageProvider.WARNING);
+ if (baseMessage != null) {
+ setMessage(baseMessage, IMessageProvider.WARNING);
}
return mainComposite;
@@ -236,7 +262,7 @@
portProfileEditComposite.setLayoutData(gd);
Label name = new Label(portProfileEditComposite, SWT.NONE);
- name.setText(Messages.getString("ServiceConnectorCreaterDialog.5")); //$NON-NLS-1$
+ name.setText(LABEL_NAME);
nameText = new Text(portProfileEditComposite, SWT.SINGLE | SWT.BORDER);
gd = new GridData();
gd.horizontalAlignment = GridData.FILL;
@@ -296,19 +322,7 @@
interfaceTableViewer = new TableViewer(detailComposite,
SWT.FULL_SELECTION | SWT.SINGLE | SWT.BORDER);
interfaceTableViewer.setContentProvider(new ArrayContentProvider());
- interfaceTableViewer.setColumnProperties(new String[] {
- PROPERTY_CONSUMER, PROPERTY_PROVIDER });
interfaceTableViewer
- .setLabelProvider(new InterfaceEntryLabelProvider());
- interfaceTableViewer.setCellModifier(new InterfaceTableCellModifier(
- interfaceTableViewer));
- CellEditor[] editors = new CellEditor[2];
- editors[0] = new ComboBoxCellEditor(interfaceTableViewer.getTable(),
- consumerLabels.toArray(new String[0]), SWT.READ_ONLY);
- editors[1] = new ComboBoxCellEditor(interfaceTableViewer.getTable(),
- providerLabels.toArray(new String[0]), SWT.READ_ONLY);
- interfaceTableViewer.setCellEditors(editors);
- interfaceTableViewer
.addSelectionChangedListener(new ISelectionChangedListener() {
public void selectionChanged(SelectionChangedEvent event) {
StructuredSelection selection = (StructuredSelection) event
@@ -333,13 +347,16 @@
interfaceTable.setLinesVisible(true);
interfaceTable.setHeaderVisible(true);
- TableColumn col = new TableColumn(interfaceTable, SWT.NONE);
- col.setText(LABEL_PROPERTY_CONSUMER);
- col.setWidth(300);
+ TableViewerColumn col = null;
+ col = createColumn(interfaceTableViewer, LABEL_PROPERTY_CONSUMER, 300);
+ col.setEditingSupport(new InterfaceTableEdittingSupport(
+ interfaceTableViewer, PROPERTY_CONSUMER));
+ col = createColumn(interfaceTableViewer, LABEL_PROPERTY_PROVIDER, 300);
+ col.setEditingSupport(new InterfaceTableEdittingSupport(
+ interfaceTableViewer, PROPERTY_PROVIDER));
- col = new TableColumn(interfaceTable, SWT.NONE);
- col.setText(LABEL_PROPERTY_PROVIDER);
- col.setWidth(300);
+ interfaceTableViewer
+ .setLabelProvider(new InterfaceEntryLabelProvider());
Composite buttonComposite = new Composite(detailComposite, SWT.NONE);
gl = new GridLayout();
@@ -358,7 +375,8 @@
public void widgetSelected(SelectionEvent e) {
InterfaceEntry entry = newEntry();
interfaceList.add(entry);
- interfaceTableViewer.setInput(interfaceList);
+ interfaceTableViewer.refresh();
+ validateEntry();
}
});
@@ -375,8 +393,9 @@
return;
}
interfaceList.remove(selectedEntry);
- interfaceTableViewer.setInput(interfaceList);
+ interfaceTableViewer.refresh();
deleteButton.setEnabled(false);
+ validateEntry();
}
});
@@ -394,6 +413,15 @@
return l;
}
+ TableViewerColumn createColumn(TableViewer tv, String title, int width) {
+ TableViewerColumn col = new TableViewerColumn(tv, SWT.NONE);
+ col.getColumn().setText(title);
+ col.getColumn().setWidth(width);
+ col.getColumn().setResizable(true);
+ col.getColumn().setMoveable(false);
+ return col;
+ }
+
/**
* モデル情報にアクセスし、表示に設定する
*/
@@ -452,10 +480,38 @@
}
}
+ /** Consumer/Providerのエントリの整合性チェック */
+ void validateEntry() {
+ if (interfaceList == null) {
+ return;
+ }
+ String message = baseMessage;
+ int level = IMessageProvider.WARNING;
+ for (InterfaceEntry entry : interfaceList) {
+ if (entry.validate()) {
+ continue;
+ }
+ if (message == null) {
+ message = "";
+ }
+ if (!message.isEmpty()) {
+ message += "\n";
+ }
+ if (entry.getErrorMessage() != null) {
+ message += entry.getErrorMessage();
+ level = IMessageProvider.ERROR;
+ }
+ if (entry.getWarningMessage() != null) {
+ message += entry.getWarningMessage();
+ }
+ }
+ setMessage(message, level);
+ }
+
@Override
protected void configureShell(Shell shell) {
super.configureShell(shell);
- shell.setText(Messages.getString("ServiceConnectorCreaterDialog.6")); //$NON-NLS-1$
+ shell.setText(DIALOG_TITLE);
}
@Override
@@ -471,12 +527,10 @@
super.cancelPressed();
}
- @Override
/**
- * {@inheritDoc}
- * <p>
* メッセージを設定する。
*/
+ @Override
public void setMessage(String newMessage, int newType) {
super.setMessage(newMessage, newType);
}
@@ -545,11 +599,14 @@
*/
private boolean isMatch(PortInterfaceProfile profile1,
PortInterfaceProfile profile2) {
-
- if (!profile1.getTypeName().equals(profile2.getTypeName())) return false;
- if (profile1.isProvidedPolarity()) return profile2.isRequiredPolarity();
- if (profile1.isRequiredPolarity()) return profile2.isProvidedPolarity();
-
+ if (!profile1.getTypeName().equals(profile2.getTypeName()))
+ return false;
+ if (!profile1.getInstanceName().equals(profile2.getInstanceName()))
+ return false;
+ if (profile1.isProvidedPolarity())
+ return profile2.isRequiredPolarity();
+ if (profile1.isRequiredPolarity())
+ return profile2.isProvidedPolarity();
return false;
}
@@ -562,6 +619,8 @@
public static class InterfaceEntry {
ConnectorProfile.InterfaceId consumer;
ConnectorProfile.InterfaceId provider;
+ String errorMessage = null;
+ String warningMessage = null;
public String getConsumerLabel() {
return toLabelString(consumer);
@@ -574,6 +633,32 @@
public static String toLabelString(ConnectorProfile.InterfaceId id) {
return id.rtc_name + ":" + id.if_tname + ":" + id.if_iname;
}
+
+ public String getErrorMessage() {
+ return errorMessage;
+ }
+
+ public String getWarningMessage() {
+ return warningMessage;
+ }
+
+ public boolean validate() {
+ errorMessage = null;
+ warningMessage = null;
+ if (consumer.if_tname != null
+ && !consumer.if_tname.equals(provider.if_tname)) {
+ errorMessage = form(MSG_UNMATCH_INTERFACE_TYPE,
+ consumer.if_tname, provider.if_tname);
+ return false;
+ }
+ if (consumer.if_iname != null
+ && !consumer.if_iname.equals(provider.if_iname)) {
+ warningMessage = form(MSG_UNMATCH_INTERFACE_INSTANCE,
+ consumer.if_iname, provider.if_iname);
+ return false;
+ }
+ return true;
+ }
}
/** ポート一覧表示のLabelProvider */
@@ -596,58 +681,99 @@
}
}
- /** インターフェース一覧のCellModifier */
- public class InterfaceTableCellModifier implements ICellModifier {
- private TableViewer viewer;
+ /** インターフェース一覧のEditingSupport */
+ public class InterfaceTableEdittingSupport extends EditingSupport {
+ CellEditor editor;
+ int column;
- public InterfaceTableCellModifier(TableViewer viewer) {
- this.viewer = viewer;
+ public InterfaceTableEdittingSupport(ColumnViewer viewer, int column) {
+ super(viewer);
+
+ // Create the correct editor based on the column index
+ this.column = column;
+ switch (this.column) {
+ case PROPERTY_CONSUMER:
+ case PROPERTY_PROVIDER:
+ editor = new ComboBoxCellEditor(((TableViewer) viewer)
+ .getTable(), itemLabels().toArray(new String[0]),
+ SWT.READ_ONLY);
+ break;
+ default:
+ break;
+ }
}
@Override
- public boolean canModify(Object element, String property) {
+ protected boolean canEdit(Object element) {
return true;
}
@Override
- public Object getValue(Object element, String property) {
- Object result = null;
+ protected CellEditor getCellEditor(Object element) {
+ return editor;
+ }
+
+ @Override
+ protected Object getValue(Object element) {
InterfaceEntry entry = (InterfaceEntry) element;
- if (PROPERTY_CONSUMER.equals(property)) {
- String label = entry.getConsumerLabel();
- int index = consumerLabels.indexOf(label);
- result = new Integer(index);
- } else if (PROPERTY_PROVIDER.equals(property)) {
- String label = entry.getProviderLabel();
- int index = providerLabels.indexOf(label);
- result = new Integer(index);
+ //
+ String label = null;
+ if (column == PROPERTY_CONSUMER) {
+ label = entry.getConsumerLabel();
+ } else if (column == PROPERTY_PROVIDER) {
+ label = entry.getProviderLabel();
}
- return result;
+ if (label == null) {
+ return null;
+ }
+ int index = itemLabels().indexOf(label);
+ return new Integer(index);
}
@Override
- public void modify(Object element, String property, Object value) {
- if (element instanceof Item) {
- element = ((Item) element).getData();
+ protected void setValue(Object element, Object value) {
+ if (!(element instanceof InterfaceEntry)) {
+ return;
}
InterfaceEntry entry = (InterfaceEntry) element;
- if (PROPERTY_CONSUMER.equals(property)) {
+ //
+ if (column == PROPERTY_CONSUMER) {
Integer index = (Integer) value;
- if (index >= 0 && index < consumerLabels.size()) {
- ConnectorProfile.InterfaceId id = consumerMap
- .get(consumerLabels.get(index));
+ if (index >= 0 && index < itemLabels().size()) {
+ ConnectorProfile.InterfaceId id = itemMap().get(
+ itemLabels().get(index));
entry.consumer = id.clone();
}
- } else if (PROPERTY_PROVIDER.equals(property)) {
+ } else if (column == PROPERTY_PROVIDER) {
Integer index = (Integer) value;
- if (index >= 0 && index < providerLabels.size()) {
- ConnectorProfile.InterfaceId id = providerMap
- .get(providerLabels.get(index));
+ if (index >= 0 && index < itemLabels().size()) {
+ ConnectorProfile.InterfaceId id = itemMap().get(
+ itemLabels().get(index));
entry.provider = id.clone();
}
}
- viewer.update(element, null);
+ validateEntry();
+ getViewer().update(element, null);
}
+
+ Map<String, ConnectorProfile.InterfaceId> itemMap() {
+ if (column == PROPERTY_CONSUMER) {
+ return consumerMap;
+ } else if (column == PROPERTY_PROVIDER) {
+ return providerMap;
+ }
+ return new HashMap<String, ConnectorProfile.InterfaceId>();
+ }
+
+ List<String> itemLabels() {
+ if (column == PROPERTY_CONSUMER) {
+ return consumerLabels;
+ } else if (column == PROPERTY_PROVIDER) {
+ return providerLabels;
+ }
+ return new ArrayList<String>();
+ }
+
}
}
Modified: trunk/rtmtools/jp.go.aist.rtm.systemeditor/src/jp/go/aist/rtm/systemeditor/ui/util/RTMixin.java
===================================================================
--- trunk/rtmtools/jp.go.aist.rtm.systemeditor/src/jp/go/aist/rtm/systemeditor/ui/util/RTMixin.java 2011-05-02 09:47:20 UTC (rev 169)
+++ trunk/rtmtools/jp.go.aist.rtm.systemeditor/src/jp/go/aist/rtm/systemeditor/ui/util/RTMixin.java 2011-05-09 05:55:07 UTC (rev 170)
@@ -5,6 +5,21 @@
*/
public class RTMixin {
+ public static String form(String fm, String... args) {
+ String result = fm;
+ for (int i = 0; i < args.length; i++) {
+ String p = "{" + i + "}";
+ int j = result.indexOf(p);
+ if (j == -1) {
+ continue;
+ }
+ String head = result.substring(0, j);
+ String tail = result.substring(j + p.length());
+ result = head + args[i] + tail;
+ }
+ return result;
+ }
+
public static boolean isBlank(String s) {
return (s == null || s.isEmpty());
}
Modified: trunk/rtmtools/jp.go.aist.rtm.systemeditor.nl1/META-INF/MANIFEST.MF
===================================================================
--- trunk/rtmtools/jp.go.aist.rtm.systemeditor.nl1/META-INF/MANIFEST.MF 2011-05-02 09:47:20 UTC (rev 169)
+++ trunk/rtmtools/jp.go.aist.rtm.systemeditor.nl1/META-INF/MANIFEST.MF 2011-05-09 05:55:07 UTC (rev 170)
@@ -2,6 +2,6 @@
Bundle-ManifestVersion: 2
Bundle-Name: Graphical Editor for RT system Nl1 Fragment
Bundle-SymbolicName: jp.go.aist.rtm.systemeditor.nl1
-Bundle-Version: 1.1.0.v20110428
+Bundle-Version: 1.1.0.v20110509
Fragment-Host: jp.go.aist.rtm.systemeditor;bundle-version="0.0.0"
Bundle-Vendor: AIST
Modified: trunk/rtmtools/jp.go.aist.rtm.systemeditor.nl1/src/jp/go/aist/rtm/systemeditor/nl/messages_ja.properties
===================================================================
--- trunk/rtmtools/jp.go.aist.rtm.systemeditor.nl1/src/jp/go/aist/rtm/systemeditor/nl/messages_ja.properties 2011-05-02 09:47:20 UTC (rev 169)
+++ trunk/rtmtools/jp.go.aist.rtm.systemeditor.nl1/src/jp/go/aist/rtm/systemeditor/nl/messages_ja.properties 2011-05-09 05:55:07 UTC (rev 170)
@@ -96,8 +96,8 @@
AboutDialog.22=About RT System Editor
ServiceConnectorCreaterDialog.1=\u30dd\u30fc\u30c8\u30d7\u30ed\u30d5\u30a1\u30a4\u30eb\u3092\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044\u3002
ServiceConnectorCreaterDialog.2=Error
-ServiceConnectorCreaterDialog.3=No corresponding port interface.
-ServiceConnectorCreaterDialog.4=Port interfaces do not match completely.
+ServiceConnectorCreaterDialog.3=\u4e00\u81f4\u3059\u308b\u30dd\u30fc\u30c8\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9\u304c\u3042\u308a\u307e\u305b\u3093\u3002
+ServiceConnectorCreaterDialog.4=\u30dd\u30fc\u30c8\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9\u306e\u4e00\u90e8\u304c\u4e00\u81f4\u3057\u307e\u305b\u3093\u3002
ServiceConnectorCreaterDialog.5=Name :
ServiceConnectorCreaterDialog.6=Port Profile
ServiceConnectorCreaterDialog.7=Consumer
@@ -106,6 +106,8 @@
ServiceConnectorCreaterDialog.10=\u524a\u9664
ServiceConnectorCreaterDialog.11=\u8a73\u7d30...
ServiceConnectorCreaterDialog.12=unknown
+ServiceConnectorCreaterDialog.13=\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9\u306e\u578b\u304c\u4e00\u81f4\u3057\u307e\u305b\u3093\u3002consumer={0} provider={1}
+ServiceConnectorCreaterDialog.14=\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u540d\u304c\u4e00\u81f4\u3057\u307e\u305b\u3093\u3002consumer={0} provider={1}
ConfigurationDialog.3=Apply
ConfigurationDialog.4=ConfigurationSet :
ConfigurationDialog.6=\u5236\u7d04\u6761\u4ef6[
openrtm-commit メーリングリストの案内