protected void validateSettings(Key changedKey, String oldValue, String newValue) { if (!areSettingsEnabled()) { return; } if (changedKey != null) { if (PREF_PB_MAX_PER_UNIT.equals(changedKey)) { fMaxNumberProblemsStatus= validateMaxNumberProblems(); } else if (PREF_RESOURCE_FILTER.equals(changedKey)) { fResourceFilterStatus= validateResourceFilters(); } else { return; } } else { updateEnableStates(); fMaxNumberProblemsStatus= validateMaxNumberProblems(); fResourceFilterStatus= validateResourceFilters(); } IStatus status= StatusUtil.getMostSevere(new IStatus[] { fMaxNumberProblemsStatus, fResourceFilterStatus }); fContext.statusChanged(status); }
protected Control createPreferenceContent(Composite composite) { return fConfigurationBlock.createContents(composite); }
@Override public void dispose() { if (fConfigurationBlock != null) { fConfigurationBlock.dispose(); } super.dispose(); }
ExpandableComposite excomposite= createStyleSection(composite, label, nColumns); Text text= addTextField(othersComposite, label, PREF_PB_MAX_PER_UNIT, 0, 0); GridData gd= (GridData) text.getLayoutData(); gd.widthHint= fPixelConverter.convertWidthInCharsToPixels(8); addCheckBox(othersComposite, label, PREF_ENABLE_EXCLUSION_PATTERNS, enableDisableValues, 0); addCheckBox(othersComposite, label, PREF_ENABLE_MULTIPLE_OUTPUT_LOCATIONS, enableDisableValues, 0); excomposite= createStyleSection(composite, label, nColumns); addCheckBox(othersComposite, label, PREF_BUILD_INVALID_CLASSPATH, abortIgnoreValues, 0); addComboBox(othersComposite, label, PREF_PB_INCOMPLETE_BUILDPATH, errorWarning, errorWarningLabels, 0); addComboBox(othersComposite, label, PREF_PB_CIRCULAR_BUILDPATH, errorWarning, errorWarningLabels, 0); addComboBox(othersComposite, label, PREF_PB_INCOMPATIBLE_JDK_LEVEL, errorWarningInfoIgnore, errorWarningInfoIgnoreLabels, 0); addComboBox(othersComposite, label, PREF_PB_OUTPUT_LOCATION_OVERLAPPING_ANOTHER_SOURCE, errorWarningInfoIgnore, errorWarningInfoIgnoreLabels, 0); addComboBox(othersComposite, label, PREF_PB_STRICTLY_COMPATIBLE_JRE_NOT_AVAILABLE, errorWarningInfoIgnore, errorWarningInfoIgnoreLabels, 0); excomposite= createStyleSection(composite, label, nColumns); addComboBox(othersComposite, label, PREF_PB_DUPLICATE_RESOURCE, errorWarning, errorWarningLabels, 0); addCheckBox(othersComposite, label, PREF_BUILD_CLEAN_OUTPUT_FOLDER, cleanIgnoreValues, 0);
@Override protected Control createContents(Composite parent) { fPixelConverter= new PixelConverter(parent); setShell(parent.getShell()); Composite mainComp= new Composite(parent, SWT.NONE); mainComp.setFont(parent.getFont()); GridLayout layout= new GridLayout(); layout.marginHeight= 0; layout.marginWidth= 0; mainComp.setLayout(layout); Composite othersComposite= createBuildPathTabContent(mainComp); GridData gridData= new GridData(GridData.FILL, GridData.FILL, true, true); gridData.heightHint= fPixelConverter.convertHeightInCharsToPixels(20); othersComposite.setLayoutData(gridData); validateSettings(null, null, null); return mainComp; }
public JavaBuildConfigurationBlock(IStatusChangeListener context, IProject project, IWorkbenchPreferenceContainer container) { super(context, project, getKeys(), container); fMaxNumberProblemsStatus= new StatusInfo(); fResourceFilterStatus= new StatusInfo(); }
public void createControl(Composite parent) { IWorkbenchPreferenceContainer container= (IWorkbenchPreferenceContainer) getContainer(); fConfigurationBlock= new JavaBuildConfigurationBlock(getNewStatusChangedListener(), getProject(), container); super.createControl(parent); if (isProjectPreferencePage()) { PlatformUI.getWorkbench().getHelpSystem().setHelp(getControl(), IJavaHelpContextIds.JAVA_BUILD_PROPERTY_PAGE); } else { PlatformUI.getWorkbench().getHelpSystem().setHelp(getControl(), IJavaHelpContextIds.JAVA_BUILD_PREFERENCE_PAGE); } }
ExpandableComposite excomposite= createStyleSection(composite, label, nColumns); Text text= addTextField(othersComposite, label, PREF_PB_MAX_PER_UNIT, 0, 0); GridData gd= (GridData) text.getLayoutData(); gd.widthHint= fPixelConverter.convertWidthInCharsToPixels(8); addCheckBox(othersComposite, label, PREF_ENABLE_EXCLUSION_PATTERNS, enableDisableValues, 0); addCheckBox(othersComposite, label, PREF_ENABLE_MULTIPLE_OUTPUT_LOCATIONS, enableDisableValues, 0); excomposite= createStyleSection(composite, label, nColumns); addCheckBox(othersComposite, label, PREF_BUILD_INVALID_CLASSPATH, abortIgnoreValues, 0); addComboBox(othersComposite, label, PREF_PB_INCOMPLETE_BUILDPATH, errorWarning, errorWarningLabels, 0); addComboBox(othersComposite, label, PREF_PB_CIRCULAR_BUILDPATH, errorWarning, errorWarningLabels, 0); addComboBox(othersComposite, label, PREF_PB_INCOMPATIBLE_JDK_LEVEL, errorWarningInfoIgnore, errorWarningInfoIgnoreLabels, 0); addComboBox(othersComposite, label, PREF_PB_OUTPUT_LOCATION_OVERLAPPING_ANOTHER_SOURCE, errorWarningInfoIgnore, errorWarningInfoIgnoreLabels, 0); addComboBox(othersComposite, label, PREF_PB_STRICTLY_COMPATIBLE_JRE_NOT_AVAILABLE, errorWarningInfoIgnore, errorWarningInfoIgnoreLabels, 0); addComboBox(othersComposite, label, PREF_PB_COMPILER_COMPLIANCE_DOES_NOT_MATCH_JRE, errorWarningInfoIgnore, errorWarningInfoIgnoreLabels, 0); addComboBox(othersComposite, label, PREF_PB_MAIN_ONLY_PROJECT_HAS_TEST_ONLY_DEPENDENCY, errorIgnore, errorIgnoreLabels, 0); excomposite= createStyleSection(composite, label, nColumns);
protected Control createContents(Composite parent) { fPixelConverter= new PixelConverter(parent); setShell(parent.getShell()); Composite mainComp= new Composite(parent, SWT.NONE); mainComp.setFont(parent.getFont()); GridLayout layout= new GridLayout(); layout.marginHeight= 0; layout.marginWidth= 0; mainComp.setLayout(layout); Composite othersComposite= createBuildPathTabContent(mainComp); GridData gridData= new GridData(GridData.FILL, GridData.FILL, true, true); gridData.heightHint= fPixelConverter.convertHeightInCharsToPixels(20); othersComposite.setLayoutData(gridData); validateSettings(null, null, null); return mainComp; }
public JavaBuildConfigurationBlock(IStatusChangeListener context, IProject project, IWorkbenchPreferenceContainer container) { super(context, project, getKeys(), container); fMaxNumberProblemsStatus= new StatusInfo(); fResourceFilterStatus= new StatusInfo(); }
@Override public void createControl(Composite parent) { IWorkbenchPreferenceContainer container= (IWorkbenchPreferenceContainer) getContainer(); fConfigurationBlock= new JavaBuildConfigurationBlock(getNewStatusChangedListener(), getProject(), container); super.createControl(parent); if (isProjectPreferencePage()) { PlatformUI.getWorkbench().getHelpSystem().setHelp(getControl(), IJavaHelpContextIds.JAVA_BUILD_PROPERTY_PAGE); } else { PlatformUI.getWorkbench().getHelpSystem().setHelp(getControl(), IJavaHelpContextIds.JAVA_BUILD_PREFERENCE_PAGE); } }
ExpandableComposite excomposite= createStyleSection(composite, label, nColumns); Text text= addTextField(othersComposite, label, PREF_PB_MAX_PER_UNIT, 0, 0); GridData gd= (GridData) text.getLayoutData(); gd.widthHint= fPixelConverter.convertWidthInCharsToPixels(8); addCheckBox(othersComposite, label, PREF_ENABLE_EXCLUSION_PATTERNS, enableDisableValues, 0); addCheckBox(othersComposite, label, PREF_ENABLE_MULTIPLE_OUTPUT_LOCATIONS, enableDisableValues, 0); excomposite= createStyleSection(composite, label, nColumns); addCheckBox(othersComposite, label, PREF_BUILD_INVALID_CLASSPATH, abortIgnoreValues, 0); addComboBox(othersComposite, label, PREF_PB_INCOMPLETE_BUILDPATH, errorWarning, errorWarningLabels, 0); addComboBox(othersComposite, label, PREF_PB_CIRCULAR_BUILDPATH, errorWarning, errorWarningLabels, 0); addComboBox(othersComposite, label, PREF_PB_INCOMPATIBLE_JDK_LEVEL, errorWarningIgnore, errorWarningIgnoreLabels, 0); excomposite= createStyleSection(composite, label, nColumns); addComboBox(othersComposite, label, PREF_PB_DUPLICATE_RESOURCE, errorWarning, errorWarningLabels, 0); addCheckBox(othersComposite, label, PREF_BUILD_CLEAN_OUTPUT_FOLDER, cleanIgnoreValues, 0); addCheckBox(othersComposite, label, PREF_RECREATE_MODIFIED_CLASS_FILES, enableIgnoreValues, 0); text= addTextField(othersComposite, label, PREF_RESOURCE_FILTER, 0, 0);
@Override protected void validateSettings(Key changedKey, String oldValue, String newValue) { if (!areSettingsEnabled()) { return; } if (changedKey != null) { if (PREF_PB_MAX_PER_UNIT.equals(changedKey)) { fMaxNumberProblemsStatus= validateMaxNumberProblems(); } else if (PREF_RESOURCE_FILTER.equals(changedKey)) { fResourceFilterStatus= validateResourceFilters(); } else { return; } } else { updateEnableStates(); fMaxNumberProblemsStatus= validateMaxNumberProblems(); fResourceFilterStatus= validateResourceFilters(); } IStatus status= StatusUtil.getMostSevere(new IStatus[] { fMaxNumberProblemsStatus, fResourceFilterStatus }); fContext.statusChanged(status); }
@Override protected Control createContents(Composite parent) { fPixelConverter= new PixelConverter(parent); setShell(parent.getShell()); Composite mainComp= new Composite(parent, SWT.NONE); mainComp.setFont(parent.getFont()); GridLayout layout= new GridLayout(); layout.marginHeight= 0; layout.marginWidth= 0; mainComp.setLayout(layout); Composite othersComposite= createBuildPathTabContent(mainComp); GridData gridData= new GridData(GridData.FILL, GridData.FILL, true, true); gridData.heightHint= fPixelConverter.convertHeightInCharsToPixels(20); othersComposite.setLayoutData(gridData); validateSettings(null, null, null); return mainComp; }
public JavaBuildConfigurationBlock(IStatusChangeListener context, IProject project, IWorkbenchPreferenceContainer container) { super(context, project, getKeys(), container); fMaxNumberProblemsStatus= new StatusInfo(); fResourceFilterStatus= new StatusInfo(); }
@Override public void createControl(Composite parent) { IWorkbenchPreferenceContainer container= (IWorkbenchPreferenceContainer) getContainer(); fConfigurationBlock= new JavaBuildConfigurationBlock(getNewStatusChangedListener(), getProject(), container); super.createControl(parent); if (isProjectPreferencePage()) { PlatformUI.getWorkbench().getHelpSystem().setHelp(getControl(), IJavaHelpContextIds.JAVA_BUILD_PROPERTY_PAGE); } else { PlatformUI.getWorkbench().getHelpSystem().setHelp(getControl(), IJavaHelpContextIds.JAVA_BUILD_PREFERENCE_PAGE); } }
public void dispose() { if (fConfigurationBlock != null) { fConfigurationBlock.dispose(); } super.dispose(); }
@Override protected Control createPreferenceContent(Composite composite) { return fConfigurationBlock.createContents(composite); }
@Override protected void validateSettings(Key changedKey, String oldValue, String newValue) { if (!areSettingsEnabled()) { return; } if (changedKey != null) { if (PREF_PB_MAX_PER_UNIT.equals(changedKey)) { fMaxNumberProblemsStatus= validateMaxNumberProblems(); } else if (PREF_RESOURCE_FILTER.equals(changedKey)) { fResourceFilterStatus= validateResourceFilters(); } else { return; } } else { updateEnableStates(); fMaxNumberProblemsStatus= validateMaxNumberProblems(); fResourceFilterStatus= validateResourceFilters(); } IStatus status= StatusUtil.getMostSevere(new IStatus[] { fMaxNumberProblemsStatus, fResourceFilterStatus }); fContext.statusChanged(status); }
private boolean hasProjectSpecificOptions() { Key[] keys; switch(fPreferencePage) { case BUILDING: keys= JavaBuildConfigurationBlock.getKeys(); break; case JAVADOC: keys= JavadocProblemsConfigurationBlock.getKeys(); break; case ERRORS_WARNINGS: keys= ProblemSeveritiesConfigurationBlock.getKeys(); break; default: return false; // cannot happen } return OptionsConfigurationBlock.hasProjectSpecificOptions(fProject.getProject(), keys, null); } }