Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
UrumaPreferencesService |
|
| 1.0;1 |
1 | /* | |
2 | * Copyright 2004-2008 the Seasar Foundation and the Others. | |
3 | * | |
4 | * Licensed under the Apache License, Version 2.0 (the "License"); | |
5 | * you may not use this file except in compliance with the License. | |
6 | * You may obtain a copy of the License at | |
7 | * | |
8 | * http://www.apache.org/licenses/LICENSE-2.0 | |
9 | * | |
10 | * Unless required by applicable law or agreed to in writing, software | |
11 | * distributed under the License is distributed on an "AS IS" BASIS, | |
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, | |
13 | * either express or implied. See the License for the specific language | |
14 | * governing permissions and limitations under the License. | |
15 | */ | |
16 | package org.seasar.uruma.rcp.core; | |
17 | ||
18 | import java.util.Properties; | |
19 | ||
20 | import org.eclipse.core.internal.preferences.exchange.IProductPreferencesService; | |
21 | import org.eclipse.core.internal.preferences.legacy.ProductPreferencesService; | |
22 | import org.eclipse.ui.IWorkbenchPreferenceConstants; | |
23 | import org.seasar.uruma.core.UrumaConstants; | |
24 | ||
25 | /** | |
26 | * {@link IProductPreferencesService} の実装クラスです。<br /> | |
27 | * Eclipse デフォルト実装の {@link ProductPreferencesService} に差し替えて使用します。<br /> | |
28 | * {@link ProductPreferencesService} では、 <code>plugin_customization.ini</code> | |
29 | * ファイルからカスタマイズ情報を読み込みますが、本クラスは Uruma 独自の設定情報を返します。<br /> | |
30 | * | |
31 | * @author y-komori | |
32 | */ | |
33 | 0 | public class UrumaPreferencesService implements IProductPreferencesService, |
34 | UrumaConstants { | |
35 | ||
36 | /* | |
37 | * @see org.eclipse.core.internal.preferences.exchange.IProductPreferencesService#getProductCustomization() | |
38 | */ | |
39 | public Properties getProductCustomization() { | |
40 | 0 | Properties props = new Properties(); |
41 | ||
42 | // キーコンフィグレーション(スキーム)を設定 | |
43 | 0 | props.put("org.eclipse.ui/" |
44 | + IWorkbenchPreferenceConstants.KEY_CONFIGURATION_ID, | |
45 | URUMA_APP_SCHEME_ID); | |
46 | ||
47 | 0 | return props; |
48 | } | |
49 | ||
50 | /* | |
51 | * @see org.eclipse.core.internal.preferences.exchange.IProductPreferencesService#getProductTranslation() | |
52 | */ | |
53 | public Properties getProductTranslation() { | |
54 | 0 | return new Properties(); |
55 | } | |
56 | } |