1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-06-07 01:36:01 +02:00

Cosmetics.

This commit is contained in:
Sergey Prigogin 2014-07-29 14:13:23 -07:00
parent 49d1763a80
commit 6a94e17ca7
2 changed files with 13 additions and 10 deletions

View file

@ -28,10 +28,10 @@ import org.eclipse.jface.text.TextSelection;
/** /**
* @author Guido Zgraggen IFS * @author Guido Zgraggen IFS
*/ */
public abstract class RewriteBaseTest extends BaseTestFramework implements ILogListener{ public abstract class RewriteBaseTest extends BaseTestFramework implements ILogListener {
protected static final NullProgressMonitor NULL_PROGRESS_MONITOR = new NullProgressMonitor(); protected static final NullProgressMonitor NULL_PROGRESS_MONITOR = new NullProgressMonitor();
protected TreeMap<String, TestSourceFile> fileMap = new TreeMap<String, TestSourceFile>(); protected TreeMap<String, TestSourceFile> fileMap = new TreeMap<>();
protected String fileWithSelection; protected String fileWithSelection;
protected TextSelection selection; protected TextSelection selection;
@ -103,7 +103,7 @@ public abstract class RewriteBaseTest extends BaseTestFramework implements ILogL
stackTrace.append(ste.toString()); stackTrace.append(ste.toString());
} }
} }
fail("Log-Message: " + status.getMessage() + stackTrace.toString()); //$NON-NLS-1$ fail("Log-Message: " + status.getMessage() + stackTrace.toString());
} }
public void setFileWithSelection(String fileWithSelection) { public void setFileWithSelection(String fileWithSelection) {

View file

@ -41,6 +41,7 @@ public abstract class InternalFileContentProvider extends IncludeFileContentProv
public static final class DependsOnOutdatedFileException extends Exception { public static final class DependsOnOutdatedFileException extends Exception {
public final Object fTu; public final Object fTu;
public final IIndexFragmentFile fIndexFile; public final IIndexFragmentFile fIndexFile;
public DependsOnOutdatedFileException(Object tu, IIndexFragmentFile file) { public DependsOnOutdatedFileException(Object tu, IIndexFragmentFile file) {
fTu= tu; fTu= tu;
fIndexFile= file; fIndexFile= file;
@ -48,8 +49,8 @@ public abstract class InternalFileContentProvider extends IncludeFileContentProv
} }
private IIncludeFileResolutionHeuristics fIncludeResolutionHeuristics; private IIncludeFileResolutionHeuristics fIncludeResolutionHeuristics;
private final Map<String, IFileNomination> fPragmaOnce= new HashMap<String, IFileNomination>(); private final Map<String, IFileNomination> fPragmaOnce= new HashMap<>();
private final Map<String, List<ISignificantMacros>> fLoadedVersions= new HashMap<String, List<ISignificantMacros>>(); private final Map<String, List<ISignificantMacros>> fLoadedVersions= new HashMap<>();
/** /**
* Checks whether the specified inclusion exists. * Checks whether the specified inclusion exists.
@ -69,9 +70,10 @@ public abstract class InternalFileContentProvider extends IncludeFileContentProv
/** /**
* Creates an InclusionContent object for the given location. * Creates an InclusionContent object for the given location.
*
* @param filePath the absolute location of the file. * @param filePath the absolute location of the file.
* @param macroDictionary macros defined at the inclusion point. * @param macroDictionary macros defined at the inclusion point.
* @return Returns an inclusion content, or <code>null</code> if the location does not exist. * @return Returns an inclusion content, or {@code null} if the location does not exist.
* @see InternalFileContent * @see InternalFileContent
*/ */
public abstract InternalFileContent getContentForInclusion(String filePath, public abstract InternalFileContent getContentForInclusion(String filePath,
@ -85,7 +87,8 @@ public abstract class InternalFileContentProvider extends IncludeFileContentProv
/** /**
* Returns a file-content object of kind {@link InclusionKind#FOUND_IN_INDEX}, representing * Returns a file-content object of kind {@link InclusionKind#FOUND_IN_INDEX}, representing
* the content from the context of the given file up to where the file actually gets included, * the content from the context of the given file up to where the file actually gets included,
* or <code>null</code> if this cannot be done. * or {@code null} if this cannot be done.
*
* @param filePath the absolute location of the file. * @param filePath the absolute location of the file.
* @param macroDictionary macros defined at the inclusion point. * @param macroDictionary macros defined at the inclusion point.
* @throws DependsOnOutdatedFileException * @throws DependsOnOutdatedFileException
@ -117,7 +120,7 @@ public abstract class InternalFileContentProvider extends IncludeFileContentProv
} }
/** /**
* Returns a strategy for heuristically resolving includes, or <code>null</code> if this shall * Returns a strategy for heuristically resolving includes, or {@code null} if this shall
* not be done. * not be done.
*/ */
public final IIncludeFileResolutionHeuristics getIncludeHeuristics() { public final IIncludeFileResolutionHeuristics getIncludeHeuristics() {
@ -140,7 +143,7 @@ public abstract class InternalFileContentProvider extends IncludeFileContentProv
} else if (!list.contains(sig)) { } else if (!list.contains(sig)) {
if (list.size() == 1) { if (list.size() == 1) {
ISignificantMacros first = list.get(0); ISignificantMacros first = list.get(0);
list= new ArrayList<ISignificantMacros>(2); list= new ArrayList<>(2);
list.add(first); list.add(first);
fLoadedVersions.put(path, list); fLoadedVersions.put(path, list);
} else if (reduceVersions > 0 && reduceVersions < list.size()) { } else if (reduceVersions > 0 && reduceVersions < list.size()) {
@ -151,7 +154,7 @@ public abstract class InternalFileContentProvider extends IncludeFileContentProv
} }
/** /**
* Return the path of the context of <code>null</code>, if there is no context. * Returns the path of the context of {@code null}, if there is no context.
*/ */
public String getContextPath() { public String getContextPath() {
return null; return null;