[openrtm-commit:03173] r797 - in trunk/rtmtools/jp.go.aist.rtm.systemeditor: . icons src/jp/go/aist/rtm/systemeditor/nl src/jp/go/aist/rtm/systemeditor/ui/action
openrtm @ openrtm.org
openrtm @ openrtm.org
2018年 2月 16日 (金) 00:23:16 JST
Author: ga
Date: 2018-02-16 00:23:16 +0900 (Fri, 16 Feb 2018)
New Revision: 797
Added:
trunk/rtmtools/jp.go.aist.rtm.systemeditor/icons/Exit.png
Modified:
trunk/rtmtools/jp.go.aist.rtm.systemeditor/plugin.properties
trunk/rtmtools/jp.go.aist.rtm.systemeditor/plugin.xml
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/action/AllComponentActionDelegate.java
Log:
Add ALL Exit button #4425
Added: trunk/rtmtools/jp.go.aist.rtm.systemeditor/icons/Exit.png
===================================================================
(Binary files differ)
Index: trunk/rtmtools/jp.go.aist.rtm.systemeditor/icons/Exit.png
===================================================================
--- trunk/rtmtools/jp.go.aist.rtm.systemeditor/icons/Exit.png 2018-02-15 15:23:01 UTC (rev 796)
+++ trunk/rtmtools/jp.go.aist.rtm.systemeditor/icons/Exit.png 2018-02-15 15:23:16 UTC (rev 797)
Property changes on: trunk/rtmtools/jp.go.aist.rtm.systemeditor/icons/Exit.png
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Modified: trunk/rtmtools/jp.go.aist.rtm.systemeditor/plugin.properties
===================================================================
--- trunk/rtmtools/jp.go.aist.rtm.systemeditor/plugin.properties 2018-02-15 15:23:01 UTC (rev 796)
+++ trunk/rtmtools/jp.go.aist.rtm.systemeditor/plugin.properties 2018-02-15 15:23:16 UTC (rev 797)
@@ -51,17 +51,18 @@
Open_New_System_Editor_Label =Open New System Editor
# popupMenus
-All_Stop =All Stop
-All_Start =All Start
-All_Deactivate =All Deactivate
-All_Activate =All Activate
+All_Stop =All Stop (&N)
+All_Start =All Start (&B)
+All_Deactivate =All Deactivate (&H)
+All_Activate =All Activate (&G)
+All_Exit =All Exit (&F)
-Exit =Exit
-Reset =Reset
-Deactivate =Deactivate
-Activate =Activate
-Stop =Stop
-Start =Start
+Exit =Exit (&E)
+Reset =Reset (&Q)
+Deactivate =Deactivate (&W)
+Activate =Activate (&A)
+Stop =Stop (&X)
+Start =Start (&Z)
Create_Composite_Component =Create Composite Component
Decompose_Composite_Component =Decompose Composite Component
Modified: trunk/rtmtools/jp.go.aist.rtm.systemeditor/plugin.xml
===================================================================
--- trunk/rtmtools/jp.go.aist.rtm.systemeditor/plugin.xml 2018-02-15 15:23:01 UTC (rev 796)
+++ trunk/rtmtools/jp.go.aist.rtm.systemeditor/plugin.xml 2018-02-15 15:23:16 UTC (rev 797)
@@ -98,6 +98,14 @@
<editorContribution
targetID="jp.go.aist.rtm.systemeditor.ui.editor.SystemDiagramEditor"
id="jp.go.aist.rtm.systemeditor.ui.editor.SystemDiagramEditor.editorActions">
+ <action id="jp.go.aist.rtm.systemeditor.ui.action.AllComponentActionDelegate.AllExit"
+ label="%All_Exit"
+ toolbarPath="additions"
+ icon="icons/Exit.png"
+ tooltip="%All_Exit"
+ helpContextId=""
+ class="jp.go.aist.rtm.systemeditor.ui.action.AllComponentActionDelegate">
+ </action>
<action id="jp.go.aist.rtm.systemeditor.ui.action.AllComponentActionDelegate.AllStop"
label="%All_Stop"
toolbarPath="additions"
@@ -159,6 +167,14 @@
<viewerContribution
id="jp.go.aist.rtm.systemeditor.ui.editor.SystemDiagramEditor.contribution"
targetID="jp.go.aist.rtm.systemeditor.ui.editor.SystemDiagramEditor">
+ <action id="jp.go.aist.rtm.systemeditor.ui.action.AllComponentActionDelegate.AllExit"
+ label="%All_Exit"
+ menubarPath="all"
+ icon="icons/Exit.png"
+ tooltip="%All_Exit"
+ helpContextId=""
+ class="jp.go.aist.rtm.systemeditor.ui.action.AllComponentActionDelegate">
+ </action>
<action id="jp.go.aist.rtm.systemeditor.ui.action.AllComponentActionDelegate.AllStop"
label="%All_Stop"
menubarPath="all"
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 2018-02-15 15:23:01 UTC (rev 796)
+++ trunk/rtmtools/jp.go.aist.rtm.systemeditor/src/jp/go/aist/rtm/systemeditor/nl/messages.properties 2018-02-15 15:23:16 UTC (rev 797)
@@ -31,6 +31,7 @@
AllComponentActionDelegate.6=Are you sure you want to stop all components?
AllComponentActionDelegate.7=Are you sure you want to activate all components?
AllComponentActionDelegate.8=Are you sure you want to deactivate all components?
+AllComponentActionDelegate.9=Are you sure you want to exit all components?
AllComponentActionDelegate.10=Change the state of the component.
AllComponentActionDelegate.11=Sending a request to the component...
AllComponentActionDelegate.12=Sent the request to the component.
Modified: trunk/rtmtools/jp.go.aist.rtm.systemeditor/src/jp/go/aist/rtm/systemeditor/ui/action/AllComponentActionDelegate.java
===================================================================
--- trunk/rtmtools/jp.go.aist.rtm.systemeditor/src/jp/go/aist/rtm/systemeditor/ui/action/AllComponentActionDelegate.java 2018-02-15 15:23:01 UTC (rev 796)
+++ trunk/rtmtools/jp.go.aist.rtm.systemeditor/src/jp/go/aist/rtm/systemeditor/ui/action/AllComponentActionDelegate.java 2018-02-15 15:23:16 UTC (rev 797)
@@ -57,6 +57,13 @@
.getName()
+ ".AllDeactivate"; //$NON-NLS-1$
+ /**
+ * AllExitに使用されるID。この値が、Plugin.XMLに指定されなければならない。
+ */
+ public static final String ALL_EXIT_ACTION_ID = AllComponentActionDelegate.class
+ .getName()
+ + ".AllExit"; //$NON-NLS-1$
+
private SystemDiagramEditor targetEditor;
/**
@@ -76,11 +83,12 @@
comfirmMessage = Messages.getString("AllComponentActionDelegate.7"); //$NON-NLS-1$
} else if (ALL_DEACTIVATE_ACTION_ID.equals(action.getId())) {
comfirmMessage = Messages.getString("AllComponentActionDelegate.8"); //$NON-NLS-1$
+ } else if (ALL_EXIT_ACTION_ID.equals(action.getId())) {
+ comfirmMessage = Messages.getString("AllComponentActionDelegate.9"); //$NON-NLS-1$
}
boolean isOk = true;
- if (SystemEditorPreferenceManager.getInstance()
- .isConfirmComponentAction()) {
+ if (SystemEditorPreferenceManager.getInstance().isConfirmComponentAction() || ALL_EXIT_ACTION_ID.equals(action.getId()) ) {
isOk = MessageDialog.openConfirm(targetEditor.getSite()
.getShell(), Messages.getString("Common.dialog.confirm_title"), comfirmMessage); //$NON-NLS-1$
}
@@ -108,6 +116,9 @@
} else if (ALL_DEACTIVATE_ACTION_ID.equals(action
.getId())) {
doAllDectivate(systemDiagram);
+ } else if (ALL_EXIT_ACTION_ID.equals(action
+ .getId())) {
+ doAllExit(systemDiagram);
}
} catch (Exception e) {
throw new InvocationTargetException(e);
@@ -175,6 +186,17 @@
});
}
+ private void doAllExit(SystemDiagram systemDiagram) {
+ systemDiagram.accept(new Visiter() {
+ @SuppressWarnings("unchecked")
+ public void visit(ModelElement element) {
+ if (element instanceof CorbaComponent) {
+ ((CorbaComponent) element).exitR();
+ }
+ }
+ });
+ }
+
public void setActiveEditor(IAction action, IEditorPart targetEditor) {
this.targetEditor = (SystemDiagramEditor) targetEditor;
}
More information about the openrtm-commit
mailing list