mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-03 14:25:37 +02:00
Tentative fix for PR 57128
This commit is contained in:
parent
024eca4958
commit
e03a6c0446
7 changed files with 61 additions and 6 deletions
|
@ -1,3 +1,17 @@
|
|||
2004-04-05 Alain Magloire
|
||||
|
||||
Changing the sequence when we shutdown, this will
|
||||
help in PR #57128
|
||||
In BaseCElementContentProvider do not call
|
||||
BinaryContainer.getBinaries() directly it is a blocking
|
||||
operation.
|
||||
|
||||
* src/org/eclipse/cdt/ui/CUIPlugin.java
|
||||
* browser/org/eclipse/cdt/ui/browser/typeinfo/AllTypesCache.java
|
||||
* src/org/eclipse/cdt/internal/ui/BaseCElementCElementContentProvider.java
|
||||
* src/org/eclipse/cdt/internal/ui/CElementImageProvider.java
|
||||
* src/org/eclipse/cdt/internal/ui/CPluginImages.java
|
||||
|
||||
2004-04-05 Hoda Amer
|
||||
Fix for bug#44378 : Content Assist: easy keyboard exit of argument-providing mode
|
||||
Fix for bug#56614 : [Content Assist] Global variables do not appear in a global completion list.
|
||||
|
|
|
@ -164,6 +164,10 @@ public class AllTypesCache {
|
|||
TypeSearchResultCollector collector= new TypeSearchResultCollector(subMonitor);
|
||||
|
||||
IWorkspace workspace= CCorePlugin.getWorkspace();
|
||||
if (workspace == null) {
|
||||
return Status.CANCEL_STATUS;
|
||||
}
|
||||
|
||||
ICSearchScope scope= SearchEngine.createWorkspaceScope();
|
||||
SearchEngine engine= new SearchEngine();
|
||||
|
||||
|
@ -171,6 +175,8 @@ public class AllTypesCache {
|
|||
try {
|
||||
flushCache();
|
||||
// start the search engine
|
||||
if (progressMonitor.isCanceled())
|
||||
throw new InterruptedException();
|
||||
engine.search(workspace, pattern, scope, collector, true);
|
||||
if (progressMonitor.isCanceled())
|
||||
throw new InterruptedException();
|
||||
|
|
BIN
core/org.eclipse.cdt.ui/icons/full/obj16/hfolder_obj.gif
Normal file
BIN
core/org.eclipse.cdt.ui/icons/full/obj16/hfolder_obj.gif
Normal file
Binary file not shown.
After Width: | Height: | Size: 171 B |
|
@ -186,8 +186,8 @@ public class BaseCElementContentProvider implements ITreeContentProvider {
|
|||
|
||||
if (element instanceof IBinaryContainer) {
|
||||
IBinaryContainer cont = (IBinaryContainer)element;
|
||||
IBinary[] bin = cont.getBinaries();
|
||||
return (bin != null) && bin.length > 0;
|
||||
IBinary[] bins = getExecutables(cont);
|
||||
return (bins != null) && bins.length > 0;
|
||||
}
|
||||
|
||||
if (element instanceof IParent) {
|
||||
|
@ -329,8 +329,8 @@ public class BaseCElementContentProvider implements ITreeContentProvider {
|
|||
}
|
||||
|
||||
private Object[] filterNonCResources(Object[] objects, ICProject cproject) {
|
||||
ICElement[] binaries = cproject.getBinaryContainer().getChildren();
|
||||
ICElement[] archives = cproject.getArchiveContainer().getChildren();
|
||||
ICElement[] binaries = getExecutables(cproject);
|
||||
ICElement[] archives = getArchives(cproject);
|
||||
ISourceRoot[] roots = null;
|
||||
try {
|
||||
roots = cproject.getSourceRoots();
|
||||
|
@ -406,6 +406,35 @@ public class BaseCElementContentProvider implements ITreeContentProvider {
|
|||
return true;
|
||||
}
|
||||
|
||||
protected IBinary[] getExecutables(ICProject cproject) {
|
||||
IBinaryContainer container = cproject.getBinaryContainer();
|
||||
return getExecutables(container);
|
||||
}
|
||||
|
||||
protected IBinary[] getExecutables(IBinaryContainer container) {
|
||||
ICElement[] celements = container.getChildren();
|
||||
ArrayList list = new ArrayList(celements.length);
|
||||
for (int i = 0; i < celements.length; i++) {
|
||||
if (celements[i] instanceof IBinary) {
|
||||
IBinary bin = (IBinary)celements[i];
|
||||
if (bin.isExecutable()) {
|
||||
list.add(bin);
|
||||
}
|
||||
}
|
||||
}
|
||||
IBinary[] bins = new IBinary[list.size()];
|
||||
list.toArray(bins);
|
||||
return bins;
|
||||
}
|
||||
|
||||
protected IArchive[] getArchives(ICProject cproject) {
|
||||
IArchiveContainer container = cproject.getArchiveContainer();
|
||||
return getArchives(container);
|
||||
}
|
||||
|
||||
protected IArchive[] getArchives(IArchiveContainer container) {
|
||||
return container.getArchives();
|
||||
}
|
||||
|
||||
/**
|
||||
* Note: This method is for internal use only. Clients should not call this method.
|
||||
|
|
|
@ -13,6 +13,7 @@ import org.eclipse.cdt.core.model.ICProject;
|
|||
import org.eclipse.cdt.core.model.IDeclaration;
|
||||
import org.eclipse.cdt.core.model.IField;
|
||||
import org.eclipse.cdt.core.model.ILibraryReference;
|
||||
import org.eclipse.cdt.core.model.IIncludeReference;
|
||||
import org.eclipse.cdt.core.model.IMethodDeclaration;
|
||||
import org.eclipse.cdt.core.model.ISourceRoot;
|
||||
import org.eclipse.cdt.core.model.ITemplate;
|
||||
|
@ -256,6 +257,8 @@ public class CElementImageProvider {
|
|||
return CPluginImages.DESC_OBJS_BINARY;
|
||||
} else if (celement instanceof ILibraryReference) {
|
||||
return CPluginImages.DESC_OBJS_LIBRARY;
|
||||
} else if (celement instanceof IIncludeReference) {
|
||||
return CPluginImages.DESC_OBJS_INCLUDES_FOLDER;
|
||||
}
|
||||
return CPluginImages.DESC_OBJS_CONTAINER;
|
||||
|
||||
|
|
|
@ -80,6 +80,7 @@ public class CPluginImages {
|
|||
public static final String IMG_OBJS_OUTPUT_FOLDER= NAME_PREFIX + "output_folder_obj.gif"; //$NON-NLS-1$
|
||||
public static final String IMG_OBJS_LIBRARY= NAME_PREFIX + "lib_obj.gif"; //$NON-NLS-1$
|
||||
public static final String IMG_OBJS_INCLUDES_CONTAINER = NAME_PREFIX + "includes_container.gif"; //$NON-NLS-1$
|
||||
public static final String IMG_OBJS_INCLUDES_FOLDER = NAME_PREFIX + "hfolder_obj.gif"; //$NON-NLS-1$
|
||||
public static final String IMG_OBJS_ORDER= NAME_PREFIX + "cp_order_obj.gif"; //$NON-NLS-1$
|
||||
public static final String IMG_OBJS_EXCLUDSION_FILTER_ATTRIB= NAME_PREFIX + "exclusion_filter_attrib.gif"; //$NON-NLS-1$
|
||||
|
||||
|
@ -130,6 +131,7 @@ public class CPluginImages {
|
|||
public static final ImageDescriptor DESC_OBJS_OUTPUT_FOLDER= createManaged(T_OBJ, IMG_OBJS_OUTPUT_FOLDER);
|
||||
public static final ImageDescriptor DESC_OBJS_LIBRARY= createManaged(T_OBJ, IMG_OBJS_LIBRARY);
|
||||
public static final ImageDescriptor DESC_OBJS_INCLUDES_CONTAINER= createManaged(T_OBJ, IMG_OBJS_INCLUDES_CONTAINER);
|
||||
public static final ImageDescriptor DESC_OBJS_INCLUDES_FOLDER= createManaged(T_OBJ, IMG_OBJS_INCLUDES_FOLDER);
|
||||
public static final ImageDescriptor DESC_OBJS_ORDER= createManaged(T_OBJ, IMG_OBJS_ORDER);
|
||||
public static final ImageDescriptor DESC_OBJS_EXCLUSION_FILTER_ATTRIB = createManaged(T_OBJ, IMG_OBJS_EXCLUDSION_FILTER_ATTRIB);
|
||||
|
||||
|
|
|
@ -299,8 +299,6 @@ public class CUIPlugin extends AbstractUIPlugin {
|
|||
|
||||
unregisterAdapters();
|
||||
|
||||
super.shutdown();
|
||||
|
||||
if (fWorkingCopyManager != null) {
|
||||
fWorkingCopyManager.shutdown();
|
||||
fWorkingCopyManager= null;
|
||||
|
@ -311,6 +309,9 @@ public class CUIPlugin extends AbstractUIPlugin {
|
|||
fDocumentProvider= null;
|
||||
}
|
||||
Refactoring.getUndoManager().shutdown();
|
||||
|
||||
// Do this last.
|
||||
super.shutdown();
|
||||
}
|
||||
|
||||
private void runUI(Runnable run) {
|
||||
|
|
Loading…
Add table
Reference in a new issue