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 2010-08-21 19:42:25 +00:00
parent 376f1cb9c1
commit 8a89295bbd
2 changed files with 2 additions and 7 deletions

View file

@ -45,7 +45,6 @@ public abstract class StructureSelectionAction extends TextEditorAction {
}
private final class ExpandSelectionJob extends SharedASTJob {
public ISourceRange newSourceRange;
private SourceRange currentSourceRange;
@ -69,7 +68,6 @@ public abstract class StructureSelectionAction extends TextEditorAction {
@Override
public void run() {
IEditorPart editorPart = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor();
if (!(editorPart instanceof CEditor)) {
return;
@ -108,13 +106,11 @@ public abstract class StructureSelectionAction extends TextEditorAction {
protected boolean nodeContains(IASTNode node, int position) {
IASTFileLocation fl = node.getFileLocation();
return (position >= fl.getNodeOffset() && position <= fl.getNodeOffset() + fl.getNodeLength());
return position >= fl.getNodeOffset() && position <= fl.getNodeOffset() + fl.getNodeLength();
}
protected boolean samePosition(IASTNode node, SourceRange current) {
IASTFileLocation fl = node.getFileLocation();
return (fl.getNodeOffset() == current.getStartPos() && fl.getNodeLength() == current.getLength());
return fl.getNodeOffset() == current.getStartPos() && fl.getNodeLength() == current.getLength();
}
}

View file

@ -62,7 +62,6 @@ public abstract class SharedASTJob extends Job {
*/
public abstract IStatus runOnAST(ILanguage lang, IASTTranslationUnit ast) throws CoreException;
@Override
protected final IStatus run(IProgressMonitor monitor) {
ASTProvider provider = CUIPlugin.getDefault().getASTProvider();