mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Cosmetics.
This commit is contained in:
parent
376f1cb9c1
commit
8a89295bbd
2 changed files with 2 additions and 7 deletions
|
@ -45,7 +45,6 @@ public abstract class StructureSelectionAction extends TextEditorAction {
|
||||||
}
|
}
|
||||||
|
|
||||||
private final class ExpandSelectionJob extends SharedASTJob {
|
private final class ExpandSelectionJob extends SharedASTJob {
|
||||||
|
|
||||||
public ISourceRange newSourceRange;
|
public ISourceRange newSourceRange;
|
||||||
private SourceRange currentSourceRange;
|
private SourceRange currentSourceRange;
|
||||||
|
|
||||||
|
@ -69,7 +68,6 @@ public abstract class StructureSelectionAction extends TextEditorAction {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
|
|
||||||
IEditorPart editorPart = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor();
|
IEditorPart editorPart = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor();
|
||||||
if (!(editorPart instanceof CEditor)) {
|
if (!(editorPart instanceof CEditor)) {
|
||||||
return;
|
return;
|
||||||
|
@ -108,13 +106,11 @@ public abstract class StructureSelectionAction extends TextEditorAction {
|
||||||
|
|
||||||
protected boolean nodeContains(IASTNode node, int position) {
|
protected boolean nodeContains(IASTNode node, int position) {
|
||||||
IASTFileLocation fl = node.getFileLocation();
|
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) {
|
protected boolean samePosition(IASTNode node, SourceRange current) {
|
||||||
IASTFileLocation fl = node.getFileLocation();
|
IASTFileLocation fl = node.getFileLocation();
|
||||||
return (fl.getNodeOffset() == current.getStartPos() && fl.getNodeLength() == current.getLength());
|
return fl.getNodeOffset() == current.getStartPos() && fl.getNodeLength() == current.getLength();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -62,7 +62,6 @@ public abstract class SharedASTJob extends Job {
|
||||||
*/
|
*/
|
||||||
public abstract IStatus runOnAST(ILanguage lang, IASTTranslationUnit ast) throws CoreException;
|
public abstract IStatus runOnAST(ILanguage lang, IASTTranslationUnit ast) throws CoreException;
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected final IStatus run(IProgressMonitor monitor) {
|
protected final IStatus run(IProgressMonitor monitor) {
|
||||||
ASTProvider provider = CUIPlugin.getDefault().getASTProvider();
|
ASTProvider provider = CUIPlugin.getDefault().getASTProvider();
|
||||||
|
|
Loading…
Add table
Reference in a new issue