[openrtm-commit:01203] r512 - in branches/work_ForRTMSafety/rtmtools/jp.go.aist.rtm.systemeditor/src/jp/go/aist/rtm/systemeditor/ui/editor: . dnd

openrtm @ openrtm.org openrtm @ openrtm.org
2014年 1月 30日 (木) 11:59:41 JST


Author: win-ei
Date: 2014-01-30 11:59:41 +0900 (Thu, 30 Jan 2014)
New Revision: 512

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/dnd/SystemDiagramDropTargetListener.java
Log:
Deleted processings for debugging.

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-30 01:51:40 UTC (rev 511)
+++ branches/work_ForRTMSafety/rtmtools/jp.go.aist.rtm.systemeditor/src/jp/go/aist/rtm/systemeditor/ui/editor/AbstractSystemDiagramEditor.java	2014-01-30 02:59:41 UTC (rev 512)
@@ -531,7 +531,6 @@
 	protected void save(IFile file, IProgressMonitor progressMonitor)
 			throws CoreException {
 		
-		System.out.println("AbstractSystemDiagramEditor.save() entry");
 		List<AbstractSystemDiagramEditor> editors = new ArrayList<AbstractSystemDiagramEditor>();
 		editors.add(this);
 		
@@ -590,7 +589,6 @@
 			// 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
@@ -603,30 +601,16 @@
 			SystemDiagram diagram = systemDiagram.getRootDiagram();
 			RtsProfileExt profile = handler.save(diagram);
 			diagram.setProfile(profile);
-			System.out.println("save 200 ");
 			//
 			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.print(" "+com.getOutportDirection()+" "+com.getCompositeTypeL()+" "+com.getComponentId());
-				System.out.println(" "+com.getLanguage());
-			}
 			//
-			System.out.println("save 210 ");
 
 			// STEP3: 拡張ポイント (RTSプロファイル保存前)
 			progressMonitor.worked(3);
 
-			System.out.println("save 300");
-			System.out.println(profile);
 			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();
@@ -638,7 +622,6 @@
 					}
 				}
 			}
-			System.out.println("save 320");
 
 			// STEP4: RTSプロファイルオブジェクトをファイルへ保存
 			progressMonitor.worked(4);
@@ -683,7 +666,6 @@
 					final String TEMPLATE_PATH = "jp/go/aist/rtm/systemeditor/template";
 					String tablepath = file.getLocation().toOSString();
 					int lastDotPos = tablepath.lastIndexOf(File.separator);
-					System.out.println("save 475 tablepath.lastIndexOf('.')="+lastDotPos);
 					if (lastDotPos == -1) 
 					{
 						;
@@ -703,7 +685,6 @@
 					newdir.mkdir();
 					File makedir = new File(makepath);
 					makedir.mkdir();
-					System.out.println("save 476 tablepath="+tablepath);
 					Map<String, Object> contextMap = new HashMap<String, Object>();
 					contextMap.put("tablepath", tablepath);
 					contextMap.put("makepath", makepath);
@@ -764,7 +745,6 @@
 					.getClass().getName(), 0, Messages.getString("AbstractSystemDiagramEditor.28"), e); //$NON-NLS-1$
 			throw new CoreException(status);
 		}
-		System.out.println("AbstractSystemDiagramEditor.save() return");
 	}
 
 	private Component getLocalObject(SystemDiagram systemDiagram,
@@ -1163,7 +1143,6 @@
 			connsMap.put(conn.getTargetDataPort().getPortName().replace(".", "_"),conn.getSourceDataPort().getPortName().replace(".", "_"));
 		}
 		contextMap.put("connectPorts", connsMap);
-		System.out.println("generateDataPortConctTbl 050");
 		GeneratedResult gr = jp.go.aist.rtm.toolscommon.util.TemplateUtil.createGeneratedResult(ins, contextMap, dataPortContct);
 		if (ins != null) 
 		{
@@ -1176,7 +1155,6 @@
 		pw.println(gr.getCode());
 		pw.close();
 
-		//System.out.println(gr.getCode());
 		}
 		catch(Exception e)
 		{
@@ -1197,7 +1175,6 @@
 		String dataPortContct = tablepath+File.separator+"DataPortCreateTbl.c";
 		RtsProfileExt profile = (RtsProfileExt)contextMap.get("profile");
 		List<org.openrtp.namespaces.rts.version02.Component> componetns = profile.getComponents();
-		System.out.println("componetns.size():"+componetns.size());
 		ArrayList<String> complist = new ArrayList<String>();
 		for(org.openrtp.namespaces.rts.version02.Component comp :componetns)
 		{
@@ -1213,7 +1190,6 @@
 				complist.add(comp.getInstanceName()); 
 			}
 		}
-		System.out.println("complist.size():"+complist.size());
 		contextMap.put("ports", complist);
 		GeneratedResult gr = TemplateUtil.createGeneratedResult(ins, contextMap, dataPortContct);
 		if (ins != null) 
@@ -1226,7 +1202,6 @@
 		PrintWriter pw = new PrintWriter(bw);
 		pw.println(gr.getCode());
 		pw.close();
-		//System.out.println(gr.getCode());
 		}
 		catch(Exception e)
 		{
@@ -1265,7 +1240,6 @@
 		PrintWriter pw = new PrintWriter(bw);
 		pw.println(gr.getCode());
 		pw.close();
-		//System.out.println(gr.getCode());
 		}
 		catch(Exception e)
 		{
@@ -1304,7 +1278,6 @@
 		PrintWriter pw = new PrintWriter(bw);
 		pw.println(gr.getCode());
 		pw.close();
-		//System.out.println(gr.getCode());
 		}
 		catch(Exception e)
 		{
@@ -1343,7 +1316,6 @@
 		PrintWriter pw = new PrintWriter(bw);
 		pw.println(gr.getCode());
 		pw.close();
-		//System.out.println(gr.getCode());
 		}
 		catch(Exception e)
 		{
@@ -1373,7 +1345,6 @@
 		PrintWriter pw = new PrintWriter(bw);
 		pw.println(gr.getCode());
 		pw.close();
-		//System.out.println(gr.getCode());
 		}
 		catch(Exception e)
 		{
@@ -1412,7 +1383,6 @@
 		PrintWriter pw = new PrintWriter(bw);
 		pw.println(gr.getCode());
 		pw.close();
-		//System.out.println(gr.getCode());
 		}
 		catch(Exception e)
 		{
@@ -1451,7 +1421,6 @@
 		PrintWriter pw = new PrintWriter(bw);
 		pw.println(gr.getCode());
 		pw.close();
-		//System.out.println(gr.getCode());
 		}
 		catch(Exception e)
 		{
@@ -1493,7 +1462,6 @@
 		PrintWriter pw = new PrintWriter(bw);
 		pw.println(gr.getCode());
 		pw.close();
-		//System.out.println(gr.getCode());
 		cl = Thread.currentThread().getContextClassLoader();
 		ins = cl.getResourceAsStream(template);
 		contextMap.put("build_config", "Release");

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-30 01:51:40 UTC (rev 511)
+++ branches/work_ForRTMSafety/rtmtools/jp.go.aist.rtm.systemeditor/src/jp/go/aist/rtm/systemeditor/ui/editor/dnd/SystemDiagramDropTargetListener.java	2014-01-30 02:59:41 UTC (rev 512)
@@ -53,39 +53,30 @@
 
 	@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;
@@ -100,30 +91,24 @@
 				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可能
@@ -134,14 +119,11 @@
 		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;
 	}
 



More information about the openrtm-commit mailing list