Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSergey Prigogin2012-12-27 19:22:11 -0500
committerSergey Prigogin2012-12-27 19:54:43 -0500
commitf7f56bb08eb9fb47d04d5a3791a2c0b76520f37e (patch)
tree283255a413d1ecaaa77dc58af016a61372bf5b23 /codan/org.eclipse.cdt.codan.ui
parent1ff1f798d5ef2379d9bec3eee2dc61406de70180 (diff)
downloadorg.eclipse.cdt-f7f56bb08eb9fb47d04d5a3791a2c0b76520f37e.tar.gz
org.eclipse.cdt-f7f56bb08eb9fb47d04d5a3791a2c0b76520f37e.tar.xz
org.eclipse.cdt-f7f56bb08eb9fb47d04d5a3791a2c0b76520f37e.zip
Bug 397208 - Problem markers don't get updated when preferences change
Diffstat (limited to 'codan/org.eclipse.cdt.codan.ui')
-rw-r--r--codan/org.eclipse.cdt.codan.ui/.settings/org.eclipse.jdt.core.prefs24
-rw-r--r--codan/org.eclipse.cdt.codan.ui/META-INF/MANIFEST.MF17
-rw-r--r--codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/CodanUIMessages.java1
-rw-r--r--codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/CodanUIMessages.properties1
-rw-r--r--codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/preferences/CodanPreferencePage.java140
-rw-r--r--codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/preferences/FileScopePreferencePage.java26
6 files changed, 179 insertions, 30 deletions
diff --git a/codan/org.eclipse.cdt.codan.ui/.settings/org.eclipse.jdt.core.prefs b/codan/org.eclipse.cdt.codan.ui/.settings/org.eclipse.jdt.core.prefs
index 4657fb0782..604e1976e5 100644
--- a/codan/org.eclipse.cdt.codan.ui/.settings/org.eclipse.jdt.core.prefs
+++ b/codan/org.eclipse.cdt.codan.ui/.settings/org.eclipse.jdt.core.prefs
@@ -1,5 +1,9 @@
-#Sun Feb 27 22:29:21 EST 2011
eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore
+org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull
+org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault
+org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
+org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
@@ -18,6 +22,7 @@ org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=
org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=ignore
org.eclipse.jdt.core.compiler.problem.fallthroughCase=warning
org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
@@ -25,12 +30,15 @@ org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
+org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled
org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=warning
org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=error
+org.eclipse.jdt.core.compiler.problem.missingDefaultCase=ignore
org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=disabled
org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=warning
org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
@@ -39,20 +47,31 @@ org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=warni
org.eclipse.jdt.core.compiler.problem.noEffectAssignment=error
org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=error
org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
+org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error
org.eclipse.jdt.core.compiler.problem.nullReference=error
+org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error
+org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning
org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=error
org.eclipse.jdt.core.compiler.problem.potentialNullReference=warning
+org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=ignore
org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning
org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning
+org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=ignore
org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore
org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
+org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
+org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=enabled
org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
+org.eclipse.jdt.core.compiler.problem.unclosedCloseable=warning
org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning
@@ -65,7 +84,8 @@ org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverridin
org.eclipse.jdt.core.compiler.problem.unusedImport=error
org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
-org.eclipse.jdt.core.compiler.problem.unusedParameter=warning
+org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
diff --git a/codan/org.eclipse.cdt.codan.ui/META-INF/MANIFEST.MF b/codan/org.eclipse.cdt.codan.ui/META-INF/MANIFEST.MF
index 0f45b872e6..84bce9e534 100644
--- a/codan/org.eclipse.cdt.codan.ui/META-INF/MANIFEST.MF
+++ b/codan/org.eclipse.cdt.codan.ui/META-INF/MANIFEST.MF
@@ -5,17 +5,18 @@ Bundle-SymbolicName: org.eclipse.cdt.codan.ui; singleton:=true
Bundle-Version: 3.2.0.qualifier
Bundle-Activator: org.eclipse.cdt.codan.internal.ui.CodanUIActivator
Bundle-Vendor: %Bundle-Vendor
-Require-Bundle: org.eclipse.ui,
- org.eclipse.core.runtime,
- org.eclipse.core.resources,
- org.eclipse.ui.workbench.texteditor,
- org.eclipse.cdt.codan.core,
- org.eclipse.jface.text,
- org.eclipse.ui.ide,
+Require-Bundle: org.eclipse.cdt.codan.core,
+ org.eclipse.cdt.core,
org.eclipse.cdt.ui,
org.eclipse.core.filesystem,
+ org.eclipse.core.resources,
+ org.eclipse.core.runtime,
+ org.eclipse.jface.text,
+ org.eclipse.ui,
org.eclipse.ui.console,
- org.eclipse.ui.editors
+ org.eclipse.ui.editors,
+ org.eclipse.ui.ide,
+ org.eclipse.ui.workbench.texteditor
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-ActivationPolicy: lazy
Export-Package: org.eclipse.cdt.codan.internal.ui;x-friends:="org.eclipse.cdt.codan.ui.cxx",
diff --git a/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/CodanUIMessages.java b/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/CodanUIMessages.java
index 821c5c4d54..04c58d57da 100644
--- a/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/CodanUIMessages.java
+++ b/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/CodanUIMessages.java
@@ -30,6 +30,7 @@ public class CodanUIMessages extends NLS {
public static String CodanPreferencePage_MessageLabel;
public static String CodanPreferencePage_NoInfo;
public static String CodanPreferencePage_Parameters;
+ public static String CodanPreferencePage_Update_markers;
public static String ProblemsTreeEditor_NameColumn;
public static String ProblemsTreeEditor_Problems;
public static String ProblemsTreeEditor_SeverityColumn;
diff --git a/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/CodanUIMessages.properties b/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/CodanUIMessages.properties
index 171453a754..6be7ba9769 100644
--- a/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/CodanUIMessages.properties
+++ b/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/CodanUIMessages.properties
@@ -22,6 +22,7 @@ CodanPreferencePage_Info=Info
CodanPreferencePage_MessageLabel=Message:
CodanPreferencePage_NoInfo=No description
CodanPreferencePage_Parameters=Parameters:
+CodanPreferencePage_Update_markers=Updating error markers
CustomizeProblemComposite_LaunchingTab=Launching
CustomizeProblemComposite_TabParameters=Preferences
CustomizeProblemComposite_TabScope=Scope
diff --git a/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/preferences/CodanPreferencePage.java b/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/preferences/CodanPreferencePage.java
index 062a395ba4..5c9f5cbbd1 100644
--- a/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/preferences/CodanPreferencePage.java
+++ b/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/preferences/CodanPreferencePage.java
@@ -8,23 +8,49 @@
* Contributors:
* Alena Laskavaia - initial API and implementation
* Alex Ruiz (Google)
+ * Sergey Prigogin (Google)
*******************************************************************************/
package org.eclipse.cdt.codan.internal.ui.preferences;
import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashSet;
import java.util.Iterator;
+import java.util.Set;
import org.eclipse.cdt.codan.core.CodanCorePlugin;
import org.eclipse.cdt.codan.core.CodanRuntime;
+import org.eclipse.cdt.codan.core.model.CheckerLaunchMode;
+import org.eclipse.cdt.codan.core.model.IChecker;
import org.eclipse.cdt.codan.core.model.ICheckersRegistry;
+import org.eclipse.cdt.codan.core.model.ICodanProblemMarker;
import org.eclipse.cdt.codan.core.model.IProblem;
import org.eclipse.cdt.codan.core.model.IProblemProfile;
+import org.eclipse.cdt.codan.internal.core.CheckersRegistry;
import org.eclipse.cdt.codan.internal.core.CodanRunner;
import org.eclipse.cdt.codan.internal.ui.CodanUIActivator;
import org.eclipse.cdt.codan.internal.ui.CodanUIMessages;
import org.eclipse.cdt.codan.internal.ui.dialogs.CustomizeProblemDialog;
+import org.eclipse.cdt.core.dom.ast.IASTTranslationUnit;
+import org.eclipse.cdt.core.model.CoreModelUtil;
+import org.eclipse.cdt.core.model.ILanguage;
+import org.eclipse.cdt.core.model.ITranslationUnit;
+import org.eclipse.cdt.internal.core.model.ASTCache.ASTRunnable;
+import org.eclipse.cdt.internal.corext.util.CModelUtil;
+import org.eclipse.cdt.internal.ui.editor.ASTProvider;
+import org.eclipse.cdt.ui.ICEditor;
+import org.eclipse.core.resources.IContainer;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IMarker;
import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IResourceRuleFactory;
import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.SubMonitor;
+import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.core.runtime.preferences.InstanceScope;
import org.eclipse.jface.dialogs.IDialogSettings;
import org.eclipse.jface.layout.GridDataFactory;
@@ -42,8 +68,13 @@ import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IEditorReference;
import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.IWorkbenchPreferencePage;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.preferences.ScopedPreferenceStore;
/**
@@ -163,7 +194,7 @@ public class CodanPreferencePage extends FieldEditorOverlayPage implements IWork
if (resource == null) {
resource = ResourcesPlugin.getWorkspace().getRoot();
}
- CodanRunner.asynchronouslyRemoveMarkersForDisabledProblems(resource);
+ asynchronouslyUpdateMarkers(resource);
}
return success;
}
@@ -215,4 +246,111 @@ public class CodanPreferencePage extends FieldEditorOverlayPage implements IWork
private boolean hasSelectedProblems() {
return selectedProblems != null && !selectedProblems.isEmpty();
}
+
+ private static void asynchronouslyUpdateMarkers(final IResource resource) {
+ final Set<IFile> filesToUpdate = new HashSet<IFile>();
+ final IWorkbench workbench = PlatformUI.getWorkbench();
+ IWorkbenchWindow active = workbench.getActiveWorkbenchWindow();
+ final IWorkbenchPage page = active.getActivePage();
+ // Get the files open C/C++ editors.
+ for (IEditorReference partRef : page.getEditorReferences()) {
+ IEditorPart editor = partRef.getEditor(false);
+ if (editor instanceof ICEditor) {
+ IFile file = (IFile) editor.getEditorInput().getAdapter(IFile.class);
+ if (file != null && resource.getFullPath().isPrefixOf(file.getFullPath())) {
+ filesToUpdate.add(file);
+ }
+ }
+ }
+
+ Job job = new Job(CodanUIMessages.CodanPreferencePage_Update_markers) {
+ @Override
+ protected IStatus run(IProgressMonitor monitor) {
+ final SubMonitor submonitor = SubMonitor.convert(monitor, 1 + 2 * filesToUpdate.size());
+ removeMarkersForDisabledProblems(resource, submonitor.newChild(1));
+ if (filesToUpdate.isEmpty())
+ return Status.OK_STATUS;
+
+ // Run checkers on the currently open files to update the problem markers.
+ for (final IFile file : filesToUpdate) {
+ ITranslationUnit tu = CoreModelUtil.findTranslationUnit(file);
+ if (tu != null) {
+ tu = CModelUtil.toWorkingCopy(tu);
+ ASTProvider.getASTProvider().runOnAST(
+ tu, ASTProvider.WAIT_ACTIVE_ONLY, submonitor.newChild(1),
+ new ASTRunnable() {
+ @Override
+ public IStatus runOnAST(ILanguage lang, IASTTranslationUnit ast) {
+ if (ast != null) {
+ CodanRunner.runInEditor(ast, file, submonitor.newChild(1));
+ } else {
+ CodanRunner.processResource(file, CheckerLaunchMode.RUN_ON_FILE_OPEN,
+ submonitor.newChild(1));
+ }
+ return Status.OK_STATUS;
+ }
+ });
+ }
+ }
+ return Status.OK_STATUS;
+ }
+ };
+ IResourceRuleFactory ruleFactory = ResourcesPlugin.getWorkspace().getRuleFactory();
+ job.setRule(ruleFactory.markerRule(resource));
+ job.setSystem(true);
+ job.schedule();
+ }
+
+ private static void removeMarkersForDisabledProblems(IResource resource, IProgressMonitor monitor) {
+ CheckersRegistry chegistry = CheckersRegistry.getInstance();
+ Set<String> markerTypes = new HashSet<String>();
+ for (IChecker checker : chegistry) {
+ Collection<IProblem> problems = chegistry.getRefProblems(checker);
+ for (IProblem problem : problems) {
+ markerTypes.add(problem.getMarkerType());
+ }
+ }
+ try {
+ removeMarkersForDisabledProblems(chegistry, markerTypes, resource, monitor);
+ } catch (CoreException e) {
+ CodanUIActivator.log(e);
+ }
+ }
+
+ private static void removeMarkersForDisabledProblems(CheckersRegistry chegistry,
+ Set<String> markerTypes, IResource resource, IProgressMonitor monitor) throws CoreException {
+ if (!resource.isAccessible()) {
+ return;
+ }
+ IResource[] children = null;
+ if (resource instanceof IContainer) {
+ children = ((IContainer) resource).members();
+ }
+ int numChildren = children == null ? 0 : children.length;
+ int childWeight = 10;
+ SubMonitor progress = SubMonitor.convert(monitor, 1 + numChildren * childWeight);
+ IProblemProfile resourceProfile = null;
+ for (String markerType : markerTypes) {
+ IMarker[] markers = resource.findMarkers(markerType, false, IResource.DEPTH_ZERO);
+ for (IMarker marker : markers) {
+ String problemId = (String) marker.getAttribute(ICodanProblemMarker.ID);
+ if (resourceProfile == null) {
+ resourceProfile = chegistry.getResourceProfile(resource);
+ }
+ IProblem problem = resourceProfile.findProblem(problemId);
+ if (problem != null && !problem.isEnabled()) {
+ marker.delete();
+ }
+ }
+ }
+ progress.worked(1);
+ if (children != null) {
+ for (IResource child : children) {
+ if (monitor.isCanceled())
+ return;
+ removeMarkersForDisabledProblems(chegistry, markerTypes, child,
+ progress.newChild(childWeight));
+ }
+ }
+ }
} \ No newline at end of file
diff --git a/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/preferences/FileScopePreferencePage.java b/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/preferences/FileScopePreferencePage.java
index 3e1e5a2830..e07f14c5cd 100644
--- a/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/preferences/FileScopePreferencePage.java
+++ b/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/preferences/FileScopePreferencePage.java
@@ -15,7 +15,6 @@ import java.util.Arrays;
import java.util.List;
import org.eclipse.cdt.codan.core.param.FileScopeProblemPreference;
-import org.eclipse.cdt.codan.internal.ui.CodanUIActivator;
import org.eclipse.cdt.codan.internal.ui.CodanUIMessages;
import org.eclipse.cdt.codan.internal.ui.dialogs.ExclusionInclusionEntryDialog;
import org.eclipse.cdt.codan.internal.ui.widgets.BasicElementLabels;
@@ -33,7 +32,6 @@ import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.Path;
import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.jface.preference.PreferencePage;
-import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.viewers.LabelProvider;
import org.eclipse.jface.viewers.ViewerComparator;
import org.eclipse.jface.window.Window;
@@ -43,7 +41,6 @@ import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Shell;
public class FileScopePreferencePage extends PreferencePage {
private ListDialogField<String> fInclusionPatternList;
@@ -106,18 +103,13 @@ public class FileScopePreferencePage extends PreferencePage {
}
private static class ExclusionInclusionLabelProvider extends LabelProvider {
- private Image fElementImage;
public ExclusionInclusionLabelProvider(String descriptorPath) {
- if (descriptorPath != null) {
- ImageDescriptor d = CodanUIActivator.getImageDescriptor(descriptorPath);
- }
- fElementImage = null; // XXX
}
@Override
public Image getImage(Object element) {
- return fElementImage;
+ return null;
}
@Override
@@ -126,10 +118,11 @@ public class FileScopePreferencePage extends PreferencePage {
}
}
- private ListDialogField<String> createListContents(FileScopeProblemPreference entryToEdit, String key, String label, String descriptor,
- String[] buttonLabels) {
+ private ListDialogField<String> createListContents(FileScopeProblemPreference entryToEdit,
+ String key, String label, String descriptor, String[] buttonLabels) {
ExclusionPatternAdapter adapter = new ExclusionPatternAdapter();
- ListDialogField<String> patternList = new ListDialogField<String>(adapter, buttonLabels, new ExclusionInclusionLabelProvider(descriptor));
+ ListDialogField<String> patternList =
+ new ListDialogField<String>(adapter, buttonLabels, new ExclusionInclusionLabelProvider(descriptor));
patternList.setDialogFieldListener(adapter);
patternList.setLabelText(label);
patternList.enableButton(IDX_EDIT, false);
@@ -265,12 +258,6 @@ public class FileScopePreferencePage extends PreferencePage {
return getPattern(fInclusionPatternList);
}
- /*
- * @see org.eclipse.jface.window.Window#configureShell(Shell)
- */
- protected void configureShell(Shell newShell) {
- }
-
private void addMultipleEntries(ListDialogField<String> field) {
String title, message;
if (isExclusion(field)) {
@@ -280,7 +267,8 @@ public class FileScopePreferencePage extends PreferencePage {
title = CodanUIMessages.ExclusionInclusionDialog_ChooseInclusionPattern_title;
message = CodanUIMessages.ExclusionInclusionDialog_ChooseInclusionPattern_description;
}
- IPath[] res = ExclusionInclusionEntryDialog.chooseExclusionPattern(getShell(), fCurrSourceFolder, title, message, null, true);
+ IPath[] res = ExclusionInclusionEntryDialog.chooseExclusionPattern(getShell(),
+ fCurrSourceFolder, title, message, null, true);
if (res != null) {
for (int i = 0; i < res.length; i++) {
field.addElement(res[i].toString());

Back to the top