本文整理匯總了Java中com.strobel.decompiler.DecompilerSettings.setIncludeErrorDiagnostics方法的典型用法代碼示例。如果您正苦於以下問題:Java DecompilerSettings.setIncludeErrorDiagnostics方法的具體用法?Java DecompilerSettings.setIncludeErrorDiagnostics怎麽用?Java DecompilerSettings.setIncludeErrorDiagnostics使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類com.strobel.decompiler.DecompilerSettings
的用法示例。
在下文中一共展示了DecompilerSettings.setIncludeErrorDiagnostics方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: loadConfig
import com.strobel.decompiler.DecompilerSettings; //導入方法依賴的package包/類
/**
* Do not load, get the loaded instance
*/
private void loadConfig() {
decompilerSettings = new DecompilerSettings();
if (decompilerSettings.getJavaFormattingOptions() == null) {
decompilerSettings.setJavaFormattingOptions(JavaFormattingOptions.createDefault());
}
luytenPreferences = new LuytenPreferences();
mainWindowPosition = new WindowPosition();
findWindowPosition = new WindowPosition();
try {
Preferences prefs = Preferences.userNodeForPackage(ConfigSaver.class);
if (!prefs.get(LANGUAGE_NAME_ID, decompilerSettings.getLanguage().getName())
.equals(decompilerSettings.getLanguage().getName()))
prefs.put(LANGUAGE_NAME_ID, decompilerSettings.getLanguage().getName());
decompilerSettings.setFlattenSwitchBlocks(
prefs.getBoolean(FLATTEN_SWITCH_BLOCKS_ID, decompilerSettings.getFlattenSwitchBlocks()));
decompilerSettings.setForceExplicitImports(
prefs.getBoolean(FORCE_EXPLICIT_IMPORTS_ID, decompilerSettings.getForceExplicitImports()));
decompilerSettings.setShowSyntheticMembers(
prefs.getBoolean(SHOW_SYNTHETIC_MEMBERS_ID, decompilerSettings.getShowSyntheticMembers()));
decompilerSettings.setExcludeNestedTypes(
prefs.getBoolean(EXCLUDE_NESTED_TYPES_ID, decompilerSettings.getExcludeNestedTypes()));
decompilerSettings.setForceExplicitTypeArguments(prefs.getBoolean(FORCE_EXPLICIT_TYPE_ARGUMENTS_ID,
decompilerSettings.getForceExplicitTypeArguments()));
decompilerSettings.setRetainRedundantCasts(
prefs.getBoolean(RETAIN_REDUNDANT_CASTS_ID, decompilerSettings.getRetainRedundantCasts()));
decompilerSettings.setIncludeErrorDiagnostics(
prefs.getBoolean(INCLUDE_ERROR_DIAGNOSTICS_ID, decompilerSettings.getIncludeErrorDiagnostics()));
decompilerSettings.setLanguage(
findLanguageByName(prefs.get(LANGUAGE_NAME_ID, decompilerSettings.getLanguage().getName())));
decompilerSettings.setUnicodeOutputEnabled(prefs.getBoolean(UNICODE_REPLACE_ENABLED_ID, false));
mainWindowPosition = loadWindowPosition(prefs, MAIN_WINDOW_ID_PREFIX);
findWindowPosition = loadWindowPosition(prefs, FIND_WINDOW_ID_PREFIX);
luytenPreferences = loadLuytenPreferences(prefs);
} catch (Exception e) {
Luyten.showExceptionDialog("Exception!", e);
}
}
示例2: loadConfig
import com.strobel.decompiler.DecompilerSettings; //導入方法依賴的package包/類
/**
* Do not load, get the loaded instance
*/
private void loadConfig() {
decompilerSettings = new DecompilerSettings();
if (decompilerSettings.getJavaFormattingOptions() == null) {
decompilerSettings.setJavaFormattingOptions(JavaFormattingOptions.createDefault());
}
luytenPreferences = new LuytenPreferences();
mainWindowPosition = new WindowPosition();
findWindowPosition = new WindowPosition();
try {
Preferences prefs = Preferences.userNodeForPackage(ConfigSaver.class);
if (!prefs.get(LANGUAGE_NAME_ID, decompilerSettings.getLanguage().getName())
.equals(decompilerSettings.getLanguage().getName()))
prefs.put(LANGUAGE_NAME_ID, decompilerSettings.getLanguage().getName());
decompilerSettings.setFlattenSwitchBlocks(
prefs.getBoolean(FLATTEN_SWITCH_BLOCKS_ID, decompilerSettings.getFlattenSwitchBlocks()));
decompilerSettings.setForceExplicitImports(
prefs.getBoolean(FORCE_EXPLICIT_IMPORTS_ID, decompilerSettings.getForceExplicitImports()));
decompilerSettings.setShowSyntheticMembers(
prefs.getBoolean(SHOW_SYNTHETIC_MEMBERS_ID, decompilerSettings.getShowSyntheticMembers()));
decompilerSettings.setExcludeNestedTypes(
prefs.getBoolean(EXCLUDE_NESTED_TYPES_ID, decompilerSettings.getExcludeNestedTypes()));
decompilerSettings.setForceExplicitTypeArguments(prefs.getBoolean(FORCE_EXPLICIT_TYPE_ARGUMENTS_ID,
decompilerSettings.getForceExplicitTypeArguments()));
decompilerSettings.setRetainRedundantCasts(
prefs.getBoolean(RETAIN_REDUNDANT_CASTS_ID, decompilerSettings.getRetainRedundantCasts()));
decompilerSettings.setIncludeErrorDiagnostics(
prefs.getBoolean(INCLUDE_ERROR_DIAGNOSTICS_ID, decompilerSettings.getIncludeErrorDiagnostics()));
decompilerSettings.setLanguage(
findLanguageByName(prefs.get(LANGUAGE_NAME_ID, decompilerSettings.getLanguage().getName())));
decompilerSettings.setUnicodeOutputEnabled(prefs.getBoolean(UNICODE_REPLACE_ENABLED_ID, false));
mainWindowPosition = loadWindowPosition(prefs, MAIN_WINDOW_ID_PREFIX);
findWindowPosition = loadWindowPosition(prefs, FIND_WINDOW_ID_PREFIX);
luytenPreferences = loadLuytenPreferences(prefs);
} catch (Exception e) {
Luyten.showExceptionDialog("Exception!", e);
}
}
示例3: cloneSettings
import com.strobel.decompiler.DecompilerSettings; //導入方法依賴的package包/類
private DecompilerSettings cloneSettings() {
DecompilerSettings settings = ConfigSaver.getLoadedInstance().getDecompilerSettings();
DecompilerSettings newSettings = new DecompilerSettings();
if (newSettings.getJavaFormattingOptions() == null) {
newSettings.setJavaFormattingOptions(JavaFormattingOptions.createDefault());
}
// synchronized: against main menu changes
synchronized (settings) {
newSettings.setExcludeNestedTypes(settings.getExcludeNestedTypes());
newSettings.setFlattenSwitchBlocks(settings.getFlattenSwitchBlocks());
newSettings.setForceExplicitImports(settings.getForceExplicitImports());
newSettings.setForceExplicitTypeArguments(settings.getForceExplicitTypeArguments());
newSettings.setOutputFileHeaderText(settings.getOutputFileHeaderText());
newSettings.setLanguage(settings.getLanguage());
newSettings.setShowSyntheticMembers(settings.getShowSyntheticMembers());
newSettings.setAlwaysGenerateExceptionVariableForCatchBlocks(
settings.getAlwaysGenerateExceptionVariableForCatchBlocks());
newSettings.setOutputDirectory(settings.getOutputDirectory());
newSettings.setRetainRedundantCasts(settings.getRetainRedundantCasts());
newSettings.setIncludeErrorDiagnostics(settings.getIncludeErrorDiagnostics());
newSettings.setIncludeLineNumbersInBytecode(settings.getIncludeLineNumbersInBytecode());
newSettings.setRetainPointlessSwitches(settings.getRetainPointlessSwitches());
newSettings.setUnicodeOutputEnabled(settings.isUnicodeOutputEnabled());
newSettings.setMergeVariables(settings.getMergeVariables());
newSettings.setShowDebugLineNumbers(settings.getShowDebugLineNumbers());
}
return newSettings;
}