本文整理匯總了Java中org.eclipse.che.ide.api.preferences.PreferencesManager類的典型用法代碼示例。如果您正苦於以下問題:Java PreferencesManager類的具體用法?Java PreferencesManager怎麽用?Java PreferencesManager使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
PreferencesManager類屬於org.eclipse.che.ide.api.preferences包,在下文中一共展示了PreferencesManager類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: configure
import org.eclipse.che.ide.api.preferences.PreferencesManager; //導入依賴的package包/類
@Override
protected void configure() {
bind(PreferencesManager.class).to(PreferencesManagerImpl.class).in(Singleton.class);
GinMultibinder.newSetBinder(binder(), PreferencesManager.class)
.addBinding()
.to(PreferencesManagerImpl.class);
bind(PreferencesView.class).to(PreferencesViewImpl.class).in(Singleton.class);
GinMultibinder<PreferencePagePresenter> pagesBinder =
GinMultibinder.newSetBinder(binder(), PreferencePagePresenter.class);
pagesBinder.addBinding().to(IdeGeneralPreferencesPresenter.class);
pagesBinder.addBinding().to(ExtensionManagerPresenter.class);
bind(IdeGeneralPreferencesView.class)
.to(IdeGeneralPreferencesViewImpl.class)
.in(Singleton.class);
bind(ExtensionManagerView.class).to(ExtensionManagerViewImpl.class).in(Singleton.class);
}
示例2: PreferencesPresenter
import org.eclipse.che.ide.api.preferences.PreferencesManager; //導入依賴的package包/類
/**
* Create presenter.
*
* <p>For tests.
*
* @param view
* @param preferences
* @param dialogFactory
* @param locale
* @param managers
*/
@Inject
protected PreferencesPresenter(
PreferencesView view,
Set<PreferencePagePresenter> preferences,
DialogFactory dialogFactory,
CoreLocalizationConstant locale,
Set<PreferencesManager> managers,
Provider<NotificationManager> notificationManagerProvider) {
this.view = view;
this.preferences = preferences;
this.dialogFactory = dialogFactory;
this.locale = locale;
this.managers = managers;
this.notificationManagerProvider = notificationManagerProvider;
this.view.setDelegate(this);
for (PreferencePagePresenter preference : preferences) {
preference.setUpdateDelegate(this);
}
}
示例3: EditorPropertiesManager
import org.eclipse.che.ide.api.preferences.PreferencesManager; //導入依賴的package包/類
@Inject
public EditorPropertiesManager(
EditorLocalizationConstants locale, PreferencesManager preferencesManager) {
this.preferencesManager = preferencesManager;
names.put(TAB_SIZE.toString(), locale.propertyTabSize());
names.put(EXPAND_TAB.toString(), locale.propertyExpandTab());
names.put(SOFT_WRAP.toString(), locale.propertySoftWrap());
names.put(AUTO_PAIR_PARENTHESES.toString(), locale.propertyAutoPairParentheses());
names.put(AUTO_PAIR_BRACES.toString(), locale.propertyAutoPairBraces());
names.put(AUTO_PAIR_SQUARE_BRACKETS.toString(), locale.propertyAutoPairSquareBrackets());
names.put(AUTO_PAIR_ANGLE_BRACKETS.toString(), locale.propertyAutoPairAngelBrackets());
names.put(AUTO_PAIR_QUOTATIONS.toString(), locale.propertyAutoPairQuotations());
names.put(AUTO_COMPLETE_COMMENTS.toString(), locale.propertyAutoCompleteComments());
names.put(SMART_INDENTATION.toString(), locale.propertySmartIndentation());
names.put(SHOW_WHITESPACES.toString(), locale.propertyShowWhitespaces());
names.put(SHOW_ANNOTATION_RULER.toString(), locale.propertyShowAnnotationRuler());
names.put(SHOW_LINE_NUMBER_RULER.toString(), locale.propertyShowLineNumberRuler());
names.put(SHOW_FOLDING_RULER.toString(), locale.propertyShowFoldingRuler());
names.put(SHOW_OVERVIEW_RULER.toString(), locale.propertyShowOverviewRuler());
names.put(SHOW_ZOOM_RULER.toString(), locale.propertyShowZoomRuler());
names.put(SHOW_OCCURRENCES.toString(), locale.propertyShowOccurrences());
names.put(
SHOW_CONTENT_ASSIST_AUTOMATICALLY.toString(),
locale.propertyShowContentAssistAutomatically());
}
示例4: JavaCompilerPreferencePresenter
import org.eclipse.che.ide.api.preferences.PreferencesManager; //導入依賴的package包/類
@Inject
public JavaCompilerPreferencePresenter(
JavaLocalizationConstant locale,
ErrorWarningsView view,
PropertyWidgetFactory propertyFactory,
@JavaCompilerPreferenceManager PreferencesManager preferencesManager,
Provider<NotificationManager> notificationManagerProvider) {
super(locale.compilerSetup(), CATEGORY);
this.view = view;
this.propertyFactory = propertyFactory;
this.preferencesManager = preferencesManager;
this.notificationManagerProvider = notificationManagerProvider;
this.locale = locale;
this.widgets = new ArrayList<>();
}
示例5: YamlExtensionManagerPresenter
import org.eclipse.che.ide.api.preferences.PreferencesManager; //導入依賴的package包/類
@Inject
public YamlExtensionManagerPresenter(
YamlExtensionManagerView view,
DialogFactory dialogFactory,
PreferencesManager preferencesManager,
YamlLocalizationConstant local,
YamlServiceClient service) {
super("Yaml", "Language Server Settings");
this.view = view;
this.dialogFactory = dialogFactory;
this.local = local;
this.service = service;
this.preferencesManager = preferencesManager;
if (preferencesManager.getValue(preferenceName) == null
|| "".equals(preferencesManager.getValue(preferenceName))
|| "{}".equals(preferencesManager.getValue(preferenceName))) {
this.yamlPreferences = new ArrayList<YamlPreference>();
} else {
this.yamlPreferences =
jsonToYamlPreference(this.preferencesManager.getValue(this.preferenceName));
}
this.view.setDelegate(this);
refreshTable();
}
示例6: MavenPreferencePresenter
import org.eclipse.che.ide.api.preferences.PreferencesManager; //導入依賴的package包/類
@Inject
public MavenPreferencePresenter(
MavenPreferenceView view,
AppContext appContext,
CoreLocalizationConstant coreLocalizationConstant,
MavenLocalizationConstant mavenLocalizationConstant,
PreferencesManager preferencesManager) {
super(
mavenLocalizationConstant.mavenPreferencesTitle(),
coreLocalizationConstant.extensionCategory());
this.view = view;
this.appContext = appContext;
this.preferencesManager = preferencesManager;
view.setDelegate(this);
}
示例7: setupResultLimit
import org.eclipse.che.ide.api.preferences.PreferencesManager; //導入依賴的package包/類
private void setupResultLimit(final PreferencesManager preferencesManager) {
final String prefRequestLimit = preferencesManager.getValue(PREFERENCE_KEY_DEFAULT_REQUEST_LIMIT);
if (prefRequestLimit != null) {
try {
int prefValue = Integer.parseInt(prefRequestLimit);
if (prefValue > 0) {
this.resultLimit = prefValue;
} else {
Log.warn(SqlRequestLauncherPresenter.class, "negative value stored in preference "
+ PREFERENCE_KEY_DEFAULT_REQUEST_LIMIT);
}
} catch (final NumberFormatException e) {
StringBuilder sb = new StringBuilder("Preference stored in ")
.append(PREFERENCE_KEY_DEFAULT_REQUEST_LIMIT)
.append(" is not an integer (")
.append(resultLimit)
.append(").");
Log.warn(SqlRequestLauncherPresenter.class, sb.toString());
}
}
// push the request limit value to the view
this.view.setResultLimit(this.resultLimit);
}
示例8: ShowWelcomePreferencePagePresenter
import org.eclipse.che.ide.api.preferences.PreferencesManager; //導入依賴的package包/類
@Inject
public ShowWelcomePreferencePagePresenter(
CoreLocalizationConstant localizationConstant,
ShowWelcomePreferencePageView view,
PreferencesManager preferencesManager) {
super(localizationConstant.welcomePreferencesTitle());
this.view = view;
this.preferencesManager = preferencesManager;
view.setDelegate(this);
view.welcomeField().setValue(true);
}
示例9: LinkWithEditorAction
import org.eclipse.che.ide.api.preferences.PreferencesManager; //導入依賴的package包/類
@Inject
public LinkWithEditorAction(
CoreLocalizationConstant localizationConstant,
Provider<EditorAgent> editorAgentProvider,
EventBus eventBus,
PreferencesManager preferencesManager) {
super(localizationConstant.actionLinkWithEditor());
this.editorAgentProvider = editorAgentProvider;
this.eventBus = eventBus;
this.preferencesManager = preferencesManager;
eventBus.addHandler(ActivePartChangedEvent.TYPE, this);
}
示例10: ShowToolbarAction
import org.eclipse.che.ide.api.preferences.PreferencesManager; //導入依賴的package包/類
@Inject
public ShowToolbarAction(
CoreLocalizationConstant localizationConstant,
PreferencesManager preferencesManager,
WorkspaceView workspaceView) {
super(localizationConstant.actionShowToolbar());
this.preferencesManager = preferencesManager;
this.workspaceView = workspaceView;
String showToolbar = preferencesManager.getValue(SHOW_TOOLBAR);
workspaceView.showToolbar(Boolean.parseBoolean(showToolbar));
}
示例11: IdeGeneralPreferencesPresenter
import org.eclipse.che.ide.api.preferences.PreferencesManager; //導入依賴的package包/類
@Inject
public IdeGeneralPreferencesPresenter(
IdeGeneralPreferencesView view,
CoreLocalizationConstant constant,
ThemeAgent themeAgent,
PreferencesManager preferencesManager) {
super(constant.generalTitle(), constant.generalCategory());
this.view = view;
this.themeAgent = themeAgent;
this.preferencesManager = preferencesManager;
view.setDelegate(this);
themeId = getStoredThemeId();
isAskBeforeClosingTab = getStoredAskBeforeClosingTab();
}
示例12: EditorAgentImpl
import org.eclipse.che.ide.api.preferences.PreferencesManager; //導入依賴的package包/類
@Inject
public EditorAgentImpl(
EventBus eventBus,
FileTypeRegistry fileTypeRegistry,
PreferencesManager preferencesManager,
EditorRegistry editorRegistry,
WorkspaceAgent workspaceAgent,
CoreLocalizationConstant coreLocalizationConstant,
EditorMultiPartStackPresenter editorMultiPartStack,
EditorContentSynchronizer editorContentSynchronizer,
PromiseProvider promiseProvider,
ResourceProvider resourceProvider,
NotificationManager notificationManager) {
this.eventBus = eventBus;
this.fileTypeRegistry = fileTypeRegistry;
this.preferencesManager = preferencesManager;
this.editorRegistry = editorRegistry;
this.workspaceAgent = workspaceAgent;
this.coreLocalizationConstant = coreLocalizationConstant;
this.editorMultiPartStack = editorMultiPartStack;
this.editorContentSynchronizer = editorContentSynchronizer;
this.promiseProvider = promiseProvider;
this.resourceProvider = resourceProvider;
this.notificationManager = notificationManager;
this.openedEditors = newArrayList();
this.openingEditorsPathsToStacks = new HashMap<>();
this.openedEditorsToProviders = new HashMap<>();
eventBus.addHandler(ActivePartChangedEvent.TYPE, this);
eventBus.addHandler(SelectionChangedEvent.TYPE, this);
eventBus.addHandler(WorkspaceStoppedEvent.TYPE, this);
}
示例13: KeyMapsPreferencePresenter
import org.eclipse.che.ide.api.preferences.PreferencesManager; //導入依賴的package包/類
@Inject
public KeyMapsPreferencePresenter(
final KeymapsPreferenceView view,
final EventBus eventBus,
final PreferencesManager preferencesManager) {
this.view = view;
this.eventBus = eventBus;
this.preferencesManager = preferencesManager;
this.view.setDelegate(this);
}
示例14: EditorPreferencesManager
import org.eclipse.che.ide.api.preferences.PreferencesManager; //導入依賴的package包/類
@Inject
public EditorPreferencesManager(
EditorLocalizationConstants locale, PreferencesManager preferencesManager) {
this.preferencesManager = preferencesManager;
names.put(TAB_SIZE.toString(), locale.propertyTabSize());
names.put(EXPAND_TAB.toString(), locale.propertyExpandTab());
names.put(AUTO_PAIR_PARENTHESES.toString(), locale.propertyAutoPairParentheses());
names.put(AUTO_PAIR_BRACES.toString(), locale.propertyAutoPairBraces());
names.put(AUTO_PAIR_SQUARE_BRACKETS.toString(), locale.propertyAutoPairSquareBrackets());
names.put(AUTO_PAIR_ANGLE_BRACKETS.toString(), locale.propertyAutoPairAngelBrackets());
names.put(AUTO_PAIR_QUOTATIONS.toString(), locale.propertyAutoPairQuotations());
names.put(AUTO_COMPLETE_COMMENTS.toString(), locale.propertyAutoCompleteComments());
names.put(SMART_INDENTATION.toString(), locale.propertySmartIndentation());
names.put(SHOW_WHITESPACES.toString(), locale.propertyShowWhitespaces());
names.put(ENABLE_AUTO_SAVE.toString(), locale.propertyAutoSave());
names.put(SOFT_WRAP.toString(), locale.propertySoftWrap());
names.put(SHOW_ANNOTATION_RULER.toString(), locale.propertyShowAnnotationRuler());
names.put(SHOW_LINE_NUMBER_RULER.toString(), locale.propertyShowLineNumberRuler());
names.put(SHOW_FOLDING_RULER.toString(), locale.propertyShowFoldingRuler());
names.put(SHOW_OVERVIEW_RULER.toString(), locale.propertyShowOverviewRuler());
names.put(SHOW_ZOOM_RULER.toString(), locale.propertyShowZoomRuler());
names.put(SHOW_OCCURRENCES.toString(), locale.propertyShowOccurrences());
names.put(
SHOW_CONTENT_ASSIST_AUTOMATICALLY.toString(),
locale.propertyShowContentAssistAutomatically());
getDefaultEditorPreferences();
}
示例15: BrowserTabCloseHandler
import org.eclipse.che.ide.api.preferences.PreferencesManager; //導入依賴的package包/類
@Inject
public BrowserTabCloseHandler(
EventBus eventBus,
Provider<EditorAgent> editorAgentProvider,
PreferencesManager preferencesManager,
CoreLocalizationConstant localizationConstant) {
this.editorAgentProvider = editorAgentProvider;
this.preferencesManager = preferencesManager;
this.localizationConstant = localizationConstant;
closeImmediately = false;
eventBus.addHandler(WindowActionEvent.TYPE, this);
}