summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenoit Maggi2014-07-15 07:25:05 (EDT)
committerCamille Letavernier2014-07-22 04:50:12 (EDT)
commit9a9927ced4aa8a509606d6ef816e50a62cab1784 (patch)
treea3717ab19813043dcf356df95041313adb7f6450
parentcc1695a50161a558ca45396886b2f486f73728aa (diff)
downloadorg.eclipse.papyrus-9a9927ced4aa8a509606d6ef816e50a62cab1784.zip
org.eclipse.papyrus-9a9927ced4aa8a509606d6ef816e50a62cab1784.tar.gz
org.eclipse.papyrus-9a9927ced4aa8a509606d6ef816e50a62cab1784.tar.bz2
Bug 437694 - Port usage of java.util Loggers to Papyrus log infrarefs/changes/06/28906/3
- remove all bad loggers - replace fine by debug Change-Id: I997ad9215a16243ee94481b19eb7e1abeb59c665 Signed-off-by: Benoit Maggi <benoit.maggi@cea.fr>
-rw-r--r--plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/src/org/eclipse/papyrus/infra/core/sasheditor/editor/SashTabDecorationSynchronizer.java22
-rw-r--r--plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/src/org/eclipse/papyrus/infra/core/sasheditor/editor/actionbarcontributor/ComposedActionBarContributor.java24
-rw-r--r--plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/src/org/eclipse/papyrus/infra/core/sasheditor/editor/actionbarcontributor/MultiPageEditorActionBarContributor.java4
-rw-r--r--plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/src/org/eclipse/papyrus/infra/core/sasheditor/internal/ActiveEditorServicesSwitcher.java14
-rw-r--r--plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/src/org/eclipse/papyrus/infra/core/sasheditor/internal/ActivePageTracker.java5
-rw-r--r--plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/src/org/eclipse/papyrus/infra/core/sasheditor/internal/ImageToolTipManager.java4
-rw-r--r--plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/src/org/eclipse/papyrus/infra/core/sasheditor/internal/SashPanelPart.java4
-rw-r--r--plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/src/org/eclipse/papyrus/infra/core/sasheditor/internal/TabFolderPart.java4
-rw-r--r--plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/src/org/eclipse/papyrus/infra/core/sasheditor/multipage/editor/MultiPageEditor.java10
9 files changed, 37 insertions, 54 deletions
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/src/org/eclipse/papyrus/infra/core/sasheditor/editor/SashTabDecorationSynchronizer.java b/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/src/org/eclipse/papyrus/infra/core/sasheditor/editor/SashTabDecorationSynchronizer.java
index 353052a..f429fd2 100644
--- a/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/src/org/eclipse/papyrus/infra/core/sasheditor/editor/SashTabDecorationSynchronizer.java
+++ b/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/src/org/eclipse/papyrus/infra/core/sasheditor/editor/SashTabDecorationSynchronizer.java
@@ -1,10 +1,19 @@
-/**
+/*****************************************************************************
+ * Copyright (c) 2010, 2014 CEA LIST and others.
*
- */
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Cedric Dumoulin Cedric.dumoulin@lifl.fr - Initial API and implementation
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.infra.core.sasheditor.editor;
-import java.util.logging.Logger;
+import org.eclipse.papyrus.infra.core.sasheditor.Activator;
import org.eclipse.papyrus.infra.core.sasheditor.internal.SashWindowsContainer;
import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.IPropertyListener;
@@ -24,11 +33,6 @@ import org.eclipse.ui.IWorkbenchPart;
*
*/
public class SashTabDecorationSynchronizer {
-
- /**
- * Logger for debug purpose.
- */
- Logger log = Logger.getLogger(this.getClass().getName() );
/**
* The container to synchronize.
@@ -123,7 +127,7 @@ public class SashTabDecorationSynchronizer {
protected void attachPage(IPage page) {
if( page instanceof IEditorPage )
{
- log.fine("attachPage( " + page + " )");
+ Activator.log.debug("attachPage( " + page + " )");
IEditorPage editorPage = (IEditorPage)page;
editorPage.getIEditorPart().addPropertyListener(editorPartPropertyListener);
}
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/src/org/eclipse/papyrus/infra/core/sasheditor/editor/actionbarcontributor/ComposedActionBarContributor.java b/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/src/org/eclipse/papyrus/infra/core/sasheditor/editor/actionbarcontributor/ComposedActionBarContributor.java
index 3b30efa..d760e91 100644
--- a/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/src/org/eclipse/papyrus/infra/core/sasheditor/editor/actionbarcontributor/ComposedActionBarContributor.java
+++ b/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/src/org/eclipse/papyrus/infra/core/sasheditor/editor/actionbarcontributor/ComposedActionBarContributor.java
@@ -1,10 +1,18 @@
-/**
+/*****************************************************************************
+ * Copyright (c) 2010, 2014 CEA LIST and others.
*
- */
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Cedric Dumoulin Cedric.dumoulin@lifl.fr - Initial API and implementation
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.infra.core.sasheditor.editor.actionbarcontributor;
-import java.util.logging.Level;
-
+import org.eclipse.papyrus.infra.core.sasheditor.Activator;
import org.eclipse.ui.IEditorActionBarContributor;
import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.part.EditorActionBarContributor;
@@ -70,8 +78,8 @@ public class ComposedActionBarContributor extends MultiPageEditorActionBarContri
if(activeEditor == activeNestedEditor)
return;
- if(log.isLoggable(Level.FINE)) {
- log.fine("setActivePage(" + activeEditor + " " + ")");
+ if(Activator.log.isDebugEnabled()) {
+ Activator.log.debug("setActivePage(" + activeEditor + " " + ")");
}
activeNestedEditor = activeEditor;
@@ -102,8 +110,8 @@ public class ComposedActionBarContributor extends MultiPageEditorActionBarContri
* the new target editor
*/
public void setActiveEditor(IEditorPart part) {
- if(log.isLoggable(Level.FINE)) {
- log.fine("setActiveEditor(" + part + " " + ")");
+ if(Activator.log.isDebugEnabled()) {
+ Activator.log.debug("setActiveEditor(" + part + " " + ")");
}
// Switch the editor and activeContributor.
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/src/org/eclipse/papyrus/infra/core/sasheditor/editor/actionbarcontributor/MultiPageEditorActionBarContributor.java b/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/src/org/eclipse/papyrus/infra/core/sasheditor/editor/actionbarcontributor/MultiPageEditorActionBarContributor.java
index 3264225..b8fb534 100644
--- a/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/src/org/eclipse/papyrus/infra/core/sasheditor/editor/actionbarcontributor/MultiPageEditorActionBarContributor.java
+++ b/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/src/org/eclipse/papyrus/infra/core/sasheditor/editor/actionbarcontributor/MultiPageEditorActionBarContributor.java
@@ -10,7 +10,6 @@
*******************************************************************************/
package org.eclipse.papyrus.infra.core.sasheditor.editor.actionbarcontributor;
-import java.util.logging.Logger;
import org.eclipse.papyrus.infra.core.sasheditor.editor.IMultiPageEditorPart;
import org.eclipse.ui.IEditorPart;
@@ -30,9 +29,6 @@ import org.eclipse.ui.part.EditorActionBarContributor;
*/
public abstract class MultiPageEditorActionBarContributor extends EditorActionBarContributor implements IMultiPageEditorActionBarContributor {
- /** Log object */
- Logger log = Logger.getLogger(getClass().getName());
-
/**
* Creates a multi-page editor action contributor.
*/
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/src/org/eclipse/papyrus/infra/core/sasheditor/internal/ActiveEditorServicesSwitcher.java b/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/src/org/eclipse/papyrus/infra/core/sasheditor/internal/ActiveEditorServicesSwitcher.java
index b29df4c..12e08e8 100644
--- a/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/src/org/eclipse/papyrus/infra/core/sasheditor/internal/ActiveEditorServicesSwitcher.java
+++ b/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/src/org/eclipse/papyrus/infra/core/sasheditor/internal/ActiveEditorServicesSwitcher.java
@@ -13,9 +13,8 @@
*****************************************************************************/
package org.eclipse.papyrus.infra.core.sasheditor.internal;
-import java.util.logging.Level;
-import java.util.logging.Logger;
+import org.eclipse.papyrus.infra.core.sasheditor.Activator;
import org.eclipse.jface.viewers.ISelectionProvider;
import org.eclipse.jface.viewers.SelectionChangedEvent;
import org.eclipse.papyrus.infra.core.sasheditor.editor.actionbarcontributor.IMultiPageEditorActionBarContributor;
@@ -53,9 +52,6 @@ import org.eclipse.ui.services.IServiceLocator;
*/
public class ActiveEditorServicesSwitcher implements IActiveEditorChangedListener {
- /** Log object */
- Logger log = Logger.getLogger(getClass().getName());
-
/** The currently active editor */
protected PagePart activeEditor;
@@ -168,12 +164,10 @@ public class ActiveEditorServicesSwitcher implements IActiveEditorChangedListene
MultiPageSelectionProvider provider = (MultiPageSelectionProvider)outerProvider;
provider.fireSelectionChanged(event);
provider.firePostSelectionChanged(event);
- } else {
- if(log.isLoggable(Level.WARNING)) {
- log.warning(this.getClass().getSimpleName()
+ } else {
+ Activator.log.warn(this.getClass().getSimpleName()
+ " did not propogate selection for " //$NON-NLS-1$
- + editorPart.getTitle());
- }
+ + editorPart.getTitle());
}
}
}
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/src/org/eclipse/papyrus/infra/core/sasheditor/internal/ActivePageTracker.java b/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/src/org/eclipse/papyrus/infra/core/sasheditor/internal/ActivePageTracker.java
index a65c921..d8c744f 100644
--- a/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/src/org/eclipse/papyrus/infra/core/sasheditor/internal/ActivePageTracker.java
+++ b/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/src/org/eclipse/papyrus/infra/core/sasheditor/internal/ActivePageTracker.java
@@ -15,7 +15,7 @@ package org.eclipse.papyrus.infra.core.sasheditor.internal;
import java.util.ArrayList;
import java.util.List;
-import java.util.logging.Logger;
+
import org.eclipse.papyrus.infra.core.sasheditor.editor.IPageChangedListener;
@@ -41,9 +41,6 @@ import org.eclipse.papyrus.infra.core.sasheditor.editor.IPageChangedListener;
*/
public class ActivePageTracker {
- /** Log object */
- Logger log = Logger.getLogger(getClass().getName());
-
/** List of listeners */
private List<IActiveEditorChangedListener> activeEditorChangedListeners = new ArrayList<IActiveEditorChangedListener>();
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/src/org/eclipse/papyrus/infra/core/sasheditor/internal/ImageToolTipManager.java b/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/src/org/eclipse/papyrus/infra/core/sasheditor/internal/ImageToolTipManager.java
index bff6c86..f3734f2 100644
--- a/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/src/org/eclipse/papyrus/infra/core/sasheditor/internal/ImageToolTipManager.java
+++ b/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/src/org/eclipse/papyrus/infra/core/sasheditor/internal/ImageToolTipManager.java
@@ -13,7 +13,6 @@
*****************************************************************************/
package org.eclipse.papyrus.infra.core.sasheditor.internal;
-import java.util.logging.Logger;
import org.eclipse.papyrus.infra.core.sasheditor.editor.IPageImageUtils;
import org.eclipse.papyrus.infra.core.sasheditor.internal.preferences.ITabTooltipPreferences;
@@ -38,9 +37,6 @@ import org.eclipse.swt.widgets.Shell;
*/
public class ImageToolTipManager {
- /** Log object */
- Logger log = Logger.getLogger(getClass().getName());
-
protected ITabTooltipPreferences settings = new TabTooltipPreferences();
/** */
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/src/org/eclipse/papyrus/infra/core/sasheditor/internal/SashPanelPart.java b/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/src/org/eclipse/papyrus/infra/core/sasheditor/internal/SashPanelPart.java
index 8a180be..01fedf0 100644
--- a/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/src/org/eclipse/papyrus/infra/core/sasheditor/internal/SashPanelPart.java
+++ b/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/src/org/eclipse/papyrus/infra/core/sasheditor/internal/SashPanelPart.java
@@ -13,7 +13,6 @@
*****************************************************************************/
package org.eclipse.papyrus.infra.core.sasheditor.internal;
-import java.util.logging.Logger;
import org.eclipse.papyrus.infra.core.sasheditor.contentprovider.IAbstractPanelModel;
import org.eclipse.papyrus.infra.core.sasheditor.contentprovider.ISashPanelModel;
@@ -40,9 +39,6 @@ import org.eclipse.ui.internal.dnd.IDropTarget;
@SuppressWarnings({ "restriction" })
public class SashPanelPart extends AbstractPanelPart implements IPanelParent {
- /** Log object */
- Logger log = Logger.getLogger(getClass().getName());
-
/** Interface to the model */
protected ISashPanelModel model;
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/src/org/eclipse/papyrus/infra/core/sasheditor/internal/TabFolderPart.java b/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/src/org/eclipse/papyrus/infra/core/sasheditor/internal/TabFolderPart.java
index 9b1a97f..9e2a405 100644
--- a/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/src/org/eclipse/papyrus/infra/core/sasheditor/internal/TabFolderPart.java
+++ b/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/src/org/eclipse/papyrus/infra/core/sasheditor/internal/TabFolderPart.java
@@ -16,7 +16,6 @@ package org.eclipse.papyrus.infra.core.sasheditor.internal;
import java.util.ArrayList;
import java.util.List;
-import java.util.logging.Logger;
import org.eclipse.jface.action.MenuManager;
import org.eclipse.jface.util.Geometry;
@@ -66,9 +65,6 @@ import org.eclipse.ui.internal.dnd.IDropTarget;
@SuppressWarnings("restriction")
public class TabFolderPart extends AbstractTabFolderPart implements IFolder {
- /** Log object */
- Logger log = Logger.getLogger(getClass().getName());
-
/** Interface to the model */
protected ITabFolderModel partModel;
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/src/org/eclipse/papyrus/infra/core/sasheditor/multipage/editor/MultiPageEditor.java b/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/src/org/eclipse/papyrus/infra/core/sasheditor/multipage/editor/MultiPageEditor.java
index 45bdd22..6998f74 100644
--- a/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/src/org/eclipse/papyrus/infra/core/sasheditor/multipage/editor/MultiPageEditor.java
+++ b/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/src/org/eclipse/papyrus/infra/core/sasheditor/multipage/editor/MultiPageEditor.java
@@ -16,10 +16,9 @@ package org.eclipse.papyrus.infra.core.sasheditor.multipage.editor;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
-import java.util.logging.Level;
-import java.util.logging.Logger;
import org.eclipse.jface.dialogs.ErrorDialog;
+import org.eclipse.papyrus.infra.core.sasheditor.Activator;
import org.eclipse.papyrus.infra.core.sasheditor.contentprovider.IAbstractPanelModel;
import org.eclipse.papyrus.infra.core.sasheditor.contentprovider.IComponentModel;
import org.eclipse.papyrus.infra.core.sasheditor.contentprovider.IEditorModel;
@@ -52,9 +51,6 @@ import org.eclipse.ui.part.MultiPageEditorPart;
*/
public abstract class MultiPageEditor extends MultiPageEditorPart {
- /** Log object */
- protected Logger log = Logger.getLogger(getClass().getName());
-
/** The pageProvider */
private ISashWindowsContentProvider pageProvider;
@@ -362,8 +358,8 @@ public abstract class MultiPageEditor extends MultiPageEditorPart {
private void addEditor(IPageModel tabItem) {
// Check if an editor already exists
if(tabExistsFor(tabItem)) {
- if(log.isLoggable(Level.FINE))
- log.fine("Editor already exists for '" + tabItem + "'");
+ if(Activator.log.isDebugEnabled())
+ Activator.log.debug("Editor already exists for '" + tabItem + "'");
return;
}