[openrtm-commit:01149] r459 - in branches/work_ForRTMSafety/rtmtools: jp.go.aist.rtm.repositoryView/src/jp/go/aist/rtm/repositoryView/repository jp.go.aist.rtm.repositoryView/src/jp/go/aist/rtm/repositoryView/ui/action jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/ui/editors jp.go.aist.rtm.systemeditor/src/jp/go/aist/rtm/systemeditor/ui/editor jp.go.aist.rtm.systemeditor/src/jp/go/aist/rtm/systemeditor/ui/editor/dnd jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/model/component jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/model/component/impl jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/util jp.go.aist.rtm.toolscommon.profiles/src/jp/go/aist/rtm/toolscommon/profiles/util

openrtm @ openrtm.org openrtm @ openrtm.org
2014年 1月 13日 (月) 16:53:56 JST


Author: win-ei
Date: 2014-01-13 16:53:56 +0900 (Mon, 13 Jan 2014)
New Revision: 459

Modified:
   branches/work_ForRTMSafety/rtmtools/jp.go.aist.rtm.repositoryView/src/jp/go/aist/rtm/repositoryView/repository/RTRepositoryAccesser.java
   branches/work_ForRTMSafety/rtmtools/jp.go.aist.rtm.repositoryView/src/jp/go/aist/rtm/repositoryView/ui/action/ViewActionLoadDirecroty.java
   branches/work_ForRTMSafety/rtmtools/jp.go.aist.rtm.repositoryView/src/jp/go/aist/rtm/repositoryView/ui/action/ViewActionLoadFile.java
   branches/work_ForRTMSafety/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/ui/editors/AbstractEditorFormPage.java
   branches/work_ForRTMSafety/rtmtools/jp.go.aist.rtm.systemeditor/src/jp/go/aist/rtm/systemeditor/ui/editor/AbstractSystemDiagramEditor.java
   branches/work_ForRTMSafety/rtmtools/jp.go.aist.rtm.systemeditor/src/jp/go/aist/rtm/systemeditor/ui/editor/dnd/SystemDiagramDropTargetListener.java
   branches/work_ForRTMSafety/rtmtools/jp.go.aist.rtm.toolscommon.profiles/src/jp/go/aist/rtm/toolscommon/profiles/util/XmlHandler.java
   branches/work_ForRTMSafety/rtmtools/jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/model/component/Component.java
   branches/work_ForRTMSafety/rtmtools/jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/model/component/ComponentPackage.java
   branches/work_ForRTMSafety/rtmtools/jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/model/component/impl/ComponentImpl.java
   branches/work_ForRTMSafety/rtmtools/jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/model/component/impl/ComponentPackageImpl.java
   branches/work_ForRTMSafety/rtmtools/jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/util/RtcProfileHandler.java
   branches/work_ForRTMSafety/rtmtools/jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/util/RtsProfileHandler.java
Log:
Added the getLanguage() and setLanguage() method to jp.go.aist.rtm.toolscommon.model.component interface.

Modified: branches/work_ForRTMSafety/rtmtools/jp.go.aist.rtm.repositoryView/src/jp/go/aist/rtm/repositoryView/repository/RTRepositoryAccesser.java
===================================================================
--- branches/work_ForRTMSafety/rtmtools/jp.go.aist.rtm.repositoryView/src/jp/go/aist/rtm/repositoryView/repository/RTRepositoryAccesser.java	2014-01-11 08:05:03 UTC (rev 458)
+++ branches/work_ForRTMSafety/rtmtools/jp.go.aist.rtm.repositoryView/src/jp/go/aist/rtm/repositoryView/repository/RTRepositoryAccesser.java	2014-01-13 07:53:56 UTC (rev 459)
@@ -154,17 +154,22 @@
 	 * @throws Exception
 	 */
 	public ComponentSpecification getComponentProfile(ComponentSpecification component) throws Exception {
+		System.out.println("RTRepositoryAccesser.getComponentProfile() entry");
 
 		RTRepositoryClientFactory factory = RTRepositoryClientFactory.getInstance();
+		System.out.println("RTRepositoryAccesser.getComponentProfile() 010 "+component.getPathId());
 		RTRepositoryClient client = factory.create(component.getPathId());
 		ItemCategory itemCategory = ItemCategory.RTC;
 		String targetXML = client.downloadProfile(component.getComponentId(), itemCategory);
+		System.out.println("RTRepositoryAccesser.getComponentProfile() 020 targetXML="+component.getPathId());
 		RtcProfileHandler handler = new RtcProfileHandler();
     	ComponentSpecification specification  = handler.createComponentFromXML(targetXML);
 		specification.setAliasName(component.getAliasName());
 		specification.setComponentId(component.getComponentId());
 		specification.setPathId(component.getPathId());
 		
+		System.out.println("RTRepositoryAccesser.getComponentProfile() 060"+specification.getRtcType());
+		System.out.println("RTRepositoryAccesser.getComponentProfile() return");
 		return specification;
 	}
 

Modified: branches/work_ForRTMSafety/rtmtools/jp.go.aist.rtm.repositoryView/src/jp/go/aist/rtm/repositoryView/ui/action/ViewActionLoadDirecroty.java
===================================================================
--- branches/work_ForRTMSafety/rtmtools/jp.go.aist.rtm.repositoryView/src/jp/go/aist/rtm/repositoryView/ui/action/ViewActionLoadDirecroty.java	2014-01-11 08:05:03 UTC (rev 458)
+++ branches/work_ForRTMSafety/rtmtools/jp.go.aist.rtm.repositoryView/src/jp/go/aist/rtm/repositoryView/ui/action/ViewActionLoadDirecroty.java	2014-01-13 07:53:56 UTC (rev 459)
@@ -38,6 +38,7 @@
 
 	@SuppressWarnings("unchecked")
 	public void run(IAction action) {
+		System.out.println("ViewActionLoadDirecroty.run() entry");
 
 		DirectoryDialog directoryDialog = new DirectoryDialog(view.getSite().getShell(),SWT.NULL);
 		directoryDialog.setText(Messages.getString("ViewActionLoadDirecroty.0")); //$NON-NLS-1$
@@ -87,6 +88,7 @@
 			RepositoryViewFactory.buildTree(itemFirst, module, RepositoryViewLeafItem.RTC_LEAF);
 		}
     	viewer.refresh();
+		System.out.println("ViewActionLoadDirecroty.run() return");
 	}
 
 	public void selectionChanged(IAction action, ISelection selection) {

Modified: branches/work_ForRTMSafety/rtmtools/jp.go.aist.rtm.repositoryView/src/jp/go/aist/rtm/repositoryView/ui/action/ViewActionLoadFile.java
===================================================================
--- branches/work_ForRTMSafety/rtmtools/jp.go.aist.rtm.repositoryView/src/jp/go/aist/rtm/repositoryView/ui/action/ViewActionLoadFile.java	2014-01-11 08:05:03 UTC (rev 458)
+++ branches/work_ForRTMSafety/rtmtools/jp.go.aist.rtm.repositoryView/src/jp/go/aist/rtm/repositoryView/ui/action/ViewActionLoadFile.java	2014-01-13 07:53:56 UTC (rev 459)
@@ -38,6 +38,7 @@
 
 	@SuppressWarnings("unchecked")
 	public void run(IAction action) {
+		System.out.println("ViewActionLoadFile.run() entry");
 
 		//対象ファイルの選択
 		FileDialog fileDialog = new FileDialog(view.getSite().getShell(), SWT.OPEN);
@@ -45,6 +46,7 @@
 		fileDialog.setFilterExtensions(new String[]{"*.xml"}); //$NON-NLS-1$
 		String targetFileName = fileDialog.open();
 		if( targetFileName==null ) return;
+		System.out.println("ViewActionLoadFile.run() 005 targetFileName="+targetFileName);
 		
 		ComponentSpecification module = null;
     	RtcProfileHandler handler = new RtcProfileHandler();
@@ -82,6 +84,7 @@
  		}
 		RepositoryViewFactory.buildTree(itemFirst, module, RepositoryViewLeafItem.RTC_LEAF);
 		viewer.refresh();
+		System.out.println("ViewActionLoadFile.run() return");
 	}
 
 	public void selectionChanged(IAction action, ISelection selection) {

Modified: branches/work_ForRTMSafety/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/ui/editors/AbstractEditorFormPage.java
===================================================================
--- branches/work_ForRTMSafety/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/ui/editors/AbstractEditorFormPage.java	2014-01-11 08:05:03 UTC (rev 458)
+++ branches/work_ForRTMSafety/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/ui/editors/AbstractEditorFormPage.java	2014-01-13 07:53:56 UTC (rev 459)
@@ -463,10 +463,24 @@
 	}
 	
 	protected String[] extractDataTypes() {
+		System.out.println("AbstractEditorFormPage.extractDataTypes() entry");
 		String FS = System.getProperty("file.separator");
+		System.out.print("AbstractEditorFormPage.extractDataTypes() 010 ");
+		System.out.println(FS);
 		List<String> sources = new ArrayList<String>(DataTypePreferenceManager
 				.getInstance().getIdlFileDirectories());
+		System.out.print("AbstractEditorFormPage.extractDataTypes() 020");
+		//<+zxc
+		for(String str: sources)
+		{
+			System.out.print(str);
+			System.out.print(" ");
+		}
+		System.out.println(" ");
+		//zxc+>
 		String defaultPath = System.getenv("RTM_ROOT");
+		System.out.print("AbstractEditorFormPage.extractDataTypes() 030 ");
+		System.out.println(defaultPath);
 		int baseindex = -1;
 		if (defaultPath != null) {
 			baseindex = 0;
@@ -476,8 +490,15 @@
 			sources.add(0, defaultPath + "rtm" + FS + "idl");
 		}
 		List<DataTypeParam> sourceContents = new ArrayList<DataTypeParam>();
+		System.out.println("AbstractEditorFormPage.extractDataTypes() 040 ");
+		System.out.print("  ");
 		for (int intidx = 0; intidx < sources.size(); intidx++) {
 			String source = sources.get(intidx);
+			System.out.print("[");
+			System.out.print(intidx);
+			System.out.print("]");
+			System.out.print(source);
+			System.out.print(" ");
 			try {
 				File idlDir = new File(source);
 				String[] list = idlDir.list();
@@ -495,6 +516,8 @@
 						return a.compareTo(b);
 					}
 				});
+				System.out.println(" ");
+				System.out.print("    ");
 				for (String idlName : idlNames) {
 					String idlContent = FileUtil
 							.readFile(source + FS + idlName);
@@ -502,15 +525,19 @@
 					param.setContent(idlContent);
 					param.setFullPath(source + FS + idlName);
 					sourceContents.add(param);
+					System.out.print(param);
+					System.out.print(" ");
 					if( baseindex<intidx) {
 						param.setAddition(true);
 					}
 				}
+				System.out.println(" ");
 			} catch (IOException e) {
 				e.printStackTrace();
 			} catch (java.lang.SecurityException e) {
 				e.printStackTrace();
 			}
+			System.out.println(" ");
 		}
 		String[] defaultTypeList = new String[0];
 		List<String> dataTypes = new ArrayList<String>();
@@ -524,6 +551,7 @@
 		editor.getGeneratorParam().getDataTypeParams().addAll(sourceContents);
 		//
 
+		System.out.println("AbstractEditorFormPage.extractDataTypes() return");
 		return defaultTypeList;
 	}
 

Modified: branches/work_ForRTMSafety/rtmtools/jp.go.aist.rtm.systemeditor/src/jp/go/aist/rtm/systemeditor/ui/editor/AbstractSystemDiagramEditor.java
===================================================================
--- branches/work_ForRTMSafety/rtmtools/jp.go.aist.rtm.systemeditor/src/jp/go/aist/rtm/systemeditor/ui/editor/AbstractSystemDiagramEditor.java	2014-01-11 08:05:03 UTC (rev 458)
+++ branches/work_ForRTMSafety/rtmtools/jp.go.aist.rtm.systemeditor/src/jp/go/aist/rtm/systemeditor/ui/editor/AbstractSystemDiagramEditor.java	2014-01-13 07:53:56 UTC (rev 459)
@@ -513,6 +513,7 @@
 	protected void save(IFile file, IProgressMonitor progressMonitor)
 			throws CoreException {
 		
+		System.out.println("save() entry");
 		List<AbstractSystemDiagramEditor> editors = new ArrayList<AbstractSystemDiagramEditor>();
 		editors.add(this);
 		
@@ -571,6 +572,7 @@
 			// STEP1: リソースを作成
 			progressMonitor.worked(1);
 
+			System.out.println("save 050 file="+file.getLocation().toOSString());
 			Resource resource = null;
 			ResourceSet resourceSet = new ResourceSetImpl();
 			resource = resourceSet.createResource(URI.createFileURI(file
@@ -583,13 +585,36 @@
 			SystemDiagram diagram = systemDiagram.getRootDiagram();
 			RtsProfileExt profile = handler.save(diagram);
 			diagram.setProfile(profile);
+			System.out.println("save 200 ");
+			//<+zxc
+			org.eclipse.emf.common.util.EList<jp.go.aist.rtm.toolscommon.model.component.Component> coms = diagram.getComponents();
+			for(jp.go.aist.rtm.toolscommon.model.component.Component com : coms)
+			{
+				System.out.print(" "+com.getTypeNameL()+" "+com.getComponentId()+" "+com.getPath());
+				System.out.print(" "+com.getInstanceNameL()+" "+com.getVenderL()+" "+com.getDescriptionL());
+				System.out.print(" "+com.getCategoryL()+" "+com.getTypeNameL()+" "+com.getVersionL());
+				System.out.println(" "+com.getOutportDirection()+" "+com.getCompositeTypeL()+" "+com.getComponentId());
+			}
+			//zxc+>
+			System.out.println("save 210 ");
 
 			// STEP3: 拡張ポイント (RTSプロファイル保存前)
 			progressMonitor.worked(3);
 
+			System.out.println("save 300");
+			System.out.println(profile);
+			//<+zxc
+   			//List<Property> props = profile.getProperties();
+			//for(Property prop : props)
+			//{
+			//	System.out.println(prop);
+			//}
+			//zxc+>
 			ProfileSaver creator = new ProfileSaver();
 			for (SaveProfileExtension.ErrorInfo info : creator.preSave(
 					diagram, profile)) {
+				System.out.println("save 310");
+				//System.out.println(info.getMessage());
 				if (info.isError()) {
 					openError(DIALOG_TITLE_ERROR, info.getMessage());
 					progressMonitor.done();
@@ -601,6 +626,7 @@
 					}
 				}
 			}
+			System.out.println("save 320");
 
 			// STEP4: RTSプロファイルオブジェクトをファイルへ保存
 			progressMonitor.worked(4);
@@ -646,6 +672,7 @@
 					.getClass().getName(), 0, Messages.getString("AbstractSystemDiagramEditor.28"), e); //$NON-NLS-1$
 			throw new CoreException(status);
 		}
+		System.out.println("save() return");
 	}
 
 	private Component getLocalObject(SystemDiagram systemDiagram,

Modified: branches/work_ForRTMSafety/rtmtools/jp.go.aist.rtm.systemeditor/src/jp/go/aist/rtm/systemeditor/ui/editor/dnd/SystemDiagramDropTargetListener.java
===================================================================
--- branches/work_ForRTMSafety/rtmtools/jp.go.aist.rtm.systemeditor/src/jp/go/aist/rtm/systemeditor/ui/editor/dnd/SystemDiagramDropTargetListener.java	2014-01-11 08:05:03 UTC (rev 458)
+++ branches/work_ForRTMSafety/rtmtools/jp.go.aist.rtm.systemeditor/src/jp/go/aist/rtm/systemeditor/ui/editor/dnd/SystemDiagramDropTargetListener.java	2014-01-13 07:53:56 UTC (rev 459)
@@ -53,30 +53,39 @@
 
 	@Override
 	protected void updateTargetRequest() {
+		System.out.println("updateTargetRequest() entry");
 		((CreateRequest) getTargetRequest()).setLocation(getDropLocation());
+		System.out.println("updateTargetRequest() return");
 	}
 
 	@Override
 	protected Request createTargetRequest() {
+		System.out.println("createTargetRequest() entry");
 		ComponentFactory factory = new ComponentFactory();
 		List<Component> components = getComponents();
 		setComponents(factory, components);
 
 		CreateRequest result = new CreateRequest(); // nullObjectとして返す。
 		result.setFactory(factory);
+		System.out.println("createTargetRequest() return");
 		return result;
 	}
 
 	void setComponents(ComponentFactory factory, List<Component> components) {
+		System.out.println("setComponents() entry");
 		if (components == null || components.isEmpty()) {
+			System.out.println("setComponents() return 0");
 			return;
 		}
 		for (Component c : components) {
+			System.out.println("setComponents() c.getLanguage()="+c.getLanguage());
 			factory.addComponent(c);
 		}
+		System.out.println("setComponents() return 1");
 	}
 
 	List<Component> getComponents() {
+		System.out.println("getComponents() entry");
 		List<Component> result = new ArrayList<Component>();
 		if (getCurrentEvent().data instanceof IStructuredSelection) {
 			IStructuredSelection selection = (IStructuredSelection) getCurrentEvent().data;
@@ -91,24 +100,30 @@
 				if (isOnline() && obj instanceof NamingObjectNode) {
 					result.add(comp);
 				} else if (!isOnline() && obj instanceof RTCRVLeafItem) {
+					System.out.println("getComponents() offline add");
 					result.add(comp);
 				}
 			}
 		}
+		System.out.println("getComponents() return");
 		return result;
 	}
 
 	@Override
 	protected void handleDrop() {
+		System.out.println("handleDrop() entry");
 		IStructuredSelection selection = (IStructuredSelection) LocalSelectionTransfer
 				.getInstance().getSelection();
 		getCurrentEvent().data = selection;
 		super.handleDrop();
+		System.out.println("handleDrop() return");
 	}
 
 	@Override
 	public boolean isEnabled(DropTargetEvent event) {
+		System.out.println("isEnabled() entry");
 		if (!super.isEnabled(event)) {
+			System.out.println("isEnabled() return false 0");
 			return false;
 		}
 		// オンラインエディタへは NameServiceViewから DnD可能
@@ -119,11 +134,14 @@
 		while (iter.hasNext()) {
 			Object obj = iter.next();
 			if (isOnline() && obj instanceof NamingObjectNode) {
+				System.out.println("isEnabled() return true 0");
 				return true;
 			} else if (!isOnline() && obj instanceof RTCRVLeafItem) {
+				System.out.println("isEnabled() return true 1");
 				return true;
 			}
 		}
+		System.out.println("isEnabled() return false 1");
 		return false;
 	}
 

Modified: branches/work_ForRTMSafety/rtmtools/jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/model/component/Component.java
===================================================================
--- branches/work_ForRTMSafety/rtmtools/jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/model/component/Component.java	2014-01-11 08:05:03 UTC (rev 458)
+++ branches/work_ForRTMSafety/rtmtools/jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/model/component/Component.java	2014-01-13 07:53:56 UTC (rev 459)
@@ -751,4 +751,7 @@
 	 */
 	boolean isDead();
 
+	String getLanguage();
+	void setLanguage(String lang);
+
 } // Component

Modified: branches/work_ForRTMSafety/rtmtools/jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/model/component/ComponentPackage.java
===================================================================
--- branches/work_ForRTMSafety/rtmtools/jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/model/component/ComponentPackage.java	2014-01-11 08:05:03 UTC (rev 458)
+++ branches/work_ForRTMSafety/rtmtools/jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/model/component/ComponentPackage.java	2014-01-13 07:53:56 UTC (rev 459)
@@ -396,7 +396,9 @@
 	 * @generated
 	 * @ordered
 	 */
-	int COMPONENT_FEATURE_COUNT = CorePackage.WRAPPER_OBJECT_FEATURE_COUNT + 23;
+	int COMPONENT__LANGUAGE_TYPE = CorePackage.WRAPPER_OBJECT_FEATURE_COUNT + 23;
+	//int COMPONENT_FEATURE_COUNT = CorePackage.WRAPPER_OBJECT_FEATURE_COUNT + 23;
+	int COMPONENT_FEATURE_COUNT = CorePackage.WRAPPER_OBJECT_FEATURE_COUNT + 24;
 
 	/**
 	 * The meta object id for the '{@link jp.go.aist.rtm.toolscommon.model.component.impl.CorbaComponentImpl <em>Corba Component</em>}' class.
@@ -633,6 +635,7 @@
 	 * @ordered
 	 */
 	int COMPONENT_SPECIFICATION__REQUIRED = COMPONENT__REQUIRED;
+	int COMPONENT_SPECIFICATION__LANGUAGE_TYPE = COMPONENT__LANGUAGE_TYPE;
 
 	/**
 	 * The feature id for the '<em><b>Alias Name</b></em>' attribute.
@@ -3272,6 +3275,7 @@
 	 * @generated
 	 */
 	EAttribute getComponent_Required();
+	EAttribute getComponent_LanguageType();
 
 	/**
 	 * Returns the meta object for the reference '{@link jp.go.aist.rtm.toolscommon.model.component.Component#getChildSystemDiagram <em>Child System Diagram</em>}'.
@@ -4786,6 +4790,7 @@
 		 * @generated
 		 */
 		EAttribute COMPONENT__REQUIRED = eINSTANCE.getComponent_Required();
+		EAttribute COMPONENT__LANGUAGE_TYPE = eINSTANCE.getComponent_LanguageType();
 
 		/**
 		 * The meta object literal for the '<em><b>Child System Diagram</b></em>' reference feature.

Modified: branches/work_ForRTMSafety/rtmtools/jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/model/component/impl/ComponentImpl.java
===================================================================
--- branches/work_ForRTMSafety/rtmtools/jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/model/component/impl/ComponentImpl.java	2014-01-11 08:05:03 UTC (rev 458)
+++ branches/work_ForRTMSafety/rtmtools/jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/model/component/impl/ComponentImpl.java	2014-01-13 07:53:56 UTC (rev 459)
@@ -388,6 +388,11 @@
 	 */
 	protected boolean required = REQUIRED_EDEFAULT;
 
+	//protected static final String LANGUAGE_TYPE_EDEFAULT = "";
+	protected static final String LANGUAGE_TYPE_EDEFAULT = "Unknown";
+	protected String languageType = LANGUAGE_TYPE_EDEFAULT;
+
+
 	/**
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
@@ -783,6 +788,18 @@
 			eNotify(new ENotificationImpl(this, Notification.SET, ComponentPackage.COMPONENT__PATH_ID, oldPathId, pathId));
 	}
 
+	public String getLanguage()
+	{
+		return languageType;
+	}
+	public void setLanguage(String lang)
+	{
+		String oldLanguageType = languageType;
+		languageType = lang;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, ComponentPackage.COMPONENT__LANGUAGE_TYPE, oldLanguageType, languageType));
+	}
+
 	/**
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
@@ -1153,6 +1170,7 @@
 	 */
 	@Override
 	public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+		System.out.println("eInverseRemove featureID="+featureID);
 		switch (featureID) {
 			case ComponentPackage.COMPONENT__CONFIGURATION_SETS:
 				return ((InternalEList<?>)getConfigurationSets()).basicRemove(otherEnd, msgs);
@@ -1175,6 +1193,8 @@
 	 */
 	@Override
 	public Object eGet(int featureID, boolean resolve, boolean coreType) {
+		System.out.println("eGet entry");
+		System.out.println("eGet featureID="+featureID);
 		switch (featureID) {
 			case ComponentPackage.COMPONENT__CONFIGURATION_SETS:
 				return getConfigurationSets();
@@ -1224,7 +1244,11 @@
 				return getComponentId();
 			case ComponentPackage.COMPONENT__REQUIRED:
 				return isRequired() ? Boolean.TRUE : Boolean.FALSE;
+			case ComponentPackage.COMPONENT__LANGUAGE_TYPE:
+				System.out.println("eGet language");
+				return getLanguage();
 		}
+		System.out.println("eGet return");
 		return super.eGet(featureID, resolve, coreType);
 	}
 
@@ -1236,6 +1260,8 @@
 	@SuppressWarnings("unchecked")
 	@Override
 	public void eSet(int featureID, Object newValue) {
+		System.out.println("eSet entry");
+		System.out.println("eSet featureID="+featureID);
 		switch (featureID) {
 			case ComponentPackage.COMPONENT__CONFIGURATION_SETS:
 				getConfigurationSets().clear();
@@ -1299,8 +1325,13 @@
 			case ComponentPackage.COMPONENT__REQUIRED:
 				setRequired(((Boolean)newValue).booleanValue());
 				return;
+			case ComponentPackage.COMPONENT__LANGUAGE_TYPE:
+				System.out.println("eSet setLanguage newValue="+(String)newValue);
+				setLanguage((String)newValue);
+				return;
 		}
 		super.eSet(featureID, newValue);
+		System.out.println("eSet return");
 	}
 
 	/**
@@ -1310,6 +1341,8 @@
 	 */
 	@Override
 	public void eUnset(int featureID) {
+		System.out.println("eUnset entry");
+		System.out.println("eUnset featureID="+featureID);
 		switch (featureID) {
 			case ComponentPackage.COMPONENT__CONFIGURATION_SETS:
 				getConfigurationSets().clear();
@@ -1368,8 +1401,13 @@
 			case ComponentPackage.COMPONENT__REQUIRED:
 				setRequired(REQUIRED_EDEFAULT);
 				return;
+			case ComponentPackage.COMPONENT__LANGUAGE_TYPE:
+				System.out.println("eUnSet setLanguage newValue="+(String)newValue);
+				setLanguage((String)newValue);
+				return;
 		}
 		super.eUnset(featureID);
+		System.out.println("eUnset return");
 	}
 
 	/**
@@ -1379,6 +1417,8 @@
 	 */
 	@Override
 	public boolean eIsSet(int featureID) {
+		System.out.println("eIsset entry");
+		System.out.println("eIsset featureID="+featureID);
 		switch (featureID) {
 			case ComponentPackage.COMPONENT__CONFIGURATION_SETS:
 				return configurationSets != null && !configurationSets.isEmpty();
@@ -1426,7 +1466,11 @@
 				return COMPONENT_ID_EDEFAULT == null ? componentId != null : !COMPONENT_ID_EDEFAULT.equals(componentId);
 			case ComponentPackage.COMPONENT__REQUIRED:
 				return required != REQUIRED_EDEFAULT;
+			case ComponentPackage.COMPONENT__LANGUAGE_TYPE:
+				System.out.println("eIsset language");
+				return LANGUAGE_TYPE_EDEFAULT == null ? languageType != null : !LANGUAGE_TYPE_EDEFAULT.equals(languageType);
 		}
+		System.out.println("eIsset return");
 		return super.eIsSet(featureID);
 	}
 
@@ -1437,6 +1481,7 @@
 	 */
 	@Override
 	public String toString() {
+		System.out.println("toString entry");
 		if (eIsProxy()) return super.toString();
 
 		StringBuffer result = new StringBuffer(super.toString());
@@ -1463,6 +1508,7 @@
 		result.append(", required: ");
 		result.append(required);
 		result.append(')');
+		System.out.println("toString return");
 		return result.toString();
 	}
 

Modified: branches/work_ForRTMSafety/rtmtools/jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/model/component/impl/ComponentPackageImpl.java
===================================================================
--- branches/work_ForRTMSafety/rtmtools/jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/model/component/impl/ComponentPackageImpl.java	2014-01-11 08:05:03 UTC (rev 458)
+++ branches/work_ForRTMSafety/rtmtools/jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/model/component/impl/ComponentPackageImpl.java	2014-01-13 07:53:56 UTC (rev 459)
@@ -631,7 +631,11 @@
 	public EAttribute getComponent_Required() {
 		return (EAttribute)componentEClass.getEStructuralFeatures().get(22);
 	}
+	public EAttribute getComponent_LanguageType() {
 
+		return (EAttribute)componentEClass.getEStructuralFeatures().get(23);
+	}
+
 	/**
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
@@ -1801,6 +1805,7 @@
 		createEAttribute(componentEClass, COMPONENT__COMPOSITE_TYPE_L);
 		createEAttribute(componentEClass, COMPONENT__COMPONENT_ID);
 		createEAttribute(componentEClass, COMPONENT__REQUIRED);
+		createEAttribute(componentEClass, COMPONENT__LANGUAGE_TYPE);
 
 		componentSpecificationEClass = createEClass(COMPONENT_SPECIFICATION);
 		createEAttribute(componentSpecificationEClass, COMPONENT_SPECIFICATION__ALIAS_NAME);
@@ -2051,6 +2056,8 @@
 		initEAttribute(getComponent_CompositeTypeL(), ecorePackage.getEString(), "compositeTypeL", null, 0, 1, Component.class, IS_TRANSIENT, !IS_VOLATILE, !IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
 		initEAttribute(getComponent_ComponentId(), ecorePackage.getEString(), "componentId", null, 0, 1, Component.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
 		initEAttribute(getComponent_Required(), ecorePackage.getEBoolean(), "required", "false", 0, 1, Component.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+		initEAttribute(getComponent_LanguageType(), ecorePackage.getEString(), "languageType", null, 0, 1, Component.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+		initEAttribute(getComponent_OutportDirection(), ecorePackage.getEString(), "outportDirection", "RIGHT", 0, 1, Component.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
 
 		addEOperation(componentEClass, this.getComponent(), "getAllComponents", 0, -1, IS_UNIQUE, IS_ORDERED);
 

Modified: branches/work_ForRTMSafety/rtmtools/jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/util/RtcProfileHandler.java
===================================================================
--- branches/work_ForRTMSafety/rtmtools/jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/util/RtcProfileHandler.java	2014-01-11 08:05:03 UTC (rev 458)
+++ branches/work_ForRTMSafety/rtmtools/jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/util/RtcProfileHandler.java	2014-01-13 07:53:56 UTC (rev 459)
@@ -42,25 +42,39 @@
 	private final String CATEGORY_COMPOSITE =  "composite.";
 
 	public static boolean validateXml(String targetString) throws Exception {
+		System.out.println("validateXml entry");
 		XmlHandler handler = new XmlHandler();
 		try {
+			System.out.print("validateXml 010 "+targetString);
 			handler.restoreFromXmlRtc(targetString);
 		} catch (IOException e) {
 			throw new Exception("XML Validation Error", e);
 		}
+		System.out.println("validateXml return");
 		return true;
 	}
 
 	public ComponentSpecification createComponentFromXML(String targetXML) throws Exception {
+		System.out.println("createComponentFromXML entry");
 		XmlHandler handler = new XmlHandler();
+		System.out.println("createComponentFromXML 010 "+targetXML);
 		RtcProfile profile = handler.restoreFromXmlRtc(targetXML);
+		System.out.println("createComponentFromXML 011 ");
+		System.out.println("createComponentFromXML 012 Language="+profile.getLanguage().getKind());
 		
 		ComponentSpecification component = profile2ComponentEMF(profile, null);
+		System.out.println("createComponentFromXML 015 Language="+profile.getLanguage().getKind());
+		component.setLanguage(profile.getLanguage().getKind());
+		System.out.println("createComponentFromXML 016 Language="+component.getLanguage());
+		System.out.println("createComponentFromXML 020 "+component.getRtcType());
+		System.out.println("createComponentFromXML return");
 		return component;
 	}
 
 	public ComponentSpecification createComponent(String targetFile) throws Exception  {
 		
+		System.out.println("createComponent entry");
+		System.out.println("createComponent 010 "+targetFile);
 		//対象ファイルの読み込み
 		BufferedReader br = new BufferedReader(new InputStreamReader(new FileInputStream(targetFile), "UTF-8"));
 		String tmp_str = null;
@@ -71,12 +85,14 @@
 	    br.close();
 
 	    ComponentSpecification component = createComponentFromXML(tmp_sb.toString());
+		System.out.println("createComponent return");
 		return component;
 	}
 
 	@SuppressWarnings("static-access")
 	private ComponentSpecification profile2ComponentEMF(RtcProfile module,
 			ComponentSpecification specification) throws Exception {
+		System.out.println("profile2ComponentEMF entry");
 		if( !checkProfile(module) ) throw new Exception("Incorrect Profile.");
 		if (specification == null) {
 			specification = ComponentFactory.eINSTANCE.createComponentSpecification();
@@ -90,6 +106,8 @@
 		specification.setDescriptionL(bi.getDescription());
 		specification.setRtcType(bi.getRtcType());
 		specification.getPorts().addAll(profile2PortEMF(module));
+		//<+zxc
+		//zxc+>
 
 		if (bi instanceof BasicInfoExt) {
 			BasicInfoExt biExt = (BasicInfoExt) bi;
@@ -130,6 +148,7 @@
 				+ specification.getVersionL();
 		specification.setComponentId(moduleId);
 
+		System.out.println("profile2ComponentEMF return");
 		return specification;
 	}
 	

Modified: branches/work_ForRTMSafety/rtmtools/jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/util/RtsProfileHandler.java
===================================================================
--- branches/work_ForRTMSafety/rtmtools/jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/util/RtsProfileHandler.java	2014-01-11 08:05:03 UTC (rev 458)
+++ branches/work_ForRTMSafety/rtmtools/jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/util/RtsProfileHandler.java	2014-01-13 07:53:56 UTC (rev 459)
@@ -51,6 +51,9 @@
 import org.openrtp.namespaces.rts.version02.TargetComponentExt;
 import org.openrtp.namespaces.rts.version02.TargetPort;
 import org.openrtp.namespaces.rts.version02.TargetPortExt;
+//<+zxc
+import org.openrtp.namespaces.rtc.version02.LanguageExt;
+//zxc+>
 
 import RTC.RTObject;
 import RTC.RTObjectHelper;
@@ -271,29 +274,40 @@
 	 */
 	public RtsProfileExt save(
 			jp.go.aist.rtm.toolscommon.model.component.SystemDiagram eDiagram) {
+		System.out.println("RtsProfileHandler.save() entry");
 		this.diagram = eDiagram;
 
 		setOnline(eDiagram.getKind() == SystemDiagramKind.ONLINE_LITERAL);
 		loader.setKind(eDiagram.getKind());
+		System.out.println("RtsProfileHandler.save() 010 "+eDiagram.getKind());
 		originalProfile = eDiagram.getProfile();
+		//<org.openrtp.namespaces.rts.version01.Property> = originalProfile.getProperties()
+		//System.out.println("RtsProfileHandler.save() 015 "+originalProfile.getProperties());
+		System.out.println("RtsProfileHandler.save() 015 "+originalProfile);
 		savedConnectors = new ArrayList<String>();
 
 		factory = new ObjectFactory();
 		RtsProfileExt profile = factory.createRtsProfileExt();
 		profile.setId(eDiagram.getSystemId());
+		System.out.println("RtsProfileHandler.save() 016 getSystemId="+eDiagram.getSystemId());
 		DatatypeFactory dateFactory = new DatatypeFactoryImpl();
 		profile.setCreationDate(dateFactory.newXMLGregorianCalendar(eDiagram.getCreationDate()));
 		profile.setUpdateDate(dateFactory.newXMLGregorianCalendar(eDiagram.getUpdateDate()));
 		profile.setVersion("0.2");
+		System.out.println("RtsProfileHandler.save() 020 "+profile.getProperties());
 
 		populateComponents(eDiagram, profile);
 
 		// プロパティ設定
+		System.out.print("RtsProfileHandler.save() 030 ");
 		for (String key : eDiagram.getPropertyKeys()) {
+			System.out.println(key + " "+profile.getProperties()+" ");
 			setProperty(key, eDiagram.getProperty(key), profile.getProperties());
 		}
+		System.out.println(" ");
 
 		populateFromProfileOnly(profile);
+		System.out.println("RtsProfileHandler.save() return");
 		return profile;
 	}
 
@@ -335,12 +349,15 @@
 	private void populateComponents(
 			jp.go.aist.rtm.toolscommon.model.component.SystemDiagram eDiagram,
 			RtsProfileExt rtsProfile) {
+		System.out.println("populateComponents entry");
 		List<Component> components = rtsProfile.getComponents();
 		for (jp.go.aist.rtm.toolscommon.model.component.Component eComp:
 				eDiagram.getRegisteredComponents()) {
 			ComponentExt target = factory.createComponentExt();
 			target.setId(eComp.getComponentId());
+			System.out.println("populateComponents eComp.getComponentId()="+eComp.getComponentId());
 			target.setPathUri(eComp.getPathId());
+			System.out.println("populateComponents eComp.getPathId()="+eComp.getPathId());
 			target.setInstanceName(eComp.getInstanceNameL());
 			target.setCompositeType(eComp.getCompositeTypeL());
 			target.setIsRequired(eComp.isRequired());
@@ -354,9 +371,12 @@
 			populateConfigurationSet(eComp, target);
 			populateParticipants(eComp, target, original);
 
+			System.out.println("populateComponents 050 eComp.getLanguage()="+eComp.getLanguage());
+
 			populateFromProfileOnly(target, original);
 			components.add(target);
 		}
+		System.out.println("populateComponents return");
 	}
 
 	// Save時にシステムダイアログ内に含まれるデータポートとそれらの接続をRTSプロファイル内にセットする
@@ -630,8 +650,10 @@
 	// Save時にComponentのConfigurationSetの情報をRTSプロファイルにセットする
 	private void populateConfigurationSet(
 			jp.go.aist.rtm.toolscommon.model.component.Component eComp, ComponentExt target) {
+		System.out.println("populateConfigurationSet entry");
 		for (jp.go.aist.rtm.toolscommon.model.component.ConfigurationSet eConfigSet : eComp.getConfigurationSets()) {
 			ConfigurationSet config = factory.createConfigurationSet();
+			System.out.println("populateConfigurationSet 010 getId()="+eConfigSet.getId());
 			config.setId(eConfigSet.getId());
 			for (jp.go.aist.rtm.toolscommon.model.component.NameValue nv : eConfigSet
 					.getConfigurationData()) {
@@ -645,6 +667,7 @@
 				target.setActiveConfigurationSet(eConfigSet.getId());
 			}
 		}
+		System.out.println("populateConfigurationSet return");
 	}
 
 	// Save時に子RTCの情報をRTSプロファイルにセットする
@@ -729,8 +752,10 @@
 	private void populateComponentProperty(
 			jp.go.aist.rtm.toolscommon.model.component.Component eComp,
 			ComponentExt target, Component original) {
+		System.out.println("populateComponentProperty entry");
 		// プロパティ設定
 		for (String key : eComp.getPropertyKeys()) {
+			System.out.println("  key="+key+" eComp.getProperty(key)="+eComp.getProperty(key));
 			//デプロイ情報は除外
 			if(key.equals(KEY_DEPLOY_TYPE) || key.equals(KEY_DEPLOY_TARGET)
 					|| key.equals(KEY_DEPLOY_IOR)) continue;
@@ -738,6 +763,7 @@
 			setProperty(key, eComp.getProperty(key), target.getProperties());
 		}
 		populateIOR(target.getProperties(), eComp);
+		System.out.println("populateComponentProperty return");
 	}
 
 	// Save時にコンポーネントの位置情報をセットする
@@ -774,12 +800,19 @@
 
 	// Save時に元のファイルにあったコンポーネントの拡張属性をセットする
 	private void populateFromProfileOnly(ComponentExt target, Component original) {
-		if (!(original instanceof ComponentExt)) return;
+		System.out.println("populateFromProfileOnly entry");
+		if (!(original instanceof ComponentExt)) 
+		{
+			System.out.println("populateFromProfileOnly return 0");
+			return;
+		}
 		ComponentExt source = (ComponentExt) original;
+		System.out.println("populateFromProfileOnly 010 source.getComment()="+source.getComment());
 		target.setComment(source.getComment());
 		if (!source.isVisible()) {
 			target.setVisible(Boolean.valueOf(source.isVisible()));
 		}
+		System.out.println("populateFromProfileOnly return 1");
 	}
 
 	// Save時にExecutionContextの情報をRTSプロファイルにセットする

Modified: branches/work_ForRTMSafety/rtmtools/jp.go.aist.rtm.toolscommon.profiles/src/jp/go/aist/rtm/toolscommon/profiles/util/XmlHandler.java
===================================================================
--- branches/work_ForRTMSafety/rtmtools/jp.go.aist.rtm.toolscommon.profiles/src/jp/go/aist/rtm/toolscommon/profiles/util/XmlHandler.java	2014-01-11 08:05:03 UTC (rev 458)
+++ branches/work_ForRTMSafety/rtmtools/jp.go.aist.rtm.toolscommon.profiles/src/jp/go/aist/rtm/toolscommon/profiles/util/XmlHandler.java	2014-01-13 07:53:56 UTC (rev 459)
@@ -214,6 +214,8 @@
 	}
 
 	public RtcProfile restoreFromXmlRtc(String targetXML) throws Exception {
+		System.out.println("restoreFromXmlRtc entry");
+		System.out.println(targetXML);
 		RtcProfile result = null;
 	    SAXParserFactory spfactory = SAXParserFactory.newInstance();
 	    SAXParser parser = spfactory.newSAXParser();
@@ -241,12 +243,17 @@
 	    xmlReader = new StringReader(targetXML);
 	    Object profile = ((JAXBElement<?>)unmarshaller.unmarshal(xmlReader)).getValue();
 	    //
+		System.out.println("restoreFromXmlRtc 060");
 	    if( xmlParser.version.equals("0.1") ) {
+		System.out.println("restoreFromXmlRtc 061");
 	    	result = convertRtcProfile01to02(profile);
+		System.out.println("restoreFromXmlRtc 062");
 	    } else {
+		System.out.println("restoreFromXmlRtc 063");
 	    	result = (RtcProfile)profile;
 	    }
 
+		System.out.println("restoreFromXmlRtc return");
 	    return result;
 	}
 	



More information about the openrtm-commit mailing list