public void update(Observable o, Object arg) { final int value= ((Integer)arg).intValue(); switch (value) { case ProfileManager.PROFILE_CREATED_EVENT: case ProfileManager.PROFILE_DELETED_EVENT: case ProfileManager.SELECTION_CHANGED_EVENT: case ProfileManager.SETTINGS_CHANGED_EVENT: fill(profileManager.getSelected().getSettings(), sharedSettings); fBrowserBlock.setText(getSelectedCleanUpsInfo(cleanUps)); } }
@Override public void update(Observable o, Object arg) { final int value= ((Integer)arg).intValue(); switch (value) { case ProfileManager.PROFILE_CREATED_EVENT: case ProfileManager.PROFILE_DELETED_EVENT: case ProfileManager.SELECTION_CHANGED_EVENT: case ProfileManager.SETTINGS_CHANGED_EVENT: fill(profileManager.getSelected().getSettings(), sharedSettings); cleanUpListBlock.setText(getSelectedCleanUpsInfo(cleanUps)); } }
private void showCustomSettings(BulletListBlock bulletListBlock) { StringBuffer buf= new StringBuffer(); final ICleanUp[] cleanUps= CleanUpRefactoring.createCleanUps(fCustomSettings); for (int i= 0; i < cleanUps.length; i++) { String[] descriptions= cleanUps[i].getDescriptions(); if (descriptions != null) { for (int j= 0; j < descriptions.length; j++) { if (buf.length() > 0) { buf.append('\n'); } buf.append(descriptions[j]); } } } bulletListBlock.setText(buf.toString()); }
@Override public void update(Observable o, Object arg) { final int value= ((Integer)arg).intValue(); switch (value) { case ProfileManager.PROFILE_CREATED_EVENT: case ProfileManager.PROFILE_DELETED_EVENT: case ProfileManager.SELECTION_CHANGED_EVENT: case ProfileManager.SETTINGS_CHANGED_EVENT: fill(profileManager.getSelected().getSettings(), sharedSettings); cleanUpListBlock.setText(getSelectedCleanUpsInfo(cleanUps)); } }
private void settingsChanged() { fFormatCodeButton.setSelection(CleanUpOptions.TRUE.equals(fSettings.get(CleanUpConstants.FORMAT_SOURCE_CODE))); boolean isFormatting= fFormatCodeButton.getSelection(); fFormatChangedOnlyButton.setSelection(CleanUpOptions.TRUE.equals(fSettings.get(CleanUpConstants.FORMAT_SOURCE_CODE_CHANGES_ONLY))); fFormatAllButton.setSelection(CleanUpOptions.FALSE.equals(fSettings.get(CleanUpConstants.FORMAT_SOURCE_CODE_CHANGES_ONLY))); fFormatChangedOnlyButton.setEnabled(isFormatting); fFormatAllButton.setEnabled(isFormatting); fFormatConfigLink.setEnabled(isFormatting); fOrganizeImportsButton.setSelection(CleanUpOptions.TRUE.equals(fSettings.get(CleanUpConstants.ORGANIZE_IMPORTS))); fOrganizeImportsConfigLink.setEnabled(fOrganizeImportsButton.getSelection()); fAdditionalActionButton.setSelection(CleanUpOptions.TRUE.equals(fSettings.get(CleanUpConstants.CLEANUP_ON_SAVE_ADDITIONAL_OPTIONS))); boolean additionalEnabled= CleanUpOptions.TRUE.equals(fSettings.get(CleanUpConstants.CLEANUP_ON_SAVE_ADDITIONAL_OPTIONS)); fSelectedActionsText.setEnabled(additionalEnabled); fConfigureButton.setEnabled(additionalEnabled); Map<String, String> settings= new HashMap<>(fSettings); settings.put(CleanUpConstants.FORMAT_SOURCE_CODE, CleanUpOptions.FALSE); settings.put(CleanUpConstants.ORGANIZE_IMPORTS, CleanUpOptions.FALSE); CleanUpOptions options= new MapCleanUpOptions(settings); fSelectedActionsText.setText(getSelectedCleanUpsText(options)); }
private void settingsChanged() { fFormatCodeButton.setSelection(CleanUpOptions.TRUE.equals(fSettings.get(CleanUpConstants.FORMAT_SOURCE_CODE))); boolean isFormatting= fFormatCodeButton.getSelection(); fFormatChangedOnlyButton.setSelection(CleanUpOptions.TRUE.equals(fSettings.get(CleanUpConstants.FORMAT_SOURCE_CODE_CHANGES_ONLY))); fFormatAllButton.setSelection(CleanUpOptions.FALSE.equals(fSettings.get(CleanUpConstants.FORMAT_SOURCE_CODE_CHANGES_ONLY))); fFormatChangedOnlyButton.setEnabled(isFormatting); fFormatAllButton.setEnabled(isFormatting); fFormatConfigLink.setEnabled(isFormatting); fOrganizeImportsButton.setSelection(CleanUpOptions.TRUE.equals(fSettings.get(CleanUpConstants.ORGANIZE_IMPORTS))); fOrganizeImportsConfigLink.setEnabled(fOrganizeImportsButton.getSelection()); fAdditionalActionButton.setSelection(CleanUpOptions.TRUE.equals(fSettings.get(CleanUpConstants.CLEANUP_ON_SAVE_ADDITIONAL_OPTIONS))); boolean additionalEnabled= CleanUpOptions.TRUE.equals(fSettings.get(CleanUpConstants.CLEANUP_ON_SAVE_ADDITIONAL_OPTIONS)); fSelectedActionsText.setEnabled(additionalEnabled); fConfigureButton.setEnabled(additionalEnabled); Map<String, String> settings= new HashMap<>(fSettings); settings.put(CleanUpConstants.FORMAT_SOURCE_CODE, CleanUpOptions.FALSE); settings.put(CleanUpConstants.ORGANIZE_IMPORTS, CleanUpOptions.FALSE); CleanUpOptions options= new MapCleanUpOptions(settings); fSelectedActionsText.setText(getSelectedCleanUpsText(options)); }
private void showCustomSettings(BulletListBlock bulletListBlock) { StringBuilder buf= new StringBuilder(); final ICleanUp[] cleanUps= JavaPlugin.getDefault().getCleanUpRegistry().createCleanUps(); CleanUpOptions options= new MapCleanUpOptions(fCustomSettings); for (int i= 0; i < cleanUps.length; i++) { cleanUps[i].setOptions(options); String[] descriptions= cleanUps[i].getStepDescriptions(); if (descriptions != null) { for (int j= 0; j < descriptions.length; j++) { if (buf.length() > 0) { buf.append('\n'); } buf.append(descriptions[j]); } } } bulletListBlock.setText(buf.toString()); }
private void showCustomSettings(BulletListBlock bulletListBlock) { StringBuffer buf= new StringBuffer(); final ICleanUp[] cleanUps= JavaPlugin.getDefault().getCleanUpRegistry().createCleanUps(); CleanUpOptions options= new MapCleanUpOptions(fCustomSettings); for (int i= 0; i < cleanUps.length; i++) { cleanUps[i].setOptions(options); String[] descriptions= cleanUps[i].getStepDescriptions(); if (descriptions != null) { for (int j= 0; j < descriptions.length; j++) { if (buf.length() > 0) { buf.append('\n'); } buf.append(descriptions[j]); } } } bulletListBlock.setText(buf.toString()); }
GridData gridData= new GridData(SWT.FILL, SWT.FILL, true, true); cleanUpListBlock.setLayoutData(gridData); cleanUpListBlock.setText(fCleanUpNames);
GridData gridData= new GridData(SWT.FILL, SWT.FILL, true, true); cleanUpListBlock.setLayoutData(gridData); cleanUpListBlock.setText(fCleanUpNames);
Control control= fBrowserBlock.createControl(composite); ((GridData)control.getLayoutData()).horizontalSpan= numColumns; fBrowserBlock.setText(getSelectedCleanUpsInfo(cleanUps));
gridData.horizontalSpan= numColumns; cleanUpListBlock.setLayoutData(gridData); cleanUpListBlock.setText(getSelectedCleanUpsInfo(cleanUps));
gridData.horizontalSpan= numColumns; cleanUpListBlock.setLayoutData(gridData); cleanUpListBlock.setText(getSelectedCleanUpsInfo(cleanUps));