本文整理汇总了Java中org.eclipse.jdt.ui.PreferenceConstants.getPreferenceStore方法的典型用法代码示例。如果您正苦于以下问题:Java PreferenceConstants.getPreferenceStore方法的具体用法?Java PreferenceConstants.getPreferenceStore怎么用?Java PreferenceConstants.getPreferenceStore使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.eclipse.jdt.ui.PreferenceConstants
的用法示例。
在下文中一共展示了PreferenceConstants.getPreferenceStore方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: initMasks
import org.eclipse.jdt.ui.PreferenceConstants; //导入方法依赖的package包/类
private void initMasks() {
IPreferenceStore store= PreferenceConstants.getPreferenceStore();
fTextFlagMask= -1;
if (!store.getBoolean(PreferenceConstants.APPEARANCE_METHOD_RETURNTYPE)) {
fTextFlagMask ^= JavaElementLabels.M_APP_RETURNTYPE;
}
if (!store.getBoolean(PreferenceConstants.APPEARANCE_METHOD_TYPEPARAMETERS)) {
fTextFlagMask ^= JavaElementLabels.M_APP_TYPE_PARAMETERS;
}
if (!(store.getBoolean(PreferenceConstants.APPEARANCE_COMPRESS_PACKAGE_NAMES)
|| store.getBoolean(PreferenceConstants.APPEARANCE_ABBREVIATE_PACKAGE_NAMES))) {
fTextFlagMask ^= JavaElementLabels.P_COMPRESSED;
}
if (!store.getBoolean(PreferenceConstants.APPEARANCE_CATEGORY)) {
fTextFlagMask ^= JavaElementLabels.ALL_CATEGORY;
}
fImageFlagMask= -1;
}
示例2: getDefaultClassPath
import org.eclipse.jdt.ui.PreferenceConstants; //导入方法依赖的package包/类
private List<CPListElement> getDefaultClassPath(IJavaProject jproj) {
List<CPListElement> list= new ArrayList<CPListElement>();
IResource srcFolder;
IPreferenceStore store= PreferenceConstants.getPreferenceStore();
String sourceFolderName= store.getString(PreferenceConstants.SRCBIN_SRCNAME);
if (store.getBoolean(PreferenceConstants.SRCBIN_FOLDERS_IN_NEWPROJ) && sourceFolderName.length() > 0) {
srcFolder= jproj.getProject().getFolder(sourceFolderName);
} else {
srcFolder= jproj.getProject();
}
list.add(new CPListElement(jproj, IClasspathEntry.CPE_SOURCE, srcFolder.getFullPath(), srcFolder));
IClasspathEntry[] jreEntries= PreferenceConstants.getDefaultJRELibrary();
list.addAll(getCPListElements(jreEntries, null));
return list;
}
示例3: init
import org.eclipse.jdt.ui.PreferenceConstants; //导入方法依赖的package包/类
public void init(ICommonContentExtensionSite commonContentExtensionSite) {
IExtensionStateModel stateModel = commonContentExtensionSite
.getExtensionStateModel();
IMemento memento = commonContentExtensionSite.getMemento();
fStateModel = stateModel;
restoreState(memento);
fLayoutPropertyListener = new IPropertyChangeListener() {
public void propertyChange(PropertyChangeEvent event) {
if (Values.IS_LAYOUT_FLAT.equals(event.getProperty())) {
if (event.getNewValue() != null) {
boolean newValue = ((Boolean) event.getNewValue())
.booleanValue() ? true : false;
setIsFlatLayout(newValue);
}
}
}
};
fStateModel.addPropertyChangeListener(fLayoutPropertyListener);
IPreferenceStore store = PreferenceConstants.getPreferenceStore();
boolean showCUChildren = store
.getBoolean(PreferenceConstants.SHOW_CU_CHILDREN);
setProvideMembers(showCUChildren);
}
示例4: createContentProvider
import org.eclipse.jdt.ui.PreferenceConstants; //导入方法依赖的package包/类
/**
* This method should only be called inside this class
* and from test cases.
* @return the created content provider
*/
public PackageExplorerContentProvider createContentProvider() {
IPreferenceStore store= PreferenceConstants.getPreferenceStore();
boolean showCUChildren= store.getBoolean(PreferenceConstants.SHOW_CU_CHILDREN);
if (getRootMode() == PROJECTS_AS_ROOTS)
return new PackageExplorerContentProvider(showCUChildren);
else
return new WorkingSetAwareContentProvider(showCUChildren, fWorkingSetModel);
}
示例5: initializeDefaultPreferences
import org.eclipse.jdt.ui.PreferenceConstants; //导入方法依赖的package包/类
@Override
public void initializeDefaultPreferences() {
IPreferenceStore store = PreferenceConstants.getPreferenceStore();
EditorsUI.useAnnotationsPreferencePage(store);
EditorsUI.useQuickDiffPreferencePage(store);
PreferenceConstants.initializeDefaultValues(store);
}
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion-Juno38,代码行数:9,代码来源:JavaUIPreferenceInitializer.java
示例6: getDefaultOutputLocation
import org.eclipse.jdt.ui.PreferenceConstants; //导入方法依赖的package包/类
public static IPath getDefaultOutputLocation(IJavaProject jproj) {
IPreferenceStore store= PreferenceConstants.getPreferenceStore();
if (store.getBoolean(PreferenceConstants.SRCBIN_FOLDERS_IN_NEWPROJ)) {
String outputLocationName= store.getString(PreferenceConstants.SRCBIN_BINNAME);
return jproj.getProject().getFullPath().append(outputLocationName);
} else {
return jproj.getProject().getFullPath();
}
}
示例7: updateUninstalledComputerCount
import org.eclipse.jdt.ui.PreferenceConstants; //导入方法依赖的package包/类
private void updateUninstalledComputerCount() {
IPreferenceStore preferenceStore= PreferenceConstants.getPreferenceStore();
fIsFirstTimeCheckForUninstalledComputers= !preferenceStore.contains(NUM_COMPUTERS_PREF_KEY);
int lastNumberOfComputers= preferenceStore.getInt(NUM_COMPUTERS_PREF_KEY);
int currNumber= fDescriptors.size();
fHasUninstalledComputers= lastNumberOfComputers > currNumber;
preferenceStore.putValue(NUM_COMPUTERS_PREF_KEY, Integer.toString(currNumber));
JavaPlugin.flushInstanceScope();
}
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion-Juno38,代码行数:10,代码来源:CompletionProposalComputerRegistry.java
示例8: updateDialogSettings
import org.eclipse.jdt.ui.PreferenceConstants; //导入方法依赖的package包/类
public void updateDialogSettings(IDialogSettings dialogSettings, IJavaProject[] checkedProjects) {
IDialogSettings settings= dialogSettings.addNewSection(SECTION_JAVADOC);
settings.put(JAVADOC_COMMAND_HISTORY, flatStringList(fJavadocCommandHistory));
if (fJavadocCommandHistory.length > 0) {
IPreferenceStore store= PreferenceConstants.getPreferenceStore();
store.setValue(PreferenceConstants.JAVADOC_COMMAND, fJavadocCommandHistory[0]);
}
settings.put(FROMSTANDARD, fFromStandard);
settings.put(DOCLETNAME, fDocletname);
settings.put(DOCLETPATH, fDocletpath);
settings.put(VISIBILITY, fAccess);
settings.put(USE, fUse);
settings.put(AUTHOR, fAuthor);
settings.put(VERSION, fVersion);
settings.put(NODEPRECATED, fNodeprecated);
settings.put(NODEPRECATEDLIST, fNoDeprecatedlist);
settings.put(SPLITINDEX, fSplitindex);
settings.put(NOINDEX, fNoindex);
settings.put(NOTREE, fNotree);
settings.put(NONAVBAR, fNonavbar);
settings.put(OPENINBROWSER, fOpenInBrowser);
settings.put(SOURCE, fSource);
if (fAntpath.length() != 0)
settings.put(ANTPATH, fAntpath);
if (fDestination.length() != 0)
settings.put(DESTINATION, fDestination);
if (fAdditionalParams.length() != 0)
settings.put(EXTRAOPTIONS, fAdditionalParams);
if (fVMParams.length() != 0)
settings.put(VMOPTIONS, fVMParams);
if (fOverview.length() != 0)
settings.put(OVERVIEW, fOverview);
if (fStylesheet.length() != 0)
settings.put(STYLESHEETFILE, fStylesheet);
if (fTitle.length() != 0)
settings.put(TITLE, fTitle);
if (checkedProjects.length == 1) {
updateRecentSettings(checkedProjects[0]);
}
getRecentSettings().store(settings);
}
示例9: isPackageNameCompressionEnabled
import org.eclipse.jdt.ui.PreferenceConstants; //导入方法依赖的package包/类
private boolean isPackageNameCompressionEnabled() {
IPreferenceStore store= PreferenceConstants.getPreferenceStore();
return store.getBoolean(PreferenceConstants.APPEARANCE_COMPRESS_PACKAGE_NAMES);
}
示例10: getPkgNamePatternForPackagesView
import org.eclipse.jdt.ui.PreferenceConstants; //导入方法依赖的package包/类
private String getPkgNamePatternForPackagesView() {
IPreferenceStore store= PreferenceConstants.getPreferenceStore();
if (!store.getBoolean(PreferenceConstants.APPEARANCE_COMPRESS_PACKAGE_NAMES))
return ""; //$NON-NLS-1$
return store.getString(PreferenceConstants.APPEARANCE_PKG_NAME_PATTERN_FOR_PKG_VIEW);
}
示例11: isPackageNameAbbreviationEnabled
import org.eclipse.jdt.ui.PreferenceConstants; //导入方法依赖的package包/类
private boolean isPackageNameAbbreviationEnabled() {
IPreferenceStore store= PreferenceConstants.getPreferenceStore();
return store.getBoolean(PreferenceConstants.APPEARANCE_ABBREVIATE_PACKAGE_NAMES);
}
示例12: getPkgNameAbbreviationPatternForPackagesView
import org.eclipse.jdt.ui.PreferenceConstants; //导入方法依赖的package包/类
private String getPkgNameAbbreviationPatternForPackagesView() {
IPreferenceStore store= PreferenceConstants.getPreferenceStore();
if (!store.getBoolean(PreferenceConstants.APPEARANCE_ABBREVIATE_PACKAGE_NAMES))
return ""; //$NON-NLS-1$
return store.getString(PreferenceConstants.APPEARANCE_PKG_NAME_ABBREVIATION_PATTERN_FOR_PKG_VIEW);
}