Revision ca4910f7
Added by Patrick Plitzner over 6 years ago
eu.etaxonomy.taxeditor.workbench/src/main/java/eu/etaxonomy/taxeditor/workbench/WorkbenchUtility.java | ||
---|---|---|
8 | 8 |
*/ |
9 | 9 |
package eu.etaxonomy.taxeditor.workbench; |
10 | 10 |
|
11 |
import java.io.File; |
|
11 | 12 |
import java.util.List; |
12 | 13 |
|
14 |
import org.eclipse.core.runtime.Platform; |
|
15 |
import org.eclipse.core.runtime.URIUtil; |
|
13 | 16 |
import org.eclipse.e4.ui.model.application.MApplication; |
14 | 17 |
import org.eclipse.e4.ui.model.application.ui.advanced.MArea; |
15 | 18 |
import org.eclipse.e4.ui.model.application.ui.basic.MPart; |
... | ... | |
45 | 48 |
return object; |
46 | 49 |
} |
47 | 50 |
|
51 |
public static File getBaseLocation() { |
|
52 |
File baseLocation; |
|
53 |
try { |
|
54 |
baseLocation = new File(URIUtil.toURI(Platform.getInstallLocation().getURL())); |
|
55 |
} catch (Exception e) { |
|
56 |
throw new RuntimeException(e); |
|
57 |
} |
|
58 |
baseLocation = new File(baseLocation, "configuration"); //$NON-NLS-1$ |
|
59 |
return baseLocation; |
|
60 |
} |
|
61 |
|
|
48 | 62 |
public static Object findSavablePart(ISelectionElementEditingPart part){ |
49 | 63 |
Object selectionProvidingPart = getE4WrappedPart(part.getSelectionProvidingPart()); |
50 | 64 |
if(selectionProvidingPart instanceof ISelectionElementEditingPart){ |
Also available in: Unified diff
Move getBaseLocation() utility method to WorkbenchUtility