[openrtm-commit:02644] r741 - trunk/rtmtools/jp.go.aist.rtm.systemeditor/src/jp/go/aist/rtm/systemeditor/ui/views/managercontrolview

openrtm @ openrtm.org openrtm @ openrtm.org
2017年 6月 19日 (月) 13:02:01 JST


Author: ga
Date: 2017-06-19 13:02:01 +0900 (Mon, 19 Jun 2017)
New Revision: 741

Modified:
   trunk/rtmtools/jp.go.aist.rtm.systemeditor/src/jp/go/aist/rtm/systemeditor/ui/views/managercontrolview/ManagerControlView.java
Log:
Modified Manager View #4122

Modified: trunk/rtmtools/jp.go.aist.rtm.systemeditor/src/jp/go/aist/rtm/systemeditor/ui/views/managercontrolview/ManagerControlView.java
===================================================================
--- trunk/rtmtools/jp.go.aist.rtm.systemeditor/src/jp/go/aist/rtm/systemeditor/ui/views/managercontrolview/ManagerControlView.java	2017-06-19 03:29:47 UTC (rev 740)
+++ trunk/rtmtools/jp.go.aist.rtm.systemeditor/src/jp/go/aist/rtm/systemeditor/ui/views/managercontrolview/ManagerControlView.java	2017-06-19 04:02:01 UTC (rev 741)
@@ -263,8 +263,9 @@
 				dialog.setModuleProfileList(targetManager
 						.getLoadableModuleProfilesR());
 				//
+				buildManagerData();
 				List<String> managerList = new ArrayList<String>();
-				for(Profile manager : profileList) {
+				for (Profile manager : profileList) {
 					managerList.add(manager.getManager_name());
 				}
 				dialog.setManagerNameList(managerList);
@@ -409,24 +410,33 @@
 				this.modulesTableViewer.setInput(this.profileList);
 
 			} else if (this.isSelectedManagers) {
-				if(managerList == null) {
-					managerList = new ArrayList<RTCManager>();
-				}
-				managerList.clear();
-				
-				this.profileList.add(new Profile(this.targetManager.getProfileR()));
-				managerList.add(targetManager);
-				for (RTCManager manager : this.targetManager
-						.getSlaveManagersR()) {
-					this.profileList.add(new Profile(manager.getProfileR()));
-					managerList.add(manager);
-				}
-				this.modulesTableViewer.setInput(this.profileList);
+				buildManagerData();
 			}
 		}
 		updateEnableButton();
 	}
 
+	private void buildManagerData() {
+		if(managerList == null) {
+			managerList = new ArrayList<RTCManager>();
+		}
+		managerList.clear();
+		//
+		if (this.profileList == null) {
+			this.profileList = new ArrayList<Profile>();
+		}
+		this.profileList.clear();
+		
+		this.profileList.add(new Profile(this.targetManager.getProfileR()));
+		managerList.add(targetManager);
+		for (RTCManager manager : this.targetManager
+				.getSlaveManagersR()) {
+			this.profileList.add(new Profile(manager.getProfileR()));
+			managerList.add(manager);
+		}
+		this.modulesTableViewer.setInput(this.profileList);
+	}
+
 	private void updateEnableButton() {
 		this.configureButton.setEnabled(false);
 		this.restartButton.setEnabled(false);



More information about the openrtm-commit mailing list