Revision cf2f4360
Added by Patrick Plitzner over 6 years ago
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/model/AbstractUtility.java | ||
---|---|---|
109 | 109 |
/** Constant <code>DATE_FORMAT_NOW="yyyyMMddHHmm"</code> */ |
110 | 110 |
public static final String DATE_FORMAT_NOW = "yyyyMMddHHmm"; |
111 | 111 |
|
112 |
public static MPart getActivePart() { |
|
113 |
return EventUtility.getActivePart(); |
|
112 |
public static Object getActivePart() { |
|
113 |
MPart activePart = EventUtility.getActivePart(); |
|
114 |
if(activePart!=null){ |
|
115 |
return activePart.getObject(); |
|
116 |
} |
|
117 |
return null; |
|
114 | 118 |
} |
115 | 119 |
|
116 | 120 |
public static boolean closeAll() { |
... | ... | |
135 | 139 |
} |
136 | 140 |
} |
137 | 141 |
|
138 |
public static Object getActiveE4Part() { |
|
139 |
//TODO merge with getActivePart() |
|
140 |
return getActivePart(); |
|
141 |
} |
|
142 |
|
|
143 | 142 |
public static IWorkbench getWorkbench() { |
144 | 143 |
return TaxeditorStorePlugin.getDefault().getWorkbench(); |
145 | 144 |
} |
Also available in: Unified diff
ref #6925 Migrate getActivePart()