Revision 398bb6b8
Added by Patrick Plitzner over 6 years ago
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/model/AbstractUtility.java | ||
---|---|---|
48 | 48 |
import org.eclipse.e4.ui.model.application.ui.basic.MPart; |
49 | 49 |
import org.eclipse.e4.ui.workbench.modeling.EPartService; |
50 | 50 |
import org.eclipse.jface.action.IStatusLineManager; |
51 |
import org.eclipse.jface.resource.ColorRegistry; |
|
52 | 51 |
import org.eclipse.jface.resource.FontRegistry; |
53 | 52 |
import org.eclipse.jface.viewers.IStructuredSelection; |
54 | 53 |
import org.eclipse.jface.viewers.SelectionChangedEvent; |
... | ... | |
144 | 143 |
return getFontRegistry().get(symbolicName); |
145 | 144 |
} |
146 | 145 |
|
147 |
/** |
|
148 |
* Color registered to the plugin may be obtained with the Eclipse themeing |
|
149 |
* functionality. Thus colors are editable by the user via |
|
150 |
* Preferences->General->Appearance->Colors and Fonts |
|
151 |
* |
|
152 |
* @return the ColorRegistry for the current theme |
|
153 |
*/ |
|
154 |
public static ColorRegistry getColorRegistry() { |
|
155 |
return getCurrentTheme().getColorRegistry(); |
|
156 |
} |
|
157 |
|
|
158 | 146 |
public static Color getColor(String symbolicName) { |
159 |
return getColorRegistry().get(symbolicName);
|
|
147 |
return ColorResources.getColor(symbolicName);
|
|
160 | 148 |
} |
161 | 149 |
|
162 | 150 |
public static IStatus executeOperation(final AbstractPostOperation operation, UISynchronize sync) { |
Also available in: Unified diff
ref #7044 Migrate color theme