1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

Cosmetics.

This commit is contained in:
Sergey Prigogin 2011-03-27 04:43:53 +00:00
parent f0ded0383c
commit df89c8daab
4 changed files with 14 additions and 19 deletions

View file

@ -38,7 +38,6 @@ import org.eclipse.core.runtime.IProgressMonitor;
* @noextend This interface is not intended to be extended by clients. * @noextend This interface is not intended to be extended by clients.
*/ */
public interface ITranslationUnit extends ICElement, IParent, IOpenable, ISourceReference, ISourceManipulation { public interface ITranslationUnit extends ICElement, IParent, IOpenable, ISourceReference, ISourceManipulation {
/** /**
* Style constant for {@link #getAST(IIndex, int)}. * Style constant for {@link #getAST(IIndex, int)}.
* Meaning: Skip function and method bodies. * 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; 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 name the name of the using
* @param monitor the progress monitor to notify * @param monitor the progress monitor to notify

View file

@ -495,7 +495,7 @@ public class Scribe {
public String getNewLine() { public String getNewLine() {
if (lastNumberOfNewLines >= 1) { 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; return EMPTY_STRING;
} }
line++; line++;

View file

@ -146,7 +146,8 @@ public abstract class CPreview {
// update the tab size // update the tab size
final int tabSize= getPositiveIntValue(fWorkingValues.get(DefaultCodeFormatterConstants.FORMATTER_TAB_SIZE), 0); 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; fTabSize= tabSize;
final StyledText widget= (StyledText) fSourceViewer.getControl(); final StyledText widget= (StyledText) fSourceViewer.getControl();

View file

@ -33,8 +33,6 @@ import org.eclipse.cdt.internal.corext.util.CodeFormatterUtil;
* @author AChapiro * @author AChapiro
*/ */
public class CFormattingStrategy extends ContextBasedFormattingStrategy { public class CFormattingStrategy extends ContextBasedFormattingStrategy {
/** Documents to be formatted by this strategy */ /** Documents to be formatted by this strategy */
private final LinkedList<IDocument> fDocuments= new LinkedList<IDocument>(); private final LinkedList<IDocument> fDocuments= new LinkedList<IDocument>();
/** Partitions to be formatted by this strategy */ /** Partitions to be formatted by this strategy */
@ -69,13 +67,12 @@ public class CFormattingStrategy extends ContextBasedFormattingStrategy {
if (edit != null) if (edit != null)
edit.apply(document); edit.apply(document);
} catch (MalformedTreeException e) {
} catch (MalformedTreeException exception) { CUIPlugin.log(e);
CUIPlugin.log(exception); } catch (BadLocationException e) {
} catch (BadLocationException exception) {
// Can only happen on concurrent document modification - log and // Can only happen on concurrent document modification - log and
// bail out // bail out
CUIPlugin.log(exception); CUIPlugin.log(e);
} }
} }
} }
@ -107,5 +104,4 @@ public class CFormattingStrategy extends ContextBasedFormattingStrategy {
fPartitions.clear(); fPartitions.clear();
fDocuments.clear(); fDocuments.clear();
} }
} }