fInsertPosition= fSettings.getInt(SETTINGS_INSERTPOSITION);
try { fVisibilityModifier= fSettings.getInt(VISIBILITY_MODIFIER); fFinal= fSettings.getBoolean(FINAL_MODIFIER); fSynchronized= fSettings.getBoolean(SYNCHRONIZED_MODIFIER); fInsertPosition= fSettings.getInt(SETTINGS_INSERTPOSITION); } catch (NumberFormatException e) { fSettings= dialogSettings.addNewSection(SETTINGS_SECTION); fSettings.put(VISIBILITY_MODIFIER, Modifier.PUBLIC); fSettings.put(FINAL_MODIFIER, false); fSettings.put(SYNCHRONIZED_MODIFIER, false); fSettings.put(SETTINGS_INSERTPOSITION, 1); }
	public SourceActionDialog(Shell parent, ILabelProvider labelProvider, ITreeContentProvider contentProvider, CompilationUnitEditor editor, IType type) {		super(parent, labelProvider, contentProvider);		fEditor= editor;		fContentProvider= contentProvider;				fType= type;		fCommentString= ActionMessages.getString("SourceActionDialog.createMethodComment"); //$NON-NLS-1$				// Take the default from the default for generating comments from the code gen prefs		CodeGenerationSettings settings= JavaPreferencesSettings.getCodeGenerationSettings();		GenStubSettings genStubSettings= new GenStubSettings(settings);		fGenerateComment= genStubSettings.createComments;				IDialogSettings dialogSettings= JavaPlugin.getDefault().getDialogSettings();		fSettings= dialogSettings.getSection(SETTINGS_SECTION);				if (fSettings == null)  {			fSettings= dialogSettings.addNewSection(SETTINGS_SECTION);			fSettings.put(SETTINGS_INSERTPOSITION, 1); //$NON-NLS-1$		}		fInsertPosition= fSettings.getInt(SETTINGS_INSERTPOSITION);	}