Project

General

Profile

« Previous | Next » 

Revision f274f083

Added by Andreas Müller almost 2 years ago

ref #9359 upgrade TaxEditor to log4j2

View differences:

eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/WorkbenchUndoContextAdapterFactory.java
6 6
* The contents of this file are subject to the Mozilla Public License Version 1.1
7 7
* See LICENSE.TXT at the top of this package for the full license terms.
8 8
*/
9

  
10 9
package eu.etaxonomy.taxeditor.navigation;
11 10

  
12
import org.apache.log4j.Logger;
11
import org.apache.logging.log4j.LogManager;import org.apache.logging.log4j.Logger;
12

  
13 13
import org.eclipse.core.commands.operations.IUndoContext;
14 14
import org.eclipse.core.commands.operations.UndoContext;
15 15
import org.eclipse.core.runtime.IAdapterFactory;
16 16

  
17

  
18 17
/**
19
 * <p>WorkbenchUndoContextAdapterFactory class.</p>
20
 *
21 18
 * @author p.ciardelli
22 19
 * @created 04.06.2009
23
 * @version 1.0
24 20
 */
25 21
public class WorkbenchUndoContextAdapterFactory implements IAdapterFactory {
26
	private static final Logger logger = Logger
27
			.getLogger(WorkbenchUndoContextAdapterFactory.class);
22

  
23
    private static final Logger logger = Logger.getLogger(WorkbenchUndoContextAdapterFactory.class);
28 24
	private UndoContext defaultUndoContext;
29 25

  
30 26
	private static final Class[] ADAPTER_LIST = new Class[] { IUndoContext.class };
31 27

  
32
	/* (non-Javadoc)
33
	 * @see org.eclipse.core.runtime.IAdapterFactory#getAdapter(java.lang.Object, java.lang.Class)
34
	 */
35
	/** {@inheritDoc} */
36 28
	@Override
37 29
    public Object getAdapter(Object adaptableObject, Class adapterType) {
38 30
//		if (IUndoContext.class.equals(adapterType)) {
......
41 33
		return null;
42 34
	}
43 35

  
44
	/**
45
	 * @return
46
	 */
47 36
	private Object getDefaultUndoContext() {
48 37
		if (defaultUndoContext == null) {
49 38
			defaultUndoContext = new UndoContext();
......
51 40
		return defaultUndoContext;
52 41
	}
53 42

  
54
	/* (non-Javadoc)
55
	 * @see org.eclipse.core.runtime.IAdapterFactory#getAdapterList()
56
	 */
57
	/**
58
	 * <p>getAdapterList</p>
59
	 *
60
	 * @return an array of {@link java.lang.Class} objects.
61
	 */
62 43
	@Override
63 44
    public Class[] getAdapterList() {
64 45
		return ADAPTER_LIST;
65 46
	}
66
}
47
}

Also available in: Unified diff