mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Cosmetics.
This commit is contained in:
parent
f0ded0383c
commit
df89c8daab
4 changed files with 14 additions and 19 deletions
|
@ -38,7 +38,6 @@ import org.eclipse.core.runtime.IProgressMonitor;
|
|||
* @noextend This interface is not intended to be extended by clients.
|
||||
*/
|
||||
public interface ITranslationUnit extends ICElement, IParent, IOpenable, ISourceReference, ISourceManipulation {
|
||||
|
||||
/**
|
||||
* Style constant for {@link #getAST(IIndex, int)}.
|
||||
* Meaning: Skip function and method bodies.
|
||||
|
@ -140,8 +139,7 @@ public interface ITranslationUnit extends ICElement, IParent, IOpenable, ISource
|
|||
IInclude createInclude(String name, boolean isStd, ICElement sibling, IProgressMonitor monitor) throws CModelException;
|
||||
|
||||
/**
|
||||
* Creates and returns a using declaration/directive in this translation unit
|
||||
*
|
||||
* Creates and returns a using declaration/directive in this translation unit.
|
||||
*
|
||||
* @param name the name of the using
|
||||
* @param monitor the progress monitor to notify
|
||||
|
|
|
@ -495,7 +495,7 @@ public class Scribe {
|
|||
|
||||
public String getNewLine() {
|
||||
if (lastNumberOfNewLines >= 1) {
|
||||
column= 1; // ensure that the scribe is at the beginning of a new line
|
||||
column= 1; // Ensure that the scribe is at the beginning of a new line
|
||||
return EMPTY_STRING;
|
||||
}
|
||||
line++;
|
||||
|
|
|
@ -146,7 +146,8 @@ public abstract class CPreview {
|
|||
|
||||
// update the tab size
|
||||
final int tabSize= getPositiveIntValue(fWorkingValues.get(DefaultCodeFormatterConstants.FORMATTER_TAB_SIZE), 0);
|
||||
if (tabSize != fTabSize) fSourceViewer.getTextWidget().setTabs(tabSize);
|
||||
if (tabSize != fTabSize)
|
||||
fSourceViewer.getTextWidget().setTabs(tabSize);
|
||||
fTabSize= tabSize;
|
||||
|
||||
final StyledText widget= (StyledText) fSourceViewer.getControl();
|
||||
|
|
|
@ -33,8 +33,6 @@ import org.eclipse.cdt.internal.corext.util.CodeFormatterUtil;
|
|||
* @author AChapiro
|
||||
*/
|
||||
public class CFormattingStrategy extends ContextBasedFormattingStrategy {
|
||||
|
||||
|
||||
/** Documents to be formatted by this strategy */
|
||||
private final LinkedList<IDocument> fDocuments= new LinkedList<IDocument>();
|
||||
/** Partitions to be formatted by this strategy */
|
||||
|
@ -69,13 +67,12 @@ public class CFormattingStrategy extends ContextBasedFormattingStrategy {
|
|||
|
||||
if (edit != null)
|
||||
edit.apply(document);
|
||||
|
||||
} catch (MalformedTreeException exception) {
|
||||
CUIPlugin.log(exception);
|
||||
} catch (BadLocationException exception) {
|
||||
} catch (MalformedTreeException e) {
|
||||
CUIPlugin.log(e);
|
||||
} catch (BadLocationException e) {
|
||||
// Can only happen on concurrent document modification - log and
|
||||
// bail out
|
||||
CUIPlugin.log(exception);
|
||||
CUIPlugin.log(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -107,5 +104,4 @@ public class CFormattingStrategy extends ContextBasedFormattingStrategy {
|
|||
fPartitions.clear();
|
||||
fDocuments.clear();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue