mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-26 10:25:32 +02:00
Cosmetics.
This commit is contained in:
parent
db44d771bb
commit
2c7f55ae19
1 changed files with 7 additions and 9 deletions
|
@ -47,7 +47,6 @@ public final class ASTProvider {
|
||||||
* Wait flag.
|
* Wait flag.
|
||||||
*/
|
*/
|
||||||
public static final class WAIT_FLAG {
|
public static final class WAIT_FLAG {
|
||||||
|
|
||||||
String fName;
|
String fName;
|
||||||
|
|
||||||
private WAIT_FLAG(String name) {
|
private WAIT_FLAG(String name) {
|
||||||
|
@ -97,7 +96,7 @@ public final class ASTProvider {
|
||||||
public static int PARSE_MODE_FULL= 0;
|
public static int PARSE_MODE_FULL= 0;
|
||||||
/** Fast parse mode (use PDOM) */
|
/** Fast parse mode (use PDOM) */
|
||||||
public static int PARSE_MODE_FAST= ITranslationUnit.AST_SKIP_INDEXED_HEADERS;
|
public static int PARSE_MODE_FAST= ITranslationUnit.AST_SKIP_INDEXED_HEADERS;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Internal activation listener.
|
* Internal activation listener.
|
||||||
*/
|
*/
|
||||||
|
@ -209,7 +208,6 @@ public final class ASTProvider {
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
String id= ref.getId();
|
String id= ref.getId();
|
||||||
|
|
||||||
return CUIPlugin.EDITOR_ID.equals(id) || ref.getPart(false) instanceof CEditor;
|
return CUIPlugin.EDITOR_ID.equals(id) || ref.getPart(false) instanceof CEditor;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -227,7 +225,7 @@ public final class ASTProvider {
|
||||||
public static ASTProvider getASTProvider() {
|
public static ASTProvider getASTProvider() {
|
||||||
return CUIPlugin.getDefault().getASTProvider();
|
return CUIPlugin.getDefault().getASTProvider();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a new AST provider.
|
* Creates a new AST provider.
|
||||||
*/
|
*/
|
||||||
|
@ -243,7 +241,7 @@ public final class ASTProvider {
|
||||||
// Create and register activation listener
|
// Create and register activation listener
|
||||||
fActivationListener= new ActivationListener();
|
fActivationListener= new ActivationListener();
|
||||||
PlatformUI.getWorkbench().addWindowListener(fActivationListener);
|
PlatformUI.getWorkbench().addWindowListener(fActivationListener);
|
||||||
|
|
||||||
// Ensure existing windows get connected
|
// Ensure existing windows get connected
|
||||||
IWorkbenchWindow[] windows= PlatformUI.getWorkbench().getWorkbenchWindows();
|
IWorkbenchWindow[] windows= PlatformUI.getWorkbench().getWorkbenchWindows();
|
||||||
for (int i= 0, length= windows.length; i < length; i++)
|
for (int i= 0, length= windows.length; i < length; i++)
|
||||||
|
@ -254,12 +252,12 @@ public final class ASTProvider {
|
||||||
private void activeEditorChanged(IWorkbenchPart editor) {
|
private void activeEditorChanged(IWorkbenchPart editor) {
|
||||||
ICElement cElement= null;
|
ICElement cElement= null;
|
||||||
if (editor instanceof CEditor) {
|
if (editor instanceof CEditor) {
|
||||||
cElement= ((CEditor)editor).getInputCElement();
|
cElement= ((CEditor) editor).getInputCElement();
|
||||||
}
|
}
|
||||||
synchronized (this) {
|
synchronized (this) {
|
||||||
fActiveEditor= editor;
|
fActiveEditor= editor;
|
||||||
fTimeStamp= IDocumentExtension4.UNKNOWN_MODIFICATION_STAMP;
|
fTimeStamp= IDocumentExtension4.UNKNOWN_MODIFICATION_STAMP;
|
||||||
fCache.setActiveElement((ITranslationUnit)cElement);
|
fCache.setActiveElement((ITranslationUnit) cElement);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -273,7 +271,7 @@ public final class ASTProvider {
|
||||||
if (cElement == null)
|
if (cElement == null)
|
||||||
return;
|
return;
|
||||||
Assert.isTrue(cElement instanceof ITranslationUnit);
|
Assert.isTrue(cElement instanceof ITranslationUnit);
|
||||||
fCache.aboutToBeReconciled((ITranslationUnit)cElement);
|
fCache.aboutToBeReconciled((ITranslationUnit) cElement);
|
||||||
updateModificationStamp();
|
updateModificationStamp();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -333,7 +331,7 @@ public final class ASTProvider {
|
||||||
final ITranslationUnit tu = (ITranslationUnit) cElement;
|
final ITranslationUnit tu = (ITranslationUnit) cElement;
|
||||||
if (!tu.isOpen())
|
if (!tu.isOpen())
|
||||||
return Status.CANCEL_STATUS;
|
return Status.CANCEL_STATUS;
|
||||||
|
|
||||||
final boolean isActive= fCache.isActiveElement(tu);
|
final boolean isActive= fCache.isActiveElement(tu);
|
||||||
if (waitFlag == WAIT_ACTIVE_ONLY && !isActive) {
|
if (waitFlag == WAIT_ACTIVE_ONLY && !isActive) {
|
||||||
return Status.CANCEL_STATUS;
|
return Status.CANCEL_STATUS;
|
||||||
|
|
Loading…
Add table
Reference in a new issue