org.eclipse.jdt.internal.ui.preferences.formatter.ProfileStore Java Examples

The following examples show how to use org.eclipse.jdt.internal.ui.preferences.formatter.ProfileStore. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: CleanUpPreferenceUtil.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 6 votes vote down vote up
/**
 * Returns a list of {@link org.eclipse.jdt.internal.ui.preferences.formatter.ProfileManager.Profile} stored in the <code>scope</code>,
 * including the built-in profiles.
 * @param scope the context from which to retrieve the profiles
 * @return list of profiles, not null
 * @since 3.3
 */
public static List<Profile> loadProfiles(IScopeContext scope) {

       CleanUpProfileVersioner versioner= new CleanUpProfileVersioner();
   	ProfileStore profileStore= new ProfileStore(CleanUpConstants.CLEANUP_PROFILES, versioner);

   	List<Profile> list= null;
       try {
           list= profileStore.readProfiles(scope);
       } catch (CoreException e1) {
           JavaPlugin.log(e1);
       }
       if (list == null) {
       	list= getBuiltInProfiles();
       } else {
       	list.addAll(getBuiltInProfiles());
       }

       return list;
   }
 
Example #2
Source File: FormatterModifyDialog.java    From xtext-xtend with Eclipse Public License 2.0 5 votes vote down vote up
public FormatterModifyDialog create(Shell parentShell, Profile profile, ProfileManager profileManager, ProfileStore profileStore,
		boolean newProfile, String dialogPreferencesKey, String lastSavePathKey) {
	FormatterModifyDialog modifyDialog = new FormatterModifyDialog(parentShell, profile, profileManager, profileStore, newProfile,
			dialogPreferencesKey, lastSavePathKey);
	injector.injectMembers(modifyDialog);
	return modifyDialog;
}
 
Example #3
Source File: FormatterModifyDialog.java    From xtext-xtend with Eclipse Public License 2.0 5 votes vote down vote up
public FormatterModifyDialog(Shell parentShell, Profile profile, ProfileManager profileManager, ProfileStore profileStore,
		boolean newProfile, String dialogPreferencesKey, String lastSavePathKey) {
	super(parentShell, profile, profileManager, profileStore, newProfile, dialogPreferencesKey, lastSavePathKey);
	this.fProfile = profile;
	this.fKeyLastFocus = JavaUI.ID_PLUGIN + dialogPreferencesKey + DS_KEY_LAST_FOCUS;
	this.fDialogSettings = JavaPlugin.getDefault().getDialogSettings();
}
 
Example #4
Source File: FormatterConfigurationBlock.java    From xtext-xtend with Eclipse Public License 2.0 4 votes vote down vote up
@Override
protected ModifyDialog createModifyDialog(Shell shell, ProfileManager.Profile profile,
		ProfileManager profileManager, ProfileStore profileStore, boolean newProfile) {
	return formatterModifyDialogFactory.create(shell, profile, profileManager, profileStore, newProfile, "", ""); //$NON-NLS-1$ //$NON-NLS-2$
}
 
Example #5
Source File: FormatterConfigurationBlock.java    From xtext-xtend with Eclipse Public License 2.0 4 votes vote down vote up
@Override
protected abstract ProfileStore createProfileStore(IProfileVersioner versioner);
 
Example #6
Source File: CleanUpConfigurationBlock.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 4 votes vote down vote up
@Override
protected ProfileStore createProfileStore(IProfileVersioner versioner) {
    fProfileStore= new ProfileStore(CleanUpConstants.CLEANUP_PROFILES, versioner);
	return fProfileStore;
   }
 
Example #7
Source File: CleanUpConfigurationBlock.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 4 votes vote down vote up
@Override
protected ModifyDialog createModifyDialog(Shell shell, Profile profile, ProfileManager profileManager, ProfileStore profileStore, boolean newProfile) {
       return new CleanUpModifyDialog(shell, profile, profileManager, profileStore, newProfile, CLEANUP_PAGE_SETTINGS_KEY, DIALOGSTORE_LASTSAVELOADPATH);
   }
 
Example #8
Source File: CleanUpModifyDialog.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 4 votes vote down vote up
public CleanUpModifyDialog(Shell parentShell, Profile profile, ProfileManager profileManager, ProfileStore profileStore, boolean newProfile, String dialogPreferencesKey, String lastSavePathKey) {
 super(parentShell, profile, profileManager, profileStore, newProfile, dialogPreferencesKey, lastSavePathKey);
}