[openrtm-commit:01725] r541 - in trunk/rtmtools/jp.go.aist.rtm.rtcbuilder: META-INF src/jp/go/aist/rtm/rtcbuilder src/jp/go/aist/rtm/rtcbuilder/generator src/jp/go/aist/rtm/rtcbuilder/ui/editors src/jp/go/aist/rtm/rtcbuilder/ui/wizard

openrtm @ openrtm.org openrtm @ openrtm.org
2016年 2月 21日 (日) 02:36:36 JST


Author: ga
Date: 2016-02-21 02:36:36 +0900 (Sun, 21 Feb 2016)
New Revision: 541

Modified:
   trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/META-INF/MANIFEST.MF
   trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/AbstractExtensionLoader.java
   trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/ExtensionLoader.java
   trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/Generator.java
   trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/RtcBuilderPlugin.java
   trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/generator/ProfileHandler.java
   trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/ui/editors/AbstractEditorFormPage.java
   trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/ui/editors/BasicEditorFormPage.java
   trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/ui/editors/RtcXmlEditorFormPage.java
   trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/ui/wizard/NewWizard.java
   trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/ui/wizard/RtcExportWizardPage.java
Log:
Modified Logger #3211

Modified: trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/META-INF/MANIFEST.MF
===================================================================
--- trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/META-INF/MANIFEST.MF	2016-02-20 17:36:14 UTC (rev 540)
+++ trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/META-INF/MANIFEST.MF	2016-02-20 17:36:36 UTC (rev 541)
@@ -5,27 +5,42 @@
 Bundle-Name: %pluginName
 Bundle-SymbolicName: jp.go.aist.rtm.rtcbuilder; singleton:=true
 Bundle-Version: 1.1.0.rc4v20130124
-Bundle-ClassPath: .,lib/velocity-1.6.3-dep.jar
+Bundle-ClassPath: .,
+ lib/velocity-1.6.3-dep.jar
 Bundle-Vendor: %providerName
 Bundle-Localization: plugin
-Export-Package: jp.go.aist.rtm.rtcbuilder,jp.go.aist.rtm.rtcbuilder.co
- rba.idl.parser,jp.go.aist.rtm.rtcbuilder.corba.idl.parser.syntaxtree,
- jp.go.aist.rtm.rtcbuilder.corba.idl.parser.visitor,jp.go.aist.rtm.rtc
- builder.extension,jp.go.aist.rtm.rtcbuilder.generator,jp.go.aist.rtm.
- rtcbuilder.generator.param,jp.go.aist.rtm.rtcbuilder.generator.param.
- idl,jp.go.aist.rtm.rtcbuilder.generator.parser,jp.go.aist.rtm.rtcbuil
- der.manager,jp.go.aist.rtm.rtcbuilder.model.component,jp.go.aist.rtm.
- rtcbuilder.model.component.impl,jp.go.aist.rtm.rtcbuilder.model.compo
- nent.util,jp.go.aist.rtm.rtcbuilder.template,jp.go.aist.rtm.rtcbuilde
- r.ui,jp.go.aist.rtm.rtcbuilder.ui.Perspective,jp.go.aist.rtm.rtcbuild
- er.ui.editors,jp.go.aist.rtm.rtcbuilder.ui.parts,jp.go.aist.rtm.rtcbu
- ilder.ui.preference,jp.go.aist.rtm.rtcbuilder.ui.wizard,jp.go.aist.rt
- m.rtcbuilder.util
-Require-Bundle: org.eclipse.ui,org.eclipse.core.runtime,org.eclipse.em
- f.ecore;visibility:=reexport,org.eclipse.compare,org.eclipse.jface.te
- xt,org.eclipse.ui.forms,org.eclipse.core.resources,org.eclipse.gef,or
- g.eclipse.ui.ide,org.eclipse.jdt.ui,jp.go.aist.rtm.toolscommon.profil
- es
+Export-Package: jp.go.aist.rtm.rtcbuilder,
+ jp.go.aist.rtm.rtcbuilder.corba.idl.parser,
+ jp.go.aist.rtm.rtcbuilder.corba.idl.parser.syntaxtree,
+ jp.go.aist.rtm.rtcbuilder.corba.idl.parser.visitor,
+ jp.go.aist.rtm.rtcbuilder.extension,
+ jp.go.aist.rtm.rtcbuilder.generator,
+ jp.go.aist.rtm.rtcbuilder.generator.param,
+ jp.go.aist.rtm.rtcbuilder.generator.param.idl,
+ jp.go.aist.rtm.rtcbuilder.generator.parser,
+ jp.go.aist.rtm.rtcbuilder.manager,
+ jp.go.aist.rtm.rtcbuilder.model.component,
+ jp.go.aist.rtm.rtcbuilder.model.component.impl,
+ jp.go.aist.rtm.rtcbuilder.model.component.util,
+ jp.go.aist.rtm.rtcbuilder.template,
+ jp.go.aist.rtm.rtcbuilder.ui,
+ jp.go.aist.rtm.rtcbuilder.ui.Perspective,
+ jp.go.aist.rtm.rtcbuilder.ui.editors,
+ jp.go.aist.rtm.rtcbuilder.ui.parts,
+ jp.go.aist.rtm.rtcbuilder.ui.preference,
+ jp.go.aist.rtm.rtcbuilder.ui.wizard,
+ jp.go.aist.rtm.rtcbuilder.util
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.eclipse.emf.ecore;visibility:=reexport,
+ org.eclipse.compare,
+ org.eclipse.jface.text,
+ org.eclipse.ui.forms,
+ org.eclipse.core.resources,
+ org.eclipse.gef,
+ org.eclipse.ui.ide,
+ org.eclipse.jdt.ui,
+ jp.go.aist.rtm.toolscommon.profiles;visibility:=reexport
 Bundle-ActivationPolicy: lazy
 Bundle-Activator: jp.go.aist.rtm.rtcbuilder.RtcBuilderPlugin
 Eclipse-BuddyPolicy: registered

Modified: trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/AbstractExtensionLoader.java
===================================================================
--- trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/AbstractExtensionLoader.java	2016-02-20 17:36:14 UTC (rev 540)
+++ trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/AbstractExtensionLoader.java	2016-02-20 17:36:36 UTC (rev 541)
@@ -3,15 +3,20 @@
 import java.util.ArrayList;
 import java.util.List;
 
-
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IConfigurationElement;
 import org.eclipse.core.runtime.IExtension;
 import org.eclipse.core.runtime.IExtensionPoint;
 import org.eclipse.core.runtime.IExtensionRegistry;
 import org.eclipse.core.runtime.Platform;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 public abstract class AbstractExtensionLoader {
+
+	private static final Logger LOGGER = LoggerFactory
+			.getLogger(AbstractExtensionLoader.class);
+
 	// Manager
 	@SuppressWarnings("unchecked")
 	private List list = new ArrayList();
@@ -56,11 +61,11 @@
 				addExtension(cfgElem);
 			}
 		} catch (CoreException e) {
-			e.printStackTrace();
+			LOGGER.error("Fail to add extension", e);
 			throw e;
 		}
 	}
-	
+
 	@SuppressWarnings("unchecked")
 	public List getList() {
 		return list;

Modified: trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/ExtensionLoader.java
===================================================================
--- trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/ExtensionLoader.java	2016-02-20 17:36:14 UTC (rev 540)
+++ trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/ExtensionLoader.java	2016-02-20 17:36:36 UTC (rev 541)
@@ -11,8 +11,14 @@
 import org.eclipse.core.runtime.IExtensionPoint;
 import org.eclipse.core.runtime.IExtensionRegistry;
 import org.eclipse.core.runtime.Platform;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 public class ExtensionLoader {
+
+	private static final Logger LOGGER = LoggerFactory
+			.getLogger(ExtensionLoader.class);
+
 	// 拡張ポイントID
 	public static final String EXTENSION_POINT_ID = "jp.go.aist.rtm.rtcbuilder.generateManager";
 	// Manager
@@ -59,7 +65,7 @@
 				}
 			}
 		} catch (CoreException e) {
-			e.printStackTrace();
+			LOGGER.error("Fail to create extension. ext=managerclass", e);
 			throw e;
 		}
 	}

Modified: trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/Generator.java
===================================================================
--- trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/Generator.java	2016-02-20 17:36:14 UTC (rev 540)
+++ trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/Generator.java	2016-02-20 17:36:36 UTC (rev 541)
@@ -49,12 +49,17 @@
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IPath;
 import org.eclipse.jface.dialogs.IDialogConstants;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * ジェネレータクラス
  */
 public class Generator {
-	
+
+	private static final Logger LOGGER = LoggerFactory
+			.getLogger(Generator.class);
+
 	Map<String, GenerateManager> generateManagerList = new HashMap<String, GenerateManager>();
 
 	public Generator() {
@@ -596,12 +601,11 @@
 									originalFileContents, MergeBlockParser
 											.parse(generatedResult.getCode())));
 						}
-	
 						isOutput = true;
 					} catch (NullPointerException e) {
-						e.printStackTrace();
+						LOGGER.error("Fail to move resource (null)", e);
 					} catch (CoreException e) {
-						e.printStackTrace();
+						LOGGER.error("Fail to move resource (move)", e);
 					}
 					//バックアップファイルの整理
 					FileUtil.removeBackupFiles(outputProject, generatedResult.getName());
@@ -624,7 +628,7 @@
 						try {
 							folder.create(false, true, null);
 						} catch (CoreException e) {
-							e.printStackTrace();
+							LOGGER.error("Fail to create folder", e);
 						}
 					}
 				}
@@ -632,7 +636,7 @@
 			try {
 				outputFile.create(new ByteArrayInputStream(generatedResult.getCode().getBytes("UTF-8")), false, null);
 			} catch (CoreException e) {
-				e.printStackTrace();
+				LOGGER.error("Fail to create file", e);
 			}
 		}
 	}

Modified: trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/RtcBuilderPlugin.java
===================================================================
--- trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/RtcBuilderPlugin.java	2016-02-20 17:36:14 UTC (rev 540)
+++ trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/RtcBuilderPlugin.java	2016-02-20 17:36:36 UTC (rev 541)
@@ -1,31 +1,28 @@
 package jp.go.aist.rtm.rtcbuilder;
 
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.logging.LogManager;
-import java.util.logging.Logger;
-
 import jp.go.aist.rtm.rtcbuilder.util.ShutdownListener;
+import jp.go.aist.rtm.toolscommon.profiles.util.LoggerUtil;
 
 import org.eclipse.ui.PlatformUI;
 import org.eclipse.ui.plugin.AbstractUIPlugin;
 import org.osgi.framework.BundleContext;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * The activator class controls the plug-in life cycle
  */
 public class RtcBuilderPlugin extends AbstractUIPlugin {
 
+	private static final Logger LOGGER = LoggerFactory
+			.getLogger(RtcBuilderPlugin.class);
+
 	// The plug-in ID
 	public static final String PLUGIN_ID = "jp.go.aist.rtm.rtcbuilder";
 
 	// The shared instance
 	private static RtcBuilderPlugin plugin;
 
-	RTCBLogHandler logHandler;
-
 	// 拡張ローダ
 	private ExtensionLoader loader;
 	private EditorExtensionLoader editorExtensionLoader;
@@ -40,14 +37,10 @@
 	 * The constructor
 	 */
 	public RtcBuilderPlugin() {
+		LoggerUtil.setup();
+		LOGGER.trace("RtcBuilderPlugin: START");
+
 		plugin = this;
-		//
-		getLogger();
-		try {
-			logHandler = new RTCBLogHandler();
-		} catch (Exception e) {
-			e.printStackTrace();
-		}
 		canExit = true;
 	}
 
@@ -56,7 +49,6 @@
 	 * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
 	 */
 	public void start(BundleContext context) throws Exception {
-		logHandler.start();
 		PlatformUI.getWorkbench().addWorkbenchListener(new ShutdownListener());
 		//
 		super.start(context);
@@ -81,8 +73,6 @@
 	 * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
 	 */
 	public void stop(BundleContext context) throws Exception {
-		logHandler.stop();
-		//
 		plugin = null;
 		super.stop(context);
 	}
@@ -116,43 +106,12 @@
 		return this.exportExtensionLoader;
 	}
 
-	static LogManager logManager;
-	static Logger log;
-
-	public static Logger getLogger() {
-		if (logManager == null) {
-			try {
-				InputStream ins = new FileInputStream(new File(
-						"rtcbuilder.logging.properties"));
-				logManager = LogManager.getLogManager();
-				logManager.readConfiguration(ins);
-			} catch (IOException e) {
-				// void
-			}
-		}
-		//
-		if (log == null) {
-			log = Logger.getLogger(PLUGIN_ID);
-		}
-		return log;
-	}
-
-	public static void addLogger(Logger logger) {
-		if (plugin != null) {
-			plugin.logHandler.addLogger(logger);
-		}
-	}
-
-	public static void removeLogger(Logger logger) {
-		if (plugin != null) {
-			plugin.logHandler.removeLogger(logger);
-		}
-	}
-
 	public boolean isCanExit() {
 		return canExit;
 	}
+
 	public void setCanExit(boolean canExit) {
 		this.canExit = canExit;
 	}
+
 }

Modified: trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/generator/ProfileHandler.java
===================================================================
--- trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/generator/ProfileHandler.java	2016-02-20 17:36:14 UTC (rev 540)
+++ trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/generator/ProfileHandler.java	2016-02-20 17:36:36 UTC (rev 541)
@@ -22,8 +22,14 @@
 import jp.go.aist.rtm.toolscommon.profiles.util.YamlHandler;
 
 import org.openrtp.namespaces.rtc.version02.RtcProfile;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 public class ProfileHandler {
+
+	private static final Logger LOGGER = LoggerFactory
+			.getLogger(ProfileHandler.class);
+
 	private List<GenerateManager> managerList = null;
 	private boolean isDirect = false;
 	
@@ -116,7 +122,7 @@
 		try {
 			result = handler.convertToXmlRtc(profile);
 		} catch (Exception e) {
-			e.printStackTrace();
+			LOGGER.error("Fail to convert rtc-profile", e);
 		}
 		return result;
 	}

Modified: trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/ui/editors/AbstractEditorFormPage.java
===================================================================
--- trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/ui/editors/AbstractEditorFormPage.java	2016-02-20 17:36:14 UTC (rev 540)
+++ trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/ui/editors/AbstractEditorFormPage.java	2016-02-20 17:36:36 UTC (rev 541)
@@ -50,9 +50,14 @@
 import org.eclipse.ui.forms.widgets.FormToolkit;
 import org.eclipse.ui.forms.widgets.ScrolledForm;
 import org.eclipse.ui.forms.widgets.Section;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 public abstract class AbstractEditorFormPage extends FormPage {
 
+	private static final Logger LOGGER = LoggerFactory
+			.getLogger(AbstractEditorFormPage.class);
+
 	protected RtcBuilderEditor editor;
 	protected BuildView buildview;
 	protected Font titleFont;
@@ -507,9 +512,7 @@
 					}
 				}
 			} catch (IOException e) {
-				e.printStackTrace();
-			} catch (java.lang.SecurityException e) {
-				e.printStackTrace();
+				LOGGER.error("Fail to read idl file", e);
 			}
 		}
 		String[] defaultTypeList = new String[0];

Modified: trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/ui/editors/BasicEditorFormPage.java
===================================================================
--- trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/ui/editors/BasicEditorFormPage.java	2016-02-20 17:36:14 UTC (rev 540)
+++ trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/ui/editors/BasicEditorFormPage.java	2016-02-20 17:36:36 UTC (rev 541)
@@ -57,12 +57,17 @@
 import org.eclipse.ui.forms.IManagedForm;
 import org.eclipse.ui.forms.widgets.FormToolkit;
 import org.eclipse.ui.forms.widgets.ScrolledForm;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * Basic Profile 設定ページ
  */
 public class BasicEditorFormPage extends AbstractEditorFormPage {
 
+	private static final Logger LOGGER = LoggerFactory
+			.getLogger(BasicEditorFormPage.class);
+
 	/**
 	 * 生成を行ったCategoryの情報を保存するワークスペース永続文字列へのキー
 	 */
@@ -367,7 +372,9 @@
 							description.setNatureIds(newIds);
 							project.setDescription(description, null);
 						} catch (CoreException e1) {
-							e1.printStackTrace();
+							LOGGER.error(
+									"Fail to get/set description for project",
+									e1);
 						}
 					}
 					//
@@ -399,8 +406,8 @@
 					//
 					editor.getRtcParam().resetUpdated();
 					editor.updateDirty();
-				} catch (Exception e1) {
-					e1.printStackTrace();
+				} catch (Exception e) {
+					LOGGER.error("Fail to save rtc-profile", e);
 				}
 			}
 

Modified: trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/ui/editors/RtcXmlEditorFormPage.java
===================================================================
--- trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/ui/editors/RtcXmlEditorFormPage.java	2016-02-20 17:36:14 UTC (rev 540)
+++ trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/ui/editors/RtcXmlEditorFormPage.java	2016-02-20 17:36:36 UTC (rev 541)
@@ -36,9 +36,14 @@
 import org.eclipse.ui.forms.IManagedForm;
 import org.eclipse.ui.forms.widgets.FormToolkit;
 import org.eclipse.ui.forms.widgets.ScrolledForm;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 public class RtcXmlEditorFormPage extends AbstractEditorFormPage {
 
+	private static final Logger LOGGER = LoggerFactory
+			.getLogger(RtcXmlEditorFormPage.class);
+
 	private SourceViewer RTCXmlViewer;
 	private Document rtcDocument;
 	SourceTextListener sourceTextListener;
@@ -230,7 +235,7 @@
 			if (message != null && !"".equals(message)) {
 				MessageDialog.openError(getSite().getShell(), "Error", message);
 			} else {
-				e.printStackTrace();// 今のところこちらにはこないはず
+				LOGGER.error("Fail to convert", e);
 			}
 		}
 		//

Modified: trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/ui/wizard/NewWizard.java
===================================================================
--- trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/ui/wizard/NewWizard.java	2016-02-20 17:36:14 UTC (rev 540)
+++ trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/ui/wizard/NewWizard.java	2016-02-20 17:36:36 UTC (rev 541)
@@ -28,11 +28,16 @@
 import org.eclipse.ui.dialogs.WizardNewProjectCreationPage;
 import org.eclipse.ui.part.FileEditorInput;
 import org.eclipse.ui.wizards.newresource.BasicNewProjectResourceWizard;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import com.sun.org.apache.xerces.internal.jaxp.datatype.XMLGregorianCalendarImpl;
 
 public class NewWizard extends Wizard implements INewWizard, IExecutableExtension {
 
+	private static final Logger LOGGER = LoggerFactory
+			.getLogger(NewWizard.class);
+
 	private WizardNewProjectCreationPage newProjectPage;
 	private IConfigurationElement configElement;
 
@@ -79,7 +84,7 @@
 			window.getActivePage().openEditor(new FileEditorInput(rtcxml),
 					RtcBuilderEditor.RTC_BUILDER_EDITOR_ID);
 		} catch (PartInitException e) {
-			e.printStackTrace();
+			LOGGER.error("Fail to open editor", e);
 		}
 		
 		return true;

Modified: trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/ui/wizard/RtcExportWizardPage.java
===================================================================
--- trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/ui/wizard/RtcExportWizardPage.java	2016-02-20 17:36:14 UTC (rev 540)
+++ trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/ui/wizard/RtcExportWizardPage.java	2016-02-20 17:36:36 UTC (rev 541)
@@ -36,10 +36,15 @@
 import org.eclipse.swt.widgets.Widget;
 import org.eclipse.ui.dialogs.WizardExportResourcesPage;
 import org.eclipse.ui.internal.wizards.datatransfer.ArchiveFileExportOperation;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 @SuppressWarnings("restriction")
 public class RtcExportWizardPage extends	WizardExportResourcesPage {
 
+	private static final Logger LOGGER = LoggerFactory
+			.getLogger(RtcExportWizardPage.class);
+
     private final static String STORE_DESTINATION_NAMES_ID = "RtcExportWizardPage.STORE_DESTINATION_NAMES_ID"; //$NON-NLS-1$
     private final static String STORE_CREATE_STRUCTURE_ID = "RtcExportWizardPage.STORE_CREATE_STRUCTURE_ID"; //$NON-NLS-1$
     private final static String STORE_COMPRESS_CONTENTS_ID = "RtcExportWizardPage.STORE_COMPRESS_CONTENTS_ID"; //$NON-NLS-1$
@@ -297,7 +302,7 @@
 				targetProjectList.add(targetProjects[intIdx].getName());
 			}
 		} catch (CoreException e) {
-			e.printStackTrace();
+			LOGGER.error("Fail to get resources", e);
 		}
     }
 
@@ -398,7 +403,7 @@
 			IResource[] targets = targetProject.members();
 			searchTarget(resourceList, targetExt, targetFile, targets);
 		} catch (CoreException e) {
-			e.printStackTrace();
+			LOGGER.error("Fail to get resources", e);
 		}
     	return resourceList;
     }
@@ -423,9 +428,8 @@
 					IResource[] resources = ((IFolder)sourceRes[intIdx]).members();
 					searchTarget(resourceList, targetExt, targetFile, resources);
 				} catch (CoreException e) {
-					e.printStackTrace();
+					LOGGER.error("Fail to search resources.", e);
 				}
-				
 			}
 		}
     }



More information about the openrtm-commit mailing list